Instructions - Conditional Control
Call Subroutine (CALL)
Description: Calls another program. When the called program finishes running, it returns to the line after the CALL instruction in the main program.
Instruction Name: CALL
| Parameter | Type | Required | Description |
|---|---|---|---|
| callInParaVarData | array | No | Number and selection of input parameters; 0-12 elements. Element format: {"data":0.0,"secondvalue":0,"value":2,"varname":"D001"} |
| callOutParaVarData | array | No | Number and selection of output parameters; 0-12 elements. Element format: {"data":0.0,"secondvalue":0,"value":2,"varname":"D001"} |
| jobName | string | Yes | Called program name, cannot be itself, the called program must have parameter declarations |
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CALL is 15 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example: With two parameters
{
"callInParaVarData": [
{
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D001"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D002"
}
],
"callOutParaVarData": [
{
"data": 0.0,
"secondvalue": 0,
"value": 5,
"varname": "GD003"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 5,
"varname": "GD004"
}
],
"jobName": "QQQQ",
"logout": false,
"type": 15,
"userParamInt": 0,
"userParamString": ""
}Return (RETURN)
Description: Exits the currently running job file, e.g.: subroutine, background program.
Instruction Name: RETURN
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | RETURN is 251 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 251,
"userParamInt": 0,
"userParamString": ""
}Call Lua File (CALL_LUAFILE)
Description: After defining parameters, upload the Lua file, then insert the call Lua file instruction. After the instruction finishes running, all defined parameter variables will be passed in and output.
Instruction Name: CALL_LUAFILE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CALL_LUAFILE is 218 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| inParaVarData | array | No | Number and selection of input parameters; element count [0-12]. Element format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I001"} |
| luafileName | string | Yes | The called lua file |
| outParaVarData | array | No | Number and selection of output parameters; element count [0-12]. Element format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I001"} |
| textEditType | bool | No | Text compilation type; true: text type, false: statement type |
Example:
{
"logout": false,
"type": 218,
"userParamInt": 0,
"userParamString": "",
"inParaVarData": [
{
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
{
"data": 2.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
],
"luafileName": "demo.lua",
"outParaVarData": [
{
"data": 3.0,
"secondvalue": 0,
"value": 0,
"varname": ""
},
{
"data": 6.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
],
"textEditType": true
}If (IF)
Description: Determines whether the condition is satisfied to execute the next target instruction. When the condition is not satisfied, the ELSEIF statement is executed. IF and ENDIF must be used as a pair and cannot be deleted or changed individually, otherwise it will cause program runtime errors. ELSE IF cannot be used independently without IF. ELSE cannot be used independently without IF.
Instruction Name: IF
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | IF is 9 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| ifconditionArrayFINAL | object | Yes | Represents the if condition; the data inside {} is the if condition data |
ifconditionArrayFINAL Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many conditions there are |
| logic | array | The relationship between if conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
conditionGroup Element Structure:
| Parameter | Type | Description |
|---|---|---|
| logicType | int | If condition comparison method; 1: ==, 2: <, 3: >, 4: <=, 5: >=, 6: != |
| paraGroupOne | object | Variable 1, format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I002"} |
| paraGroupTwo | object | Variable 2, format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I002"} |
Example:
{
"logout": false,
"type": 9,
"userParamInt": 0,
"userParamString": "",
"ifconditionArrayFINAL": {
"conditionGroup": [
[
{
"logicType": 2,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
],
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
],
[
{
"logicType": 6,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
]
],
"logic": [1, 0]
}
}End If (END IF)
Instruction Name: END IF
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | END IF is 12 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 12,
"userParamInt": 0,
"userParamString": ""
}Else If (ELSE IF)
Instruction Name: ELSE IF
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | ELSE IF is 11 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| ifconditionArrayFINAL | object | Yes | Represents the if condition; the data inside {} is the if condition data |
ifconditionArrayFINAL Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions |
| logic | array | The relationship between if conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
Example:
{
"logout": false,
"type": 11,
"userParamInt": 0,
"userParamString": "",
"ifconditionArrayFINAL": {
"conditionGroup": [
[
{
"logicType": 2,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
],
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
],
[
{
"logicType": 6,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
]
],
"logic": [1, 0]
}
}Else (ELSE)
Instruction Name: ELSE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | ELSE is 10 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 10,
"userParamInt": 0,
"userParamString": ""
}Wait (WAIT)
Description: The program is in a waiting state until the condition is satisfied. After the condition is satisfied, the program continues to execute the instruction following the WAIT instruction.
Instruction Name: WAIT
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | WAIT is 8 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| m_filterTime | double | No | Filter time, the time the input signal must satisfy; [0,9999]s. Filter time must be less than wait time |
| paraTime | object | No | Wait time; double type; [0.01,9999]s |
| para_wait_result_ | object | No | Wait result, true when condition is satisfied; bool type |
| waitConditionFinal | object | No | The conditions and variables participating in the judgment inside {} |
| wait_value_check_ | bool | No | Whether to accept the result; true: "para_wait_result_" node exists, false: does not exist |
waitConditionFinal Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions |
| logic | array | The relationship between if conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
Example:
{
"logout": false,
"type": 8,
"userParamInt": 0,
"userParamString": "",
"m_filterTime": 66.0,
"paraTime": {
"data": 77.0,
"secondvalue": 0,
"value": 0,
"varname": ""
},
"para_wait_result_": {
"data": 0.0,
"secondvalue": 0,
"value": 3,
"varname": "B005"
},
"waitConditionFinal": {
"conditionGroup": [
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I003"
}
}
],
[
{
"logicType": 2,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I004"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I005"
}
}
],
[
{
"logicType": 3,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I006"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I007"
}
}
]
],
"logic": [1, 0]
},
"wait_value_check_": true
}WHILE Loop (WHILE)
Description: When the condition is true, the instructions inside the loop body are repeatedly executed. Inserting a WHILE instruction simultaneously inserts an ENDWHILE instruction. To delete a WHILE instruction, also delete the corresponding ENDWHILE instruction, otherwise the program will not run. When the program starts with WHILE and the last instruction is ENDWHILE, please insert a TIMER (delay) instruction at the beginning or end of the program. Otherwise, when the WHILE condition is not satisfied, the program may freeze. When the instructions inside WHILE do not contain motion instructions or may fall into an infinite loop in certain situations, please insert a TIMER (delay) instruction between WHILE and ENDWHILE, otherwise the program may freeze when the WHILE condition is satisfied. When the WHILE condition is satisfied, the instructions between WHILE and ENDWHILE will be executed in a loop. If the condition is not satisfied before reaching the WHILE instruction, when the WHILE instruction is reached, it will jump directly to the ENDWHILE instruction without executing the instructions between WHILE and ENDWHILE; if the condition becomes unsatisfied while executing instructions between WHILE and ENDWHILE, execution will continue until reaching the ENDWHILE line, then it will stop looping and continue executing the instructions below ENDWHILE.
Instruction Name: WHILE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | WHILE is 13 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| whileconditionArrayFINAL | object | Yes | Represents the while condition; the data inside {} is the while condition data |
whileconditionArrayFINAL Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions |
| logic | array | The relationship between while conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
Example:
{
"logout": false,
"type": 13,
"userParamInt": 0,
"userParamString": "",
"whileconditionArrayFINAL": {
"conditionGroup": [
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I003"
}
}
],
[
{
"logicType": 2,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I004"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I005"
}
}
],
[
{
"logicType": 3,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I007"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I006"
}
},
{
"logicType": 4,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I008"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I009"
}
}
]
],
"logic": [0, 1],
"logicGroup": [null, null, [0]]
}
}End Loop (ENDWHILE)
Instruction Name: ENDWHILE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | ENDWHILE is 14 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 14,
"userParamInt": 0,
"userParamString": ""
}LABEL (LABEL)
Description: Specifies a label for the jump target line. Two label instructions with the same label name cannot be inserted in the same program. Label instructions do not support move up/down operations.
Instruction Name: LABEL
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | LABEL is 51 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| label | string | Yes | Label name; format: [$......$] |
Example:
{
"logout": false,
"type": 51,
"userParamInt": 0,
"userParamString": "",
"label": "[$EAFF$]"
}JUMP (JUMP)
Description: Jumps to the instruction line of the specified label number. When the condition is satisfied, it jumps to the LABEL instruction line; if the condition is not satisfied, the JUMP instruction is ignored and execution continues to the line after the JUMP instruction. The JUMP instruction must be used together with the LABEL instruction. The JUMP instruction cannot jump across programs. For example, if a LABEL [$Q1$] instruction is inserted in the main program and a JUMP [$Q1$] instruction is inserted in a subroutine, the program will report an error.
Instruction Name: JUMP
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | JUMP is 52 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| jumpCondition | object | No | Represents the if condition; the data inside {} is the if condition data |
| jumpConditionFlag | bool | No | Whether to use the condition; true: use, false: do not use |
| label | string | Yes | Label name; format: [$......$] |
jumpCondition Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions |
| logic | array | The relationship between if conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
Example:
{
"logout": false,
"type": 52,
"userParamInt": 0,
"userParamString": "",
"jumpCondition": {
"conditionGroup": [
[
{
"logicType": 3,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I005"
},
"paraGroupTwo": {
"data": 89.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
},
{
"logicType": 3,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 88.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
],
[
{
"logicType": 6,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I089"
},
"paraGroupTwo": {
"data": 78.0,
"secondvalue": 0,
"value": 0,
"varname": ""
}
}
]
],
"logic": [1],
"logicGroup": [[0]]
},
"jumpConditionFlag": true,
"label": "[$EAFF$]"
}UNTIL (UNTIL)
Description: When the condition is not satisfied, the instructions between UNTIL and ENDUNTIL are repeatedly executed; when the condition is satisfied, execution jumps directly to the instruction below ENDUNTIL. Inserting a UNTIL instruction simultaneously inserts an ENDUNTIL instruction. To delete a UNTIL instruction, also delete the corresponding ENDUNTIL instruction, otherwise the program will not run.
Instruction Name: UNTIL
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | UNTIL is 87 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| untilconditionArrayFINAL | object | Yes | The judgment data inside {} |
untilconditionArrayFINAL Structure:
| Parameter | Type | Description |
|---|---|---|
| conditionGroup | array | The number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions |
| logic | array | The relationship between if conditions, in the order of array elements; 1: OR, 0: AND |
| logicGroup | array | The condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level |
Example:
{
"logout": false,
"type": 87,
"userParamInt": 0,
"userParamString": "",
"untilconditionArrayFINAL": {
"conditionGroup": [
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
}
},
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I003"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I004"
}
}
],
[
{
"logicType": 1,
"paraGroupOne": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I005"
},
"paraGroupTwo": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I006"
}
}
]
],
"logic": [0],
"logicGroup": [[1]]
}
}End Until (ENDUNTIL)
Instruction Name: ENDUNTIL
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | ENDUNTIL is 88 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 88,
"userParamInt": 0,
"userParamString": ""
}Craft Line (CRAFTLINE)
Description: Used only for dedicated processes. Inserting this instruction in the program sets the corresponding line number. When running the program in the dedicated process interface, it will first jump to the corresponding line number.
Instruction Name: CRAFTLINE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CRAFTLINE is 89 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| line | int | Yes | Corresponding instruction line number in the dedicated process interface; [1,999] |
Example:
{
"logout": false,
"type": 89,
"userParamInt": 0,
"userParamString": "",
"line": 3
}Instruction Note (CMDNOTE)
Description: Dedicated process instruction. After running this instruction in the program, it will jump to the corresponding line number in the dedicated process interface.
Instruction Name: CMDNOTE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CMDNOTE is 127 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| note | string | Yes | Note content; format: ##.......$$ |
Example:
{
"logout": false,
"type": 127,
"userParamInt": 0,
"userParamString": "",
"note": "##ADSDDD$$"
}Reachability Check (POS_REACHABLE)
Description: Determines whether the target point can be reached. If the point can be reached, the variable storing the status is set to 1; if not, it is set to 0.
Instruction Name: POS_REACHABLE
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | POS_REACHABLE is 133 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| moveType | int | No | Motion type; 0-MOVJ, 1-MOVL |
| positionId | string | Yes | Position variable name |
| _pVarName | object | Yes | Status storage variable |
Example:
{
"logout": false,
"type": 133,
"userParamInt": 0,
"userParamString": "",
"moveType": 0,
"positionId": "GP0001",
"_pVarName": {
"data": 0.0,
"secondvalue": 0,
"value": 6,
"varname": "GB001"
}
}Timer (CLKSTART / CLKSTOP / CLKRESET)
Description: Running this instruction starts timing and records the time to a local or global DOUBLE variable. Stopping the corresponding numbered timer stops timing, and the value already stored in the variable will not be reset to zero after stopping.
Timer Start (CLKSTART)
Instruction Name: CLKSTART
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CLKSTART is 128 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| ID | int | Yes | Timer number; [1,32] |
| _pVarName | object | Yes | Storage variable |
Example:
{
"logout": false,
"type": 128,
"userParamInt": 0,
"userParamString": "",
"ID": 5,
"_pVarName": {
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D001"
}
}Timer Stop (CLKSTOP)
Instruction Name: CLKSTOP
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CLKSTOP is 129 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| ID | int | Yes | Timer number; [1,32] |
Example:
{
"logout": false,
"type": 129,
"userParamInt": 0,
"userParamString": "",
"ID": 5
}Timer Reset (CLKRESET)
Instruction Name: CLKRESET
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CLKRESET is 130 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| ID | int | Yes | Timer number; [1,32] |
Example:
{
"logout": false,
"type": 130,
"userParamInt": 0,
"userParamString": "",
"ID": 5
}Read Linear Velocity (READLINEAR / STOPREADLINEAR)
Description: Real-time reading of the robot's linear velocity while the robot is running, storing the read velocity into a variable. When inserting the read linear velocity instruction, the stop read linear velocity instruction is also inserted simultaneously. To delete the read linear velocity instruction, also delete the corresponding stop linear velocity instruction, otherwise the program will report an error.
Read Linear Velocity (READLINEAR)
Instruction Name: READLINEAR
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | READLINEAR is 146 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| _pVarName | object | Yes | Variable; int type or double type |
Example:
{
"logout": false,
"type": 146,
"userParamInt": 0,
"userParamString": "",
"_pVarName": {
"data": 0.0,
"secondvalue": 0,
"value": 4,
"varname": "GI003"
}
}Stop Read Linear Velocity (STOPREADLINEAR)
Instruction Name: STOPREADLINEAR
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | STOPREADLINEAR is 147 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 147,
"userParamInt": 0,
"userParamString": ""
}Call Lua Statement (CALL_LUASTRING)
Description: Achieves corresponding functionality or operations by calling Lua statements.
Instruction Name: CALL_LUASTRING
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | CALL_LUASTRING is 230 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| textEditType | bool | No | Text compilation type; true: text type, false: statement type |
| variable | object | No | Lua statement variable |
Example:
{
"logout": false,
"type": 230,
"userParamInt": 0,
"userParamString": "",
"textEditType": false,
"variable": {
"data": 0.0,
"secondvalue": 0,
"value": 8,
"varname": "S001"
}
}Parameter Declaration (PARAM_DECLARATION)
Description: Declares parameters to be input or output. Input parameters will be received and used by the subroutine, and output parameters will be returned to the main program for use.
Instruction Name: PARAM_DECLARATION
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | PARAM_DECLARATION is 237 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| declareInParaVarData | array | No | Input parameter variables; element count equals the number of input parameters; parameter count [0,12] |
| declareInParaVarValues | array | No | Input parameter default values; element count equals the number of input parameters; parameter count [0,12] |
| declareInParaVarnote | array | No | Input parameter notes; element count equals the number of input parameters; parameter count [0,12] |
| declareOutParaVarData | array | No | Output parameter values; element count equals the number of output parameters; parameter count [0,12] |
| declareOutParaVarnote | array | No | Output parameter notes; element count equals the number of output parameters; parameter count [0,12] |
Example:
{
"logout": false,
"type": 237,
"userParamInt": 0,
"userParamString": "",
"declareInParaVarData": [
{
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I002"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I003"
}
],
"declareInParaVarValues": [
{
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D001"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D002"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 2,
"varname": "D003"
}
],
"declareInParaVarnote": [
"000",
"111",
"222"
],
"declareOutParaVarData": [
{
"data": 0.0,
"secondvalue": 0,
"value": 3,
"varname": "B001"
},
{
"data": 0.0,
"secondvalue": 0,
"value": 3,
"varname": "B002"
}
],
"declareOutParaVarnote": [
"333",
"4444"
]
}Wait for Position Reached (WAIT_POS)
Description: The end of MOV instruction execution does not mean the servo motion is finished; it only means the point has been dispatched. This instruction waits for the servo motor to precisely reach the point before executing the next instruction. This instruction only takes effect when used after a motion instruction. This instruction only supports foreground programs; background programs do not have motion instructions and naturally do not need to use it. This instruction does not support advance execution. If the robot reaches the point between the minimum wait time and the maximum wait time, it will exit waiting and execute the next instruction.
Instruction Name: WAIT_POS
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | WAIT_POS is 238 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| accurary | double | Yes | Accuracy; [0.0001,0.1] degrees/seconds |
| waitType | int | No | Wait type; 0: position, 1: velocity |
| maxTime | int | Yes | Maximum wait time; [20,20000] |
| minTime | int | Yes | Minimum wait time; [20,20000] |
Example:
{
"logout": false,
"type": 238,
"userParamInt": 0,
"userParamString": "",
"accurary": 0.10,
"maxTime": 200,
"minTime": 20,
"waitType": 0
}Collision Detection (DETECTCOLLISION_SET / DETECTCOLLISION_RESET)
Description: Collision detection set: calls temporary parameters for timely adjustment of collision detection thresholds. The collision detection set instruction only uses temporary parameters, effective only for motion instructions below the collision detection set instruction. When no collision detection set instruction is inserted, the collision detection threshold (instruction) parameter from the human-robot collaboration - force function interface is used. Collision detection parameter reset: resets the temporarily used collision detection threshold. After executing this instruction, the collision detection threshold (instruction) parameter from the human-robot collaboration - force function interface is called.
Collision Detection Set (DETECTCOLLISION_SET)
Instruction Name: DETECTCOLLISION_SET
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | DETECTCOLLISION_SET is 243 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| axis_1_ | double | No | Axis 1; [1,10000] |
| axis_2_ | double | No | Axis 2; [1,10000] |
| axis_3_ | double | No | Axis 3; [1,10000] |
| axis_4_ | double | No | Axis 4; [1,10000] |
| axis_5_ | double | No | Axis 5; [1,10000] |
| axis_6_ | double | No | Axis 6; [1,10000] |
| axis_7_ | double | No | Axis 7; [1,10000] |
| collision_detection_enable_ | int | No | Collision detection enable; 1: enable, 0: disable |
| temp_parameters_enable_ | int | No | Use temporary parameters; 1: use, 0: do not use |
Example:
{
"logout": false,
"type": 243,
"userParamInt": 0,
"userParamString": "",
"axis_1_": 10.0,
"axis_2_": 20.0,
"axis_3_": 30.0,
"axis_4_": 40.0,
"axis_5_": 50.0,
"axis_6_": 60.0,
"axis_7_": 0.0,
"collision_detection_enable_": 1,
"temp_parameters_enable_": 1
}Collision Detection Reset (DETECTCOLLISION_RESET)
Instruction Name: DETECTCOLLISION_RESET
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | DETECTCOLLISION_RESET is 244 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 244,
"userParamInt": 0,
"userParamString": ""
}Switch Conditional Branch (Switch / Case / Default / EndSwitch)
Description: When the parameter value of SWITCH matches a certain CASE value, it will jump to the corresponding CASE statement block to execute the corresponding instructions. After executing the statement block, it will exit SWITCH; if the SWITCH parameter value does not match any CASE, the DEFAULT statement is executed.
Switch (Switch)
Instruction Name: Switch
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | Switch is 247 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| variable_switch_ | object | Yes | Variable; int type |
Example:
{
"logout": false,
"type": 247,
"userParamInt": 0,
"userParamString": "",
"variable_switch_": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
}
}Case (Case)
Instruction Name: Case
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | Case is 248 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
| switch_case | int | Yes | Case value |
Example:
{
"logout": false,
"type": 248,
"userParamInt": 0,
"userParamString": "",
"switch_case": 22
}Default (Default)
Instruction Name: Default
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | Default is 249 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 249,
"userParamInt": 0,
"userParamString": ""
}EndSwitch (EndSwitch)
Instruction Name: EndSwitch
| Parameter | Type | Required | Description |
|---|---|---|---|
| logout | bool | No | Whether commented out; true: this instruction will not be executed in the job file; false: not commented, executable |
| type | int | Yes | EndSwitch is 250 in the enumeration sequence |
| userParamInt | int | No | Customer custom in secondary development, currently no meaning |
| userParamString | string | No | Customer custom in secondary development, currently no meaning |
Example:
{
"logout": false,
"type": 250,
"userParamInt": 0,
"userParamString": ""
}