Port 7000 Communication (2207)
The controller acts as the server, with a default port number of 7000.
All data packets specified in this protocol conform to this format definition, using standard TLV (Type, Length, Value) format, with a fixed start header and CRC checksum.
Data Packet Format
| Item | Length (Byte) | Description |
|---|---|---|
| SyncByte | 2 | 0x4E66 fixed header |
| Length | 2 | Hex length 0-0xffff; does not include the data header and command word, does not include the CRC segment |
| Command | 2 | Command word |
| data | Length | Data segment (mainly JSON data format) |
| CRC | 4 | CRC checksum (CRC32) on data excluding the header |
Configuration File Settings
In the configuration file controller.json, under the hostComputerService node:
socketType: socket type, can be "TCP" or "UDP", default is "TCP"checkCRC: whether to perform CRC checking; when set to false, CRC is not checked, but note that the 4 bytes of data occupied by CRC must still be sent; default is true, CRC is checked
Query Status
Command Word: 0x9512
{
"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"]
}
}
}Parameter Description
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel | int | Yes | Up to 9 channels |
| stop | int | No | When set to 1, stops the previous continuous transmission; the data below can be omitted |
| robot | int | Yes | Robot number |
| mode | int | Yes | 0: Response mode (one request, one reply), 1: Continuous mode (one request, continuous replies) |
| interval | int | No | ms, only valid when mode is continuous, range 10-60000 |
| queryType | array | No | Query type array, see table below for available values |
| typeCfg | object | No | Query content configuration, only valid when querying related types of data |
queryType Available Values
| Value | Description |
|---|---|
| realPosACS | Real-time position - Joint coordinates |
| realPosMCS | Real-time position - Cartesian coordinates |
| realPosPCS | Real-time position - Tool coordinates |
| realPosUCS | Real-time position - User coordinates |
| axisVel | Axis velocity |
| axisAcc | Axis acceleration |
| torque | Torque |
| electric | Current |
| numGVar | Numeric variables |
| IO | IO ports |
| serialNum | Serial number |
| runControlPosRunNum | Number of points executed in the current trajectory by motion control |
| detailedMotionPos | Detailed motion points; each robot supports only one channel query at the same time |
typeCfg Detailed Description
| Parameter | Type | Description |
|---|---|---|
| numGVar | array | Array of queryable variable names, e.g., ["GD001", "GA001", "GI001", "GI333"] |
| IO | array | Array of queryable IO names, e.g., ["DI1", "DI16", "DO1", "DO3", "DO17"], maximum count should not exceed the number of IOs |
| detailedMotionPos | object | Detailed motion point configuration |
| detailedMotionPos.num | int | Number of points to reply per data frame |
| detailedMotionPos.optional | array | Optional parameters: ACS (joint coordinates), MCS (Cartesian coordinates), time (timestamp), reset (reset point records) |
Query Response
Command Word: 0x9513
{
"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]
}
]
}
}
}Parameter Description
Coordinate description: Robot (first 7) + External axes (last 5). When there are no external axes, the number of coordinates equals the number of axes; when there are external axes, the number of coordinates is 7 + number of external axes.
| Parameter | Type | Description |
|---|---|---|
| channel | int | Channel number |
| robot | int | Robot number |
| replyData | object | Query response data object; fields not queried will not be replied |
Motion Control
Command Word: 0x9521
Mode 1: Independent Points
{
"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]}
]
}Mode 2: Independent Points - Partial Points per Transmission (Move After Receiving Complete Trajectory)
{
"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]},
{"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]}
]
}Mode 3: Continuous Trajectory - All Trajectory Points Transmitted at Once
{
"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
}
]
}Mode 4: Continuous Trajectory - Partial Points per Transmission (Move After Receiving Complete Trajectory)
{
"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
}
]
}Motion Control Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| clearBuffer | int | When set to 1, clears the motion trajectory buffer queue; if 0, this field can be omitted |
| end | int | When set to 1, stops the previous continuous transmission; if 0, this field can be omitted |
| targetMode | int | 0: Independent points, 1: Continuous trajectory |
| sendMode | int | 0: All trajectory points transmitted at once, 1: Partial points per transmission |
| runMode | int | Only valid for partial point transmission; 0: Move after receiving complete trajectory, 1: Move while receiving |
| sum | int | Only valid for "move after receiving complete trajectory"; total number of frames to send |
| count | int | Only valid for "move after receiving complete trajectory"; current frame number |
cfg Configuration Parameter Description
| Parameter | Type | Description |
|---|---|---|
| coord | string | Coordinate type, e.g., "ACS" |
| extMove | int | 1 indicates external axis motion; 0 or omitted means none |
| sync | int | 0 or omitted means external axes not synchronized, 1 means external axes synchronized |
| speed | int | Speed; if omitted, default value is used |
| acc | int | Acceleration; if omitted, default value is used |
| pl | int | Speed level; only valid for "independent points" mode using the "targetVec" node; default value 5 |
| moveMode | string | Motion mode; options: "TeachSet", "MOVJ", "MOVL", "MOVS"; default value "TeachSet" |
| timeout | int | ms, timeout; if omitted, timeout is not checked; range 10-10000; only valid for "move after receiving complete trajectory" |
targetVec Point Parameter Description
| Parameter | Type | Description |
|---|---|---|
| pos | array | Coordinate array: Robot (first 7) + External axes (last 5) |
| axisVel | array | Axis velocity; only valid for continuous trajectory mode |
| axisAcc | array | Axis acceleration; only valid for continuous trajectory mode |
| timeStamp | int | ms, time relative to the start point when reaching this point; only valid for continuous trajectory mode |
Note: When both
targetPosandtargetVecnodes exist, only thetargetPosnode takes effect
Motion Control Response
Command Word: 0x9523
{
"robot": 1,
"success": false,
"size": 1,
"cause": "timeout"
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| success | bool | Whether the reception was successful |
| size | int | Current number of trajectories in the motion trajectory buffer queue; only present when success is true |
| cause | string | Failure reason; empty on success; available values: busy (data transfer still in progress), timeout (reception timeout), dataErr (data error), termination (sender terminated the ongoing data transfer) |
Variable and IO Control
Command Word: 0x9531
{
"numGVar": {
"GA001": true,
"GI033": 6,
"GD666": -2.33
},
"IO": {
"DO1": 1,
"DO13": 0
}
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| numGVar | object | Numeric variables; key is variable name, value is variable value |
| IO | object | IO ports; key is IO name, value is IO state (0 or 1) |
Servo Point Motion Control Switch
Command Word: 0x95A1
This function and the "Motion Control" function cannot be used simultaneously
{
"robot": 1,
"switch": true
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| switch | bool | true: enable, false: disable |
Switch Response
Command Word: 0x95A3
{
"robot": 1,
"success": false,
"cause": "busy"
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| success | bool | Whether successful |
| cause | string | Failure reason; empty on success; available values: dataErr (received data error), startupErr (startup failure), busy (current channel is occupied) |
Point Transmission
Command Word: 0x95A4
{
"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]
]
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| end | int | When set to 1, stops the previous continuous transmission and the data below can be omitted; if 0, this field can be omitted; 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 | array | Coordinate array; coordinate format: Robot (first 7) + External axes (last 5) |
Point Transmission Response
Command Word: 0x95A6
{
"robot": 1,
"success": false,
"cause": "dataErr"
}Parameter Description
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| success | bool | Whether the reception was successful |
| cause | string | Failure reason; empty on success; available values: notStart (servo point motion control mode not enabled), dataErr (data error), termination (sender terminated the ongoing data transfer), cacheFull (buffer is full, maximum cache is 6 trajectories) |