RMD-X Servo Motor Control Protocol V3.6
RMD-X Servo Motor Control Protocol V3.6
5
Disclaimer
Thanks for choosing RMD series motor.Please read this statement carefully
before using.Once used, this statement is deemed to be approved and
accepted.Please install and use this product strictly in accordance with the
manual, product description and relevant laws, regulations, policies and
guidelines. In the process of using the product, the user undertakes to be
responsible for his own behavior and all consequences arising therefrom.
MYACTUATOR will not be liable for any loss caused by improper use,
installation and modification of the user.
1
Catalogue
1. Communication Bus Parameters and Message Format......................................................7
1.1.CAN Bus...........................................................................................................................7
1.1.1. Parameters...........................................................................................................7
1.1.2. Message format...................................................................................................7
1.2.RS485 bus........................................................................................................................7
1.2.1. Parameters...........................................................................................................7
1.2.2. Message format...................................................................................................7
2. Single motor command description.........................................................................................8
2.1. Read PID parameter command (0x30).......................................................................8
2.1.1. Instruction description.........................................................................................8
2.1.2. Send data field definition....................................................................................8
2.1.3. Reply data field definition...................................................................................8
2.1.4. Communication example....................................................................................9
2.2. Write PID parameters to RAM command (0x31).....................................................10
2.2.1. Instruction description.......................................................................................10
2.2.2. Send data field definition..................................................................................11
2.2.3. Reply data field definition.................................................................................11
2.2.4. Communication example..................................................................................11
2.3. Write PID parameters to ROM command (0x32).....................................................12
2.3.1. Instruction description.......................................................................................13
2.3.2. Send data field definition..................................................................................13
2.3.3. Reply data field definition.................................................................................13
2.3.4. Communication example..................................................................................13
2.4. Read acceleration command (0x42)..........................................................................15
2.4.1. Instruction description.......................................................................................15
2.4.2. Send data field definition..................................................................................15
2.4.3. Reply data field definition.................................................................................15
2.4.4. Communication example..................................................................................16
2.5. Write acceleration to RAM and ROM command (0x43)..........................................16
2.5.1. Instruction description.......................................................................................16
2.5.2. Send data field definition..................................................................................16
2.5.3. Reply data field definition.................................................................................17
2.5.4. Function Index Description..............................................................................17
2.5.5 Communication example...................................................................................17
2.6. Read multi-turn encoder position data command (0x60)........................................20
2.6.1. Instruction description.......................................................................................20
2.6.2. Send data field definition..................................................................................20
2.6.3. Reply data field definition.................................................................................21
2.6.4. Communication example..................................................................................21
2
2.7. Read multi-turn encoder original position data command (0x61)..........................22
2.7.1. Instruction description.......................................................................................22
2.7.2. Send data field definition..................................................................................22
2.7.3. Reply data field definition.................................................................................23
2.7.4. Communication example..................................................................................23
2.8. Read multi-turn encoder zero offset data command (0x62)...................................24
2.8.1. Instruction description.......................................................................................24
2.8.2. Send data field definition..................................................................................24
2.8.3. Reply data field definition.................................................................................24
2.8.4. Communication example..................................................................................25
2.9. Write encoder multi-turn value to ROM as motor zero command (0x63).............26
2.9.1. Instruction description.......................................................................................26
2.9.2. Send data field definition..................................................................................26
2.9.3. Reply data field definition.................................................................................26
2.9.4. Communication example..................................................................................26
2.10. Write the current multi-turn position of the encoder to the ROM as the motor
zero command (0x64)..........................................................................................................27
2.10.1. Instruction description.....................................................................................27
2.10.2. Send data field definition................................................................................28
2.10.3. Reply data field definition...............................................................................28
2.10.4. Communication example................................................................................28
2.11. Read multi-turn angle command (0x92)..................................................................29
2.11.1. Instruction description.....................................................................................29
2.11.2. Send data field definition................................................................................29
2.11.3. Reply data field definition...............................................................................30
2.11.4. Communication example................................................................................30
2.12. Read Motor Status 1 and Error Flag Command (0x9A).......................................31
2.12.1. Instruction description.....................................................................................31
2.12.2. Send data field definition................................................................................31
2.12.3. Reply data field definition...............................................................................32
2.12.4. Communication example................................................................................33
2.13. Read Motor Status 2 Command (0x9C)..................................................................34
2.13.1. Instruction description.....................................................................................34
2.13.2. Send data field definition................................................................................34
2.13.3. Reply data field definition...............................................................................34
2.13.4. Communication example................................................................................35
2.14. Read Motor Status 3 Command (0x9D)..................................................................36
2.14.1. Instruction description.....................................................................................36
2.14.2. Send data field definition................................................................................36
2.14.3. Reply data field definition...............................................................................36
2.14.4. Communication example................................................................................37
2.15. Motor shutdown command (0x80)...........................................................................38
2.15.1. Instruction description.....................................................................................38
2.15.2. Send data field definition................................................................................38
3
2.15.3. Reply data field definition...............................................................................38
2.15.4. Communication example................................................................................38
2.16. Motor stop command (0x81).....................................................................................38
2.16.1. Instruction description.....................................................................................38
2.16.2. Send data field definition................................................................................39
2.16.3. Reply data field definition...............................................................................39
2.16.4. Communication example................................................................................39
2.17. Torque closed-loop control command (0xA1).........................................................39
2.17.1. Instruction description.....................................................................................39
2.17.2. Send data field definition................................................................................39
2.17.3. Reply data field definition...............................................................................40
2.17.4. Communication example................................................................................40
2.18. Speed Closed-loop Control Command (0xA2).......................................................43
2.18.1. Instruction description.....................................................................................43
2.18.2. Send data field definition................................................................................43
2.18.3. Reply data field definition...............................................................................43
2.18.4. Communication example................................................................................44
2.19. Position tracking control command (0xA3).............................................................46
2.19.1. Instruction description.....................................................................................46
2.19.2. Send data field definition................................................................................47
2.19.3. Reply data field definition...............................................................................47
2.19.4. Communication example................................................................................48
2.20. Absolute position closed-loop control command (0xA4).......................................49
2.20.1. Instruction description.....................................................................................49
2.20.2. Send data field definition................................................................................49
2.20.3. Reply data field definition...............................................................................49
2.20.4. Communication example................................................................................50
2.21. Position tracking control command with speed limit (0xA5).................................53
2.21.1. Instruction description.....................................................................................53
2.21.2. Send data field definition................................................................................54
2.21.3. Reply data field definition...............................................................................54
2.21.4. Communication example................................................................................55
2.22. Incremental position closed-loop control command (0xA8).................................56
2.22.1. Instruction description.....................................................................................56
2.22.2. Send data field definition................................................................................57
2.22.3. Reply data field definition...............................................................................57
2.22.4. Communication example................................................................................58
2.23. System operating mode acquisition (0x70)............................................................60
2.23.1. Instruction description.....................................................................................60
2.23.2. Send data field definition................................................................................60
2.23.3. Reply data field definition...............................................................................61
2.23.4. Communication example................................................................................61
2.24. Motor power acquisition (0x71)................................................................................62
2.24.1. Instruction description.....................................................................................62
4
2.24.2. Send data field definition................................................................................62
2.24.3. Reply data field definition...............................................................................62
2.24.4. Communication example................................................................................63
2.25. System reset command (0x76)................................................................................64
2.25.1. Instruction description.....................................................................................64
2.25.2. Send data field definition................................................................................64
2.25.3. Reply data field definition...............................................................................64
2.25.4. Communication example................................................................................64
2.26. System brake release command (0x77).................................................................65
2.26.1. Instruction description.....................................................................................65
2.26.2. Send data field definition................................................................................65
2.26.3. Reply data field definition...............................................................................65
2.26.4. Communication example................................................................................65
2.27. System brake lock command (0x78).......................................................................66
2.27.1. Instruction description.....................................................................................66
2.27.2. Send data field definition................................................................................66
2.27.3. Reply data field definition...............................................................................66
2.27.4. Communication example................................................................................66
2.28. System runtime read command (0xB1)...................................................................66
2.28.1. Instruction description.....................................................................................66
2.28.2. Send data field definition................................................................................66
2.28.3. Reply data field definition...............................................................................67
2.28.4. Communication example................................................................................67
2.29. System software version date read command (0xB2)..........................................68
2.29.1. Instruction description.....................................................................................68
2.29.2. Send data field definition................................................................................68
2.29.3. Reply data field definition...............................................................................68
2.29.4. Communication example................................................................................69
2.30. Communication interruption protection time setting command (0xB3)...............70
2.30.1. Instruction description.....................................................................................70
2.30.2. Send data field definition................................................................................70
2.30.3. Reply data field definition...............................................................................70
2.30.4. Communication example................................................................................70
2.31. Communication baud rate setting command (0xB4).............................................72
2.31.1. Instruction description.....................................................................................72
2.31.2. Send data field definition................................................................................73
2.31.3. Reply data field definition...............................................................................73
2.31.4. Communication example................................................................................73
2.32. Motor model reading command (0xB5)...................................................................74
2.32.1. Instruction description.....................................................................................74
2.32.2. Send data field definition................................................................................74
2.32.3. Reply data field definition...............................................................................75
2.32.4. Communication example................................................................................75
2.33. Function control command (0x20)...........................................................................76
5
2.33.1. Instruction description.....................................................................................76
2.33.2. Send data field definition................................................................................76
2.33.3. Reply data field definition...............................................................................76
2.33.4. Function Index Description............................................................................77
2.33.5. Communication example................................................................................77
3. Multi-motor command (0x280 + command).........................................................................79
3.1. Instruction description..................................................................................................79
3.2. Communication example.............................................................................................79
4. CANID setting command (0x79)............................................................................................81
4.1. Instruction description..................................................................................................81
4.2. Send data field definition.............................................................................................81
4.3. Reply data field definition............................................................................................82
4.4. Communication example.............................................................................................82
5. Motion Mode Control Command_CAN (0x400 + ID)..........................................................83
5.1. Instruction Description.................................................................................................83
5.2. Send data field definition.............................................................................................83
5.3. Reply data field definition............................................................................................84
5.4. Communication example.............................................................................................85
6. RS485-ID setting command (0x79).......................................................................................86
6.1. Instruction Description.................................................................................................86
6.2. Send Data Field Definition...........................................................................................86
6.3. Reply data field definition............................................................................................87
6.4. Communication example.............................................................................................87
7.Indicator Light Description.......................................................................................................88
7.1 Status Description..........................................................................................................88
7.2 Failure Description Form..............................................................................................88
8. Version revision information...................................................................................................89
6
1. Communication Bus Parameters and Message Format
1.1.CAN Bus
1.1.1. Parameters
Bus interface: CAN
Baud rate: 1Mbps
1.2.RS485 bus
1.2.1. Parameters
Bus interface: RS485
Baudrate:115200bps,500Kbps,1Mbps,1.5Mbps,2Mbps.
Defination
7
According The content of the data field in the standard
Data field Data content to the protocol is exactly the same as that of the CAN.
length
Check CRC Check 2 CRC16 check, low order first, high order last.
Current loop KP
DATA[2] DATA[2] = (uint8_t)(CurrKP)
parameters
8
Current loop KI
DATA[3] DATA[3] = (uint8_t)(CurrKI)
parameters
Speed loop KP
DATA[4] DATA[4] = (uint8_t)(SpdKP)
parameters
Speed loop KI
DATA[5] DATA[5] = (uint8_t)(SpdKI)
parameters
Position loop KP
DATA[6] DATA[6] = (uint8_t)(PosKP)
parameters
Position loop KI
DATA[7] DATA[7] = (uint8_t)(PosKI)
parameters
RS485:
Frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Header
0x3E 0x01 0x08 0x30 0x00 0x00 0x00 0x00 0x00 0x00 0x30 CRC16L CRC16H
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Heade
9
r
0x3E 0x01 0x08 0x30 0x00 0x55 0x19 0x55 0x19 0x55 0x19 CRC16L CRC16H
Description:
Data[2] represents the current loop KP parameter, 0x55 decimal represents
85, assuming that the maximum value of the current loop set by the system is
3, then the actual value of 1 unit is 3/256 = 0.01171875, and 85 units
represent the actual value 85*0.01171875 = 0.99609375, which is the actual
value of the KP parameter of the current loop inside the system.
Data[3] represents the current loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum value of the current loop set by the system is 0.1,
then the actual value of 1 unit is 0.1/256 = 0.00039062, and 25 units
represent the actual value of 25* 0.00039062 = 0.0097656, which is the actual
value of the KI parameter of the current loop inside the system.
Data[4] represents the KP parameter of the speed loop, and 0x55 in decimal
represents 85. Assuming that the maximum value of the speed loop set by the
system is 0.1, the actual value of 1 unit is 0.1/256 = 0.00039062, and 85 units
represent the actual value of 85* 0.00039062 = 0.0332027, this is the actual
value of the KP parameter of the internal speed loop of the system.
Data[5] represents the speed loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum speed loop set by the system is 0.01, then the
actual value of 1 unit is 0.01/256 = 0.00003906, and 25 units means the
actual value is 25* 0.00003906 = 0.0009765, this is the actual value of the KI
parameter of the speed loop inside the system.
10
2.2. Write PID parameters to RAM command (0x31)
2.2.1. Instruction description
This command can write the parameters of current, speed, position loop KP
and KI to RAM at one time, and it will not be saved after power off. The data
type is uint8_t. The system sets the maximum range of PI parameters
according to the motor model, and then divides it equally according to the
maximum range of uint8_t of 256 units. Users only need to adjust 0-256 units.
Current loop KP
DATA[2] DATA[2] = (uint8_t)(CurrKP)
parameter
Current loop KI
DATA[3] DATA[3] = (uint8_t)(CurrKI)
parameter
Speed loop KP
DATA[4] DATA[4] = (uint8_t)(SpdKP)
parameter
Speed loop KI
DATA[5] DATA[5] = (uint8_t)(SpdKI)
parameter
Position loop KP
DATA[6] DATA[6] = (uint8_t)(PosKP)
parameter
Position loop KI
DATA[7] DATA[7] = (uint8_t)(PosKI)
parameter
11
The content of the reply data is the same as the sent data.
RS485:
Frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x31 0x00 0x55 0x19 0x55 0x19 0x55 0x19 CRC16L CRC16H
Description:
Data[2] represents the current loop KP parameter, 0x55 decimal represents
85, assuming that the maximum current loop set by the system is 3, then the
actual value of 1 unit is 3/256 = 0.01171875, and 85 units represent the actual
value of 85* 0.01171875 = 0.99609375, which is the actual value of the KP
parameter of the current loop inside the system.
Data[3] represents the current loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum value of the current loop set by the system is 0.1,
then the actual value of 1 unit is 0.1/256 = 0.00039062, and 25 units
represent the actual value of 25* 0.00039062 = 0.0097656, which is the actual
value of the KI parameter of the current loop inside the system.
Data[4] represents the KP parameter of the speed loop, and 0x55 in decimal
represents 85. Assuming that the maximum value of the speed loop set by the
system is 0.1, the actual value of 1 unit is 0.1/256 = 0.00039062, and 85 units
represent the actual value of 85* 0.00039062 = 0.0332027, this is the actual
value of the KP parameter of the internal speed loop of the system.
Data[5] represents the speed loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum speed loop set by the system is 0.01, then the
actual value of 1 unit is 0.01/256 = 0.00003906, and 25 units means the
actual value is 25* 0.00003906 = 0.0009765, this is the actual value of the KI
parameter of the speed loop inside the system.
12
system is 0.1, then the actual value of 1 unit is 0.1/256 = 0.00039062, and 85
units means the actual value is 85* 0.00039062 = 0.0332027, this is the
actual value of the KP parameter of the internal position loop of the system.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x31 0x00 0x55 0x19 0x55 0x19 0x55 0x19 CRC16L CRC16H
Current loop KP
DATA[2] DATA[2] = (uint8_t)(CurrKP)
parameters
13
parameters
Speed loop KP
DATA[4] DATA[4] = (uint8_t)(SpdKP)
parameters
Speed loop KI
DATA[5] DATA[5] = (uint8_t)(SpdKI)
parameters
Position loop KP
DATA[6] DATA[6] = (uint8_t)(PosKP)
parameters
Position loop KI
DATA[7] DATA[7] = (uint8_t)(PosKI)
parameters
RS485:
frame
ID length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x32 0x00 0x55 0x19 0x55 0x19 0x55 0x19 CRC16L CRC16H
Description:
Data[2] represents the current loop KP parameter, 0x55 decimal represents
85, assuming that the maximum value of the current loop set by the system is
3, then the actual value of 1 unit is 3/256 = 0.01171875, and 85 units
represent the actual value 85*0.01171875 = 0.99609375, which is the actual
value of the KP parameter of the current loop inside the system.
Data[3] represents the current loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum value of the current loop set by the system is 0.1,
then the actual value of 1 unit is 0.1/256 = 0.00039062, and 25 units
represent the actual value of 25* 0.00039062 = 0.0097656, which is the actual
14
value of the KI parameter of the current loop inside the system.
Data[4] represents the KP parameter of the speed loop, and 0x55 in decimal
represents 85. Assuming that the maximum value of the speed loop set by the
system is 0.1, the actual value of 1 unit is 0.1/256 = 0.00039062, and 85 units
represent the actual value of 85* 0.00039062 = 0.0332027, this is the actual
value of the KP parameter of the internal speed loop of the system.
Data[5] represents the speed loop KI parameter, 0x19 decimal represents 25,
assuming that the maximum speed loop set by the system is 0.01, then the
actual value of 1 unit is 0.01/256 = 0.00003906, and 25 units means the
actual value is 25* 0.00003906 = 0.0009765, this is the actual value of the KI
parameter of the speed loop inside the system.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x32 0x00 0x55 0x19 0x55 0x19 0x55 0x19 CRC16L CRC16H
15
2.4.2. Send data field definition
data field Description Data
16
RS485:
frame
ID length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x42 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
32-bit data is 0x00002710, which means 10000 in decimal. It means that the
acceleration of the motor position loop is 10000dps/s.
17
0x00 position planning Acceleration value from initial velocity to maximum
0x02 speed planning The acceleration value from the current speed to the
0x03 speed planning In the same direction, the deceleration value from the
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x43 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[1] is 0x00, indicating the position planning acceleration value. Data[4] to
data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit) 32-bit
data is 0x00002710, which means 10000 in decimal. Indicates that the
position planning acceleration of 10000dps/s is written to the motor driver, and
the value can be saved after the power is turned off.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
18
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x43 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:The motor replies to the host after receiving the command, and
the reply command is the same as the received command.
Example 2:
Send command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x01 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Reply command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x01 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description: The motor replies to the host computer after receiving the
command, and the reply command is the same as the received command.
Example 3:
Send command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
19
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x02 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Reply command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x02 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description: The motor replies to the host after receiving the command, and
the reply command is the same as the received command.
Example 4:
Send command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x03 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Reply command:
CAN:
20
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x43 0x03 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description: The motor replies to the host after receiving the command, and
the reply command is the same as the received command.
21
DATA[0] command byte 0x60
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x60 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description: The host sends this command to read the multi-turn position of
the encoder.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
22
header
0x3E 0x01 0x08 0x60 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description: Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is
the highest bit) 32-bit data is 0x00002710, which means 10000 in decimal.
The multi-turn encoder value representing the current relative multi-turn zero
offset (initial position) of the motor is 10000 pulses.
(0x61)
23
data field Description data
DATA[6] = (uint8_t)
DATA[6] Encoder original position byte3
(encoderRaw>>16)
DATA[7] = (uint8_t)
DATA[7] Encoder original position byte4
(encoderRaw>>24)
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x61 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
The host sends this command to read the original position of the encoder
multi-turn.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
24
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x61 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
32-bit data is 0x00002710, which means 10000 in decimal. Indicates that the
current multi-turn encoder value of the motor is 10000 pulses, excluding the
zero offset (initial position).
25
DATA[4] Encoder Offset Byte 1 DATA[4] = (uint8_t)(encoderOffset)
DATA[5] = (uint8_t)
DATA[5] Encoder Offset Byte2
(encoderOffset>>8)
DATA[6] = (uint8_t)
DATA[6] Encoder Offset Byte3
(encoderOffset>>16)
DATA[7] = (uint8_t)
DATA[7] Encoder Offset Byte4
(encoderOffset>>24)
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x62 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
The host sends this command to read the multi-turn zero offset value of the
encoder.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x62 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
26
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest
bit) 32-bit data is 0x00002710, which means 10000 in decimal. Indicates that
the current multi-turn encoder zero offset value of the motor is 10000 pulses.
command (0x63)
2.9.1. Instruction description
The host sends this command to set the zero offset (initial position) of the
encoder, where the encoder multi-turn value to be written, encoderOffset, is of
type int32_t, (value range, 4 bytes of valid data).
Note: After writing the position of the new zero point, the motor needs to be
restarted to be effective. Because of the change of the zero offset, the new
zero offset (initial position) should be used as a reference when setting the
target position.
27
is the same as the command sent by the host.
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x63 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
32-bit data is 0x00002710, which means 10000 in decimal. It means to write
10000 pulses as multi-turn encoder zero offset.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x63 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
The motor replies to the host after receiving the command, and the frame
data is the same as the command sent by the host.
28
Write the current encoder position of the motor as the multi-turn encoder zero
offset (initial position) into the ROM
Note: After writing the new zero point position, the motor needs to be restarted
to be effective. Because of the change of the zero offset, the new zero offset
(initial position) should be used as a reference when setting the target
position.
DATA[5] = (uint8_t)
DATA[5] Encoder Offset Byte2
(encoderOffset>>8)
DATA[6] = (uint8_t)
DATA[6] Encoder Offset Byte3
(encoderOffset>>16)
29
(encoderOffset>>24)
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x64 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
After sending the 0x64 command, the motor will write the current multi-turn
encoder value as the zero offset (initial position) into the ROM.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x64 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
32-bit data is 0x00002710, which means 10000 in decimal. Indicates that the
multi-turn zero offset value (initial position) written to the motor is 10,000
pulses.
30
2.11.2. Send data field definition
data field Description data
31
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x92 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
After sending the 0x92 command, it will return the absolute angle of the motor
output shaft.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x92 0x00 0x00 0x00 0xA0 0x8C 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
The 32-bit data is 0x00008CA0, which means the decimal is 36000, which is
reduced by 100 times in units of 0.01°/LSB That is 36000*0.01=360°.
Indicates that the motor output shaft moves 360° in the positive direction
relative to the zero position.
32
data field Description data
Brake release
DATA[3] DATA[3] = (uint8_t)(RlyCtrlRslt)
command
Remark:
1. System abnormal state value System_errorState state table 1 is as follows:
System_errorState Status Description
33
0x0004 low pressure
0x0008 overvoltage
0x0010 overcurrent
0x0100 speeding
0x0200
0x0400
0x0800
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
After sending the 0x9A command, the temperature, voltage and error status
flags of the motor will be returned.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9A 0x32 0x00 0x01 0xE5 0x01 0x04 0x00 CRC16L CRC16H
34
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment.
Data[3] indicates that the brake indicates the state of the brake control
command, 1 represents the brake release command, and 0 represents the
brake lock command. So 0x01 indicates that the current brake release
command has been executed.
Data[4] and Data[5] (Data[4] is the low bit, Data[5] is the high bit) form
0x01E5, the decimal is 485, which is reduced by 10 times according to the
unit of 0.1V/LSB, 485*0.1=48.5V, representing The current motor supply
voltage is 48.5V.
Data[6] and Data[7] (Data[6] is low and Data[7] is high) form 0x0004, which
indicates a low-voltage error according to the error description in the
System_errorState table.
35
1. Motor temperature temperature (int8_t type, 1℃/LSB).
2. The torque current value iq of the motor (int16_t type, 0.01A/LSB).
3. Motor output shaft speed (int16_t type, 1dps/LSB).
4. Motor output shaft angle (int16_t type, 1degree/LSB, maximum range
±32767degree).
data field Description data
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9C 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the current temperature, speed and encoder position of
the motor.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
36
0x241 0x9C 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9C 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0x0064 is
100 in decimal, and it is 100*0.01=1A when scaled down by 100 times, which
means that the actual current of the current motor is 1A. The composite data
0x01F4 of Data[4] and Data[5] is 500 in decimal, which means the motor
output shaft speed is 500dps. There is a reduction ratio relationship between
the motor output shaft speed and the motor speed. If the reduction ratio is 6,
then the motor speed is 6 times higher than the output shaft speed. The
composite data of Data[6] and Data[7] 0x002D is 45 in decimal, which means
that the motor output shaft moves 45 degrees in the positive direction relative
to the zero position. The position of the motor output shaft is related to the
number of lines of the motor encoder and the reduction ratio. For example, if
the number of lines of the motor encoder is 65536 and the reduction ratio is 6,
then 360 degrees of the motor output shaft corresponds to 65536*6 = 393216
pulses.
37
DATA[6] NULL 0x00
38
0x141 0x9D 0x00 0x00 0x00 0x00 0x00 0x00 0x00
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9D 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the current motor temperature and phase current data.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x9D 0x32 0xC2 0x0B 0x10 0xFA 0xC0 0xF9 CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data 0x0BC2 of Data[2] and Data[3] is
3010 in decimal, and it is 3010*0.01=30.1A when scaled down by 100 times,
which means that the actual current of the current phase A of the motor is
30.1A. The composite data 0xFA10 of Data[4] and Data[5] is -1520 in decimal,
and it is -1520*0.01=-15.2A when scaled down by 100 times, which means
that the actual current of the current phase B of the motor is -15.2A. The
composite data 0xF9C0 of Data[6] and Data[7] is -1600 in decimal, and it is -
1600*0.01=-16A when scaled down by 100 times, which means that the
actual current of the current phase C of the motor is -16A.
39
2.15.2. Send data field definition
data field Description data
40
The motor replies to the host after receiving the command, and the frame data
is the same as that sent by the host
41
DATA[1] Motor temperature DATA[1] = (uint8_t)(temperature)
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA1 0x00 0x00 0x00 0x64 0x00 0x00 0x00 CRC16L CRC16H
Description:
Data[4] and data[5] represent the data size, Data[4] (0x64) is the low bit, and
Data[5] (0x00) is the high bit. So the actual data is 0x0064, which means
decimal 100, which is 100*0.01=1A when reduced by 0.01A/LSB. Driving will
be performed with 1A as the target current.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
42
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA1 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0x0064 is
100 in decimal, and it is 100*0.01=1A when scaled down by 100 times, which
means that the actual current of the current motor is 1A. The composite data
0x01F4 of Data[4] and Data[5] is 500 in decimal, which means the motor
output shaft speed is 500dps. There is a reduction ratio relationship between
the motor output shaft speed and the motor speed. If the reduction ratio is 6,
then the motor speed is 6 times higher than the output shaft speed. The
composite data of Data[6] and Data[7] 0x002D is 45 in decimal, which means
that the motor output shaft moves 45 degrees in the positive direction relative
to the zero position. The position of the motor output shaft is related to the
number of lines of the motor encoder and the reduction ratio. For example, if
the number of lines of the motor encoder is 65536 and the reduction ratio is 6,
then 360 degrees of the motor output shaft corresponds to 65536*6 = 393216
pulses.
Example 2:
Send command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA1 0x00 0x00 0x00 0x9C 0xFF 0x00 0x00 CRC16L CRC16H
Description:
Data[4] and data[5] represent the data size, Data[4] (0x9C) is the low bit,
Data[5] (0xFF) is the high bit. So the actual data is 0xFF9C, which means
decimal -100, which is -100*0.01=-1A when reduced by 0.01A/LSB. The drive
43
will be performed with -1A as the target current.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA1 0x32 0x9C 0xFF 0x0C 0xFE 0xD3 0xFF CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0xFF9C is
-100 in decimal, and it is -100*0.01=-1A when scaled down by 100 times,
which means that the actual current of the current motor is -1A. The
composite data 0xFE0C of Data[4] and Data[5] is -500 in decimal, which
means the motor output shaft speed is -500dps. There is a reduction ratio
relationship between the motor output shaft speed and the motor speed. If the
reduction ratio is 6, then the motor speed is 6 times higher than the output
shaft speed. The composite data of Data[6] and Data[7] 0xFFD3 is -45 in
decimal, which means that the motor output shaft moves in the opposite
direction by -45 degrees relative to the zero position. The position of the motor
output shaft is related to the number of motor encoder lines and the reduction
ratio. For example, if the number of motor encoder lines is 65536 and the
reduction ratio is 6, then 360 degrees of the motor output shaft corresponds to
65536*6 = 393216 pulses.
44
DATA[2] NULL 0x00
DATA[5] = (uint8_t)
DATA[5] speed control
(speedControl>>8)
DATA[6] = (uint8_t)
DATA[6] speed control
(speedControl>>16)
Remark:
1. The maximum torque current of the motor under this command is limited by
the Max Torque Current value in the host computer.
2. In this control mode, the maximum acceleration of the motor is limited by
the Max Acceleration value in the host computer.
45
DATA[6] Motor angle low byte DATA[6] = (uint8_t)(degree)
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA2 0x00 0x00 0x00 0x10 0x27 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest
bit) 32-bit data is 0x00002710, which means 10000 in decimal. The sending
command is reduced by 100 times according to 0.01dps/LSB, that is,
10000*0.01=100dps. The drive operates at the target speed of 100dps of the
motor output shaft.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA2 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0x0064 is
100 in decimal, and it is 100*0.01=1A when scaled down by 100 times, which
means that the actual current of the current motor is 1A. The composite data
0x01F4 of Data[4] and Data[5] is 500 in decimal, which means the motor
46
output shaft speed is 500dps. There is a reduction ratio relationship between
the motor output shaft speed and the motor speed. If the reduction ratio is 6,
then the motor speed is 6 times higher than the output shaft speed. The
composite data of Data[6] and Data[7] 0x002D is 45 in decimal, which means
that the motor output shaft moves 45 degrees in the positive direction relative
to the zero position. The position of the motor output shaft is related to the
number of lines of the motor encoder and the reduction ratio. For example, if
the number of lines of the motor encoder is 65536 and the reduction ratio is 6,
then 360 degrees of the motor output shaft corresponds to 65536*6 = 393216
pulses.
Example 2:
Send command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA2 0x00 0x00 0x00 0xF0 0xD8 0xFF 0xFF CRC16L CRC16H
Description:
Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the highest bit)
32-bit data is 0xFFFFD8F0, which means -10000 in decimal. The sending
command is reduced by 100 times according to 0.01dps/LSB, that is -
10000*0.01=-100dps. The drive runs at the target speed of the motor output
shaft -100dps.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA2 0x32 0x9C 0xFF 0x0C 0xFE 0xD3 0xFF CRC16L CRC16H
47
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0xFF9C is
-100 in decimal, and it is -100*0.01=-1A when scaled down by 100 times,
which means that the actual current of the current motor is -1A. The
composite data 0xFE0C of Data[4] and Data[5] is -500 in decimal, which
means the motor output shaft speed is -500dps. There is a reduction ratio
relationship between the motor output shaft speed and the motor speed. If the
reduction ratio is 6, then the motor speed is 6 times higher than the output
shaft speed. The composite data of Data[6] and Data[7] 0xFFD3 is -45 in
decimal, which means that the motor output shaft moves in the opposite
direction by -45 degrees relative to the zero position. The position of the motor
output shaft is related to the number of motor encoder lines and the reduction
ratio. For example, if the number of motor encoder lines is 65536 and the
reduction ratio is 6, then 360 degrees of the motor output shaft corresponds to
65536*6 = 393216 pulses.
If the customer has realized the trajectory planning in the control, it can be
achieved by sending different target positions in a fixed cycle through the A3
command. At the same time, the speed and acceleration of the motor during
the movement process also depend on the speed and acceleration of the
trajectory planning.
48
2.19.2. Send data field definition
Data Field Description Data
DATA[5] = (uint8_t)
DATA[5] position control
(angleControl>>8)
DATA[6] = (uint8_t)
DATA[6] position control
(angleControl>>16)
49
byte
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0xA3 0x00 0x00 0x00 0x64 0x00 0x00 0x00 CRC16L CRC16H
Description: Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is
the highest bit) 32-bit data is 0x00000064, which means 100 in decimal. The
sending command is reduced by 100 times according to 0.01degree/LSB, that
is, 100*0.01=1°. The motor will move the output shaft by 1° in the positive
direction relative to the zero position. The position interval sent by the client in
the adjacent control cycle should be appropriate, otherwise it will generate a
large speed and acceleration.
Reply command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA3 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
50
ratio is 6, then the motor speed is 6 times higher than the output shaft speed.
The composite data of Data[6] and Data[7] 0x002D is 45 in decimal, which
means that the motor output shaft moves 45 degrees in the positive direction
relative to the zero position. The position of the motor output shaft is related to
the number of motor encoder lines and the reduction ratio. For example, if the
number of motor encoder lines is 16384 and the reduction ratio is 6, then 360
degrees of the motor output shaft corresponds to 16384*6 = 98304 pulses.
51
8. Motor output shaft angle (int16_t type, 1degree/LSB, maximum range
±32767degree).
Data Field Description Data
RS485:
Frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Header No.
0x3E 0x01 0x08 0xA4 0x00 0xF4 0x01 0xA0 0x8C 0x00 0x00 CRC16L CRC16H
Description: Data[2] and Data[3] form one (Data[2] is the low bit, Data[3] is
the high bit) 16-bit data is 0x01F4, which means the decimal 500dps motor
output shaft speed. The drive will run the position loop at this speed as the
maximum speed. Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7]
is the highest bit) 32-bit data is 0x00008CA0, which means 36000 in decimal.
The sending command is reduced by 100 times according to 0.01degree/LSB,
that is, 36000*0.01=360°. The motor will move 360° in the positive direction
with the output shaft relative to the zero position.
52
Reply command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Heade
0x3E 0x01 0x08 0xA4 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
Example 2:
Send command:
CAN:
53
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Heade
0x3E 0x01 0x08 0xA4 0x00 0xF4 0x01 0x60 0x73 0xFF 0xFF CRC16L CRC16H
Description: Data[2] and Data[3] form one (Data[2] is low, Data[3] is high) 16-
bit data is 0x01F4, indicating decimal Control 500dps motor output shaft
speed. The drive will run the position loop at this speed as the maximum
speed. Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the
highest bit) 32-bit data is 0xFFFF7360, which means -36000 in decimal. The
sending command is reduced by 100 times according to 0.01degree/LSB, ie -
36000*0.01=-360°. The motor will move -360° in the opposite direction with
the output shaft relative to the zero position.
Reply command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Heade
0x3E 0x01 0x08 0xA4 0x32 0x9C 0xFF 0x0C 0xFE 0xD3 0xFF CRC16L CRC16H
54
means the motor output shaft speed is -500dps. There is a reduction ratio
relationship between the motor output shaft speed and the motor speed. If the
reduction ratio is 6, then the motor speed is 6 times higher than the output
shaft speed. The composite data of Data[6] and Data[7] 0xFFD3 is -45 in
decimal, which means that the motor output shaft moves in the opposite
direction by -45 degrees relative to the zero position. The position of the motor
output shaft is related to the number of motor encoder lines and the reduction
ratio. For example, if the number of motor encoder lines is 16384 and the
reduction ratio is 6, then 360 degrees of the motor output shaft corresponds to
16384*6 = 98304 pulses.
(0xA5)
2.21.1. Instruction description
This command is a control command, which can be run when the motor is not
faulty. The host sends this command to control the position of the motor
(multi-turn angle). The control value angleControl is int32_t type, and the
corresponding actual position is 0.01degree/LSB, that is, 36000 represents
360°, and the rotation direction of the motor is determined by the difference
between the target position and the current position . The control value
maxSpeed limits the maximum speed of the motor output shaft rotation, which
is of type uint16_t, corresponding to the actual speed of 1dps/LSB. The A5
command is used for direct position tracking. After the motor receives the
target position, it is compared with the current position and then output to the
subsequent stage after passing through the PI controller. See the following
control block diagram:
55
Block Diagram of Position Tracking Mode with Speed Limit
If the customer has realized the trajectory planning in the control, it can be
achieved by sending different target positions in a fixed cycle through the A5
command. At the same time, the speed of the motor during the movement is
limited by the set maximum speed.
2.21.2. Send data field definition
Data Field Description Data
56
12. Motor output shaft angle (int16_t type, 1degree/LSB, maximum range
±32767degree).
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Heade
0x3E 0x01 0x08 0xA5 0x00 0xF4 0x01 0x64 0x00 0x00 0x00 CRC16L CRC16H
Description: Data[2] and Data[3] form one (Data[2] is the low bit, Data[3] is
the high bit) 16-bit data is 0x01F4, which means the decimal 500dps motor
output shaft speed. It means that the speed of the motor will not exceed the
absolute value of 500dps when executing the A5 command. Data[4] to data[7]
form one (Data[4] is the lowest bit, Data[7] is the highest bit) 32-bit data is
57
0x00000064, which means 100 in decimal. The sending command is reduced
by 100 times according to 0.01degree/LSB, that is, 100*0.01=1°. The motor
will move the output shaft by 1° in the positive direction relative to the zero
position.
Reply command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA5 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
58
2.22. Incremental position closed-loop control command
(0xA8)
2.22.1. Instruction description
This command is a control command, which can be run when the motor is not
faulty. The host sends this command to control the incremental position (multi-
turn angle) of the motor, and run the input position increment with the current
position as the starting point. The control value angleControl is of type int32_t,
and the corresponding actual position is 0.01degree/LSB, that is, 36000
represents 360°, and the rotation direction of the motor is determined by the
incremental position symbol.
The control value maxSpeed limits the maximum speed of the motor output
shaft rotation, which is of type uint16_t, corresponding to the actual speed of
1dps/LSB.
DATA[5] = (uint8_t)
DATA[5] position control
(angleControl>>8)
DATA[6] = (uint8_t)
DATA[6] position control
(angleControl>>16)
DATA[7] = (uint8_t)
DATA[7] position control high byte
(angleControl>>24)
59
7. Motor output shaft speed (int16_t type, 1dps/LSB).
8. Motor output shaft angle (int16_t type, 1degree/LSB, maximum range
±32767degree).
data field Description data
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA8 0x00 0xF4 0x01 0xA0 0x8C 0x00 0x00 CRC16L CRC16H
Description:
Data[2] and Data[3] form one (Data[2] is the low bit, Data[3] is the high bit)
16-bit data is 0x01F4, which means the decimal 500dps motor output shaft
speed. The drive will run the position loop at this speed as the maximum
speed. Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the
highest bit) 32-bit data is 0x00008CA0, which means 36000 in decimal. The
sending command is reduced by 100 times according to 0.01degree/LSB, that
is, 36000*0.01=360°. The motor will move 360° in the positive direction with
60
the output shaft relative to the current position.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA8 0x32 0x64 0x00 0xF4 0x01 0x2D 0x00 CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0x0064 is
100 in decimal, and it is 100*0.01=1A when scaled down by 100 times, which
means that the actual current of the current motor is 1A. The composite data
0x01F4 of Data[4] and Data[5] is 500 in decimal, which means the motor
output shaft speed is 500dps. There is a reduction ratio relationship between
the motor output shaft speed and the motor speed. If the reduction ratio is 6,
then the motor speed is 6 times higher than the output shaft speed. The
composite data of Data[6] and Data[7] 0x002D is 45 in decimal, which means
that the motor output shaft moves 45 degrees in the positive direction relative
to the zero position. The position of the motor output shaft is related to the
number of lines of the motor encoder and the reduction ratio. For example, if
the number of lines of the motor encoder is 65536 and the reduction ratio is 6,
then 360 degrees of the motor output shaft corresponds to 65536*6 = 393216
pulses.
Example 2:
Send command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA8 0x00 0xF4 0x01 0x60 0x73 0xFF 0xFF CRC16L CRC16H
Description:
61
Data[2] and Data[3] form one (Data[2] is the low bit, Data[3] is the high bit)
16-bit data is 0x01F4, which means the decimal 500dps motor output shaft
speed. The drive will run the position loop at this speed as the maximum
speed. Data[4] to data[7] form one (Data[4] is the lowest bit, Data[7] is the
highest bit) 32-bit data is 0xFFFF7360, which means -36000 in decimal. The
sending command is reduced by 100 times according to 0.01degree/LSB, ie -
36000*0.01=-360°. The motor will move -360° in the opposite direction
relative to the current position with the output shaft.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xA8 0x32 0x9C 0xFF 0x0C 0xFE 0xD3 0xFF CRC16L CRC16H
Description:
Data[1] = 0x32 is 50 in decimal, which means the motor temperature is 50
degrees at the moment. The composite data of Data[2] and Data[3] 0xFF9C is
-100 in decimal, and it is -100*0.01=-1A when scaled down by 100 times,
which means that the actual current of the current motor is -1A. The
composite data 0xFE0C of Data[4] and Data[5] is -500 in decimal, which
means the motor output shaft speed is -500dps. There is a reduction ratio
relationship between the motor output shaft speed and the motor speed. If the
reduction ratio is 6, then the motor speed is 6 times higher than the output
shaft speed. The composite data of Data[6] and Data[7] 0xFFD3 is -45 in
decimal, which means that the motor output shaft moves in the opposite
direction by -45 degrees relative to the zero position. The position of the motor
output shaft is related to the number of lines of the motor encoder and the
reduction ratio. For example, if the number of lines of the motor encoder is
65536 and the reduction ratio is 6, then 360 degrees of the motor output shaft
corresponds to 65536*6 = 393216 pulses.
62
2.23.2. Send data field definition
data field Description data
Motor operating
DATA[7] DATA[7] = (uint8_t)(runmode)
mode
63
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x70 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the current motor running mode.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x70 0x00 0x00 0x00 0x00 0x00 0x00 0x03 CRC16L CRC16H
Description:
Data[7] = 0x03, according to the definition of the reply frame, it means that
the current system is in the position loop mode.
64
DATA[2] NULL 0x00
RS485:
frame ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
65
header
0x3E 0x01 0x08 0x71 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the current motor power.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x71 0x00 0x00 0x00 0x00 0x00 0xD0 0x07 CRC16L CRC16H
Description:
The composition of Data[6] and Data[7] = 0x07D0, decimal 2000, reduced by
10 times according to the unit of 0.1W/LSB, 2000*0.1=200W. Indicates that
the current power of the motor is 200W.
66
The motor will reset after receiving the command and will not return to the
command.
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0x76 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
After sending the command, the system is reset and the program runs again.
67
DATA[6] NULL 0x00
68
2.27.4. Communication example
SysRunTime low
DATA[4] DATA[4] = (uint8_t)(SysRunTime)
byte1
DATA[5] = (uint8_t)
DATA[5] SysRunTime byte2
(SysRunTime>>8)
DATA[6] = (uint8_t)
DATA[6] SysRunTime byte3
(SysRunTime>>16)
69
DATA[7] = (uint8_t)
DATA[7] SysRunTime byte4
(SysRunTime>>24)
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the running time of the current system.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB1 0x00 0x00 0x00 0x00 0x00 0x00 0x10 CRC16L CRC16H
Description:
Data[4] to Data[7] (Data[4] is low and Data[7] is high) = 0x10000000, decimal
268435456, indicating that the system has run for 268435456ms after
restarting or resetting, about 74 Hour.
70
2.29.2. Send data field definition
data field Description data
VersionDate low
DATA[4] DATA[4] = (uint8_t)(&VersionDate)
byte1
DATA[5] = (uint8_t)
DATA[5] VersionDate byte2
(VersionDate>>8)
DATA[6] = (uint8_t)
DATA[6] VersionDate byte3
(VersionDate>>16)
DATA[7] = (uint8_t)
DATA[7] VersionDate byte4
(VersionDate>>24)
71
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
This command reads the current software version date.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB2 0x00 0x00 0x00 0x2E 0x89 0x34 0x01 CRC16L CRC16H
Description:
Data[4] to Data[7] (Data[4] is low and Data[7] is high) = 0x0134892E, decimal
20220206, indicating that the software version date is February 6, 2022.
command (0xB3)
2.30.1. Instruction description
This command is used to set the communication interruption protection time in
ms. If the communication is interrupted for more than the set time, it will cut off
the output brake lock. To run again, you need to establish stable and
continuous communication first. Writing 0 means that the communication
interruption protection function is not enabled.
72
2.30.2. Send data field definition
data field Description data
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB3 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Note:
The data values are all 0, which means that the communication interruption
protection function is not enabled. If the communication is interrupted, the
motor will continue to execute the current command.
73
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB3 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
The frame data is the same as the command sent by the host.
Example 2:
Send command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB3 0x00 0x00 0x00 0xE8 0x03 0x00 0x00 CRC16L CRC16H
Description:
Data[4] to Data[7] (Data[4] is low and Data[7] is high) constitute data
0x000003E8, decimal is 1000ms. Indicates that the communication
interruption protection time is set to 1000ms, which is stored in the ROM and
saved after power failure. Then, if the communication interval exceeds
1000ms, the communication interruption protection will be triggered, and the
output lock brake will be cut off. When the communication interval is restored
to within 1000ms, normal operation can be resumed.
Reply command:
CAN:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
74
frame
ID Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB3 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description:
The frame data is the same as the command sent by the host.
Baudrate:
RS485: 0 represents 115200bps baud rate,
1 stands for 500Kbps baud rate,
2 stands for 1Mbps baud rate,
3 represents 1.5Mbps baud rate,
4 represents 2Mbps baud rate;
CAN: 0 means 500Kbps baud rate,
1 stands for 1Mbps baud rate;
75
2.31.3. Reply data field definition
Since the communication baud rate is modified, the reply command is random
and need not be processed.
RS485:
Example 2:
Send command:
CAN:
Data[0
ID NO. Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
]
RS485:
Frame Lengt
ID NO. D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Header h
0x3E 0x01 0x08 0xB4 0x00 0x00 0x00 0x00 0x00 0x00 0x01 CRC16L CRC16H
76
Example 3:
Send command:
CAN:
Data[0
ID NO. Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
]
RS485:
Frame Lengt
ID NO. D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
Header h
0x3E 0x01 0x08 0xB4 0x00 0x00 0x00 0x00 0x00 0x00 0x02 CRC16L CRC16H
This command is used to read the motor model, and the read data is ACSII
code, which can be converted into the corresponding actual symbol by
checking the ACSII code table.
77
DATA[0] Command byte 0xB5
Example 1:
Send command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB5 0x00 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Reply command:
CAN:
ID No. Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
Frame ID No. Length D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
header
0x3E 0x01 0x08 0xB5 0x58 0x38 0x53 0x32 0x56 0x31 0x30 CRC16L CRC16H
Description: This command replies with 7 ACSII codes, and the 7 characters
corresponding to the motor model are obtained by looking up the table: RMD-
78
X8 S2 V10.
The motor replies to the host computer after receiving the command, and the
frame data is the same as the command sent by the host computer.
0x01 Clear multi-turn Clear motor multi-turn value, update zero point and
79
0x02 CANID filter Enable The Value “1” means that the CANID filter is enabled,
Example 1:
Send command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x20 0x01 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Command Reply:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
80
0x241 0x20 0x01 0x00 0x00 0x00 0x00 0x00 0x00
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x20 0x01 0x00 0x00 0x00 0x00 0x00 0x00 CRC16L CRC16H
Description: the frame data is the same as the command sent by the host.
Example 2:
Send command:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
0x3E 0x01 0x08 0x20 0x02 0x00 0x00 0x01 0x00 0x00 0x00 CRC16L CRC16H
Command Reply:
CAN:
ID 号 Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
RS485:
帧头 ID 号 长度 D0 D1 D2 D3 D4 D5 D6 D7 CRC16L CRC16H
81
0x3E 0x01 0x08 0x20 0x02 0x00 0x00 0x01 0x00 0x00 0x00 CRC16L CRC16H
Description: The frame data is the same as the command sent by the host
computer.
Example 1:
Send command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
4 motors receive the 0x80 motor shutdown command at the same time (see
2.30 for details), and then all 4 motors immediately execute the motor
shutdown command.
Reply command:
4 motors reply at the same time, and the reply ID is their own ID number
respectively. The reply sequence depends on the respective delays on the
bus.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor whose ID number is 0x241 returns the corresponding command.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor whose ID number is 0x242 returns the corresponding command.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
82
0x243 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Description:
The motor whose ID number is 0x243 returns the corresponding command.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor whose ID number is 0x244 returns the corresponding command.
Example 2:
Send command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
4 motors receive the 0x60 read multi-turn encoder position data command at
the same time (see 2.21 for details), and then the 4 motors reply to their
respective multi-turn encoder position data.
Reply command:
4 motors reply at the same time, and the reply ID is their own ID number
respectively. The reply sequence depends on the respective delays on the
bus.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor reply data with ID number 0x241 consists of Data[4] to data[7]
(Data[4] is the lowest bit, Data[7] is the highest bit). The 32-bit data is
0x00002710, which means the decimal is 10000. The multi-turn encoder
value representing the current relative multi-turn zero offset (initial position) of
the motor is 10000 pulses.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor reply data with ID number 0x242 consists of Data[4] to data[7]
(Data[4] is the lowest bit, Data[7] is the highest bit). The 32-bit data is
0x00004E20, which means 20000 in decimal. The multi-turn encoder value
representing the current relative multi-turn zero offset (initial position) of the
motor is 20000 pulses.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
83
The motor reply data with ID number 0x243 consists of Data[4] to data[7]
(Data[4] is the lowest bit, Data[7] is the highest bit). The 32-bit data is
0x00007530, which means 30000 in decimal. The multi-turn encoder value
representing the current relative multi-turn zero offset (initial position) of the
motor is 30000 pulses.
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
The motor reply data with ID number 0x244 consists of Data[4] to data[7]
(Data[4] is the lowest bit, Data[7] is the highest bit). The 32-bit data is
0x00009C40, which means 40000 in decimal. The multi-turn encoder value
representing the current relative multi-turn zero offset (initial position) of the
motor is 40000 pulses.
84
2. Set CANID, the range is 1-32, and return to the original command.
3. Read CANID, the return parameters are as follows.
data field Description data
Example 1:
Send command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
Data[2] = 0 means write CANID. Data[7] = 1 means that the motor CANID is
set to 2, that is, the send ID is 0x142, and the reply ID is 0x242.
Reply command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
Same as sending command.
Example 2:
Send command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
85
Description:
Data[2] = 1 means reading CANID.
Reply command:
ID Data[0] Data[1] Data[2] Data[3] Data[4] Data[5] Data[6] Data[7]
Description:
Data[6] and Data[7] form 0x242, which means that the motor send ID is
0x142, and the reply ID is 0x242.
86
0-3bit p_des Lower 8-bit
DATA[1] p_des[0-7]
4-7bit data
0-3bit
DATA[5] kd[4-11] kd Upper 8-bit data 12-bit
4-7bit
range
0-3bit kd[0-3] kd Lower 4-bit data
DATA[6] t_ff Upper 4-bit
4-7bit t_ff[8-11]
data
12-bit
0-3bit t_ff Lower 8-bit range
DATA[7] t_ff[0-7]
4-7bit data
87
0-3bit
DATA[5] NULL NULL
4-7bit NULL
0-3bit NULL
DATA[7] NULL NULL
4-7bit
88
0x
0-3bit
DATA[6 0x 3
] 3B 0x
4-7bit
B t_ff value
(-)24N- t_ff=(2901/4095)*48
0x is 0xB55
0-3bit m~24N-m + (-24)
DATA[7 0x 5 decimal is
totol 48N-m = 10.004 N-m
] 55 0x (2901)
4-7bit
5
89
6.1. Instruction Description
This command is used to set and read RS485 ID. Communication ID uses
0xCD, all devices on the bus will receive and process this command,
When modifying, you need to pay attention to whether multiple devices are
connected, so that the IDs of multiple devices may be modified to the same at
the same time.
The host sends this command to set and read the RS485 ID, the parameters
are as follows.
3. The read and write flag bit wReadWriteFlag is bool type, 1 read 0 write.
4. RS485-ID, size range (#1~#32), uint16_t type (synchronized with the upper
computer function), device identifier ID (1~32).
90
Send command:
Frame ID Leng CRC16L
D0 D1 D2 D3 D4 D5 D6 D7
Header No. th CRC16H
0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 CRC16L
0x3E 0xCD 0x08
9 0 0 0 0 0 0 2 CRC16H
Description: Data[2] = 0 means write RS485ID. Data[7] = 1 means to set the
motor RS485ID to 2.
Reply command:
Frame ID Leng CRC16L
D0 D1 D2 D3 D4 D5 D6 D7
Header No. th CRC16H
0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 CRC16L
0x3E 0xCD 0x08
9 0 0 0 0 0 0 2 CRC16H
Description: Same as sending command.
Example 2:
Send command:
Frame ID Leng CRC16L
D0 D1 D2 D3 D4 D5 D6 D7
Header No. th CRC16H
0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 CRC16L
0x3E 0xCD 0x08
9 0 1 0 0 0 0 0 CRC16H
Reply command:
Frame ID Leng CRC16L
D0 D1 D2 D3 D4 D5 D6 D7
Header No. th CRC16H
0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 CRC16L
0x3E 0xCD 0x08
9 0 1 0 0 0 0 2 CRC16H
91
7.2 Failure Description Form
Fault Name Description Error Level
92
use.
Version V3.1:
Version V3.2:
Version V3.3:
Version V3.4:
1) Version revision content:
a. Add position tracking instruction 0xA3;
b. In the 0x43 command, add the settings of 4 values of acceleration and
deceleration for position planning and speed planning;
2) Version revision date: 2022.8.17
Version V3.5:
1) Version revision content:
a. Increase the position tracking command 0xA5 with speed limit;
b. Added function control command 0x20: error status sending and multi-turn
value power-down save selection function;
c. Add the 0xB5 command to read the motor model;
2) Version revision date: 2022.9.05
93