Program CRUD
1 Program Deletion
Command Word: 0x5000
Description: Host sends delete program
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number, range [1,4] |
| jobfilename | string | Yes | Job file name |
| suffixname | string | Yes | Job file suffix |
Suffix Types:
.JBR- Main program.JBP- Background local program.JBPG- Background global program
{
"robot": 1,
"jobfilename": "QQQQ",
"suffixname": ".JBR"
}2 Program Rename
Command Word: 0x5001
Description: Changes the name of an existing program; host sends rename program
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number, range [1,4] |
| lastname | string | Yes | Program name before modification |
| newname | string | Yes | Program name after modification |
| suffixname | string | Yes | Program suffix |
Suffix Types:
.JBR- Main program.JBP- Background local program.JBPG- Background global program
{
"robot": 1,
"lastname": "QQQQ",
"newname": "WWWW",
"suffixname": ".JBR"
}3 Program Creation
Command Word: 0x5002
Description:
- Program creation must be in teach mode
- Program execution must be in run mode with servo ready and no power-on errors
- Host sends create program
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number, range [1,4] |
| jobName | string | Yes | New program name; first character must not be a number |
| suffix | string | Yes | Program suffix |
| time | string | Yes | Instruction insertion time, format like 2025.03.11 20:28:23 |
Suffix Types:
.JBR- Main program.JBP- Background local program.JBPG- Background global program
{
"robot": 1,
"jobName": "TTT",
"suffixname": ".JBR",
"time": "2025.03.11 20:28:23"
}3.1 Controller Sends New Job Command (0x5004)
Description: Controller sends a new job triggered by an external button on the teach pendant
Command Word: 0x5004
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobName | string | Yes | Name of the job to create |
{
"jobName": "File1"
}4 Program File List Query
Description: Host sends query for program file list; if successful, will return 0x5011, 0x5012, 0x5013 three command words
- When in use, after receiving
0x5011, start a 5-second timer to determine whether the file download process has timed out - When returning
0x5012, each robot sends separately, and each send contains up to five files - After file sending is complete,
0x5013is returned as the completion flag
4.1 Query Program File List (0x5010)
Command Word: 0x5010
Description: Host sends query for program file list
| Parameter | Type | Required | Description |
|---|---|---|---|
| - | - | - | No fields |
4.2 Return Program File Total Count (0x5011)
Command Word: 0x5011
Description: Controller returns total program file count, gets program file list for all robots
| Parameter | Type | Required | Description |
|---|---|---|---|
| absolutepath | string array | Yes | Program file folder list, e.g. {"/job/R1/","/job/R2/","/job/R3/","/job/R4/"}; when only one robot exists, fill other positions with empty strings |
| jobfilenum | int array | Yes | Number of files in each program folder, corresponding to robots 1,2,3,4; count includes reset program; when only one robot exists, other positions are 0 |
Note: Reset program - executes the reset program or moves to the reset point when reset is clicked, depending on user settings
{
"absolutepath": ["/job/R1/", "/job/R2/", "/job/R3/", "/job/R4/"],
"jobfilenum": [4, 1, 1, 1]
}4.3 Return Program File List (0x5012)
Command Word: 0x5012
Description: Controller proactively sends to host; when replying to host, each robot is sent separately
| Parameter | Type | Required | Description |
|---|---|---|---|
| robot | int | Yes | Robot number, range [1,4] |
| listnum | int | Yes | Number of program files sent, maximum 5 per send, range [0,5] |
| jobfilelist | object array | Yes | Program file array, number of elements equals listnum |
jobfilelist Element Structure:
| Parameter | Type | Description |
|---|---|---|
| name | string | Program file name, e.g. xxx.JBR |
| MD5 | string | MD5 value, used to determine if files are the same |
Note: RobotResetProgram.ResetPro is the reset program
{
"robot": 1,
"listnum": 2,
"jobfilelist": [
{
"name": "RobotResetProgram.ResetPro",
"MD5": "e4b21ca518cd2d2eecd4b3f463c02ab1"
},
{
"name": "yyy.JBR",
"MD5": "5b172a7a37a07aa6ccec1c60cfd5db7d"
}
]
}4.4 Program File List Query Complete (0x5013)
Command Word: 0x5013
Description: Marks the end of program file list query; controller returns the completion flag
| Parameter | Type | Required | Description |
|---|---|---|---|
| - | - | - | No fields |
5 Lua File List Query
5.1 Query Lua File List (0x5020)
Command Word: 0x5020
Description: Host sends query for lua file list
| Parameter | Type | Required | Description |
|---|---|---|---|
| - | - | - | No fields |
5.2 Return Lua File List (0x5021)
Command Word: 0x5021
Description: Controller returns lua file list
| Parameter | Type | Required | Description |
|---|---|---|---|
| absolutepath | string | Yes | Lua script directory, e.g. lua/ |
| sum | int | Yes | Total list count |
| scriptlist | string array | Yes | Lua file list |
{
"absolutepath": "lua/",
"sum": 2,
"scriptlist": ["ww.lua", "ee.lua"]
}