Skip to content

Job File Transfer

For running without job file instructions, to insert instructions into job files, please use 0x3121

0x3001 FILE_INSTRUCTION

This command is used when the teach pendant sends job file instructions.

json
{
    "robot": 1,      // Robot number
    "cmd->toJson()" // Instruction JSON list
}

Job File Transfer Process

Scenario 1: The controller has fewer job files than the teach pendant, so the teach pendant needs to upload job files to the controller

Step 1: Teach pendant sends a command to get the controller ID

0x5052 IDENTIFY_NUMBER_INQUIRE

Controller response: 0x5053 IDENTIFY_NUMBER_RESPOND

json
{
    "controllerID": "4DC9F0249098C82E" // Controller ID
}
ParameterTypeDescription
controllerIDstringController ID

After obtaining the connected controller ID, when synchronizing job files, you need to check whether this ID is known. If known, check whether the path dir/controllerID exists; if it exists, no operation is needed; if it does not exist, create a working file path in the format: dir/controllerID/robotJob/R1. For multiple robots, use R1-4.

Step 2: Teach pendant sends a command to get the job file list

0x5532 JOBFILE_LIST_INQUIRE

Controller response: 0x5533 JOBFILE_SUM_RESPOND

json
{
    "absolutepath": ["/job/R1/", "/job/R2/", "/job/R3/", "/job/R4/"], // Job file folder list
    "jobfilenum": [2, 33, 233, 666]                                   // Number of files in each job file folder
}
ParameterTypeDescription
absolutepatharrayJob file folder list
jobfilenumarrayNumber of files in each job file folder

At this point, start the download timer with a 5-second timeout, used to determine whether the file download process has timed out.

Step 3: Controller actively sends the job file list to the teach pendant

0x5534 JOBFILE_LIST_RESPOND

json
{
    "robot": 1,
    "listnum": 2, // Maximum 10
    "jobfilelist": [
        {
            "name": "xxx.JBR", // Job file name
            "MD5": "123"       // MD5 value, used to determine whether the file is the same
        },
        {
            "name": "yyy.JBR",
            "MD5": "132"
        }
    ]
}
ParameterTypeDescription
robotintRobot number
listnumintList count, maximum 10
jobfilelistarrayJob file list

The parameters returned by the controller are used to compare with the local job files. If the file is the same, check whether the MD5 value is the same. If the MD5 value is the same, no action is needed; if different, delete the local file and re-download it. Record the files that need to be downloaded: file name and path are stored in the download job file list (with absolute path). If the file is different, also record it in the list as a file that needs to be downloaded.

Step 4: File transfer connection

For file download and upload, the teach pendant needs to connect to port 5000 for file transfer (command and other instruction transfers use port 6000).

Step 5: The file transfer network between the teach pendant and controller is connected, and file transfer begins

Step 6: Teach pendant sends the name and size of the job file to be uploaded

0x5501 REQUEST_UPLOAD_FILE

json
{
    "name": "vxWorks", // File name sent by the teach pendant
    "size": 4096       // File size sent by the teach pendant
}
ParameterTypeDescription
namestringFile name sent by the teach pendant
sizeintFile size sent by the teach pendant

The teach pendant starts requesting to upload a file and waits for the controller's response.

Step 7: Controller responds whether to agree to the upload

0x5502 REQUEST_UPLOAD_RESPOND

json
{
    "answer": "yes" // "yes" means agreeing to the file upload request, "busy" means the controller is busy
}
ParameterTypeDescription
answerstringyes=agree to upload, busy=controller is busy

Step 8: Teach pendant receives "yes" and starts sending the file

0x5512

The file is written as a binary stream, sent in sliced chunks. If the remaining file size exceeds the specified value (2*1024), the specified data size is sent each time until the remaining file size is less than the specified data size, and then the remaining file data is sent.

Step 9: Controller finishes receiving the file

0x5513 RECEIVE_UPLOAD_FINISH

