Skip to content

Variables

Get Current Position

Command Word: 0x6000

FieldTypeDescription
robotintSelect robot, range [1, 4]
json
{
  "robot": 1
}

Controller Response

Command Word: 0x6001

FieldTypeDescription
robotintSelect robot, range [1, 4]
globalPositionobjectGlobal position variable object
noteobjectNote object

Each point data in globalPosition is of type double[], with the following meaning:

IndexDescription
0Coordinate type: 0 Joint, 1 Cartesian, 2 Tool, 3 User
1Degree/Radian: 0 Radian, 1 Degree
2Left/Right hand: 0 None, 1 Left, 2 Right
3Tool coordinate system
4User coordinate system
5, 6Reserved for extension
7~13Robot coordinates (7 values)
14~20External axes
json
{
  "globalPosition": {
    "GP0021": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0022": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0023": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0024": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0025": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0026": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0027": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0028": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0029": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0030": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0031": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0032": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0033": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0034": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0035": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0036": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0037": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0038": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0039": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    "GP0040": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  },
  "note": {
    "GP0021": "",
    "GP0022": "",
    "GP0023": "",
    "GP0024": "",
    "GP0025": "",
    "GP0026": "",
    "GP0027": "",
    "GP0028": "",
    "GP0029": "",
    "GP0030": "",
    "GP0031": "",
    "GP0032": "",
    "GP0033": "",
    "GP0034": "",
    "GP0035": "",
    "GP0036": "",
    "GP0037": "",
    "GP0038": "",
    "GP0039": "",
    "GP0040": ""
  },
  "robot": 1
}

Set Global Position Variable

Note: If it is a four-axis robot, pad the last two values with 0.

Command Word: 0x6002

FieldTypeDescription
robotintSelect robot, range [1, 4]
posNamestringVariable name
posdouble[]Variable data
notestringNote
json
{
  "robot": 1,
  "posName": "GP0001",
  "pos": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 2, 3.3, 0, 0],
  "note": "qqq"
}

Query Global Position Variable

Command Word: 0x6003

FieldTypeDescription
robotintSelect robot, range [1, 4]
posNamestringPoint name
initialValueboolInitialization, optional to send or not
json
{
  "robot": 1,
  "posName": "GP0001",
  "initialValue": true
}

Controller Response

Command Word: 0x6004

FieldTypeDescription
robotintSelect robot, range [1, 4]
initialValueboolInitialization
posNamestringPoint name
posValuedouble[]Point data (radian)
posValueDegdouble[]Point data (degree)
notestringNote
json
{
  "initialValue": true,
  "note": "qqq",
  "posName": "GP0001",
  "posValue": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  "posValueDeg": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  "robot": 1
}

Local Variables

Local Variable Position P Point Query

Command Word: 0x6010

FieldTypeDescription
robotintRobot number, range [1, 4]
varnamestringPoint name
initialValueboolWhether it is an initial value, true: yes, false: no
json
{
  "robot": 1,
  "varname": "P0001",
  "initialValue": true
}

Controller Response

Command Word: 0x6011

FieldTypeDescription
robotintSelect robot, range [1, 4]
jobnamestringJob file name
varnamestringPoint name
initialValueboolWhether it is an initial value, true: yes, false: no
posdouble[]Point data in radians
posDegdouble[]Point data in degrees
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]
}

Local Variable Position E Point Query

Command Word: 0x6012

FieldTypeDescription
robotintRobot number, range [1, 4]
varnamestringPoint name
initialValueboolWhether it is an initial value, true: yes, false: no
json
{
  "robot": 1,
  "varname": "E0001",
  "initialValue": true
}

Controller Response

Command Word: 0x6013

FieldTypeDescription
robotintSelect robot, range [1, 4]
jobnamestringJob file name
varnamestringPoint name
initialValueboolWhether it is an initial value, true: yes, false: no
posdouble[]Point data in radians
posDegdouble[]Point data in degrees
json
{
  "robot": 1,
  "jobname": "Q1",
  "varname": "E0001",
  "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]
}

Local Variable Query

Command Word: 0x6014

FieldTypeDescription
robotintRobot number, range [1, 4]
vartypeintVariable type: 0 int, 1 double, 2 bool, 3 string
varnamestringVariable name
initialValueboolWhether it is an initial value, true: yes, false: no
identifystringCommandInsert: variable in the insert instruction interface, VariableReview: numeric variable in the monitoring interface
json
{
  "robot": 1,
  "vartype": 1,
  "varname": "I001",
  "initialValue": true,
  "identify": "CommandInsert"
}

Controller Response

Command Word: 0x6015

FieldTypeDescription
robotintSelect robot, range [1, 4]
jobnamestringJob file name
vartypeintVariable type: 1 bool, 2 int, 3 double
varnamestringVariable name
valuedoubleIf the variable is a numeric type, transmitted via value
stringstringIf the variable is a string type, transmitted via string
identifystringCommandInsert: variable in the insert instruction interface, VariableReview: numeric variable in the monitoring interface
json
{
  "robot": 1,
  "jobname": "Q1",
  "vartype": 1,
  "varname": "I001",
  "value": 2,
  "string": "i'm a string",
  "identify": "CommandInsert"
}

