Communications and messages

Note: When use a communication protocol to communicate directly you need to burn Transponder in Basic and the latest version of AtomMain in Atom.

communication

1 Communication Settings

Make sure your communication Settings are as follows

  • Bus Interface: USB Type-C
  • Baud Rate: 115200
  • Date Bits: 8
  • Parity Check:none
  • Stop Bit: 1

2 Command Frame Description & Single Instruction Parsing

The main BASIC sends data to the Atom, and the Atom parses the data after receiving it. For example, an instruction containing Return Value will be returned to the BASIC within 500ms.

3 Format for Sending and Receiving Command Frames

All commands are hexadecimal, and the format of send and receive is the same.

Each communication command must contain the following five parts,part 3 and 4 of which can be null.

  • *1 Command Frame Head: 0xFE 0xFE
    • Fixed
    • Included
  • Effective Command Length : 0x02 ~ 0x10
    • The length of all the following commands
    • Included
  • Command Sequence Number: 00 ~ 8F
    • Various commands have been developed
    • Null
  • Command Content: some
    • Null
  • End of the Command: 0XFA
    • Fixed
    • Included

4 Single Instruction Parsing

The main BASIC sends data to the Atom, and the Atom parses the data after receiving it. For example, an instruction containing Return Value will be returned to the BASIC within 500ms.

Type Data Description Data Length Description
Command frame First byte 0 1 The frame head identification, 0xfe
First byte1 1 The frame head identification, 0xfe
Data length byte 1 Different instructions correspond to different lengths of data
Command byte 1 Depends on different commands
Data frame Data 0-16 Command attached data, depends on different commands
End frame End the byte 1 Stop bit, 0xfa

1) Atom Power On

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x10
Data[4] End frame 0xfa

Serial port sending example: FE FE 02 10 FA

No Return Value

2) Atom Power Off

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x11
Data[4] End frame 0xfa

Serial port sending example: FE FE 02 11 FA

NO Return Value

3) Atom Status Inquiry

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x12
Data[4] End frame 0xfe

Serial port sending example: FE FE 02 12 FA

Return Value

Data field Description Data
Data[0] Return frame header 0XFE
Data[1] Return frame header 0XFE
Data[2] Return data length frame 0X02
Data[3] Return instruction frame 0X12
Data[4] Power on/off 0X01/0X00
Data[5] End frame 0XFA

Serial port sending example: FE FE 02 12 00 FA

4) Read Angle (read position information)

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x20
Data[4] End frame 0xfa

Serial port sending example: FE FE 02 20 FA

Returns a data structure from Atom

Data field Description Data
Data[0] Return frame header 0XFE
Data[1] Return frame header 0XFE
Data[2] Return data length frame 0X0E
Data[3] Return instruction frame 0X20
Data[4] Servo 1 high Angle Angle1_low
Data[5] Servo 1 low Angle Angle1_high
Data[6] Servo 1 high Angle Angle2_low
Data[7] Servo 1 low Angle Angle2_high
Data[8] Servo 1 high Angle Angle3_low
Data[9] Servo 1 low Angle Angle3_high
Data[10] Servo 1 high Angle Angle4_low
Data[11] Servo 1 low Angle Angle4_high
Data[12] Servo 1 high Angle Angle5_low
Data[13] Servo 1 low Angle Angle5_high
Data[14] Servo 1 high Angle Angle6_low
Data[15] Servo 1 low Angle Angle6_high
Data[16] End frame 0XFA

Serial port sending example: FE FE 0E 20 06 E6 EA 4E C4 81 0B BD EA C0 02 B6 FA

How to get the angle of joint 1 ?

temp = angle1_low+angle1_high*256

Angle1=(temp > 33000 ? (temp–65536) : temp)/100

(The rest are the same)

5) Send Individual Angles

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x06
Data[3] Instruction frame 0x21
Data[4] Joint number Joint_no
Data[5] Angle of rotation Angle
Data[6] high Angle Angle_high
Data[7] low Angle Angle_low
Data[8] End frame 0xfa

Serial port sending example: FE FE 06 21 00 00 00 20 FA

The value of joint NO ranges from 0 to 5

Angle High: Data type Byte

Calculation: The Angle value is multiplied by 100 first to int and then to take the high hexadecimal byte

Angle Low: Data type Byte

Calculation: The Angle value is multiplied by 100 first to int and then to take the high hexadecimal byte

No Return Value

