Recipe Interface#

Formula classification:

1、According to the function, it is divided into user-defined formula (non-real-time formula) and system data formula (real-time formula) : Custom recipe: The user defines the data format that he wants to receive and send, and the recipe manager extracts the user’s input valid data and frames the output data. The process of receiving and sending is controlled by the user in the script. System data recipe: The user selects the desired data from the system data provided by the system for real-time reading through the output end, or modifies the system variables provided by the robot in real time through the input end. User-configurable variables are provided by the system and cannot be customized for personal use. The receiving and sending of data are not controlled by the user, but by the system in real time. The control period (the fastest period for sending and receiving) is 4ms.

2、According to the protocol, it is divided into streaming protocol formula and can protocol formula: Streaming protocols are formulated for streaming data (485, tcp, etc.) services.

The can protocol formula provides support for can only.

indicates the description of system data mapping#

Data type of recipe:

(1)byte(unsigned 8-bit shaping)

(2)char(signed 8-bit shaping)

(3)word(unsigned 16-bit shaping)

(4)short(signed 16-bit shaping)

(5)dword(unsigned 32-bit shaping)

(6)int(signed 32-bit shaping)

(7)float(32-bit floating point number)

(8)double(64-bit double floating point number)

System data entry:

Data direction: user  robot

Formula variable

type

Corresponding interface

Instructions

DigitalOutputCommand[1..2]

byte

Control cabinet general

