Skip to content

Global Variables

1. Current Position Mode

ValueModeDescription
-1Controller current coordinatesController current coordinates
0Joint coordinates (Joint)Joint coordinate system
1Cartesian coordinates (Angle)Cartesian coordinate system
2Tool coordinates (Tool)Tool coordinate system
3User coordinates (User)User coordinate system

2. Get Global Position Variable Points

Command: 0x5602 GLOBAL_ALLPOSITION_INQUIRE

Request Parameters:

ParameterTypeRequiredDescription
robotintYesRobot number

Example Request:

json
{
  "robot": 1
}

Controller Response: 0x5603 GLOBAL_ALLPOSITION_RESPOUND

Response Parameters:

ParameterTypeDescription
robotintRobot number
globalPositionobjectGlobal point list
noteobjectAnnotation list

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
posNamestringYesPoint name
posarrayYesPoint data (14 elements)
notestringNoAnnotation

pos Array Description (14 elements total):

IndexDescription
0Coordinate system: 0-Joint, 1-Cartesian, 2-Tool, 3-User
1Unit: 0-Radian, 1-Degree
2Posture: 0-None, 1-Left hand, 2-Right hand
3Tool coordinate number
4User coordinate number
5-6Reserved
7-13Position data: J1~J7 / xyzabc

Example Request:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
posNamestringYesPoint name

Example Request:

json
{
  "robot": 1,
  "posName": "GP0001"
}

Controller Response: 0x5606 GLOBAL_POSITION_RESPOUND

Response Parameters:

ParameterTypeDescription
notestringAnnotation
posNamestringVariable name
posValuearrayPoint in radians
posValueDegarrayPoint in degrees
robotintRobot number

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
varNamestringYesVariable name
varTypeintYesVariable type: 0-int, 1-double, 2-bool, 3-string
varValuedoubleNoVariable value (for numeric types)
varStringstringNoVariable value (for string type)
varNotestringNoAnnotation

Example Request:

json
{
  "varName": "GI001",
  "varType": 1,
  "varValue": 14.0,
  "varString": "oooo",
  "varNote": "aaa"
}

6. Get Global Numeric Variable List

Command: 0x5608 GLOBAL_VARIANT_INQUIRE

Request Parameters:

ParameterTypeRequiredDescription
varTypeintYesVariable type: 1-bool, 2-int, 3-double

Example Request:

json
{
  "varType": 1
}

Controller Response: 0x5609 GLOBAL_VARIANT_RESPOND

Response Parameters:

ParameterTypeDescription
varTypeintVariable type
varNumintNumber of numeric variables (0-100)
varListarrayNumeric variable list

varList Array Element:

ParameterTypeDescription
varNamestringVariable name
varValuemixedVariable value
varNotestringAnnotation

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
varTypeintYesVariable type: 1-bool, 2-int, 3-double, 4-string

Example Request:

json
{
  "varType": 1
}

Controller Response: 0x5611 GLOBAL_ALLVARIANT_NOTE_RESPOND

Response Parameters:

ParameterTypeDescription
varNoteobjectAnnotation list
varTypeintVariable type

Example Response:

json
{
  "varNote": {
    "GB001": "III",
    "GB002": "SDFSF"
  },
  "varType": 1
}

8. Query Single Global Variable

Command: 0x560B GLOBAL_VARIANT_INQUIRE

Request Parameters:

ParameterTypeRequiredDescription
varTypeintYesVariable type: 0-int, 1-double, 2-bool, 3-string
varNamestringYesVariable name
identitystringNoSource identifier

identity Value Description:

ValueDescription
VariableReviewGlobal variable from monitoring interface
NumerlcalVarWidgetGlobal numeric variable interface

Example Request:

json
{
  "varType": 1,
  "varName": "GI001",
  "identity": "VariableReview"
}

Controller Response: 0x560C GLOBAL_VARIANT_RESPOUND

Response Parameters:

ParameterTypeDescription
varTypeintVariable type
varNamestringVariable name
varValuemixedVariable value
varStringstringString value (for string type)
identitystringSource identifier
varNotestringAnnotation

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
varnamestringYesPoint name
initialValueboolYesWhether it is an initial value

Example Request:

json
{
  "robot": 1,
  "varname": "P0001",
  "initialValue": true
}

Controller Response: 0x5613 LOCAL_POS_P_VAR_RESPOND

Response Parameters:

ParameterTypeDescription
robotintRobot number
jobnamestringJob file name
varnamestringPoint name
initialValueboolWhether it is an initial value
posarrayPoint (in radians)
posDegarrayPoint (in degrees)

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
varnamestringYesPoint name
initialValueboolYesWhether it is an initial value

Example Request:

json
{
  "robot": 1,
  "varname": "E0001",
  "initialValue": true
}

Controller Response: 0x5616 LOCAL_POS_E_VAR_RESPOND

Response Parameters:

ParameterTypeDescription
robotintRobot number
jobnamestringJob file name
varnamestringPoint name
initialValueboolWhether it is an initial value
posarrayPoint (in radians, 11 elements)
posDegarrayPoint (in degrees, 11 elements)

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
vartypeintYesVariable type: 0-int, 1-double, 2-bool, 3-string
varnamestringYesVariable name
initialValueboolYesWhether it is an initial value
identifystringNoSource identifier

identify Value Description:

ValueDescription
CommandInsertVariable from instruction insertion interface
VariableReviewNumeric variable from monitoring interface

Example Request:

json
{
  "robot": 1,
  "vartype": 1,
  "varname": "I001",
  "initialValue": true,
  "identify": "CommandInsert"
}

Controller Response: 0x5619 LOCAL_VALUE_VAR_RESPOND

Response Parameters:

ParameterTypeDescription
robotintRobot number
jobnamestringJob file name
vartypeintVariable type: 1-bool, 2-int, 3-double
varnamestringVariable name
valuemixedVariable value (numeric type)
stringstringVariable value (string type)
identifystringSource identifier

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
varnamestringYesPoint name
posarrayYesPoint data (21 elements)
notestringNoRemark

pos Array Description:

Index RangeDescription
0-6Point info
7-13Robot position
14-18Sync external axis position
19-20Reserved

Example Request:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
varnamestringYesPoint name
initialValueboolYesWhether it is an initial value

Example Request:

json
{
  "robot": 1,
  "varname": "GE0001",
  "initialValue": true
}

Controller Response: 0x561c GLOBAL_EXTPOS_VAR_RESPOND

Response Parameters:

ParameterTypeDescription
notestringAnnotation
varnamestringVariable name
initialValueboolWhether it is an initial value
posValuearrayGP + external point (in radians)
posValueDegarrayGP + external point (in degrees)

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number

Example Request:

json
{
  "robot": 1
}

Controller Response: 0x561e GLOBAL_ALLEXTPOS_VAR_RESPOND

Response Parameters:

ParameterTypeDescription
robotintRobot number
globalExtPositionobjectPoint list
noteobjectAnnotation list

Example Response:

json
{
  "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:

ParameterTypeRequiredDescription
robotintYesRobot number
namestringYesPoint name
posarrayYesPoint data (21 elements)
targetCoordintYesTarget coordinate system: 0-Joint, 1-Cartesian, 2-Tool, 3-User

Example Request:

json
{
  "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:

ParameterTypeDescription
namestringPoint name
posarrayPoint info (universal 21-element data, in radians)
posDegarrayPoint info (universal 21-element data, in degrees)
robotintRobot number

Example Response:

json
{
  "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
}