TCP/IP interface#
When powered on, the robot acts as a TCP Server to listen for connections between ports 2000 and 2001. Port 2000 can receive control commands for the robot and return status. Port 2001 sends external information about the current status of the robot at a frequency of 10Hz.
Port 2000#
Port 2000 adopts a request-response response mechanism and can accept system commands. The communication protocol between the Client and Server is as follows:
Received instruction |
Returned value |
Instructions |
---|---|---|
run(program name) or run(program name,percent speed) |
Feedback at start: run start Feedback of run fail: |
The robot will run the corresponding program. If the speed percentage is not set or the speed percentage parameter is invalid, the robot runs at the current speed. |
speed(Percentage of speed) |
Execution success Feedback: set success Feedback on execution failure : set fail |
can change the percentage of program running speed. The parameter range is (0,100). If the modification succeeds, set success is displayed. If the modification fails, set fail is displayed |
stop |
Execution success Feedback: stop success Execution failure feedback : stop fail |
The robot will stop the currently executed command. A stop success receipt will be sent after stopping. If the robot is not running, it will send a stop fail receipt after receiving the stop command |
pause |
pause success is displayed Feedback on execution failure : pause fail |
pause fail The robot will pause the current command. A pause success receipt is sent when stopped. If the robot is not running, it sends a pause fail receipt after receiving the pause command. |
resume |
resume success If the execution fails, resume fail |
The robot will continue to run the program when paused. A resume success receipt is sent at runtime. If the robot is not in the paused state, it sends a resume fail receipt after receiving the resume command |
poweron |
Execution success feedback: poweron success Execution failure feedback: poweron fail |
Power on the robot. If the robot is successfully powered on, establish a communication link and return poweron success If this fails, poweron fail is displayed. If the system is powered on, already poweron is displayed |
poweroff |
Execution success feedback: poweroff success Execution failure feedback: poweroff fail |
The robot is powered off. If the robot is powered off successfully, the poweroff success message is displayed. already poweroff If this fails, poweroff fail is displayed. If the system is powered off, already poweroff is displayed |
enable |
success feedback: enable success Execution failure feedback : enable fail |
The function is enabled on the robot. the function is enabled successfully, If the system returns enable success If the command fails, enable fail is displayed. If the command is enabled, already enable is displayed |
disable |
disable success is displayed Execution failure feedback: disable fail |
If the robot is successfully enabled, success is displayed If the function fails, disable disable fail is displayed. If the function is powered on but not enabled, already disable is displayed |
shutdown |
shutdown success feedback: shutdown success |
The robot is in poweroff state, the robot system will automatically shutdown, and the shutdown success receipt will be returned. If the robot is not powered off, return the shutdown fail receipt |
state |
Feedback each system state , machine, format:(2): (3):(4) Note: (1) Robot state machine,
state, (3) security monitoring state (4) robot operation mode |
Each state machine is returned as a number. Each number represents the state. Refer to Port 2001, address 1448-1451 |
isprogfinish |
Feedback whether the program has finished running, end feedback character 1, not end feedback character 0 |
|
getlasterror |
Feedback the detailed error information of the last error reported by the robot. The format is error_id:error _messagen |
Error codes are returned in hexadecimal |
getsysteminfo |
Feedback series number, model number, SN number, firmware version number and other information of the robot |
Port 2001#
Port 2001 will send the current status information of the robot to the outside at a frequency of 10Hz, with a total length of 1468 bytes.
Data |
Type |
Number |
Bytes Size |
Address |
comment |
---|---|---|---|---|---|
Actual joint position |
float |
7 |
28 |
0-27 |
6 Actual position of each joint. The seventh position is reserved. Unit is rad |
Actual joint velocity |
float |
7 |
28 |
28-55 |
6 Actual speed of each joint, the 7th place is reserved. The unit is rad/s |
Actual joint acceleration |
float |
7 |
28 |
56-83 |
6 Actual acceleration of each joint, the seventh place is reserved. The unit is rad/s^2 |
Actual joint torque |
float |
7 |
28 |
84-111 |
6 Actual torque of each joint. The seventh bit is reserved. Unit: Nm |
Desired joint position |
float |
7 |
28 |
112-139 |
6 Set the position of each joint, and reserve the 7th position. Unit is rad |
Desired joint velocity |
float |
7 |
28 |
140-167 |
6 joints set their own speed, and the 7th position is reserved. The unit is rad/s |
Expected joint acceleration |
float |
7 |
28 |
168-195 |
6 Set the acceleration of each joint, and reserve the 7th position. The unit is rad/s^2 |
Joint expected torque |
float |
7 |
28 |
196-223 |
6 Set the torque for each joint, and reserve the seventh bit. Unit: Nm |
Actual joint temperature |
float |
7 |
28 |
224-251 |
7 Actual temperature of each joint. Data reservation |
Actual joint current |
float |
7 |
28 |
252-279 |
6 Actual current of each joint, the 7th digit is reserved. The unit is the rated current kilofraction. |
Servo driver error id |
uint |
7 |
28 |
280-307 |
6 Joint servo drive error id. The seventh digit is reserved. |
Servo drive status word |
uint |
7 |
28 |
308-335 |
6 joint servo drive status word, 7th bit reserved |
reserve |
byte |
32 |
32 |
336-367 |
|
TCP physical position |
float |
6 |
24 |
368-391 |
End Cartesian space actual pose. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, unit m, rad |
TCP actual speed |
float |
6 |
24 |
392-415 |
Actual velocity in terminal Cartesian space. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, rad/s |
TCP actual acceleration |
float |
6 |
24 |
416-439 |
Actual velocity in terminal Cartesian space. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, in m/s^2, rad/s^2 |
Actual external force of flange |
float |
6 |
24 |
440-463 |
The external force on the robot end flange, when the end torque sensor is configured, is the force description of the sensor data under the robot end flange. Data definition: X, Y, Z,Rx,Ry,Rz, unit N, Nm |
TCP desired position |
float |
6 |
24 |
464-487 |
End Cartesian space actual pose. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, unit m, rad |
TCP expected speed |
float |
6 |
24 |
488-511 |
Actual velocity in terminal Cartesian space. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, in m/s, rad/s |
TCP expected acceleration |
float |
6 |
24 |
512-535 |
Actual velocity in terminal Cartesian space. TCP relative to the base coordinate system. Data definition: X, Y, Z,Rx,Ry,Rz, in m/s^2, rad/s^2 |
Theoretical external force of flange |
float |
6 |
24 |
536-559 |
The theoretical external force received by the end flange of the robot in the current motion state. Data definition: X, Y, Z,Rx,Ry,Rz, unit N, Nm |
Actual external force on the base |
float |
6 |
24 |
560-583 |
Actual force on the base Description of the force under the robot base. When a base torque sensor is configured, the value is the measured value of the torque sensor. The value is defined as X, Y, Z,Rx,Ry,Rz (unit: N, Nm) |
Theoretical external force on a base |
float |
6 |
24 |
584-607 |
In the current motion state, the theoretical
is described. Data definition: X, Y, Z,Rx,Ry,Rz, unit N, Nm |
Currently active tool coordinate system |
float |
6 |
24 |
608-631 |
Data definition: X, Y, Z,Rx,Ry,Rz, unit m, rad |
Currently active workpiece coordinate system |
float |
6 |
24 |
632-655 |
Does not contain the current tool coordinate, offset. Data definition: X, Y, Z Rx,Ry,Rz, unit m, rad |
Closing velocity |
float |
1 |
4 |
656-659 |
Terminal closing velocity, in m/s |
Global velocity |
byte |
1 |
1 |
660 |
Global velocity percentage |
Jog speed |
byte |
1 |
1 |
661 |
Percent Jog speed |
reserve |
byte |
58 |
58 |
662-719 |
|
Features digital IO input |
byte |
8 |
8 |
720-727 |
A byte represents a bool quantity. True=1, false=0. It corresponds to hardware FDI1-FDI8 |
Function digital IO output |
byte |
8 |
8 |
728-735 |
A byte represents a bool quantity. True=1,false=0. It corresponds to hardware FDO1-FDO8 |
Digital IO input |
byte |
16 |
16 |
736-751 |
Common DI inputs 1 to 16 correspond to the DI interface. It corresponds to hardware DI1-DI16 |
Digital IO output |
byte |
16 |
16 |
752-767 |
Corresponding to common DO output 1-16 of the DO interface. It corresponds to hardware DO1-DO16 |
Analog input |
float |
8 |
32 |
768-799 |
8 analog inputs, the first 4 for current, the last 4 for voltage. It corresponds to hardware AI_C1-AI_C4,AI_V1-AI_V4. For details about the value range, see the hardware manual. |
Analog output |
float |
8 |
32 |
800-831 |
reserve |
float register input |
float |
32 |
128 |
832-959 |
It can be modified using external interfaces such as modbus and Profinet |
float register output |
float |
32 |
128 |
960-1087 |
It can be modified by script functions |
Function bool Register input |
byte |
16 |
16 |
1088-1103 |
It can be modified using external interfaces such as modbus and Profinet |
Function bool Register output |
byte |
16 |
16 |
1104-1119 |
It can be modified using external interfaces such as modbus and Profinet |
bool register input |
byte |
64 |
64 |
1120-1183 |
It can be modified using external interfaces such as modbus and Profinet |
bool register output |
byte |
64 |
64 |
1184-1247 |
It can be modified by script functions |
word register input |
char |
32 |
64 |
1248-1311 |
It can be modified using external interfaces such as modbus and Profinet |
word register output |
char |
32 |
64 |
1312-1375 |
It can be modified by script functions |
reserve |
byte |
32 |
31 |
1376-1406 |
|
Simulation/real machine |
byte |
1 |
1 |
1407 |
Robot simulation/real machine mode |
Tool IO input |
byte |
8 |
8 |
1408-1415 |
Tool numeric input (1-2 terminal input, 3-8 reserved). The corresponding hardware tool I/O input is 1-2 |
Tool IO output |
byte |
8 |
8 |
1416-1423 |
Tool digital output (1-2 terminal output, 3-8 reserved). Corresponding hardware tool I/O digital output 1-2 |
Tool analog input |
float |
2 |
16 |
1424-1431 |
Tool end voltage analog input. The value ranges from 0V to 10V |
Tool analog output |
float |
2 |
16 |
1432-1439 |
reserve |
Tool button status |
byte |
2 |
2 |
1440-1441 |
A byte represents a bool quantity. True=1,false=0. Address 1440 indicates the state of the S key, and address 1441 indicates the state of the T key. |
reserve |
byte |
6 |
6 |
1442-1447 |
|
Robot operation mode |
char |
1 |
1 |
1448 |
0:kManual, 1:kAuto,2:kRemote, |
Robot state |
char |
1 |
1 |
1449 |
0:SR_Start,1:SR_Initialize,2:SR_Logout, 3:SR_Login,4:SR_PowerOff,5:SR_Disable/ SR _ PowerOn(Power-on disabled state)6:SR_Enable |
Robot program running status |
char |
1 |
1 |
1450 |
0:SP_Stopped,1:SP_Stopping,2:SP_Running, 3:SP_Paused,4:SP_Pausing 5P:SP_TaskRunning |
Safety monitoring status |
char |
1 |
1 |
1451 |
0:SS_INIT2:SS_WAIT3:SS_CONFIG 4:SS_POWER_OFF5:SS_RUN6:SS_RECOVERY 7:SS_STOP28:SS_STOP19:SS_STOP0 10:SS_MODEL12:SS_REDUCE13:SS_BOOT 14:SS_FAIL15:SS_UPDATE |
Collision detection trigger signal |
char |
1 |
1 |
1452 |
1 indicates that collision detection is triggered |
Collision axis |
char |
1 |
1 |
1453 |
The return value is a number. 1 to 6 indicates the joint in which the collision occurred, and 11 to 16 indicates the direction in which the collision occurred based on the base force sensor . The order X, Y, Z,Rx,Ry, Rz.20 indicates that a collision occurs based on the end force sensor |
reserve |
byte |
2 |
2 |
1454-1455 |
|
Robot error code |
uint |
1 |
4 |
1456-1459 |
The latest error code reported by the robot. When multiple errors occur at the same time, any of the error codes may be returned |
reserve |
byte |
8 |
8 |
1460-1467 |