Skip to content

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

ParameterTypeRequiredDescription
callInParaVarDataarrayNoNumber and selection of input parameters; 0-12 elements. Element format: {"data":0.0,"secondvalue":0,"value":2,"varname":"D001"}
callOutParaVarDataarrayNoNumber and selection of output parameters; 0-12 elements. Element format: {"data":0.0,"secondvalue":0,"value":2,"varname":"D001"}
jobNamestringYesCalled program name, cannot be itself, the called program must have parameter declarations
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCALL is 15 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example: With two parameters

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesRETURN is 251 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCALL_LUAFILE is 218 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
inParaVarDataarrayNoNumber and selection of input parameters; element count [0-12]. Element format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}
luafileNamestringYesThe called lua file
outParaVarDataarrayNoNumber and selection of output parameters; element count [0-12]. Element format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I001"}
textEditTypeboolNoText compilation type; true: text type, false: statement type

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesIF is 9 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
ifconditionArrayFINALobjectYesRepresents the if condition; the data inside {} is the if condition data

ifconditionArrayFINAL Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many conditions there are
logicarrayThe relationship between if conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

conditionGroup Element Structure:

ParameterTypeDescription
logicTypeintIf condition comparison method; 1: ==, 2: <, 3: >, 4: <=, 5: >=, 6: !=
paraGroupOneobjectVariable 1, format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I002"}
paraGroupTwoobjectVariable 2, format: {"data":0.0,"secondvalue":0,"value":1,"varname":"I002"}

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesEND IF is 12 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

json
{
    "logout": false,
    "type": 12,
    "userParamInt": 0,
    "userParamString": ""
}

Else If (ELSE IF)

Instruction Name: ELSE IF

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesELSE IF is 11 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
ifconditionArrayFINALobjectYesRepresents the if condition; the data inside {} is the if condition data

ifconditionArrayFINAL Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions
logicarrayThe relationship between if conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesELSE is 10 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesWAIT is 8 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
m_filterTimedoubleNoFilter time, the time the input signal must satisfy; [0,9999]s. Filter time must be less than wait time
paraTimeobjectNoWait time; double type; [0.01,9999]s
para_wait_result_objectNoWait result, true when condition is satisfied; bool type
waitConditionFinalobjectNoThe conditions and variables participating in the judgment inside {}
wait_value_check_boolNoWhether to accept the result; true: "para_wait_result_" node exists, false: does not exist

waitConditionFinal Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions
logicarrayThe relationship between if conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesWHILE is 13 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
whileconditionArrayFINALobjectYesRepresents the while condition; the data inside {} is the while condition data

whileconditionArrayFINAL Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions
logicarrayThe relationship between while conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesENDWHILE is 14 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesLABEL is 51 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
labelstringYesLabel name; format: [$......$]

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesJUMP is 52 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
jumpConditionobjectNoRepresents the if condition; the data inside {} is the if condition data
jumpConditionFlagboolNoWhether to use the condition; true: use, false: do not use
labelstringYesLabel name; format: [$......$]

jumpCondition Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions
logicarrayThe relationship between if conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesUNTIL is 87 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
untilconditionArrayFINALobjectYesThe judgment data inside {}

untilconditionArrayFINAL Structure:

ParameterTypeDescription
conditionGrouparrayThe number of elements indicates how many parallel conditions there are, elements within the array are parallel conditions
logicarrayThe relationship between if conditions, in the order of array elements; 1: OR, 0: AND
logicGrouparrayThe condition logic for elements in the conditionGroup node; 1: OR, 0: AND, null means no logic at this level

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesENDUNTIL is 88 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCRAFTLINE is 89 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
lineintYesCorresponding instruction line number in the dedicated process interface; [1,999]

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCMDNOTE is 127 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
notestringYesNote content; format: ##.......$$

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesPOS_REACHABLE is 133 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
moveTypeintNoMotion type; 0-MOVJ, 1-MOVL
positionIdstringYesPosition variable name
_pVarNameobjectYesStatus storage variable

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCLKSTART is 128 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
IDintYesTimer number; [1,32]
_pVarNameobjectYesStorage variable

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCLKSTOP is 129 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
IDintYesTimer number; [1,32]

Example:

json
{
    "logout": false,
    "type": 129,
    "userParamInt": 0,
    "userParamString": "",
    "ID": 5
}

Timer Reset (CLKRESET)

Instruction Name: CLKRESET

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCLKRESET is 130 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
IDintYesTimer number; [1,32]

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesREADLINEAR is 146 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
_pVarNameobjectYesVariable; int type or double type

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesSTOPREADLINEAR is 147 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCALL_LUASTRING is 230 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
textEditTypeboolNoText compilation type; true: text type, false: statement type
variableobjectNoLua statement variable

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesPARAM_DECLARATION is 237 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
declareInParaVarDataarrayNoInput parameter variables; element count equals the number of input parameters; parameter count [0,12]
declareInParaVarValuesarrayNoInput parameter default values; element count equals the number of input parameters; parameter count [0,12]
declareInParaVarnotearrayNoInput parameter notes; element count equals the number of input parameters; parameter count [0,12]
declareOutParaVarDataarrayNoOutput parameter values; element count equals the number of output parameters; parameter count [0,12]
declareOutParaVarnotearrayNoOutput parameter notes; element count equals the number of output parameters; parameter count [0,12]

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesWAIT_POS is 238 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
accurarydoubleYesAccuracy; [0.0001,0.1] degrees/seconds
waitTypeintNoWait type; 0: position, 1: velocity
maxTimeintYesMaximum wait time; [20,20000]
minTimeintYesMinimum wait time; [20,20000]

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesDETECTCOLLISION_SET is 243 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
axis_1_doubleNoAxis 1; [1,10000]
axis_2_doubleNoAxis 2; [1,10000]
axis_3_doubleNoAxis 3; [1,10000]
axis_4_doubleNoAxis 4; [1,10000]
axis_5_doubleNoAxis 5; [1,10000]
axis_6_doubleNoAxis 6; [1,10000]
axis_7_doubleNoAxis 7; [1,10000]
collision_detection_enable_intNoCollision detection enable; 1: enable, 0: disable
temp_parameters_enable_intNoUse temporary parameters; 1: use, 0: do not use

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesDETECTCOLLISION_RESET is 244 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

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

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesSwitch is 247 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
variable_switch_objectYesVariable; int type

Example:

json
{
    "logout": false,
    "type": 247,
    "userParamInt": 0,
    "userParamString": "",
    "variable_switch_": {
        "data": 0.0,
        "secondvalue": 0,
        "value": 1,
        "varname": "I001"
    }
}

Case (Case)

Instruction Name: Case

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesCase is 248 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning
switch_caseintYesCase value

Example:

json
{
    "logout": false,
    "type": 248,
    "userParamInt": 0,
    "userParamString": "",
    "switch_case": 22
}

Default (Default)

Instruction Name: Default

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesDefault is 249 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

json
{
    "logout": false,
    "type": 249,
    "userParamInt": 0,
    "userParamString": ""
}

EndSwitch (EndSwitch)

Instruction Name: EndSwitch

ParameterTypeRequiredDescription
logoutboolNoWhether commented out; true: this instruction will not be executed in the job file; false: not commented, executable
typeintYesEndSwitch is 250 in the enumeration sequence
userParamIntintNoCustomer custom in secondary development, currently no meaning
userParamStringstringNoCustomer custom in secondary development, currently no meaning

Example:

json
{
    "logout": false,
    "type": 250,
    "userParamInt": 0,
    "userParamString": ""
}