Communication Protocols Introduction
Serial Frame to CAN Frame Conversion
-
In the process of converting a serial frame to a CAN message, if the data format of a certain fixed byte (13 bytes) in the serial data frame, which is aligned to a fixed byte length, is not standard, the fixed byte length will not be converted, and the subsequent data will be converted instead. If any CAN messages are missing after conversion, please check whether the serial data format of the corresponding message's fixed byte length complies with the standard format.
-
The frame data in the CAN format conversion has a fixed length of 8 bytes. The valid length is determined by the value of DLC3-DLC0. When the valid data is less than the fixed length, it is necessary to pad with zeros to reach the fixed length.
-
In this mode, it is important to strictly follow the fixed byte format for serial data in order for the conversion to be successful. The CAN mode conversion can refer to the following example. During the conversion, make sure that the frame information is correct and the data length is accurately represented; otherwise, the conversion will not proceed.
-
Example:
Serial Frame
88
17
65
43
21
99
88
77
66
55
44
33
22
↓
CAN Frame
Frame Info
Frame ID
Frame Data
88
17
65
43
21
99
88
77
66
55
44
33
22
Control Frame
- The control frame is sent from the master controller to the actuator for mode selection, parameter configuration, and motion control.
- Type of Frame:DATA
- Format of Frame:EXTENDED
- DLC: 8
Control Function | Default frame ID | DATA | |||||||
Data[0] | Data[1] | Data[2] | Data[3] | Data[4] | Data[5] | Data[6] | Data[7] | ||
Reset |
|
|
|
|
|
|
|
|
|
Select EEPROM Mode |
|
|
|
|
|
|
|
|
|
Restore Factory Settings |
|
|
|
|
|
|
|
|
|
Read Register Value |
|
|
|
|
|
|
|
|
|
Write Register Value |
|
|
| 32-bit data content, using big-endian mode |
|
| |||
Motor Parament Calibration |
|
|
|
|
|
|
|
|
|
Select Current Mode |
|
|
|
|
|
|
|
|
|
Set Phase Current (Current mode) |
| 16-bit phase current data content, using big-endian mode |
|
|
|
|
|
| |
Select Profile Velocity Mode |
|
|
|
|
|
|
|
|
|
Set Phase Current & Velocity (Profile Velocity Mode) |
| 16-bit phase current data content, using big-endian mode | 16-bit velocity data content, using big-endian mode |
|
|
|
| ||
Select Profile Position Mode |
|
|
|
|
|
|
|
|
|
Set Phase Current & Velocity&Position (Profile Position Mode) |
| 16-bit phase current data content, using big-endian mode | 16-bit velocity data content, using big-endian mode | 32-bit position data content, using big-endian mode | |||||
Select Position Mode |
|
|
|
|
|
|
|
|
|
Set Phase Current & Velocity&Position (Profile Position Mode 2) |
| 16-bit phase current data content, using big-endian mode | 16-bit velocity data content, using big-endian mode | 32-bit position data content, using big-endian mode | |||||
Select MIT Mode |
|
|
|
|
|
|
|
|
|
Set Phase Current & Velocity&Position (MIT mode) |
| 16-bit phase current data content, using big-endian mode | 16-bit velocity data content, using big-endian mode | 32-bit position data content, using big-endian mode | |||||
Select Openloop Mode |
|
|
|
|
|
|
|
|
|
Set Velocity (Openloop Mode) |
| 16-bit velocity data content, using big-endian mode,unit:Pul |
|
|
|
|
|
| |
Set Brake PWM and Duration |
| 16-bit PWM data content, using big-endian mode | 16-bit time data content, using big-endian mode |
|
|
|
| ||
Note: The following are real-time parameter modification instructions, which modify the RAM value. They are sent after entering the running mode. If they are not sent, the value in the Flash is called. | |||||||||
Real-time Setting of Current Loop PI(Current Mode & Profile Velocity Mode & Profile Position Mode&Position Mode) |
| 32-bit float type current loop coefficient Kp parameter | 32-bit float type current loop coefficient Ki parameter | ||||||
Real-time Setting of Velocity loop PI (Profile Velocity Mode & Profile Position Mode&Position Mode) |
| 32-bit float type velocity loop coefficient Kp parameter | 32-bit float type velocity loop coefficient Ki parameter | ||||||
Real-time Setting of Position Loop PD (Profile Position Mode&Position Mode) |
| 32-bit float type position loop coefficient Kp parameter | 32-bit float type position loop coefficient Kd parameter | ||||||
Real-time setting of Kp & Kd (MIT Mode) |
| 32-bit float type position coefficient (Kp) parameter | 32-bit float type velocity coefficient (Kd) parameter | ||||||
Real-time acceleration and deceleration setting (Open-loop mode) |
| 32-bit acceleration data in big-endian format, unit: Pul/s | 32-bit deceleration data in big-endian format, unit: Pul/s | ||||||
Real-time acceleration and deceleration setting (Profile Velocity Mode & Profile Position Mode & Position Mode) |
| 32-bit acceleration data in big-endian format, unit: rpm/s | 32-bit deceleration data in big-endian format, unit: rpm/s |
EEPROM/FLASH List
Definition | Register Adress | Default Value | Range | Unit |
---|---|---|---|---|
Current Loop_Kp |
| 0.0006 | ||
Current Loop_Ki |
| 0.0001 | ||
Velocity Loop_Kp |
| 30 | ||
Velocity Loop_Ki |
| 1 | ||
Position Loop_Kp |
| 0.006 | ||
Position Loop_Kd |
| 1.7 | ||
MIT_Kp |
| 0.1 | ||
MIT_Kd |
| 13.1 | ||
CAN ID Start |
| 05060000 | 0-256 | |
Motor Rotation Direction |
| Auto-Set | +1/-1 | |
Encoder Selection for Each Positon Mode |
| 0 | 1:Reducer | |
reduction ratio Numerator |
| 31/51/101 | ||
reduction ratio Denominator |
| 1 | ||
Reducer Encoder Zero Bias |
| 0 | ||
Auto Return Zero Point |
| 1 | 0:No | |
Openloop Mode Acceleration |
| 1500 | Pul/s | |
Openloop Mode Deceleration |
| 1500 | Pul/s | |
Acceleration settings in profile velocity mode and profile position modes |
| 1500 | rpm/s | |
Deceleration settings in profile velocity mode and profile position modes |
| 1500 | rpm/s | |
Max Phase Current Limt(MIT Mode) |
| 10000 | ma | |
Max Velocity Limt |
| 3500 | rpm | |
Negative Position Limit |
| -2147480000 | ||
Positive Position Limit |
| 2147480000 | ||
Under Voltage Protection Value |
| 20 | V | |
Over Voltage Protection Value |
| 60 | V | |
Mosfet Shutdown Temperature |
| 90 | ℃ | |
Motor Shutdown Temperature |
| 90 | ℃ | |
MCU Shutdown Temperature |
| 90 | ℃ | |
CAN Watch Dog Period |
| 0 | ms |
Feedback Frame
- The feedback frame is sent from the actuator to the master controller to provide feedback on various statuses.
- Type of Frame:DATA
- Format of Frame:EXTENDED
- DLC:8
Type of Feedback | Default frame ID | DATA | |||||||
Data[0] | Data[1] | Data[2] | Data[3] | Data[4] | Data[5] | Data[6] | Data[7] | ||
Feedback 0 |
| 32-bit serial number | 32-bit firmware version date | ||||||
Feedback 1 |
| 16-bit Voltage | 16-bit PWM | 16-bit Phase Current | 16-bit Velocity | ||||
Feedback 2 |
| 32-bit Motor Position | 32-bit Reducer Position | ||||||
Feedback 3 |
| Mosfet temperature | Motor temperature | MCU temperature | Warning Type | Error Type | No Definition | No Definition | Operating Mode |
Error Type | |
---|---|
| Power Supply Under Voltage |
| Power Supply Over Voltage |
| Motor Over Current |
| Mosfet Over Temperature |
| Motor Over Temperature |
| MCU Over Temperature |
Warning Type | |
| CAN Watch Dog Time Out |