Skip to content

Program Run Control

Reset Program Run Count

Command Word: 0x5600

FieldTypeDescription
robotintSelect robot, value range [1, 4]
json
{
  "robot": 1
}

Run Program

Operate on the program.

Send Start Program

Command Word: 0x5601

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
jobnamestringProgram name
suffixnamestringProgram name suffix, values: .JBR main program, .JBP background local program, .JBPG background global program
stepRunSumintTotal number of steps (optional)
callerNamestringCaller name (optional)
stepRunboolWhether to run in single step (optional)
indexintIndex (optional)
noFileRunboolRun without file (optional)
notJudgeSafePosboolDo not check safe position (optional)
lineintLine number to start running
globalStartboolWhether in multi-robot mode
continueRunintWhether to continue running: 0 do not continue, 1 continue
startOverintWhether to restart from beginning: 0 continue, 1 restart from beginning
json
{
  "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

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
json
{
  "robot": 1
}

Program Execution Status Setting

Sent when the upper computer needs to change the current controller program execution mode.

Command Word: 0x5603

FieldTypeDescription
robotintSelect robot, value range [1, 4]
typeintProgram execution status: 0 single step run, 1 pause, 2 stop without powering off, 5 stop without powering off (preferred for stopping)
json
{
  "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

FieldTypeDescription
robotintSelect robot, value range [1, 4]
json
{
  "robot": 1
}

Forward/Reverse Motion

Set Reverse Run

Command Word: 0x5610

FieldTypeDescription
switchboolWhether to run in reverse order
json
{
  "switch": false
}

Query Forward/Reverse

Command Word: 0x5611

  • No data to send

Controller Reply

Command Word: 0x5612

FieldTypeDescription
switchboolWhether to run in reverse order
json
{
  "switch": false
}

Loop Count

Set Loop Count

Command Word: 0x5620

FieldTypeDescription
robotintSelect robot, value range [1, 4]
indexintTotal loop count, 0 means infinite loop
json
{
  "robot": 1,
  "index": 1
}

Query Loop Count

Command Word: 0x5621

FieldTypeDescription
robotintSelect robot, value range [1, 4]
json
{
  "robot": 1
}

Controller Reply

Command Word: 0x5622

FieldTypeDescription
robotintSelect robot, value range [1, 4]
indexintTotal loop count, 0 means infinite loop
countintCurrent run count
json
{
  "robot": 1,
  "count": 0,
  "index": 1
}

Global Thread

Global Thread Auto-Start Setting

Command Word: 0x5630

FieldTypeDescription
robotintSelect robot, value range [1, 4]
namestringGlobal background program name
json
{
  "robot": 1,
  "name": "Q1"
}

Global Thread Auto-Start Query

Command Word: 0x5631

FieldTypeDescription
robotintSelect robot, value range [1, 4]
json
{
  "robot": 1
}

Global Thread Auto-Start Response

Command Word: 0x5632

FieldTypeDescription
robotintSelect robot, value range [1, 4]
namestringGlobal background program name
json
{
  "robot": 1,
  "name": "Q1"
}

Global Thread Start Control

Command Word: 0x5633

FieldTypeDescription
robotintSelect robot, value range [1, 4]
typeintStart control: 0 means stop, 1 means start
json
{
  "robot": 1,
  "type": 1
}

Global Thread Start Status Query

Command Word: 0x5634

FieldTypeDescription
robotintSelect robot, value range [1, 4]
runNameint1 means get global background run status
json
{
  "robot": 1,
  "hasRun": true,
  "runName": 1
}

Controller Reply

Command WordTypeDescription
0x50c6-GLOBAL_PTHREAD_RUNSTATUS_RESPOND
FieldTypeDescription
robotintCurrent robot number
hasRunbool[]Auto-start status array, true means started, false means stopped
json
{
  "robot": 1,
  "hasRun": [false, true]
}

Append Motion Mode

Append motion mode runs programs without using program files.

Usage:

  1. Open append motion mode
  2. Append motion mode insert instruction vector
  3. Append motion mode settings

Open Append Motion Mode

Command Word: 0x5640

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
openboolWhether to enable append motion mode, true to enable, false to disable
json
{
  "robot": 1,
  "open": true
}

Query Append Motion Mode

Command Word: 0x5641

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
json
{
  "robot": 1
}

Controller Reply

Command Word: 0x5642

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
openboolWhether append motion mode is enabled, true means enabled, false means disabled
json
{
  "robot": 1,
  "open": true
}

Append Motion Insert Instruction Vector

Command Word: 0x5643

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
isContinuebooltrue: only receive and store pos; false: receive pos and make the robot execute all pos
dataarrayInstruction JSON list, format is cmd->toJson()
json
{
  "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

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
json
{
  "robot": 1
}

Append Motion Mode Start

Command Word: 0x5645

FieldTypeDescription
robotintRobot number to operate, value range [1, 4]
json
{
  "robot": 1
}

Append Motion Mode Stop

Command Word: 0x5646

FieldTypeDescription
robotintRobot number to operate, value range [0, 3]
json
{
  "robot": 0
}

Auto-Start

Auto-start program; after setting, it will auto-start on boot.

Set Auto-Start Program

Command Word: 0x5647

FieldTypeDescription
robotintRobot number to query, value range [1, 4]
enableboolWhether enabled, true means enabled, false means not used
countintRun count
speedintRun speed
jobnamestringProgram name
json
{
  "robot": 1,
  "enable": false,
  "count": 1,
  "speed": 15,
  "jobname": "Q1"
}

Query Auto-Start Program

Command Word: 0x5648

FieldTypeDescription
robotintRobot number to query, value range [1, 4]
json
{
  "robot": 1
}

Controller Reply

Command Word: 0x5649

FieldTypeDescription
robotintRobot number to query, value range [1, 4]
enableboolWhether enabled
countintRun count
speedintRun speed
jobnamestringProgram name
json
{
  "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

FieldTypeDescription
robotintCurrent robot number
hasRunboolAuto-start status, true means started, false means stopped
runNameint1: get global background run status
json
{
  "robot": 1,
  "hasRun": true,
  "runName": 1
}

Controller Reply

Command Word: 0x50c6

FieldTypeDescription
robotintCurrent robot number
hasRunboolAuto-start status, true means started, false means stopped
json
{
  "robot": 1,
  "hasRun": false
}