6) Send All Angles

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x0f
Data[3] Instruction frame 0x22
Data[4] Angle 1 is in low_byte Angle1_low
Data[5] Angle 1 is in high_byte Angle1_high
Data[6] Angle 2 is in low_byte Angle2_low
Data[7] Angle 2 is in high_byte Angle2_high
Data[8] Angle 3 is in low_byte Angle3_low
Data[9] Angle 3 is in high_byte Angle3_high
Data[10] Angle 4 is in low_byte Angle4_low
Data[11] Angle 4 is in high_byte Angle4_high
Data[12] Angle 5 is in low_byte Angle5_low
Data[13] Angle 5 is in high_byte Angle5_high
Data[14] Angle 6 is in low_byte Angle6_low
Data[15] Angle 6 is in high_byte Angle6_high
Data[16] Specified speed Sp
Data[17] End frame 0xfa

Serial port sending example: FE FE 0F 22 06 E6 EA 4E C4 81 0B BD EA C0 02 B6 FA

Angle High: Data type Byte

Calculation: The Angle value of Joint 1 is multiplied by 100 first to int and then to take the high hexadecimal byte

Angle Low: Data type Byte

Calculation: The Angle value of Joint 1 is multiplied by 100 first to int and then to take the high hexadecimal byte

(The rest are the same)

No Return Value

7) Read All Coordinates

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x23
Data[4] End frame 0xfa

Serial port sending example: FE FE 02 23 FA

Returns a data structure from Atom

Data field Description Data
Data[0] Return frame header 0XFE
Data[1] Return frame header 0XFE
Data[2] Return data length frame 0X0E
Data[3] Return instruction frame 0X23
Data[4] Specified x is in a low coordinate x_high
Data[5] Specified x is in a high coordinate x_low
Data[6] Specified y is in a low coordinate y_ high
Data[7] Specified y in a high coordinate y_ low
Data[8] Specified z is in a low coordinate z_ high
Data[9] Specified z in a high coordinate z_low
Data[10] Specified rx is in a low coordinate rx_high
Data[11] Specified rx is in a high coordinate rx_low
Data[12] Specified ry is in a low coordinate ry_high
Data[13] Specified ry in a high coordinate ry_low
Data[14] Specified rz is in a low coordinate rz_high
Data[15] Specified rz is in a high coordinate rz_low
Data[16] End frame 0XFA

How to get x-coordinate ?

temp = x_low + x_high*256

x-coordinate =(temp > 33000 ?(temp – 65536) : temp)/10

(same as the y/z-coordinate )

How to get rx-coordinate ?

temp = rx_low + rx_high*256

rx-coordinate =(temp > 33000 ?(temp – 65536) : temp) /10

(same as the ry/rz-coordinate )

8) Send Individual Coordinates

Data field Description Data
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x06
Data[3] Instruction frame 0x24
Data[4] Specified coordinate X/y/z/rx/ry/rz
Data[5] Specified xyz/rxryrz is in a low parameter Xyz/ rxryrz_low
Data[6] Specified xyz/rxryrz is in a high parameter Xyz/rxryrz_high
Data[7] Specified speed Sp
Data[8] End frame 0xfa

Set the x-coordinate to be 100 and the target speed to be 20

Serial port sending example: FE FE 06 24 00 00 64 20 FA

Specify coordinate axis: data type Byte

Value range: 0~5

xyz_high: Data type Byte

Calculation: The x/y/z coordinate value is multiplied by 10 and then to take the high hexadecimal byte

xyz_low: Data type Byte

Calculation: The x/y/z coordinate value is multiplied by 10 and then to take the low hexadecimal byte

rxyz_high: Data type Byte

Calculation: The rx/ry/rz coordinate value is multiplied by 10 and then to take the high hexadecimal byte

rxyz_low: Data type Byte

Calculation: The rx/ry/rz coordinate value is multiplied by 10 and then to take the low hexadecimal byte

No Return Value

9) Send All Coordinates

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x10
Data[3] Instruction frame 0x25
Data[4] Specified x is in a low coordinate X_low
Data[5] Specified x is in a high coordinate X_high
Data[6] Specified y is in a low coordinate Y_low
Data[7] Specified y in a high coordinate Y_high
Data[8] Specified z is in a low coordinate Z_low
Data[9] Specified z in a high coordinate Z_high
Data[10] Specified rx is in a low coordinate Rx_low
Data[11] Specified rx is in a high coordinate Rx_high
Data[12] Specified ry is in a low coordinate Ry_low
Data[13] Specified ry in a high coordinate Ry_high
Data[14] Specified rz is in a low coordinate Rz_low
Data[15] Specified rz is in a high coordinate Rz_high
Data[16] Specified speed Sp
Data[17] Mode Mode
Data[18] End frame 0xfa

