Instructions - Program Control
Start Thread
Description: Starts a global background or local background task
Instruction Name: PTHREAD_START
type Value: 90
| Parameter | Type | Description |
|---|---|---|
| jobName | string | Background task program file name |
| localOrGlobal | int | Background type: 0-local background, 1-global background |
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| jobName | string | Background task program file name |
| localOrGlobal | int | Background type: 0-local background, 1-global background |
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| jobName | string | Program name selected when local background type is chosen |
| programtype | int | Background type: 0-local background, 1-global background |
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| jobName | string | Program name selected when local background type is chosen |
| programtype | int | Background type: 0-local background, 1-global background |
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
| count | int | Number of options, value range [0,3] |
| text1 | string | Prompt content |
| text2 | string | Option 1 content |
| text3 | string | Option 2 content |
| text4 | string | Option 3 content |
| value1 | int | Option 1 corresponding variable value |
| value2 | int | Option 2 corresponding variable value |
| value3 | int | Option 3 corresponding variable value |
| variable | object | Bound variable, structure: |
variable Structure:
| Field | Type | Description |
|---|---|---|
| data | float | Data value |
| secondvalue | int | Secondary value |
| value | int | Variable value |
| varname | string | Variable name |
Request Example:
{
"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
| Parameter | Type | Description |
|---|---|---|
| logout | bool | Whether commented out: true-this instruction will not be executed in the job file, false-not commented, executable |
| userParamInt | int | Customer custom parameter in secondary development (currently no meaning) |
| userParamString | string | Customer custom parameter in secondary development (currently no meaning) |
| jobName | string | Program name selected when background type is chosen |
| localOrGlobal | int | Program type: 0-local background, 1-global background, 2-main program |
| m_VariableValue | object | Storage variable, structure: |
m_VariableValue Structure:
| Field | Type | Description |
|---|---|---|
| data | float | Data value |
| secondvalue | int | Secondary value |
| value | int | Variable value |
| varname | string | Variable name |
Request Example:
{
"logout": false,
"type": 209,
"userParamInt": 0,
"userParamString": "",
"jobName": "SFDFF",
"localOrGlobal": 0,
"m_VariableValue": {
"data": 0.0,
"secondvalue": 0,
"value": 1,
"varname": "I001"
}
}