Professional Documents
Culture Documents
SteadyWin Communication Specification V1.01
SteadyWin Communication Specification V1.01
The CAN baud rate can be adjusted from 100K to 1M bit/s, with hardware including CAN_H, CAN_L
and GND three signal pins. Generally, a 120-ohm terminal resistor needs to be paralleled at the
transmitting end and the receiving end. The CAN communication rate of the motor module can be set by a
serial port.
Motor modules are slaves, using a one-on-one communication mode, i.e. the master sends commands
and the slave responds to commands. If the master does not send commands with the corresponding ID,
the slave will not actively send data on the bus. It takes 500us to respond to the master after receiving the
command. Therefore, the maximum communication interval supported by the system is 500us.
The motor module's own ID can be configured via the serial port, and any number between 0 and 100
can be selected. Note that the same bus cannot have duplicate IDs.
The master ID is also written into the motor module through the serial port. In this way, when the
motor module receives a CAN data frame that meets the specification, it will send a response data frame to
the master ID set in advance. The default master ID is 100, i.e. the controller sets its own ID to 100 to
receive the response from the motor module.
P - Position Mode Position and torque double closed-loop mode (3510,4305 exclusive);
S - Speed Mode Speed and torque double closed-loop mode;
C - Current Mode Torque closed-loop mode;
F - Pos-Speed Mode Speed and position control mode (3510 exclusive);
V - Pos-3loop Mode Position, speed and torque three closed-loop mode;
D - Encoder Mode Encoder output mode (2206 exclusive);
T - Custom Mode Custom mode (not open).
*Refer to the corresponding product manual for the specific operating modes supported by each
motor.
Not Use Not Use Not Use Not Use Not Use Expand Extended Multi-circle
PWM Position Disable
should be 0 should be 0 should be 0 should be 0 should be 0 output Mode 1 = +-1Cycle
1 = PWM 1 = 16bit 0 = +-2Cycle
Output 0 = 32bit
0 = PWM
Input
Byte 2-8
Not used
The motor module can receive instructions, 8 bytes in total, divided into two categories:
a. Set the motor position, speed, torque, position loop Kp, Kd, where Kp affects the response time of
the position loop, Kd affects the damping of the position loop, and there is no integral control item in the
position loop. Speed loop Kp, Ki Kd are not currently open, torque loop Kp can be set directly through the
serial port, torque loop Ki Kd is not currently open.
Position command
The position command is 16 bits long, from 0x0000 to 0xFFFF, 0X8000 is the position command 0, so
when the host computer sends the command, it needs to offset 0X8000. The full range of position
command is set to Pmax in the serial port. When Pmax = 1, the range of position command is +-1 circle,
that is, 0XFFFF represents positive rotation of one circle, 0x0000 represents negative rotation of one circle,
When Pmax >1, the range of position command changes to +-Pmax circle.
Speed command
The speed command has 12 bits in length, from 0x000 to 0xFFF, and 0x800 is also the speed command
0. Therefore, when the upper computer sends the command, it needs to offset 0X800. The full-scale speed
command is different for different models of motors.
Torque command
The torque command is 12 bits long, ranging from 0x000 to 0xFFF, with 0x800 being torque command
0. Therefore, when the upper computer sends commands, it needs to offset 0X800. The full range of torque
commands varies from different types of motors.
*Location loop gains and location loop damping constants should be positive and no offset processing
is required. The numerical values should be adjusted according to different motor models and load
conditions.
*The definitions of different motor modes, speed, and torque commands will change.In the position-
velocity-torque closed-loop mode, the velocity command represents the maximum velocity that can be
In encoder mode, the host sends damping commands and scale commands to the motor module,
adjusting the damping and scale value of the motor module in encoder mode. The damping ranges from 0-
255, and n represents the motor scale interval is 32*n. The total number of motor scales per rotation is
1024*n.
The motor module responds to the host in two modes, normal mode is 6 bytes and extended mode is
8 bytes.
Motor module ID Current Position Current Position Current Velocity Current Velocity Current Torque
used for host High 8 Bits Low 8 Bits High 8 Bits Low 4 Bits+ Low 8 Bits
identification Current Torque
High 4 Bits
Calculate the position, speed and torque in the same way as sending commands, and each needs to
offset the offset.
In extended address mode, the location data uploaded by the motor module changes from 16 bits to
32 bits, and the position code value changes by 1024 each time the motor rotates one circle.
Motor module ID Current Position Current Position Current Position Current Position Current motor
used for host 31-24 bit 23-16 bit 15-8 bit 7-0 bit rotation direction
identification 1 CW
-1 CCW
0 Keep still
In encoder mode, the position calculation uses 32-bit data, and the position data value changes 1024
when the motor rotates one round.
4.Program example
Host using the following code to communicate with the motor module (position mode):
CanSendProcess()
{
s_p_int = 0x8000;
s_v_int = 0x900;
s_Kp_int = 0x800;
s_Kd_int = 0x800;
s_c_int = 0x900;
g_transmit_message.tx_data[0] = s_p_int>>8;
g_transmit_message.tx_data[1] = s_p_int&0xFF;
g_transmit_message.tx_data[2] = s_v_int>>4;;
g_transmit_message.tx_data[3] = ((s_v_int&0xF)<<4) + (s_Kp_int >>8);
g_transmit_message.tx_data[4] = s_Kp_int &0xFF;
g_transmit_message.tx_data[5] = s_Kd_int>>4;
g_transmit_message.tx_data[6] = ((s_Kd_int &0xF)<<4) + (s_c_int >>8);