Set the target point at the end of the robot (-14,-27,275,-89.5, 0.7,-90.7)

set the target speed to be 20

Serial port sending example: FE FE 10 25 FF 74 FE EE 0A C1 DD 05 00 48 DC 95 32 01 FA

x_high: Data type Byte

Calculation: The x coordinate value is multiplied by 10 and then to take the high hexadecimal byte

x_low:Data type Byte

Calculation: The x coordinate value is multiplied by 10 and then to take the low hexadecimal byte

(same as the y/z-coordinate )

rx_high: Data type Byte

Calculation: The rx coordinate value is multiplied by 10 and then to take the high hexadecimal byte

rx_low: Data type Byte

Calculation: The rx coordinate value is multiplied by 10 and then to take the low hexadecimal byte

(same as the ry/rz-coordinate )

No Return Value

10) Specified Point Arrival Detection (under development)

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x10
Data[3] Instruction frame 0x25
Data[4] x is in a low coordinate X_low
Data[5] x is in a high coordinate X_high
Data[6] y is in a low coordinate Y_low
Data[7] y in a high coordinate Y_high
Data[8] z is in a low coordinate Z_low
Data[9] z in a high coordinate Z_high
Data[10] rx is in a low coordinate Rx_low
Data[11] rx is in a high coordinate Rx_high
Data[12] ry is in a low coordinate Ry_low
Data[13] ry in a high coordinate Ry_high
Data[14] rz is in a low coordinate Rz_low
Data[15] rz is in a high coordinate Rz_high
Data[16] Is_linear type
Data[17] End frame 0xfa

Determine whether the manipulator has reached the specified point

Serial port sending example: FE FE 10 25 FF 74 FE EE 0A C1 DD 05 00 48 DC 95 32 01 FA

x_high: Data type Byte

Calculation: The x coordinate value is multiplied by 10 and then to take the high hexadecimal byte

x_low:Data type Byte

Calculation: The x coordinate value is multiplied by 10 and then to take the low hexadecimal byte

(same as the y/z-coordinate )

rx_high: Data type Byte

Calculation: The rx coordinate value is multiplied by 10 and then to take the high hexadecimal byte

rx_low: Data type Byte

Calculation: The rx coordinate value is multiplied by 10 and then to take the low hexadecimal byte

(same as the ry/rz-coordinate )

Type: Data type Byte (Not yet in use)

Returns a data structure

Data field Description Data
Data[0] Return frame 0XFE
Data[1] Return frame 0XFE
Data[2] Return data length frame 0X03
Data[3] Return instruction frame 0X2A
Data[4] InPosition/noInPosition 0X01/0X00
Data[5] End frame 0XFA

It has reached a point;

Serial port sending example: FE FE 03 2A 00 FA

11) Motion Detection

Data field Description Data
Data[0] Identify the frame 0XFE
Data[1] Identify the frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X2B
Data[4] End frame 0XFA

Check whether the robot is moving

Serial port sending example: FE FE 02 2B FA

Returns a data structure

Data field Description Data
Data[0] Return frame 0XFE
Data[1] Return frame 0XFE
Data[2] Return data length frame 0X02
Data[3] Return instruction frame 0X2B
Data[4] Not running/no data - running 0X00/0X01
Data[5] End frame 0XFA

Serial port sending example: FE FE 02 2B 00 FA

12) Jog-Direction Motion

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x05
Data[3] Instruction frame 0x30
Data[4] Joint number Joint
Data[5] Joint direction Direction
Data[6] Specified speed Sp
Data[7] End frame 0xfa

Set Joint 1 to rotate clockwise at 50% speed

Serial port sending example: FE FE 05 30 01 01 32 FA

Joint No. ranges from 1~6

di: Data type Byte, ranges from 0~1

sp: Data type Byte, ranges from 0-100%

No Return Value

13) Jog-Coordinate Motion

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x05
Data[3] Instruction frame 0x33
Data[4] Specified coordinates X1 y2 z3 rx4 ry5 rz6
Data[5] Joint direction Direction
Data[6] Specified speed Sp
Data[7] End frame 0xfa

Set the end to move at a speed of 50% counterclockwise toward the X-axis

Serial port sending example: FE FE 05 32 01 00 32 FA

Axis_number: Data type Byte(x = 0 ,y,z,rx,ry,rz) Range from 1~6

di:Data type Byte, ranges from 0~1

