Program Run Control
Reset Program Run Count
Command Word: 0x5600
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
{
"robot": 1
}Run Program
Operate on the program.
Send Start Program
Command Word: 0x5601
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
| jobname | string | Program name |
| suffixname | string | Program name suffix, values: .JBR main program, .JBP background local program, .JBPG background global program |
| stepRunSum | int | Total number of steps (optional) |
| callerName | string | Caller name (optional) |
| stepRun | bool | Whether to run in single step (optional) |
| index | int | Index (optional) |
| noFileRun | bool | Run without file (optional) |
| notJudgeSafePos | bool | Do not check safe position (optional) |
| line | int | Line number to start running |
| globalStart | bool | Whether in multi-robot mode |
| continueRun | int | Whether to continue running: 0 do not continue, 1 continue |
| startOver | int | Whether to restart from beginning: 0 continue, 1 restart from beginning |
{
"robot": 1,
"jobname": "TTT",
"suffixname": ".JBR",
"stepRunSum": 2,
"callerName": "tttt",
"stepRun": false,
"index": 0,
"noFileRun": false,
"notJudgeSafePos": false,
"line": 1,
"globalStart": false,
"continueRun": 0,
"startOver": 0
}Note: Optional fields have no effect if not used
Send Stop Program
Command Word: 0x5602
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
{
"robot": 1
}Program Execution Status Setting
Sent when the upper computer needs to change the current controller program execution mode.
Command Word: 0x5603
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| type | int | Program execution status: 0 single step run, 1 pause, 2 stop without powering off, 5 stop without powering off (preferred for stopping) |
{
"robot": 1,
"type": 5
}Note: For single step, there is no "all robots" option. For pause and stop, "all robots" is only available in multi-robot mode; set "robot" to 0 in this case.
Use Run Without File Switch
Command Word: 0x5604
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
{
"robot": 1
}Forward/Reverse Motion
Set Reverse Run
Command Word: 0x5610
| Field | Type | Description |
|---|---|---|
| switch | bool | Whether to run in reverse order |
{
"switch": false
}Query Forward/Reverse
Command Word: 0x5611
- No data to send
Controller Reply
Command Word: 0x5612
| Field | Type | Description |
|---|---|---|
| switch | bool | Whether to run in reverse order |
{
"switch": false
}Loop Count
Set Loop Count
Command Word: 0x5620
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| index | int | Total loop count, 0 means infinite loop |
{
"robot": 1,
"index": 1
}Query Loop Count
Command Word: 0x5621
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
{
"robot": 1
}Controller Reply
Command Word: 0x5622
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| index | int | Total loop count, 0 means infinite loop |
| count | int | Current run count |
{
"robot": 1,
"count": 0,
"index": 1
}Global Thread
Global Thread Auto-Start Setting
Command Word: 0x5630
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| name | string | Global background program name |
{
"robot": 1,
"name": "Q1"
}Global Thread Auto-Start Query
Command Word: 0x5631
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
{
"robot": 1
}Global Thread Auto-Start Response
Command Word: 0x5632
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| name | string | Global background program name |
{
"robot": 1,
"name": "Q1"
}Global Thread Start Control
Command Word: 0x5633
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| type | int | Start control: 0 means stop, 1 means start |
{
"robot": 1,
"type": 1
}Global Thread Start Status Query
Command Word: 0x5634
| Field | Type | Description |
|---|---|---|
| robot | int | Select robot, value range [1, 4] |
| runName | int | 1 means get global background run status |
{
"robot": 1,
"hasRun": true,
"runName": 1
}Controller Reply
| Command Word | Type | Description |
|---|---|---|
| 0x50c6 | - | GLOBAL_PTHREAD_RUNSTATUS_RESPOND |
| Field | Type | Description |
|---|---|---|
| robot | int | Current robot number |
| hasRun | bool[] | Auto-start status array, true means started, false means stopped |
{
"robot": 1,
"hasRun": [false, true]
}Append Motion Mode
Append motion mode runs programs without using program files.
Usage:
- Open append motion mode
- Append motion mode insert instruction vector
- Append motion mode settings
Open Append Motion Mode
Command Word: 0x5640
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
| open | bool | Whether to enable append motion mode, true to enable, false to disable |
{
"robot": 1,
"open": true
}Query Append Motion Mode
Command Word: 0x5641
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
{
"robot": 1
}Controller Reply
Command Word: 0x5642
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
| open | bool | Whether append motion mode is enabled, true means enabled, false means disabled |
{
"robot": 1,
"open": true
}Append Motion Insert Instruction Vector
Command Word: 0x5643
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
| isContinue | bool | true: only receive and store pos; false: receive pos and make the robot execute all pos |
| data | array | Instruction JSON list, format is cmd->toJson() |
{
"data": [
{ "cmd": "toJson()" },
{ "cmd": "toJson()" },
{ "cmd": "toJson()" }
],
"isContinue": false,
"robot": 1
}For instruction details, please refer to the Instructions page
Append Motion Mode Suspend (Pause)
Command Word: 0x5644
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
{
"robot": 1
}Append Motion Mode Start
Command Word: 0x5645
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [1, 4] |
{
"robot": 1
}Append Motion Mode Stop
Command Word: 0x5646
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to operate, value range [0, 3] |
{
"robot": 0
}Auto-Start
Auto-start program; after setting, it will auto-start on boot.
Set Auto-Start Program
Command Word: 0x5647
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to query, value range [1, 4] |
| enable | bool | Whether enabled, true means enabled, false means not used |
| count | int | Run count |
| speed | int | Run speed |
| jobname | string | Program name |
{
"robot": 1,
"enable": false,
"count": 1,
"speed": 15,
"jobname": "Q1"
}Query Auto-Start Program
Command Word: 0x5648
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to query, value range [1, 4] |
{
"robot": 1
}Controller Reply
Command Word: 0x5649
| Field | Type | Description |
|---|---|---|
| robot | int | Robot number to query, value range [1, 4] |
| enable | bool | Whether enabled |
| count | int | Run count |
| speed | int | Run speed |
| jobname | string | Program name |
{
"robot": 1,
"enable": false,
"count": 1,
"speed": 15,
"jobname": "Q1"
}Content to be added for trial run and single step
Query Global Background Auto-Start Status
Command Word: 0x50c5
| Field | Type | Description |
|---|---|---|
| robot | int | Current robot number |
| hasRun | bool | Auto-start status, true means started, false means stopped |
| runName | int | 1: get global background run status |
{
"robot": 1,
"hasRun": true,
"runName": 1
}Controller Reply
Command Word: 0x50c6
| Field | Type | Description |
|---|---|---|
| robot | int | Current robot number |
| hasRun | bool | Auto-start status, true means started, false means stopped |
{
"robot": 1,
"hasRun": false
}