Port 7000 Protocol
Overview
Data Frame Structure
| Item | Length (Byte) | Description |
|---|---|---|
| SyncByte | 2 | 0x4E66 fixed header |
| Length | 2 | Hex length 0–0xffff; does not include data header and command, does not include CRC segment |
| Command | 2 | Command word |
| data | Length | Data segment (primarily JSON data format) |
| CRC | 4 | CRC verification on data excluding the header (CRC32) |
Communication Protocol Configuration
Port 7000 supports both TCP and UDP communication protocols. By entering the controller backend and modifying the configuration file config/controller.json, under the hostComputerService node:
socketType: socket type, can be"TCP"or"UDP", default is"TCP"checkCRC: whether to perform CRC check; whenfalse, CRC is not checked (but the 4 bytes occupied by CRC still need to be sent), default istrue
Status queries can be set to UDP communication for data retrieval, with a minimum cycle of 1ms.
Command Overview
| Command | Direction | Function |
|---|---|---|
0x1E00 | Host computer → Controller | Query status |
0x1E01 | Controller → Host computer | Query status reply |
0x1E02 | Host computer → Controller | Motion control |
0x1E03 | Controller → Host computer | Motion control reply |
0x1E04 | Host computer → Controller | Variable, IO control |
0x1E10 | Host computer → Controller | Servo on/off point motion control |
0x1E11 | Controller → Host computer | Servo on/off point motion control reply |
0x1E12 | Host computer → Controller | Point transmission |
0x1E13 | Controller → Host computer | Point transmission reply |
1. Query Status (0x1E00)
Request Field Description
| Field | Type | Description |
|---|---|---|
channel | int | Channel; up to 9 channels, default is 1 |
stop | int | Stop sending; when 1, stops previous continuous sending; the data below can be omitted |
robot | int | Robot number; range [1, 4] |
mode | int | Request reply mode; 0: on-demand (one reply per request), 1: continuous (continuous reply after one request) |
interval | int | Continuous reply interval (ms); only valid when mode=1, range [1, 60000] |
queryType | string[] | List of runtime parameters to query; omit those not needed |
typeCfg | object | Query content configuration; only valid when querying related type data |
queryType Available Values
| Value | Description |
|---|---|
realPosACS | Real-time coordinate position (joint coordinate system) |
realPosMCS | Real-time coordinate position (Cartesian coordinate system) |
realPosPCS | Real-time coordinate position (tool coordinate system) |
realPosUCS | Real-time coordinate position (user coordinate system) |
axisVel | Axis velocity |
axisAcc | Axis acceleration |
torque | Torque |
electric | Current |
numGVar | Numeric variables |
IO | IO ports |
serialNum | Serial number |
runControlPosRunNum | Number of points already executed in the current trajectory of motion control |
detailedMotionPos | Detailed motion points (each robot supports only one channel query at the same time) |
typeCfg Configuration Description
numGVar: Query global variables (int type), e.g.,["GD001", "GA001", "GI001", "GI333"]IO: Query IO ports (string type), e.g.,["DI1", "DI16", "DO1", "DO3", "DO17"]; if the queried IO does not exist, returns-1; the maximum number that can be queried should not exceed the number of IOsdetailedMotionPos:num: Number of points replied per data frame (int)optional: Optional parameters (string[]), can be"ACS","MCS","time","reset"
Request Example
json
{
"channel": 1,
"stop": 1,
"robot": 1,
"mode": 0,
"interval": 10,
"queryType": [
"realPosACS", "realPosMCS", "realPosPCS", "realPosUCS",
"axisVel", "axisAcc",
"torque", "electric",
"numGVar",
"IO",
"serialNum",
"runControlPosRunNum",
"detailedMotionPos"
],
"typeCfg": {
"numGVar": ["GD001", "GA001", "GI001", "GI333"],
"IO": ["DI1", "DI16", "DO1", "DO3", "DO17"],
"detailedMotionPos": {
"num": 10,
"optional": ["ACS", "MCS", "time", "reset"]
}
}
}2. Query Status Reply (0x1E01)
Reply Field Description
| Field | Type | Description |
|---|---|---|
channel | int | Channel; up to 9 channels |
robot | int | Robot number; range [1, 4] |
replyData | object | Reply query results; items not queried will not be replied |
Coordinate Data Description
Coordinate format: Robot (first 7) + External axes (last 5)
- Without external axes, the number of coordinates equals the number of axes
- With external axes, the number of coordinates is
7 + number of external axes
replyData Field Details
| Field | Description |
|---|---|
realPosACS | Real-time coordinate position (joint coordinate system), float array |
realPosMCS | Real-time coordinate position (Cartesian coordinate system), float array |
realPosPCS | Real-time coordinate position (tool coordinate system), float array |
realPosUCS | Real-time coordinate position (user coordinate system), float array |
axisVel | Axis velocity, float array |
axisAcc | Axis acceleration, float array |
torque | Torque, float array |
electric | Current, float array |
numGVar | Global variable key-value pairs, e.g., {"GD001": 0.1, "GA001": true, "GI001": 33} |
IO | IO status key-value pairs, e.g., {"DI1": 1, "DO1": 0}; if IO does not exist, returns -1 |
runControlPosRunNum | Number of points already executed in the current trajectory of motion control |
serialNum | Serial number; increments by 1 for each reply, each channel is independent |
detailedMotionPos | Detailed motion points |
detailedMotionPos Details
num: Number of points replied per data frame (int)data: Point array, each point contains:ACS: Joint coordinates, float arrayMCS: Cartesian coordinates, float arraytime: Timestamp[seconds, nanoseconds], e.g.,[123456, 654321]
Reply Example
json
{
"channel": 1,
"robot": 1,
"replyData": {
"realPosACS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"realPosMCS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"realPosPCS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"realPosUCS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisVel": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisAcc": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"torque": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"electric": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"numGVar": {"GD001": 0.1, "GA001": true, "GI001": 33, "GI333": -55},
"IO": {"DI1": 1, "DI16": 0, "DO1": 0, "DO3": 1, "DO17": -1},
"runControlPosRunNum": 0,
"serialNum": 1,
"detailedMotionPos": {
"num": 10,
"data": [
{
"time": [123456, 654321],
"ACS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"MCS": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]
}
]
}
}
}3. Motion Control (0x1E02)
Request Field Description
| Field | Type | Description |
|---|---|---|
robot | int | Robot number; range [1, 4] |
clearBuffer | int | Clear motion trajectory buffer queue; 1: clear (does not affect data currently being transmitted), can be omitted when 0 |
targetMode | int | Motion mode; 0: independent point, 1: continuous trajectory |
sendMode | int | 0: transmit all trajectory points at once, 1: transmit partial points each time |
runMode | int | Valid only when transmitting partial points each time; 0: receive complete trajectory before moving, 1: move while receiving |
end | int | 1: stop previous continuous transmission; the data below can be omitted; can be omitted when 0 |
sum | int | Valid only for "receive complete trajectory before moving"; total number of frames to send |
count | int | Valid only for "receive complete trajectory before moving"; current frame number |
cfg | object | Motion configuration (only needs to be set for the first frame, and only valid for the first frame) |
targetPos | float[] | Single target point (using this field only moves to one target point) |
targetVec | object[] | Multiple target points (traverse all points in order; when both targetPos and targetVec exist, only targetPos takes effect) |
cfg Field Details
| Field | Type | Description |
|---|---|---|
coord | string | Coordinate system, e.g., "ACS" |
extMove | int | Whether there is external axis motion; 1: yes, 0 or omitted: no |
sync | int | Whether external axes are synchronized; 0 or omitted: not synchronized, 1: synchronized |
speed | int | Speed setting; uses default value if omitted |
acc | int | Acceleration setting; uses default value if omitted |
pl | int | Defaults to 5 if omitted; only valid for "independent point" with targetVec |
moveMode | string | Motion mode; can be "TeachSet", "MOVJ", "MOVL", "MOVS", default "TeachSet"; only valid for "independent point" with targetVec |
timeout | int | Timeout (ms); no timeout check if omitted, range 10–10000; only valid for "receive complete trajectory before moving" |
Example 1: Independent Point · Transmit All Points at Once
json
{
"robot": 1,
"clearBuffer": 1,
"targetMode": 0,
"cfg": {
"coord": "ACS",
"extMove": 0,
"sync": 0,
"speed": 100,
"acc": 100,
"pl": 5,
"moveMode": "TeachSet"
},
"targetPos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"targetVec": [
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]},
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]},
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]},
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]}
]
// When both targetPos and targetVec exist, only targetPos takes effect
}Example 2: Independent Point · Transmit Partial Points Each Time · Receive Complete Trajectory Before Moving
json
{
"robot": 1,
"clearBuffer": 1,
"end": 0,
"targetMode": 0,
"sendMode": 1,
"runMode": 0,
"sum": 10,
"count": 1,
"cfg": {
"coord": "ACS",
"extMove": 0,
"sync": 0,
"speed": 100,
"acc": 100,
"pl": 5,
"moveMode": "TeachSet",
"timeout": 100
},
"targetVec": [
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]},
{"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]}
]
}Example 3: Continuous Trajectory · Transmit All Points at Once
json
{
"robot": 1,
"clearBuffer": 1,
"targetMode": 1,
"sendMode": 0,
"cfg": {
"coord": "ACS",
"extMove": 0,
"sync": 0,
"speed": 100,
"acc": 100
},
"targetVec": [
{
"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisVel": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisAcc": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"timeStamp": 10
},
{
"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisVel": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisAcc": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"timeStamp": 10
}
]
}
timeStamp: Time relative to the start point when reaching this point (ms)
Example 4: Continuous Trajectory · Transmit Partial Points Each Time · Receive Complete Trajectory Before Moving
json
{
"robot": 1,
"clearBuffer": 1,
"end": 0,
"targetMode": 1,
"sendMode": 1,
"runMode": 0,
"sum": 10,
"count": 1,
"cfg": {
"coord": "ACS",
"extMove": 0,
"sync": 0,
"speed": 100,
"acc": 100,
"timeout": 100
},
"targetVec": [
{
"pos": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisVel": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"axisAcc": [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
"timeStamp": 10
}
]
}4. Motion Control Reply (0x1E03)
Reply Field Description
| Field | Type | Description |
|---|---|---|
robot | int | Robot number; range [1, 4] |
success | bool | true: success, false: failure |
size | int | Current number of trajectories in the motion trajectory buffer queue; only present when success=true |
cause | string | Failure reason (empty when successful) |
cause Failure Reasons
| Value | Description |
|---|---|
"busy" | There is data currently being transmitted that has not completed |
"timeout" | Reception timeout |
"dataErr" | Data error |
"termination" | The sender terminated the data being transmitted |
Reply Example
json
{
"robot": 1,
"success": false,
"size": 1,
"cause": "timeout"
}5. Variable, IO Control (0x1E04)
Request Field Description
| Field | Type | Description |
|---|---|---|
numGVar | object | Set variables; GA is bool type, GI is int type, GD is double type |
IO | object | Set IO ports; 1/0 indicates IO port status |
Request Example
json
{
"numGVar": {
"GA001": true,
"GI033": 6,
"GD666": -2.33
},
"IO": {
"DO1": 1,
"DO13": 0
}
}6. Servo On/Off Point Motion Control (0x1E10)
Note: This function cannot be used simultaneously with the "Motion Control" function (
0x1E02).
Request Field Description
| Field | Type | Description |
|---|---|---|
robot | int | Robot number; range [1, 4] |
switch | bool | true: on, false: off |
Request Example
json
{
"robot": 1,
"switch": true
}7. Servo On/Off Point Motion Control Reply (0x1E11)
Reply Field Description
| Field | Type | Description |
|---|---|---|
success | bool | true: success, false: failure |
cause | string | Failure reason (empty when successful) |
cause Failure Reasons
| Value | Description |
|---|---|
"busy" | Current channel is occupied |
"dataErr" | Data error |
"startupErr" | Startup failed |
Reply Example
json
{
"success": false,
"cause": "busy"
}8. Point Transmission (0x1E12)
Request Field Description
| Field | Type | Description |
|---|---|---|
robot | int | Robot number; range [1, 4] |
end | int | 1: stop previous continuous transmission; the data below can be omitted; can be omitted when 0. When point transmission is not complete, previously received data will be cleared and a new point queue will be awaited |
sum | int | Total number of frames to send |
count | int | Current frame number |
PosVec | float[][] | Point coordinate array; format: robot (first 7) + external axes (last 5) |
Request Example
json
{
"robot": 1,
"end": 1,
"sum": 10,
"count": 1,
"PosVec": [
[1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
[1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5],
[1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 2.1, 2.2, 2.3, 2.4, 2.5]
]
}9. Point Transmission Reply (0x1E13)
Reply Field Description
| Field | Type | Description |
|---|---|---|
robot | int | Robot number; range [1, 4] |
success | bool | true: reception successful, false: reception failed |
cause | string | Failure reason (empty when successful) |
cause Failure Reasons
| Value | Description |
|---|---|
"notStart" | Servo point motion control mode is not enabled |
"dataErr" | Data error |
"termination" | The sender terminated the data being transmitted |
"cacheFull" | Buffer is full (maximum buffer is 6 trajectories) |
Reply Example
json
{
"robot": 1,
"success": false,
"cause": "dataErr"
}