sp: Data type Byte, ranges from 0-100%

No Return Value

14) jog stop

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x02
Data[3] Instruction frame 0x34
Data[4] End frame 0xfa

Jog stop to move

Serial port sending example: FE FE 02 34 FA

No Return Value

15) send potential value

Data field Description Data
Data[0] Identify the frame 0xfe
Data[1] Identify the frame 0xfe
Data[2] Data length frame 0x05
Data[3] Instruction frame 0x3a
Data[4] Joint number Joint
Data[5] Encoder is in a Low position Encoder_low
Data[6] Encoder is in a High position Encoder_high
Data[7] End frame 0xfa

Return data structure

| Data domain | Description | Data |
| - | - | - |
| Data[0] | recognition frame | 0XFE |
| Data[1] | recognition frame | 0XFE |
| Data[2] | data length frames | 0X05 |
| Data[3] | instruction frame | 0X3A |
| Data[4] | Joint serial number | Joint |
| Data[5] | High value of steering gear potential | Encoder\_high |
| Data[6] | Low potential of steering gear | Encoder\_low |
| Data[7] | End frame | 0XFA |

Example, set joint 2 to 2249 potential.

Example of serial port sending: FE FE 05 3A 01 08 C9 FA

Range of joint serial numbers: 0~5

byte Joint: data types

byte Encoder_high: data types

Calculation method: high bit value (hexadecimal) is taken

byte Encoder_low: data types

Calculation method: take potential value (hexadecimal) low position

Return Value: No


16) .Gets the potential value;)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X3B
Data[4] Joint serial number joint
Data[5] End frame 0XFA

Get the potential value of steering gear 1

Example of serial port sending: FE FE 03 3B 00 FA

Range of joint serial numbers: 1~6

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X04
Data[3] Returns the instruction frame 0X3B
Data[4] High value of steering gear potential Encoder_high
Data[5] Low potential of steering gear Encoders_low
Data[6] End frame 0XFA

Example of serial port return: FE FE 04 3B 08 C9 FA

Potential =2249

How to calculate the potential value

Potential value = low potential value + high potential value *256


17) Transmission of potential values for six steering gear

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X15
Data[3] Instruction frame 0X3C
Data[4] 1 steering gear with high potential encoder_1_high
Data[5] Low byte potential of steering gear 1 encoder_1_low
Data[6] 2 steering gear with high potential encoder_2_high
Data[7] Low byte potential of steering gear 2 encoder_2_low
Data[8] 3 steering gear with high potential encoder_3_high
Data[9] Low byte potential of steering gear 3 encoder_3_low
Data[10] 4 steering gear with high potential bytes encoder_4_high
Data[11] Low byte potential of steering gear 4 encoder_4_low
Data[12] 5 steering gear with high potential encoder_5_high
Data[13] Low byte potential of steering gear 5 encoder_5_low
Data[14] 6 steering gear with high potential encoder_6_high
Data[15] Low byte potential of steering gear 6 encoder_6_low
Data[16] Specify speed Sp
Data[17] End frame 0XFA

Send potential values for all motors

Example of serial port sending: FE FE 15 3C 00 00 00 00 00 00 00 00 00 00 00 00 20FA

(separate potential values sent over reference)

byte encoder_1_high: data types

Calculation method :1 steering gear potential value converted to int type and then hexadecimal high byte

byte encoder_1_low: data types

Calculation method :1 steering gear potential value converted to int type and then hexadecimal low byte

(Other Same)

Sp: data type byte range 0~100

Return Value: No


18) Read speed

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X40
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 40 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X40
Data[4] Specify speed Sp
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 40 32 FA


19) Set speed

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X41
Data[4] Specify speed sp
Data[5] End frame 0XFA

Example of serial port sending: FE FE 02 41 32 FA

Return Value: No


20) Read FeedOverride( not open yet)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X42
Data[4] End frame 0XFA

Return Value: No


21) Read acceleration (not yet open)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X44
Data[4] End frame 0XFA

22) Read the minimum angle of the joint

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X4A
Data[4] Joint steering gear serial number Joint_number
Data[5] End frame 0XFA

Read

Example of serial port sending: FE FE 03 4A 00 FA

joint_no range: 0~5

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X04
Data[3] Returns the instruction frame 0X4A
Data[4] High angle of steering gear Angle_high
Data[5] Low angle of steering gear Angle_low
Data[6] End frame 0XFA

Example of serial port return: FE FE 04 4A 01 44 FA

Angle =90

How to get the minimum angle

temp =angle1_low+angle1_high*256