Global Variables

Set Global Variable

Command Word: 0x6020

FieldTypeDescription
varNamestringVariable name
varTypeintVariable type: 0 int, 1 double, 2 bool, 3 string
varValuedoubleVariable value
varStringstringUsed when varType = 3 for transmission
varNotestringNote
json
{
  "varName": "GD001",
  "varType": 1,
  "varValue": 14.0,
  "varString": "oooo",
  "varNote": "aaa"
}

Get Global Numeric Variable

Command Word: 0x6021

FieldTypeDescription
varTypeintVariable type: 1 bool, 2 int, 3 double
json
{
  "varType": 1
}

Controller Response

Command Word: 0x6022

FieldTypeDescription
varTypeintVariable type: 1 bool, 2 int, 3 double
varNumintNumber of numeric variables, range [1, 100]
varListarrayVariable list
varList[].varNamestringVariable name
varList[].varValuedoubleVariable value
varList[].varNotestringNote
json
{
  "varType": 1,
  "varNum": 2,
  "varList": [
    {
      "varName": "I001",
      "varValue": 3,
      "varNote": "QQQ"
    },
    {
      "varName": "D002",
      "varValue": 8.4,
      "varNote": "hhha"
    }
  ]
}

Global Variable Note Query

Command Word: 0x6023

FieldTypeDescription
varTypeintVariable type: 1 bool, 2 int, 3 double
json
{
  "varType": 1
}

Controller Response

Command Word: 0x6024

FieldTypeDescription
varTypeintVariable type: 1 bool, 2 int, 3 double
varNoteobjectVariable note object, key is variable name, value is note content
json
{
  "varNote": {
    "GI001": "9999"
  },
  "varType": 1
}

Global External Axis Variables

Set Global External Axis Variable

Command Word: 0x6025

FieldTypeDescription
robotintSelect robot, range [1, 4]
varnamestringPoint name
posdouble[]Point data, format: point info(7) + robot position(7) + external axis position(5) + reserved(2)
notestringNote
json
{
  "robot": 1,
  "varname": "GE0001",
  "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],
  "note": "qqq"
}

Query Global External Axis Variable

Command Word: 0x6026

FieldTypeDescription
robotintSelect robot, range [1, 4]
varnamestringPoint name
initialValueboolWhether it is an initial value, true: yes, false: no
json
{
  "robot": 1,
  "varname": "GE001",
  "initialValue": true
}

Controller Response

Command Word: 0x6027

FieldTypeDescription
robotintSelect robot, range [1, 4]
varnamestringPoint name
initialValueboolWhether it is an initial value
notestringNote
posValuedouble[]GP + external point (degree)
posValueDegdouble[]GP + external point (radian)
json
{
  "initialValue": true,
  "note": "qqq",
  "posValue": [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, 0.0],
  "posValueDeg": [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, 0.0],
  "robot": 1,
  "varname": "GE001"
}

Get All Global External Axis Points

Command Word: 0x6028

FieldTypeDescription
robotintSelect robot, range [1, 4]
json
{
  "robot": 1
}

Controller Response

Command Word: 0x6029

FieldTypeDescription
robotintSelect robot, range [1, 4]
globalExtPositionobjectPoint list, key is variable name, value is double[]
noteobjectNote list, key is variable name, value is note string
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"
  }
}

Query Position Under Specified Coordinate System

Command Word: 0x602A

FieldTypeDescription
robotintSelect robot, range [1, 4]
namestringPoint name
initialValueboolWhether it is an initial value
targetCoordintTarget coordinate system type
json
{
  "initialValue": true,
  "name": "GP0001",
  "targetCoord": 3
}

Controller Response

Command Word: 0x602B

FieldTypeDescription
robotintSelect robot, range [1, 4]
posNamestringPoint name
resultintWhether coordinate system conversion is correct
posarrayPosition information, 0~6 info, 7~13 robot body, 14~18 external axes (degree)
initialValueboolWhether it is an initial value
json
{
  "robot": 1,
  "posName": "GP0001",
  "result": 0,
  "pos": [0, 0, 0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  "initialValue": true
}

Query a Single Global Variable

Command Word: 0x602C

FieldTypeDescription
varTypeintVariable type
varNamestringVariable name
identitystringSource identifier: VariableReview for global variables in the monitoring interface, NumerlcalVarWidget for the global numeric variable interface
json
{
  "varType": 1,
  "varName": "GI001",
  "identity": "VariableReview"
}

Controller Response

Command Word: 0x602D

FieldTypeDescription
varTypeintVariable type
varNamestringVariable name
identitystringSource identifier
varNotestringNote
varValuedoubleVariable value
json
{
  "varType": 1,
  "varName": "GI001",
  "identity": "VariableReview",
  "varNote": "9999",
  "varValue": 16.0
}