Transferring Robot Programs via CRI

From Wiki

The CRI Ethernet Interface can be used to transfer robot program files to the robot. This article shows how to do this.

This approach is intended for use advanced cases that require dynamic program changes. For most applications defining and transmitting the program manually via CPRog/iRC, then starting it via CRI or a different interface should be sufficient. Variables and global signals can be used to parameterize a manually defined program via CRI, Modbus or a logic program.

Commands

The relevant CRI commands are:

  • CMD UploadFileInit
  • CMD UploadFileLine
  • CMD UploadFileFinish

UploadFileInit starts the upload. Its parameters are the file name (relative to the Data directory, this means you need to prepend your file name with "Programs/") and the number of lines. UploadFileLine uploads a single line of the file. Send this command for each line. UploadFileFinish closes the file.

Please read the CRI documentation for more info.

Example

The following shows the actual commands to upload a short program. The command start and end (CRISTART, command number and CRIEND) are omitted in this example, they need to be added. Otherwise your commands should be similar.

CMD UploadFileInit Programs/MyProgram.xml 8
CMD UploadFileLine <?xml version="1.0" encoding="utf-8"?>
CMD UploadFileLine <Program>
CMD UploadFileLine <Header RobotName="igus Gantry" RobotType="DLE-RG-0001" GripperType="" Software="iRC V902-13-022-DEV" VelocitySetting="0" />
CMD UploadFileLine <Loop Nr="1" Mode="DIn" Condition="False" Descr="" />
CMD UploadFileLine <Joint AbortCondition="False" Nr="2" Source="Numerical" velPercent="100" acc="40" smooth="0" a1="10" a2="0" a3="0" a4="0" a5="0" a6="0" e1="0" e2="0" e3="0" Descr="" />
CMD UploadFileLine <Joint AbortCondition="False" Nr="3" Source="Numerical" velPercent="100" acc="40" smooth="0" a1="210" a2="0" a3="0" a4="0" a5="0" a6="0" e1="0" e2="0" e3="0" Descr="" />
CMD UploadFileLine <EndLoop Nr="4" Descr="" />
CMD UploadFileLine </Program>
CMD UploadFileFinish