json
{
    "finish": true // Stop the download timer and import the newly uploaded file
}
ParameterTypeDescription
finishbooltrue=stop the download timer and import the newly uploaded file

Step 10: If multiple job files need to be synchronized to the controller, repeat steps 6-9


Scenario 2: The controller has more job files than the teach pendant, so the teach pendant needs to download job files from the controller

Steps 1-5 are the same for upload and download. The file transfer network between the teach pendant and controller is connected, and file transfer begins.

Step 1: Teach pendant sends a command to get the controller ID

0x5052 IDENTIFY_NUMBER_INQUIRE

Controller response: 0x5053 IDENTIFY_NUMBER_RESPOND

json
{
    "controllerID": "4DC9F0249098C82E" // Controller ID
}
ParameterTypeDescription
controllerIDstringController ID

After obtaining the connected controller ID, when synchronizing job files, you need to check whether this ID is known. If known, check whether the path dir/controllerID exists; if it exists, no operation is needed; if it does not exist, create a working file path in the format: dir/controllerID/robotJob/R1. For multiple robots, use R1-4.

Step 2: Teach pendant sends a command to get the job file list

0x5532 JOBFILE_LIST_INQUIRE

Controller response: 0x5533 JOBFILE_SUM_RESPOND

json
{
    "absolutepath": ["/job/R1/", "/job/R2/", "/job/R3/", "/job/R4/"], // Job file folder list
    "jobfilenum": [2, 33, 233, 666]                                   // Number of files in each job file folder
}
ParameterTypeDescription
absolutepatharrayJob file folder list
jobfilenumarrayNumber of files in each job file folder

At this point, start the download timer with a 5-second timeout, used to determine whether the file download process has timed out.

Step 3: Controller actively sends the job file list to the teach pendant

0x5534 JOBFILE_LIST_RESPOND

json
{
    "robot": 1,
    "listnum": 2, // Maximum 10
    "jobfilelist": [
        {
            "name": "xxx.JBR", // Job file name
            "MD5": "123"       // MD5 value, used to determine whether the file is the same
        },
        {
            "name": "yyy.JBR",
            "MD5": "132"
        }
    ]
}
ParameterTypeDescription
robotintRobot number
listnumintList count, maximum 10
jobfilelistarrayJob file list

The parameters returned by the controller are used to compare with the local job files. If the file is the same, check whether the MD5 value is the same. If the MD5 value is the same, no action is needed; if different, delete the local file and re-download it. Record the files that need to be downloaded: file name and path are stored in the download job file list (with absolute path). If the file is different, also record it in the list as a file that needs to be downloaded.

Step 4: File transfer connection

For file download and upload, the teach pendant needs to connect to port 5000 for file transfer (command and other instruction transfers use port 6000).

Step 5: The file transfer network between the teach pendant and controller is connected, and file transfer begins

Step 6: Teach pendant starts sending the job file name from the list

0x5504

json
{
    "name": "job/R1/WWWWW.JBR" // Name of the job file to download
}
ParameterTypeDescription
namestringName of the job file to download (including path)

The parameter name is the job file path in the controller plus the file name. In 0x5533 and 0x5534, the controller has sent the path and name to the teach pendant. The teach pendant prompts to start synchronizing job files.

Step 7: Controller responds

0x5505

json
{
    "answer": "yes",             // Whether the controller agrees to the download
    "name": "job/R1/WWWWW.JBR",  // Name of the job file to be downloaded
    "size": 217                  // Size of this job file
}
ParameterTypeDescription
answerstringWhether the controller agrees to the download
namestringName of the job file to be downloaded
sizeintSize of this job file

Step 8: Controller actively sends

0x5522

Step 9: Check whether the teach pendant received the parameters successfully

0x5523

json
{
    "finish": true // Teach pendant received successfully
}
ParameterTypeDescription
finishboolTeach pendant received successfully

The above process represents the completion of downloading one job file. If multiple job files need to be downloaded, decrement the count in the list from 0x5534 by one and repeat the above process.