Angle1= temp \33000? (temp –65536): temp)/10

Calculation method: low angle value + high angle value multiplied by 256 to determine whether it is greater than 33000 if it is greater than 33000 then subtract 65536 and divide 10 if directly divided by 10


23) Read the maximum angle of the joint

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X4B
Data[4] Joint steering gear serial number joint_number
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 4B 01 FA

Return data structure

Data domain Desccription Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X04
Data[3] Returns the instruction frame 0X4B
Data[4] High angle of steering gear Angle_high
Data[5] Low angle of steering gear Angle_low
Data[6] End frame 0XFA

Example of serial port return: FE FE 04 4B 01 44 FA

joint_no range 0~5

How to get the maximum angle of the joint

temp =angle1_low+angle1_high*256

Angle1= temp \33000? (temp –65536): temp)/10

Calculation method: low angle value + high angle value multiplied by 256 to determine whether it is greater than 33000 if it is greater than 33000 then subtract 65536 and divide 10 if directly divided by 10


24) View connection

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X50
Data[4] End frame 0XFA

Example of serial port sending: FE FE 03 50 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Instruction frame 0X50
Data[4] Connected/unconnected 0X01/0X00
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 50 00 FA


25) Check to see if the steering gear is all powered up

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X51
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 51 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Instruction frame 0X51
Data[4] Electricity on/off 0X01/0X00
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 51 00 FA


26) Read steering gear status

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X53
Data[4] Joint steering gear serial number joint_number
Data[5] Data data_id
Data[6] End frame 0XFA

Read Parameter of position P ratio of steering gear 1

Example of serial port sending: FE FE 04 53 00 21 FA

joint_no range 0~5

byte Data_id: data types

The values are taken in the table below

Address Function value range initial value value analysis
20 LED alarm 0-254 0 1\0 = open or close LED alarm
21 Speed loop P 0-254 123joint8,456joint5 control the proportional coefficient of the motor
22 Position ring I 0-254 123joint20,456joint13 control the differential coefficient of the motor
23 Position ring D 0-254 0 control the integral coefficient of the motor
24 minimum starting force 0-1000 0 set the minimum output torque1000 = 100%

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X53
Data[4] Return data data_state
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 53 00 FA

27) Set steering gear zero

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X55
Data[4] Joint steering gear serial number joint_number
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 55 00 FA

Return Value: No

28) Brake single motor (not yet open)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X56
Data[4] Joint steering gear serial number joint_number
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 56 00 FA

Return Value: No


29) Setting atom Pin Mode

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X60
Data[4] Number of pins pin_no
Data[5] Pin mode pin_mode
Data[6] End frame 0XFA

atom pin16 set to output mode 0

Example of serial port sending: FE FE 04 60 19 00 FA

byte Pin_no: data types

byte Pin_mode: data types

Return Value: No


30) The program paused

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X26
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 26 FA

Return Value: No


31) The program continues to run

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X27
Data[6] End frame 0XFA

Example of serial port sending: FE FE 02 27 FA

Return Value: No

32) The program stops running

Data Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X28
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 28 FA

Return Value: No

33) Set steering gear status

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X05
Data[3] Instruction frame 0X52
Data[4] Joint steering gear serial number servo_no
Data[5] Steering gear status servo_state
Data[6] Data servo_data
Data[7] End frame 0XFA

Set position P ratio Parameter 1

Example of serial port sending: FE FE 05 52 00 21 01 FA

Return Value: No


34) Robot free mode (turn off all torque output)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X13
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 13 FA

Return Value: No

35) Set atom screen RGB light color

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X05
Data[3] Instruction frame 0X6A
Data[4] R R
Data[5] G G
Data[6] B B
Data[7] End frame 0XFA

RGB set to blue

Example of serial port sending: FE FE 05 6A 00 00 FF FA

Return Value: No

36) Setting Claw Angle

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X66
Data[4] Claw Data Gripper_data
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 66 00 FA

Gripper_data: data type byte range 0-1

Return Value: No


37) Set FeedOverride ( not open yet)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X43
Data[4] Feed_override high Feed_override_high
Data[5] Feed_override low Feed_override_low
Data[6] End frame 0XFA

38) Set acceleration (not open yet)

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X45
Data[4] High acceleration values acceleration_high
Data[5] Acceleration low acceleration_low
Data[6] End frame 0XFA

byte acceleration_high: data types

Calculation method: the acceleration value multiplied by 10 is converted to int format and then hexadecimal high byte

byte acceleration_low: data types