output DO[1..16

The user controls the robot’s

DO . A byte sequence

corresponds to eight DO’s.

DigitalOutputCommand[3]

byte

End tool output

Tool_DO[1..2]

The first two digits of the

byte correspond to tools DO1

and DO2,and the last six digits

are reserved.

BitInputReg[1..2]

byte

byte Register function

input fun_reg_in[1..16]

A byte sequence corresponds

to 8 register function inputs

BitInputReg[3..10]

byte

byte Register Bool Input

bool_reg_in[1..64]

A byte sequence corresponds to

8 register Bool input

WordInputReg[1..32]

word

Register Word input

word_reg_in[1..32]

Enter 1-32 corresponding

registers Word in sequence

FloatInputReg[1..32]

float

float Register Float enter

float_reg_in[1..32]

Enter 1-32 corresponding

registers Float in order

ForceEnd[1..6]

float

float End force sensor data

The force description of the

end force sensor data under

the robot end TCP. Data

definition: X, Y, Z,

Rx,Ry,Rz, unit N, Nm

ForceBase[1..6]

float

Base force sensor data

Force description of the base

force sensor data under the

robot base. Data definition:

X, Y, Z,Rx,Ry,Rz, unit N, Nm

System data output:

Data direction: robot  users

Formula variable

type

Corresponding interface

Instructions

DigitalSignalStatus[1..2]

byte

Control cabinet general

input DI[1..16]

The robot feedbacks the input

signal of the current robot

to the user. A byte sequence

corresponds to eight DI’s

DigitalSignalStatus[3]

byte

Arm end tool Enter

Tool_DI[1..2]

The first two digits of the

byte correspond to DI1 and DI2,

and the last six digits are

reserved

DigitalSignalStatus[4..5]

byte

Control cabinet general

output DO[1..16]

The robot feedbacks the output

signal of the current robot to

the user. A byte sequence

corresponds to eight DO’s

DigitalSignalStatus[6]

byte

Output Tool_DO [1..2]

The first two digits of the

byte correspond to tools DO1

and DO2, and the last six

digits are reserved

DigitalSignalStatus[7]

byte

IO function Input

fun_io_in[1..8]

A byte sequence corresponds

to function input 1-8

DigitalSignalStatus[8]

byte

IO function output

fun_io_out [1..8]

A byte sequence corresponds

to 1-8 of the function output

RobotState[1..7]

float

Actual joint position

6 Actual position of each joint

. The seventh position is

reserved. Unit is rad

RobotState[8..13]

float

float The actual Cartesian

pose with the end in the

base coordinate system

End Cartesian space actual

. TCP relative to the base

posecoordinate system. Data

definition: X,Y,Z,Rx,Ry,Rz,

unit m, rad

RobotState[14..19]

float

Cartesian actual moment

Force description of the end

force sensor data under the

end flange of the robot.

Data definition: X,Y,Z,Rx,

Ry,Rz, unit N, Nm

RobotState[20..25]

float

Offset of tool coordinate

system

The pose offset in the tool

coordinate system

RobotState[26..29]

float

Load mass and center of mass

Mass and center of mass of

end load, unit kg,m

RobotState[30..32]

float

reserv

No

BitOutputReg[1..2]

byte

Register function output

fun_reg_out[1..16]

A byte sequence corresponds to

the function output of eight

registers

BitOutputReg[3..10]

byte

Register Bool Output

bool_reg_out[1..64]

A byte sequence corresponds

to 8 register Bool output

WordOutputReg[1..32]

word

Register Word Output

word_reg_out[1..32]

Enter 1-32 corresponding

registers Word in sequence

FloatOutputReg[1..32]

float

Register Float output

float_reg_out[1..32]

Enter 1-32 corresponding

registers Float in order

Recipe creation#

streaming data recipe#

User-defined recipe#

1、Select any streaming port (485, tcp, etc.) formula management in the ui interface (select 485 port here)

../_images/%E9%85%8D%E6%96%B9%E7%AE%A1%E7%90%86.jpg

2、Click Add, enter the recipe name, and select the non-real-time recipe

../_images/%E6%96%B0%E5%BB%BA%E9%85%8D%E6%96%B9.jpg

3、Add input data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%85%A5.jpg

4、Add output data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%87%BA.jpg

Click OK. Recipe creation is complete. Note: The header and tail of the input and output frames are relatively independent and need to be configured separately without affecting each other.

System data formulation#

1、 Select any streaming port (485, tcp, etc.) formula management in the ui interface (select 485 port here)

2、Click Add, enter the recipe name, and select the non-real-time recipe

../_images/%E6%96%B0%E5%BB%BA%E9%85%8D%E6%96%B91.jpg

3、Add input data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%85%A51.jpg

4、 Add output data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%87%BA1.jpg

5、Click OK to complete the recipe creation.

CAN protocol recipe#

User-defined recipe#

1、Select can port formula management in the ui interface

../_images/%E9%85%8D%E6%96%B9%E7%AE%A1%E7%90%863.jpg

2、Click Add, enter the recipe name, and select the non-real-time recipe

../_images/%E6%96%B0%E5%BB%BA%E9%85%8D%E6%96%B93.jpg

3、Add input data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%85%A53.jpg

4、 Add output data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%87%BA3.jpg

Click OK. Recipe creation is complete.

System data formulation#

1、Select can port formula management in the ui interface

2、 Click Add, enter the recipe name, and select the real-time recipe

3、 Add input data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%85%A54.jpg

4、 Add output data items

../_images/%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E9%A1%B9-%E8%BE%93%E5%87%BA4.jpg

5、Click OK to complete the recipe creation。

Formulation use#

Use of 485 port formula#

Custom recipes to use#

1、use 485 to serial debugging assistant to connect the computer and robot 485 port

2、Select the recipe file for port 485

../_images/a.jpg

3、Write program flow control

../_images/b.jpg

CommRecv:

../_images/c.jpg

CommSend:

../_images/d.jpg

4、run the program, serial debugging assistant send FF FF 01 02 03 EE EE

5、program variable interface display

../_images/e.jpg

6、In the serial debugging assistant, you will receive: FF FF 7D 7D 7D FE FE

../_images/f.jpg

System formulation use#

1、use 485 to serial debugging assistant to connect the computer and robot 485 port

2、Select the recipe file for port 485

../_images/a1.jpg

3、Due to the selection of real-time system formula, the serial debugging assistant will periodically receive robot pose data:

../_images/b1.jpg

4、when sending FF FF 01 EE EE through the serial debugging assistant, the corresponding IO port will be controlled through the recipe manager

../_images/c1.jpg

Use of CAN port formula#

Custom recipes to use#

1、Connect the computer with the robot using the can box, and debug the can using CanTest

2、Select recipe file for can port

../_images/a2.jpg

3、Write program flow control

../_images/b2.jpg

CommRecv:

../_images/c2.jpg

CommSend:

../_images/d2.jpg

4、Run the program, CanTest send data frame id 1, data 01 02 03

5、program variable interface display

../_images/e2.jpg

The first variable in the list is the received frame id, followed by the data.

6、The CanTest terminal will receive frame id 1:7D 7D 7D(125 125 125).

../_images/f2.jpg

System formulation use#

1、Connect the computer with the robot using the can box, and debug the can using CanTest

2、Select recipe file for can port

../_images/a3.jpg

Due to the selection of a real-time system formula, CanTest will periodically receive robot pose data:

../_images/b3.jpg

When the data frame id 1 is sent via CanTest and the data is 01, the corresponding IO port will be controlled via the recipe manager:

../_images/c3.jpg

Use of TCP and UDP port recipes#

The tcp/ip interface can also use the streaming recipe interface; for historical reasons, tcp and udp can only use the system data recipe in the recipe (real-time recipe).

The robot controller provides two ways to use the formula for the tcp/ip interface:

1、udp server, port 2011.

2、tcp/udp client, ip and port are user-defined.

udp server#

1、 Use the network cable to connect the computer and the controller, use the network debugging assistant to test

2、Configure the formula file for the udp server

../_images/a4.jpg

3、 Use the debugging assistant to create a udp client

../_images/b4.jpg

4、 Periodic robot pose data will be received after successful connection

../_images/c4.jpg

5、 send FF FF 01 EE EE to the server, will control the configuration of the corresponding IO.

../_images/d4.jpg

tcp/udp client#

1、Use the network cable to connect the computer and the controller, use the network debugging assistant to test

2、Use the debugging assistant to create a tcp/udp server

../_images/a5.jpg

3、Create a tcp/udp client through the ui

../_images/b5.jpg ../_images/c5.jpg

4、Select the recipe file for the client

../_images/d5.jpg

5、The debugging assistant will receive periodic robot pose data

../_images/e5.jpg

6、Send FF FF 01 EE EE to the client, which will control the corresponding IO of the configuration