Skip to content

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

ItemLength (Byte)Description
SyncByte20x4E66 fixed header
Length2Hex length 0-0xffff; does not include the data header and command word, does not include the CRC segment
Command2Command word
dataLengthData segment (mainly JSON data format)
CRC4CRC 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

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"]
        }
    }
}

Parameter Description

ParameterTypeRequiredDescription
channelintYesUp to 9 channels
stopintNoWhen set to 1, stops the previous continuous transmission; the data below can be omitted
robotintYesRobot number
modeintYes0: Response mode (one request, one reply), 1: Continuous mode (one request, continuous replies)
intervalintNoms, only valid when mode is continuous, range 10-60000
queryTypearrayNoQuery type array, see table below for available values
typeCfgobjectNoQuery content configuration, only valid when querying related types of data

queryType Available Values

ValueDescription
realPosACSReal-time position - Joint coordinates
realPosMCSReal-time position - Cartesian coordinates
realPosPCSReal-time position - Tool coordinates
realPosUCSReal-time position - User coordinates
axisVelAxis velocity
axisAccAxis acceleration
torqueTorque
electricCurrent
numGVarNumeric variables
IOIO ports
serialNumSerial number
runControlPosRunNumNumber of points executed in the current trajectory by motion control
detailedMotionPosDetailed motion points; each robot supports only one channel query at the same time

typeCfg Detailed Description

ParameterTypeDescription
numGVararrayArray of queryable variable names, e.g., ["GD001", "GA001", "GI001", "GI333"]
IOarrayArray of queryable IO names, e.g., ["DI1", "DI16", "DO1", "DO3", "DO17"], maximum count should not exceed the number of IOs
detailedMotionPosobjectDetailed motion point configuration
detailedMotionPos.numintNumber of points to reply per data frame
detailedMotionPos.optionalarrayOptional parameters: ACS (joint coordinates), MCS (Cartesian coordinates), time (timestamp), reset (reset point records)

Query Response

Command Word: 0x9513

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]
                }
            ]
        }
    }
}

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.

ParameterTypeDescription
channelintChannel number
robotintRobot number
replyDataobjectQuery response data object; fields not queried will not be replied

Motion Control

Command Word: 0x9521

Mode 1: Independent Points

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]}
    ]
}

Mode 2: Independent Points - Partial Points per Transmission (Move After Receiving Complete Trajectory)

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]},
        {"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

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
        }
    ]
}

Mode 4: Continuous Trajectory - Partial Points per Transmission (Move After Receiving Complete Trajectory)

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
        }
    ]
}

Motion Control Parameter Description

ParameterTypeDescription
robotintRobot number
clearBufferintWhen set to 1, clears the motion trajectory buffer queue; if 0, this field can be omitted
endintWhen set to 1, stops the previous continuous transmission; if 0, this field can be omitted
targetModeint0: Independent points, 1: Continuous trajectory
sendModeint0: All trajectory points transmitted at once, 1: Partial points per transmission
runModeintOnly valid for partial point transmission; 0: Move after receiving complete trajectory, 1: Move while receiving
sumintOnly valid for "move after receiving complete trajectory"; total number of frames to send
countintOnly valid for "move after receiving complete trajectory"; current frame number

cfg Configuration Parameter Description

ParameterTypeDescription
coordstringCoordinate type, e.g., "ACS"
extMoveint1 indicates external axis motion; 0 or omitted means none
syncint0 or omitted means external axes not synchronized, 1 means external axes synchronized
speedintSpeed; if omitted, default value is used
accintAcceleration; if omitted, default value is used
plintSpeed level; only valid for "independent points" mode using the "targetVec" node; default value 5
moveModestringMotion mode; options: "TeachSet", "MOVJ", "MOVL", "MOVS"; default value "TeachSet"
timeoutintms, timeout; if omitted, timeout is not checked; range 10-10000; only valid for "move after receiving complete trajectory"

targetVec Point Parameter Description

ParameterTypeDescription
posarrayCoordinate array: Robot (first 7) + External axes (last 5)
axisVelarrayAxis velocity; only valid for continuous trajectory mode
axisAccarrayAxis acceleration; only valid for continuous trajectory mode
timeStampintms, time relative to the start point when reaching this point; only valid for continuous trajectory mode

Note: When both targetPos and targetVec nodes exist, only the targetPos node takes effect


Motion Control Response

Command Word: 0x9523

json
{
    "robot": 1,
    "success": false,
    "size": 1,
    "cause": "timeout"
}

Parameter Description

ParameterTypeDescription
robotintRobot number
successboolWhether the reception was successful
sizeintCurrent number of trajectories in the motion trajectory buffer queue; only present when success is true
causestringFailure 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

json
{
    "numGVar": {
        "GA001": true,
        "GI033": 6,
        "GD666": -2.33
    },
    "IO": {
        "DO1": 1,
        "DO13": 0
    }
}

Parameter Description

ParameterTypeDescription
numGVarobjectNumeric variables; key is variable name, value is variable value
IOobjectIO 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

json
{
    "robot": 1,
    "switch": true
}

Parameter Description

ParameterTypeDescription
robotintRobot number
switchbooltrue: enable, false: disable

Switch Response

Command Word: 0x95A3

json
{
    "robot": 1,
    "success": false,
    "cause": "busy"
}

Parameter Description

ParameterTypeDescription
robotintRobot number
successboolWhether successful
causestringFailure reason; empty on success; available values: dataErr (received data error), startupErr (startup failure), busy (current channel is occupied)

Point Transmission

Command Word: 0x95A4

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]
    ]
}

Parameter Description

ParameterTypeDescription
robotintRobot number
endintWhen 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
sumintTotal number of frames to send
countintCurrent frame number
PosVecarrayCoordinate array; coordinate format: Robot (first 7) + External axes (last 5)

Point Transmission Response

Command Word: 0x95A6

json
{
    "robot": 1,
    "success": false,
    "cause": "dataErr"
}

Parameter Description

ParameterTypeDescription
robotintRobot number
successboolWhether the reception was successful
causestringFailure 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)