Calculation method: the acceleration value multiplied by 10 is converted to int format and then hexadecimal low byte


39) Set minimum angle of joint

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X05
Data[3] Instruction frame 0X4C
Data[4] Joint steering gear serial number Joint
Data[5] High angle Angle_high
Data[6] Low angle Angle_low
Data[7] End frame 0XFA

Set the minimum angle to 90

Example of serial port sending: FE FE 05 4C 00 01 44 FA

Joint range 0~5

byte angle_high: data types

Calculation: angle value multiplied by 10 converted to int form and then hexadecimal high byte

byte angle_low: data types

Calculation: angle value multiplied by 10 converted to int form and then hexadecimal low byte

Return Value: No


40) Set the maximum angle of the joint

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X05
Data[3] Instruction frame 0X4D
Data[4] Joint steering gear serial number Joint
Data[5] High angle Angle_high
Data[6] Low angle Angle_low
Data[7] End frame 0XFA

<<<<<<< HEAD set maximum angle to 90

Example of serial port sending: FE FE 05 4D 00 01 44 FA

Example of serial port sending: FE FE 02 12 FA

Return Value: Yes

Joint range 0~5

byte of <<<<<<<HEAD angle_high: data types

Calculation method: angle value multiplied by 10 converted to int form and then hexadecimal high byte

Example of serial port sending: FE FE 02 20 FA

Return Value: Yes

Example of serial port return: FE FE 0E 20 06 E6 EA 4E C4 81 0B BD EA C0 02 B6 FA

byte angle_low: data types

Calculation: angle value multiplied by 10 converted to int form and then hexadecimal low byte

Return Value: No



41) Set the Tool Coordinate System

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X14
Data[3] Instruction frame 0X81
Data[4] X coordinates high byte x_high
Data[5] X coordinates low byte x_low
Data[6] Y coordinates high byte y_high
Data[7] Y coordinates low byte y_low
Data[8] Z coordinates high byte z_high
Data[9] Z coordinates low byte z_low
Data[10] RX coordinates high byte rx_high
Data[11] RX coordinates low byte rx_low
Data[12] RY coordinates high byte ry_high
Data[13] RY coordinates low byte ry_low
Data[14] RZ coordinates high byte rz_high
Data[15] RZ coordinates low byte rz_low
Data[16] End frame 0XFA

Set tool coordinate system (-14,-27,275,-89.5,0.7,-90.7),

Example of serial port sending: FE FE 14 81FF 74FE EE 0A C1DD 05 00 48DC 95FA

byte x_high: data types

Calculation: x coordinates multiplied by 10 and then high bytes in hexadecimal

byte x_low: data types

Calculation: x coordinates multiplied by 10 and then hexadecimal low bytes

(y axis coordinates z axis coordinates are the same)

byte rx_high: data types

Calculation: rx coordinate value multiplied by 100 and then hexadecimal high byte

byte rx_low: data types

Calculation: rx coordinate value multiplied by 100 and then hexadecimal low byte

(ry axis coordinates rz axis coordinates are the same)

Return Value: No


42) Setting the world coordinate system

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X14
Data[3] Instruction frame 0X83
Data[4] X coordinates high byte x_high
Data[5] X coordinates low byte x_low
Data[6] Y coordinates high byte y_high
Data[7] Y coordinates low byte y_low
Data[8] Z coordinates high byte z_high
Data[9] Z coordinates low byte z_low
Data[10] RX coordinates high byte rx_high
Data[11] RX coordinates low byte rx_low
Data[12] RY coordinates high byte ry_high
Data[13] RY coordinates low byte ry_low
Data[14] RZ coordinates high byte rz_high
Data[15] RZ coordinates low byte rz_low
Data[16] End frame 0XFA

Set the world coordinate system (-14,-27,275,-89.5,0.7,-90.7),

Example of serial port sending: FE FE 14 83 FF 74 FE EE 0A C1 DD 05 00 48 DC 95 FA

byte x_high: data types

Calculation: x coordinates multiplied by 10 and then high bytes in hexadecimal

byte x_low: data types

Calculation: x coordinates multiplied by 10 and then hexadecimal low bytes

(y axis coordinates z axis coordinates are the same)

byte rx_high: data types

Calculation: rx coordinate value multiplied by 100 and then hexadecimal high byte

<<<<<<<HEAD

<<<<<<< HEAD

byte rx_low: data types

Example of serial port sending: FE FE 05 30 01 01 32 FA

Range of joint serial numbers 1~6

di:data type byte value range 0 and 1

sp:data type range 0-100%

