Global Variables
1. Current Position Mode
| Value | Mode | Description |
|---|---|---|
| -1 | Controller current coordinates | Controller current coordinates |
| 0 | Joint coordinates (Joint) | Joint coordinate system |
| 1 | Cartesian coordinates (Angle) | Cartesian coordinate system |
| 2 | Tool coordinates (Tool) | Tool coordinate system |
| 3 | User coordinates (User) | User coordinate system |
2. Get Global Position Variable Points
Command: 0x5602 GLOBAL_ALLPOSITION_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
Example Request:
{
"robot": 1
}Controller Response: 0x5603 GLOBAL_ALLPOSITION_RESPOUND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| globalPosition | object | Global point list |
| note | object | Annotation list |
Example Response:
{
"robot": 1,
"globalPosition": {
"GP0001": [0, 0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6],
"GP0003": [0, 0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6]
},
"note": {
"GP0001": "qqqq",
"GP0002": "",
"GP0003": "www"
}
}Note: For four-axis robots, the last two digits are padded with 0.
3. Set Global Point
Command: 0x5604 GLOBAL_POSITION_SET
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| posName | string | Yes | Point name |
| pos | array | Yes | Point data (14 elements) |
| note | string | No | Annotation |
pos Array Description (14 elements total):
| Index | Description |
|---|---|
| 0 | Coordinate system: 0-Joint, 1-Cartesian, 2-Tool, 3-User |
| 1 | Unit: 0-Radian, 1-Degree |
| 2 | Posture: 0-None, 1-Left hand, 2-Right hand |
| 3 | Tool coordinate number |
| 4 | User coordinate number |
| 5-6 | Reserved |
| 7-13 | Position data: J1~J7 / xyzabc |
Example Request:
{
"robot": 1,
"posName": "GP0001",
"pos": [1, 0, 0, 0, 0, 0, 0, 459, 0, 796, 3.141, 0, 0, 0],
"note": "data"
}4. Query Global Point
Command: 0x5605 GLOBAL_POSITION_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| posName | string | Yes | Point name |
Example Request:
{
"robot": 1,
"posName": "GP0001"
}Controller Response: 0x5606 GLOBAL_POSITION_RESPOUND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| note | string | Annotation |
| posName | string | Variable name |
| posValue | array | Point in radians |
| posValueDeg | array | Point in degrees |
| robot | int | Robot number |
Example Response:
{
"note": "",
"posName": "GP0001",
"posValue": [1.0, 1.0, 8.0, 0.0, 0.0, 0.0, 0.0, 377.5550, 1.3950, 718.3910, 3.104225101352, 0.106517442432, 0.024713861787, 0.0],
"posValueDeg": [1.0, 1.0, 8.0, 0.0, 0.0, 0.0, 0.0, 377.5550, 1.3950, 718.3910, 177.858996966040, 6.102999895881, 1.415999975865, 0.0],
"robot": 1
}5. Set Global Numeric Variable
Command: 0x5607 GLOBAL_VARIANT_SET
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| varName | string | Yes | Variable name |
| varType | int | Yes | Variable type: 0-int, 1-double, 2-bool, 3-string |
| varValue | double | No | Variable value (for numeric types) |
| varString | string | No | Variable value (for string type) |
| varNote | string | No | Annotation |
Example Request:
{
"varName": "GI001",
"varType": 1,
"varValue": 14.0,
"varString": "oooo",
"varNote": "aaa"
}6. Get Global Numeric Variable List
Command: 0x5608 GLOBAL_VARIANT_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| varType | int | Yes | Variable type: 1-bool, 2-int, 3-double |
Example Request:
{
"varType": 1
}Controller Response: 0x5609 GLOBAL_VARIANT_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| varType | int | Variable type |
| varNum | int | Number of numeric variables (0-100) |
| varList | array | Numeric variable list |
varList Array Element:
| Parameter | Type | Description |
|---|---|---|
| varName | string | Variable name |
| varValue | mixed | Variable value |
| varNote | string | Annotation |
Example Response:
{
"varType": 1,
"varNum": 2,
"varList": [
{
"varName": "I001",
"varValue": 3,
"varNote": "QQQ"
},
{
"varName": "D002",
"varValue": 8.4,
"varNote": "hhha"
}
]
}7. Request Global Numeric Annotation
Command: 0x5610 GLOBAL_ALLVARIANT_NOTE_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| varType | int | Yes | Variable type: 1-bool, 2-int, 3-double, 4-string |
Example Request:
{
"varType": 1
}Controller Response: 0x5611 GLOBAL_ALLVARIANT_NOTE_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| varNote | object | Annotation list |
| varType | int | Variable type |
Example Response:
{
"varNote": {
"GB001": "III",
"GB002": "SDFSF"
},
"varType": 1
}8. Query Single Global Variable
Command: 0x560B GLOBAL_VARIANT_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| varType | int | Yes | Variable type: 0-int, 1-double, 2-bool, 3-string |
| varName | string | Yes | Variable name |
| identity | string | No | Source identifier |
identity Value Description:
| Value | Description |
|---|---|
| VariableReview | Global variable from monitoring interface |
| NumerlcalVarWidget | Global numeric variable interface |
Example Request:
{
"varType": 1,
"varName": "GI001",
"identity": "VariableReview"
}Controller Response: 0x560C GLOBAL_VARIANT_RESPOUND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| varType | int | Variable type |
| varName | string | Variable name |
| varValue | mixed | Variable value |
| varString | string | String value (for string type) |
| identity | string | Source identifier |
| varNote | string | Annotation |
Example Response:
{
"varType": 1,
"varName": "GI001",
"varValue": 666,
"varString": "i'm a string",
"identity": "VariableReview",
"varNote": "Parachute simulator"
}9. Local Variable Position Variable P Point Query
Command: 0x5612 LOCAL_POS_P_VAR_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| varname | string | Yes | Point name |
| initialValue | bool | Yes | Whether it is an initial value |
Example Request:
{
"robot": 1,
"varname": "P0001",
"initialValue": true
}Controller Response: 0x5613 LOCAL_POS_P_VAR_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| jobname | string | Job file name |
| varname | string | Point name |
| initialValue | bool | Whether it is an initial value |
| pos | array | Point (in radians) |
| posDeg | array | Point (in degrees) |
Example Response:
{
"robot": 1,
"jobname": "Q1",
"varname": "P0001",
"initialValue": true,
"pos": [0, 0, 1, 2, 3, 4, 5, 6],
"posDeg": [0, 0, 1, 2, 3, 4, 5, 6]
}10. Local Variable Position Variable E Point Query
Command: 0x5615 LOCAL_POS_E_VAR_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| varname | string | Yes | Point name |
| initialValue | bool | Yes | Whether it is an initial value |
Example Request:
{
"robot": 1,
"varname": "E0001",
"initialValue": true
}Controller Response: 0x5616 LOCAL_POS_E_VAR_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| jobname | string | Job file name |
| varname | string | Point name |
| initialValue | bool | Whether it is an initial value |
| pos | array | Point (in radians, 11 elements) |
| posDeg | array | Point (in degrees, 11 elements) |
Example Response:
{
"robot": 1,
"jobname": "Q1",
"varname": "E001",
"initialValue": true,
"pos": [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
"posDeg": [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}11. Local Variable Numeric Variable Query
Command: 0x5618 LOCAL_VALUE_VAR_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| vartype | int | Yes | Variable type: 0-int, 1-double, 2-bool, 3-string |
| varname | string | Yes | Variable name |
| initialValue | bool | Yes | Whether it is an initial value |
| identify | string | No | Source identifier |
identify Value Description:
| Value | Description |
|---|---|
| CommandInsert | Variable from instruction insertion interface |
| VariableReview | Numeric variable from monitoring interface |
Example Request:
{
"robot": 1,
"vartype": 1,
"varname": "I001",
"initialValue": true,
"identify": "CommandInsert"
}Controller Response: 0x5619 LOCAL_VALUE_VAR_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| jobname | string | Job file name |
| vartype | int | Variable type: 1-bool, 2-int, 3-double |
| varname | string | Variable name |
| value | mixed | Variable value (numeric type) |
| string | string | Variable value (string type) |
| identify | string | Source identifier |
Example Response:
{
"robot": 1,
"jobname": "Q1",
"vartype": 1,
"varname": "I001",
"value": 2,
"string": "i'm a string",
"identify": "CommandInsert"
}12. Global External Axis Variable
Note: Global external axis variable structure: Point info (7) + Robot position (7) + External axis position (5) + Reserved (2) = 21 elements
12.1 Set Global External Axis Variable
Command: 0x561a GLOBAL_EXTPOS_VAR_SET
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| varname | string | Yes | Point name |
| pos | array | Yes | Point data (21 elements) |
| note | string | No | Remark |
pos Array Description:
| Index Range | Description |
|---|---|
| 0-6 | Point info |
| 7-13 | Robot position |
| 14-18 | Sync external axis position |
| 19-20 | Reserved |
Example Request:
{
"robot": 1,
"varname": "GE001",
"pos": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1, 2.2, 2.3, 2.4, 0, 0],
"note": "qqq"
}12.2 Query Global External Axis Variable
Command: 0x561b GLOBAL_EXTPOS_VAR_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| varname | string | Yes | Point name |
| initialValue | bool | Yes | Whether it is an initial value |
Example Request:
{
"robot": 1,
"varname": "GE0001",
"initialValue": true
}Controller Response: 0x561c GLOBAL_EXTPOS_VAR_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| note | string | Annotation |
| varname | string | Variable name |
| initialValue | bool | Whether it is an initial value |
| posValue | array | GP + external point (in radians) |
| posValueDeg | array | GP + external point (in degrees) |
Example Response:
{
"note": "",
"varname": "GE001",
"initialValue": true,
"posValue": [0.0, 0.0, 0.0, 0.0],
"posValueDeg": [0.0, 0.0, 0.0, 0.0]
}12.3 Get All Global External Axis Points
Command: 0x561d GLOBAL_ALLEXTPOS_VAR_INQUIRE
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
Example Request:
{
"robot": 1
}Controller Response: 0x561e GLOBAL_ALLEXTPOS_VAR_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| robot | int | Robot number |
| globalExtPosition | object | Point list |
| note | object | Annotation list |
Example Response:
{
"robot": 1,
"globalExtPosition": {
"GE001": [0, 0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6],
"GE003": [0, 0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6]
},
"note": {
"GE001": "qqqq",
"GE002": "",
"GE003": "www"
}
}13. Robot Point Coordinate System Transformation
Command: 0x2A12 POS_TRANS_COORD
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number |
| name | string | Yes | Point name |
| pos | array | Yes | Point data (21 elements) |
| targetCoord | int | Yes | Target coordinate system: 0-Joint, 1-Cartesian, 2-Tool, 3-User |
Example Request:
{
"robot": 1,
"name": "P001",
"pos": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"targetCoord": 1
}Controller Response: 0x2A13 POS_TRANS_COORD_RESPOND
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Point name |
| pos | array | Point info (universal 21-element data, in radians) |
| posDeg | array | Point info (universal 21-element data, in degrees) |
| robot | int | Robot number |
Example Response:
{
"name": "P001",
"pos": [1, 1, 0, 0, 0, 0, 0, 459.62120, -0.1010, 796.79160, 3.141592653590, 0.0, 0.0, 0.0],
"posDeg": [1, 1, 0, 0, 0, 0, 0, 459.62120, -0.1010, 796.79160, 180.0, 0.0, 0.0, 0.0],
"robot": 1
}