Staubli SIO: Configuring TCP/IP Position Transfer Guide

Jason IP2 min read
Other ManufacturerRoboticsTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

What the Program Actually Sends

pRecupPosition is an in-program point value produced by jointToPoint(flange,world,jPosition). The code does not send that point object directly. It copies the Cartesian transform and six joint values into nCurrentPositionArray, converts 12 elements to binary with toBinary, and passes the resulting nBinaryPositionArray to sioSet(sClient,...).

Array indexes Values
0-5 x, y, z, rx, ry, rz
6-11 j1 through j6

Trace the SIO Data Path

jPosition
  -> jointToPoint(flange, world, jPosition)
  -> pRecupPosition
  -> nCurrentPositionArray[0..11]
  -> toBinary(..., 12, "8.0b", nBinaryPositionArray)
  -> sioSet(sClient, nBinaryPositionArray)
  -> sClient buffer
  -> external socket server

To inspect pRecupPosition inside the robot program, monitor that program variable. To obtain the transmitted data over TCP/IP, read the buffer associated with sClient from a socket server and decode it using the same field order and binary representation. The evidence does not define the byte order or provide the receiving-side decoder, so verify both before interpreting the received bytes.

Configure the Socket Before Running the Program

Transferring only the program is insufficient because the code references an existing socket named sClient but does not create it. Configure the socket directly on the controller, or configure it in SRS and transfer sio.cfx to the controller.

  1. Create the socket configuration for sClient on the controller or in SRS.
  2. If using SRS, transfer sio.cfx to the controller along with the robot program.
  3. Start a socket server capable of accessing and reading the sClient buffer.
  4. Run the motion program and confirm that the server receives the binary position payload after the latch succeeds.

Verify the Transfer

The send path executes only when watch(getLatch(jPosition)==true,5) makes bLatch true. Verify that condition first, then compare the 12 decoded receiver values with the monitored nCurrentPositionArray. A program that reaches end without an error proves only that execution completed; it does not by itself prove that a server read or correctly decoded the socket buffer.

FAQ

Where is pRecupPosition stored on a Staubli CS9?

It is a program variable populated by jointToPoint(flange,world,jPosition). The transmitted buffer contains its six transform fields plus the six fields from jPosition, not the point object itself.

Is transferring the robot program enough to use sClient?

No. Create the socket on the controller or configure it in SRS and transfer sio.cfx to the controller.

How do I read the position data sent by sioSet?

Use a socket server to read the sClient buffer, then decode the binary payload in array order: six transform values followed by j1 through j6.

Back to blog