no Return Value

f8f31e0282f58b3f27f944c8d7a6ac99dc0185de

Calculation: rx coordinate value multiplied by 100 and then hexadecimal low byte

(ry axis coordinates rz axis coordinates are the same)

Return Value: No


43) Gets the tool coordinate

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X82
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 82 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X14
Data[3] Returns the instruction frame 0X82
Data[4] X coordinates high byte x_high
Data[5] X coordinates low byte x_low
Data[6] Y coordinates high byte y_high
Data[7] Y coordinates low byte y_low
Data[8] Z coordinates high byte z_high
Data[9] Z coordinates low byte z_low
Data[10] RX coordinates high byte rx_high
Data[11] RX coordinates low byte rx_low
Data[12] RY coordinates high byte ry_high
Data[13] RY coordinates low byte ry_low
Data[14] RZ coordinates high byte rz_high
Data[15] RZ coordinates low byte rz_low
Data[16] End frame 0XFA

Example of serial port return: FE FE 14 82 FF 74 FE EE 0A C1DD 05 00 48 DC 95 FA

byte x_high: data types

Mode of calculation: x coordinates multiplied by 10 are converted to int type and then hexadecimal high bytes

byte x_low: data types

Mode of calculation: x coordinates multiplied by 10 are converted to int type and then hexadecimal low bytes

(y axis coordinates z axis coordinates are the same)

byte rx_high: data types

Mode of calculation: rx coordinates multiplied by 100 are converted to int type and then hexadecimal high bytes

byte rx_low: data types

Mode of calculation: rx coordinates multiplied by 100 are converted to int type and then hexadecimal low bytes

(ry axis coordinates rz axis coordinates are the same)


44) Get the world coordinate system

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X84
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 84 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X14
Data[3] Returns the instruction frame 0X84
Data[4] X coordinates high byte x_high
Data[5] X coordinates low byte x_low
Data[6] Y coordinates high byte y_high
Data[7] Y coordinates low byte y_low
Data[8] Z coordinates high byte z_high
Data[9] Z coordinates low byte z_low
Data[10] RX coordinates high byte rx_high
Data[11] RX coordinates low byte rx_low
Data[12] RY coordinates high byte ry_high
Data[13] RY coordinates low byte ry_low
Data[14] RZ coordinates high byte rz_high
Data[15] RZ coordinates low byte rz_low
Data[16] End frame 0XFA

Example of serial port return: FE FE 14 84 FF 74 FE EE 0A C1 DD 05 00 48 DC 95 FA


45) Set up flange base coordinate system

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X85
Data[4] RFType 0x00/0x01
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 85 00FA

byte RFType: data types

Value range :0~1 BASE =0; WORLD BASE =1;

The RFType::BASE is to take the robot base as the base coordinate, RFType::WORLD the world coordinate system as the base coordinate.


46) Get the flange base coordinate system

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X86
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 86 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X86
Data[4] RFType 0x00/0x01
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 86 00 FA


47) Set the terminal coordinate system

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X89
Data[4] EndType 0x00/0x01
Data[5] End frame 0XFA

Example of serial port sending: FE FE 03 89 00 FA

Return Value: No

byte EndType: data types

Value range :0~1 FLANGE =0; TOOL FLANGE =1;

EndType::FLANGE to set the end to flange, EndType::TOOL to set the end to tool end.

48) Get the terminal coordinate system

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X8A
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 8A FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X8A
Data[4] EndType 0x00/0x01
Data[5] End frame 0XFA

Example of serial port return: FE FE 03 8A 00 FA


49) Single motor shutdown

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X56
Data[4] Steering gear serial number Servo_no
Data[5] End frame 0XFA

Turn down the first steering gear

Example of serial port sending: FE FE 03 56 01 FA

Return Value: No

50) Single motor powered on

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X57
Data[4] Steering gear serial number Servo_no
Data[5] End frame 0XFA

Power the steering gear one

Example of serial port sending: FE FE 03 57 01 FA

Return Value: No


51) Setting Atom IO port level state

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X61
Data[4] Number of pins Pin_no
Data[5] Level signal 0X00/0X01
Data[6] End frame 0XFA

set pin P22 to high level

Example of serial port sending: FE FE 04 61 22 01 FA

Return Value: No


52) Read Atom IO port level state

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X03
Data[3] Instruction frame 0X62
Data[4] Number of pins pin_no
Data[5] End frame 0XFA

Read pin P22 level state

Example of serial port sending: FE FE 03 62 22 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Returns the instruction frame 0X62
Data[4] Level state 0X00/0X01
Data[5] End frame 0XFA

