Skip to content

Instructions - Program Control

Start Thread

Description: Starts a global background or local background task

Instruction Name: PTHREAD_START

type Value: 90

ParameterTypeDescription
jobNamestringBackground task program file name
localOrGlobalintBackground type: 0-local background, 1-global background
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

json
{
    "jobName": "SFDFF",
    "localOrGlobal": 0,
    "logout": false,
    "type": 90,
    "userParamInt": 0,
    "userParamString": ""
}

Exit Thread

Description: Closes an already started background task

Instruction Name: PTHREAD_END

type Value: 91

ParameterTypeDescription
jobNamestringBackground task program file name
localOrGlobalintBackground type: 0-local background, 1-global background
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

json
{
    "jobName": "SFDFF",
    "localOrGlobal": 0,
    "logout": false,
    "type": 91,
    "userParamInt": 0,
    "userParamString": ""
}

Pause Run

Description: Pauses the main program and local background program execution

Instruction Name: PAUSERUN

type Value: 111

ParameterTypeDescription
jobNamestringProgram name selected when local background type is chosen
programtypeintBackground type: 0-local background, 1-global background
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

json
{
    "jobName": "SFDFF",
    "programtype": 2,
    "logout": false,
    "type": 111,
    "userParamInt": 0,
    "userParamString": ""
}

Continue Run

Description: Continues running the paused main program or local background program

Instruction Name: CONTINUERUN

type Value: 112

ParameterTypeDescription
jobNamestringProgram name selected when local background type is chosen
programtypeintBackground type: 0-local background, 1-global background
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

json
{
    "jobName": "SFDFF",
    "programtype": 2,
    "logout": false,
    "type": 112,
    "userParamInt": 0,
    "userParamString": ""
}

Stop Run

Description: Stops the running program. When the program reaches the stop run instruction, the servo powers down

Instruction Name: STOPRUN

type Value: 113

ParameterTypeDescription
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

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

Restart Run

Description: Stops the running program. When the program reaches the stop run instruction, the servo powers down

Instruction Name: RESTRATRUN

type Value: 117

ParameterTypeDescription
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)

Request Example:

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

Window Instruction

Description: When running the instruction, a popup window with the filled prompt content appears. The number of buttons equals the number of options. Clicking a button stores the variable value into the bound variable

Instruction Name: WINDOW

type Value: 208

ParameterTypeDescription
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)
countintNumber of options, value range [0,3]
text1stringPrompt content
text2stringOption 1 content
text3stringOption 2 content
text4stringOption 3 content
value1intOption 1 corresponding variable value
value2intOption 2 corresponding variable value
value3intOption 3 corresponding variable value
variableobjectBound variable, structure:

variable Structure:

FieldTypeDescription
datafloatData value
secondvalueintSecondary value
valueintVariable value
varnamestringVariable name

Request Example:

json
{
    "logout": false,
    "type": 208,
    "userParamInt": 0,
    "userParamString": "",
    "count": 3,
    "text1": "AAAAA",
    "text2": "1",
    "text3": "2",
    "text4": "3",
    "value1": 1111,
    "value2": 2222,
    "value3": 3333,
    "variable": {
        "data": 0.0,
        "secondvalue": 0,
        "value": 1,
        "varname": "I001"
    }
}

Thread State

Description: Views the state of the currently executing thread program. Stopped equals 1, paused equals 2, running equals 3

Instruction Name: PTHREAD_STATE

type Value: 209

ParameterTypeDescription
logoutboolWhether commented out: true-this instruction will not be executed in the job file, false-not commented, executable
userParamIntintCustomer custom parameter in secondary development (currently no meaning)
userParamStringstringCustomer custom parameter in secondary development (currently no meaning)
jobNamestringProgram name selected when background type is chosen
localOrGlobalintProgram type: 0-local background, 1-global background, 2-main program
m_VariableValueobjectStorage variable, structure:

m_VariableValue Structure:

FieldTypeDescription
datafloatData value
secondvalueintSecondary value
valueintVariable value
varnamestringVariable name

Request Example:

json
{
    "logout": false,
    "type": 209,
    "userParamInt": 0,
    "userParamString": "",
    "jobName": "SFDFF",
    "localOrGlobal": 0,
    "m_VariableValue": {
        "data": 0.0,
        "secondvalue": 0,
        "value": 1,
        "varname": "I001"
    }
}