53) Set Atom pin PWM mode

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X63
Data[4] Number of pins pin_no
Data[5] Channels channel
Data[6] End frame 0XFA

Example of serial port sending: FE FE 04 63 22 01 FA

Return Value: No

54) Set Atom pin PWM output

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X64
Data[4] Channels channel
Data[5] Duty cycle Pin_val
Data[6] End frame 0XFA

Example of serial port sending: FE FE 04 64 01 20 FA

Return Value: No

55) Reading Claw Angle

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X65
Data[4] End frame 0XFA

Example of serial port sending: FE FE 02 65 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X04
Data[3] Instruction frame 0X65
Data[4] High angle Value_high
Data[5] Low angle Value_low
Data[6] End frame 0XFA

56) Set Claw Mode

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X04
Data[3] Instruction frame 0X66
Data[4] Claw opening and closing 0X00/0X01
Data[5] Speed Sp
Data[6] End frame 0XFA

Set the claw to open at 20

Example of serial port sending: FE FE 04 66 00 20 FA

Return Value: No


57) Set Claw Angle

Data domain Decription Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X05
Data[3] Instruction frame 0X67
Data[4] High angle Angle_high
Data[5] Low angle Angle_low
Data[6] Speed Sp
Data[7] End frame 0XFA

Sample serial port sending:

Return Value: No


58) Claw setting zero

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X68
Data[4] End frame 0XFA

Set the current position of the claw to zero

Example of serial port sending: FE FE 02 68 FA


59) Check the movement of the claw

Data domain Description Data
Data[0] Recognition frame 0XFE
Data[1] Recognition frame 0XFE
Data[2] Data length frame 0X02
Data[3] Instruction frame 0X69
Data[4] End frame 0XFA

Set the current position of the claw to zero

Example of serial port sending: FE FE 02 69 FA

Return data structure

Data domain Description Data
Data[0] Return recognition frame 0XFE
Data[1] Return recognition frame 0XFE
Data[2] Returns data length frames 0X03
Data[3] Instruction frame 0X69
Data[4] 0X00/0X01
Data[5] End frame 0XFA

Appendix:

A coordinate transformation program is added to the ATOM library and the kinematics library, which is implemented as follows:

  1. change the terminal coordinate system
  2. can set the end coordinate system by setEndType and getEndType functions, EndType::FLANGE to set the end to flange, EndType::TOOL to set the end to tool end.
  3. can set the coordinate information of the reading tool by setToolReference and getToolReference functions. The flange coordinate system is set as the relative coordinate system, and the tool end information is relative to the flange coordinate system.
  4. set the EndType to FLANGE, both the GetCoords and the WriteCoords methods are calculated by the flange position.
  5. set the EndType to TOOL, both the GetCoords and the WriteCoords methods are calculated at the end position of the tool.
  6. Change the base coordinate system
  7. base coordinate system can be set by setReferenceFrame function, RFType::BASE the robot base as the base coordinate and the world coordinate system as the base coordinate. getReferenceFrame function is to read the current base coordinate system type.
  8. read base coordinate system information can be set by setWorldReference and getWorldReference functions. When set, the world coordinate system is used as the relative coordinate system, and the position information of the base of the robot relative to the world coordinate system is input.
  9. when the base coordinate system is the base, the GetCoords and WriteCoords methods take the base as the reference coordinate system.
  10. When the base coordinate system is the world coordinate system, both the GetCoords and WriteCoords methods use the world coordinate system as the reference coordinate system.

Communications related changes (temporary)

The setting and reading of the terminal coordinate system, the setting and reading of the world coordinate system, the setting and reading of the current reference coordinate system, the setting and reading of the terminal type, the setting and reading of the moving mode, and the sending and receiving of the manipulator information are added.

These communications are temporarily set to 0x80 to 0x8A

The new roboticMessages space in the ParameterList.h file is used to add the manipulator communication information.

MOVEL function simple design idea is as follows:

The Euclidean distance between the initial point and the target point is obtained, and an interpolation point is inserted every 10 mm based on the Euclidean distance. If the interpolation point has no inverse solution, search position invariant three directions attitude positive and negative PI/30 adjacent space whether there are inverse solutions, mainly to avoid singular values and some special positions that can not be solved.

The point transmission interval between MOVEL and JOG is changed to dynamic time. The moving time is calculated according to the maximum joint moving distance between two points, and then the moving time minus the specific time is taken as the time interval.

results matching ""

    No results matching ""