0% found this document useful (0 votes)
160 views26 pages

MS MF RMD Motor CAN Protocol V2.35

Uploaded by

jpauleni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views26 pages

MS MF RMD Motor CAN Protocol V2.35

Uploaded by

jpauleni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

SMC POWERS LTD

(20) Position closed loop control command2


command (1frame)The host
MS MF RMD-S RMD-F Motor CANBus sends this command to control the position of the motor
(multi-turn angle).The control value angleControl is int32_t,
Communication Protocol V2.
V2.35 the actual position is 0.01degree/LSB, that is,36000

1. CANbus parameters and single motor commands end and represents 360°,and the motor rotation direction is determined
by the difference between the target position and the current
receive message format position. The control value maxSpeed limits the maximum
speed at which the motor rotates, of the uint16_t type,
Businterface: CAN corresponding to the actual speed of 1dps/LSB.
Baudrate: 1Mbps
The format of message used to send commands and motor Datafield Description Data
replies to asingle motor is as follows:
DATA[0] Command byte 0xA4
ID: 0x140+ID(1~32)
Frame format: DATA DATA[1] NULL 0x00
Frame type: StandardDLC:8Byte
DATA[2] Speed limit low byte DATA[3]=*(uint8_t*)(&maxSpeed)
DATA[3]

DATA[3] Speed limit high byte DATA[4]=*((uint8_t*)(&maxSpeed)+1)


DATA[4]

DATA[4] Position control low b DATA[3]=*(uint8_t*)(&angleControl)


DATA[3]

DATA[5] Position control DATA[4]=*((uint8_t*)(&angleControl)+1)


DATA[4]

DATA[6] Position control DATA[5]=*((uint8_t*)(&angleControl)+2)


DATA[5]

DATA[7] Position control high b DATA[6]=*((uint8_t*)(&angleControl)+3)


DATA[6]

Notes
1. The control value angle Control under this command is limited by
the Max Angle value in the host computer.
MS MF 120 70 90 CAN Motor pins specifications 2. In this control mode, the maximum acceleration of the motor is
limited by the MaxAcceleration value in the host computer.
The following is a sample to send a running command to the #1 motor. 3. In this control mode, the maximum torque current of the motor is
ID Len Data0 D1 D2 D3 D4 D5 D6 D7 Format Type
141 8 88 00 00 00 00 00 00 00 Standard Data limited by the MaxTorqueCurrent value in the host computer.
00 to send a stop command
The following is a sample to the #1 motor. Drive reply(1 frame)
ID Len Data0 D1 D2 D3 D4 D5 D6 D7 Format Type
141 8 81 00 00 00 00 00 00 00 Standard Data
The motor responds to the host after receiving the command. The
The following is a sample to send a Speed closed loop control frame data contains the following parameters.
command to the #1 motor running at 90dps. 1. Motor temperature (int8_ttype,1°C/LSB).
1°C/LSB).
ID Len Data0 D1 D2 D3 D4 D5 D6 D7 Format Type
141 8 A2 00 00 00 28 23 00 00 Standard Data 2. The torque current value of the motor is iq(int16_ttype, range-
The following is a sample to send a Position + Speed closed loop 2048~2048,corresponding to the actual torque current range-
control command to the #1 motor to run at speed 90dps to 720degre
720degree
33A~33A).
ID Len Data0 D1 D2 D3 D4 D5 D6 D7 Format Type
141 8 A4 00 28 23 40 19 01 00 Standard Data 3. Motor speed(int16_ttype,1dps/LSB).
4. Encoder position value encoder (uint16_ttype,14-bit
(uint16_ttype,14 encoder

2.Single motor command list value range0~16383).


The current CAN control commands supported by RMD Data field Description D
Motor drives are as follows:
DATA[0] Command byte 0xA4
Description Command
1 Read the command for setting parameters 0x4
40 DATA[1] DATA[1]=*(uint8_t*)(&temperature)
DATA[1]
2 Write the Settings to the RAM command 0x42
42 Motor temperature
3 Write the Settings to the ROM command 0x44
44 DATA[2] DATA[2] =*(uint8_t*)(&iq)
Torque current low byte
4 Read encoder command 0x90
5 Write encoder value to ROM as motor 0x91 DATA[3] Torque current high byte DATA[3]
DATA[3 =*((uint8_t*)(&iq)+1)
zero command
6 Write current position to ROM as 0x19 DATA[4] Motor speed low byte DATA[4] =*(uint8_t*)(&speed)
motor zero command
DATA[5] Motor speed high byte DATA[5]=*((uint8_t*)(&speed)+1)
DATA[5]
7 Read multi-turn angle command 0x92
8 Read single circle angle command 0x94 DATA[6] DATA[6]=*(uint8_t*)(&encoder)
DATA[6]
9 Clear motor angle command (set 0x95 Encoder position low byte
initial position) DATA[7] DATA[7]=*((uint8_t*)(&encoder)+1)
DATA[7]
Encoder position high b
10 Read motor status1 and error flag 0x9A
commands
11 Clear motor error flag command 0x9B
12 Read motor status2 command 0x9C
13 Read motor status3 command 0x9D
14 Motor off command 0x80
15 Motor stop command 0x81
16 Motor running command 0x88
17 Torque closed loop control command 0xA1
18 Speed closed loop control command 0xA2
19 Multi loop Angle control command 0xA3
20 Multi loop Angle & speed control 0xA4
21 Single loop Angle control command 0xA5 SMCPowersLtd.
22 Single loop Angle & speed control 0xA6 www.smc-powers.com
www.smc
23 Increasement Angle control 0xA7
24 Increasement Angle & speed 0xA8
control 1 / 26
SMC POWERS LTD
MS MF RMD MOTOR CONTROL PROTOCOL(CANBUS
CANBUS)V2.35
1.Brief Introduction

Connect to PC program.
You can use USB to UART Adaptor with Molex 1.25 connection 3pin wires to o connect to the driver on Tx and Rx
socket. Then you can plug the PC USB port to connect program to the driver.

2 / 26
SMC POWERS LTD
Connect to Power and RS485 or CAN
CAN.
The following is the sample for connect to power and RS485
RS485.

The following is the sample for connect to power and CAN.

You can use USB to UART Adapter to conneect the driver to PC.

3 / 26
SMC POWERS LTD
You can also test running the motor on the PC program with following control mode.

The following is a copy of test page.

4 / 26
SMC POWERS LTD
2.Motor receiving message format
The format of the message used to send control commands and motor replies to a single motor is as
follows
Identifier:0x140+ID(1~32)
Frame format: DATA
Frame type: standard frame
DLC:8byte

3.Control Command list


SN COMMAND
COMMANDNAME COMMANDDATA
DATA
1. Read the command for setting parameters
0x40
2. Write the Settings to the RAM command
0x42
3. Write the Settings to the ROM
M command
0x44
4. Read acceleration data command 0x33
5. Write acceleration data to RAM command 0x34
6. Read encoder data command
ommand 0x90
7. Write encoder off set command 0x91
8. Write current position to ROM as motor zero command 0x19
9. Read multi turns angle command 0x92
10. Read single circle angle command 0x94
11 Make motor current position as zero position 0x95
12 Readmotorstatus1anderror
errorflagcommands 0x9A
13 Clearmotor error flag command 0x9B
14. Read motor status2 0x9C
15. Read motor status3 0x9D
16. Motor off command 0x80
17 Motor stop command 0x81
18. Motor running command 0x88
19 Torque open-loop command 0xA0
20. Torque closed-loop command 0xA1
21 Speed closed-loop command 0xA2
22 Multi
ulti loop Angle control command 0xA3
23 Multi
ulti loop Angle & speed control 0xA4
24 Single loop Angle control command 0xA5
25 Single loop Angle & speed control 0xA6
26 Increasement Angle control 0xA7
27 Increasement Angle & speed control 0xA8

4.Single motor Command description


4.1.
1. Read the command for setting parameters
The host sends this command to read the set parameters of the current motor. The type of parameters to be
read is determined by parameter number ParamID
Datafield Description Data
DATA[0] commandbyte
byte 0x40

5 / 26
SMC POWERS LTD
DATA[1] ParamID 0x96; Angle loop pid
0x97; Speed loop pid
0x98; Current pid
0x99; max Torque Current
0x9A; maxSpeed
0x9B; maxAngle
0x9C; maxAngle
0x9D; currentRamp
0x9E; speedRamp
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
For example: 0x40 96 00 00 00 00 00 00 to read angle loop PID
Driver reply(one frame)
The motor responds to the host after receiving the command. The frame data contains the following parameters.
Datafield Description Data
DATA[0] commandbyte
byte 0x40
DATA[1] ParamID 0x96; 0x97;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
DATA[2] DATA[2]
DATA[3] DATA[3]
DATA[4] DATA[4]
DATA[5] DATA[5]
DATA[6] DATA[6]
DATA[7] DATA[7]

ParamID Table
ParamID Motor parameter specifications
Angle loop pid
anglePidKp(Angle_
Angle_kp,uint16_t)
DATA[2]= *(uint8_t *))(& anglePidKp)
150 (0x96)
DATA[3] = *((uint8_t *)(& anglePidKp)+1)
Angle_ki,uint16_t )
anglePidKi(Angle_
DATA[4]= *(uint8_t *))(& anglePidKi)
DATA[5] = *((uint8_t *)(& anglePidKi)+1)
Angle_kd,uint16_t )
anglePidKd(Angle_
DATA[6]= *(uint8_t *))(& anglePidKd)
DATA[7] = *((uint8_t *)(& anglePidKd)+1)

ParamID Table
ParamID Motor parameter specifications

6 / 26
SMC POWERS LTD
Speed pid
Speed_kp,uint16_t )
speedPidKp(Speed_
DATA[2]= *(uint8_t
8_t *)(& speedPidKp)
DATA[3] = *((uint8_t
8_t *)(& speedPidKp)+1)
Speed_ki,uint16_t )
speedPidKi(Speed_
151 (0x97) DATA[4]= *(uint8_t
8_t *)(& speedPidKi)
DATA[5] = *((uint8_t
8_t *)(& speedPidKi)+1)
Speed_kd,uint16_t )
speedPidKd(Speed_
DATA[6]= *(uint8_t
8_t *)(& speedPidKd)
DATA[7] = *((uint8_t
8_t *)(& speedPidKd)+1)
Current pid
Current_kp,uint16_t )
currentPidKp(Current_
DATA[2]= *(uint8_t
8_t *)(& currentPidKp)
DATA[3] = *((uint8_t
8_t *)(& currentPidKp)+1)
Current_ki,uint16_t )
currentPidKi(Current_
152 (0x98) DATA[4]= *(uint8_t
8_t *)(& currentPidKi)
DATA[5] = *((uint8_t
8_t *)(& currentPidKi)+1)
Current_kd,uint16_t )
currentPidKd(Current_
DATA[6]= *(uint8_t
8_t *)(& currentPidKd)
DATA[7] = *((uint8_t
8_t *)(& currentPidKd)+1)
maxTorqueCurrentt(Max_Torque_current,int16_t )
153 (0x99) DATA[2]= *(uint8_t
8_t *)(& maxTorqueCurrent)
DATA[3] = *((uint8_t
8_t *)(& maxTorqueCurrent)+1)

max_Speed,int32_t )
maxSpeed(max_Speed
DATA[2]= *(uint8_t
8_t *)(& maxSpeed)
154 (0x9A) DATA[3] = *((uint8_t
8_t *)(& maxSpeed)+1)
DATA[4] = *((uint8_t
8_t *)(& maxSpeed)+2)
DATA[5] = *((uint8_t
8_t *)(& maxSpeed)+3)

maxAngle low 4 byte maxAngle


DATA[2]= *(uint8_t
8_t *)(& maxAngle)
155 (0x9B) DATA[3] = *((uint8_t
8_t *)(& maxAngle)+1)
DATA[4] = *((uint8_t
8_t *)(& maxAngle)+2)
DATA[5] = *((uint8_t
8_t *)(& maxAngle)+3)

maxAngle high 4 byte maxAngle


DATA[2] = *((uint8_t
8_t *)(& maxAngle)+4)
156 (0x9C) DATA[3] = *((uint8_t
8_t *)(& maxAngle)+5)
DATA[4] = *((uint8_t
8_t *)(& maxAngle)+6)
DATA[5] = *((uint8_t
8_t *)(& maxAngle)+7)

currentRamp(current_Ramp
current_Ramp,int16_t)
157 (0x9D)
DATA[2]= *(uint8_t
t8_t *)(& currentRamp)
DATA[3]] = *((uint8_t *)(& currentRamp)+1)

speed_Ramp,int32_t )
speedRamp(speed
DATA[2]=
]= *(uint8_t *)(& speedRamp)
158 (0x9E) DATA[3]] = *((uint8_t *)(& speedRamp)+1)
DATA[4]] = *((uint8_
*((uint8_t *)(& speedRamp)+2)
DATA[5]] = *((uint8_t *)(& speedRamp)+3)

4.2 Write the Settings to the RAM command


7 / 26
SMC POWERS LTD
The host sends this command to write the PID parameter to RAM, and the write parameter becomes invalid
after power off.. See motor setting parameters for th
the data sent

Datafield Description Data


DATA[0] Commandbyte
byte 0x42
DATA[1] ParamID 0x96; 0x97;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
DATA[2] DATA[2]
DATA[3] DATA[3]
DATA[4] DATA[4]
DATA[5] DATA[5]
DATA[6] DATA[6]
DATA[7] DATA[7]
Driver reply (one frame)
The motor responds to the host after receiving the command.
Datafield Description Data
DATA[0] commandbyte
byte 0x42
DATA[1] ParamID 0x96; 0x97;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
DATA[2] Pass / Failure DATA[2] = 0 write successful; DATA[2] = 1 write failure
DATA[3] NULL
DATA[4] NULL
DATA[5] NULL
DATA[6] NULL
DATA[7] NULL
4.3 Writes the set parameters to the ROM command
The host sends this command to write the PID parameters to the ROM. The parameters are still valid after power off. See
motor setting parameters for the data sent

Datafield Description Data


DATA[0] Commandbyte
byte 0x44
DATA[1] ParamID 0x96; 0x97;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
DATA[2] DATA[2]
DATA[3] DATA[3]
DATA[4] DATA[4]
DATA[5] DATA[5]
DATA[6] DATA[6]
DATA[7] DATA[7]
Driver reply(one frame)
The motor responds to the host after receiving the command.
Datafield Description Data
DATA[0] commandbyte
byte 0x44
DATA[1] ParamID 0x96; 0x97;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
;0x98;0x99;0x9A;0x9B;0x9C;0x9D;0x9E;
DATA[2] Pass / Failure DATA[2] = 0 write successful; DATA[2] = 1 write failure
DATA[3] NULL
DATA[4] NULL
DATA[5] NULL
DATA[6] NULL
DATA[7] NULL

8 / 26
SMC POWERS LTD

4.5. Write acceleration data to RAM command(oneframe)


The host sends the command to write the acceleration to the RAM, and the write parameters are invalid after the
power is turned off. Acceleration data Accel is int32_t type, unit 1dps/s

Datafield Description Data


DATA[0] Command byte 0x34
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Acceleration DATA[4]=*(uint8_t*)(&Accel)
DATA[5] Acceleration DATA[5] =*((uint8_t*)(&Accel)+1)
DATA[6] Acceleration DATA[6] =*((uint8_t*)(&Accel)+2)
DATA[7] Acceleration DATA[7] =*((uint8_t*)(&Accel)+3)

Drive reply(one frame)


The motor responds to the host after receiving the command, the frame data is the same as the host sent

4.6 Read encoder data command (one frame)


The host sends the command to read the current position of the encoder
Data field Description Data
DATA[0] Command byte 0x90
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply (one frame)
The motor responds to the host after receiving the command. The framed at a contains the following
parameters.
1. Encoder current position(uint16_t type, 14bit encoder value range0~16383), which is the
encoder original position minus the encoder zero off set value
2. Encoder original position (encoder Raw) (uint16_t type, 14bit encoder value range0~16383)
range
3. Encoder Offset(uint16_t
uint16_t type, 14bit encoder value range0~16383)

Data field Description Data


DATA[0] Command byte 0x90
DATA[1] NULL 0x00
DATA[2] Encoder position low byte DATA[2]=*(uint8_t*)(&encoder)
*(uint8_t*)(&encoder)
DATA[3] Encoder position high byte DATA[3]=*((uint8_t*)(&encoder)+1)
*((uint8_t*)(&encoder)+1)
DATA[4] Encoder original position low byte DATA[4]=*(uint8_t*)(&encoderRaw)
*)(&encoderRaw)
DATA[5] Encoder original position high byte DATA[5]=*((uint8_t*)(&encoderRaw)+1)
*((uint8_t*)(&encoderRaw)+1)
DATA[6] Encoder offset low byte DATA[6]=*(uint8_t*)(&encoderOffset)
*(uint8_t*)(&encoderOffset)
DATA[7] Encoder offset high byte DATA[7]=*((uint8_t*)(&encoderOffset)+1
DATA[7]=*((uint8_t*)(&encoderO
)
9 / 26
SMC POWERS LTD

4.7 Write encoder offset command(one frame)


The host sends the command to set encoder offset, written the encoder offset with uint16_t type, 14bit encoder value
range0~16383

Data field Description Data


DATA[0] Command byte 0x91
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] Encoder off set low byte DATA[6]=*(uint8_t*)(&encoderOffset)
*(uint8_t*)(&encoderOffset)
DATA[7] Encoder off set high byte DATA[7]=*((uint8_t*)(&encoderOffset)+1)
*((uint8_t*)(&encoderOffset)+1)
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following
parameters.
1. New encoder Offset(uint16_t
uint16_t type, 14bit encoder value range0~16383)
Data field Description Data
DATA[0] Command byte 0x91
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] Encoder offset low byte DATA[6]=*(uint8_t*)(&encoderOffset)
ncoderOffset)
DATA[7] Encoder offset high byte DATA[7]=*((uint8_t*)(&encoderOffset)+1)
*((uint8_t*)(&encoderOffset)+1)

4.8 Write current position to ROM as motor zero position command (one frame)
Notice:
1.This command needs to be powered on again to take effect.
2.This command will write the zero position to ROM. Multiple writes will affect the chip life. So it is not
recommended to use it frequently.
Data field Description Data
DATA[0] Command byte 0x19
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Driver reply(one frame)
The motor returns to the host after receiving the command, and the data is offset value.
Data field Description Data
DATA[0] Command byte 0x19
10 / 26
SMC POWERS LTD
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] Encoder offset low byte DATA[6]=*(uint8_t*)(&encoderOffset)
DATA[7] Encoder offset high byte DATA[7]=*((uint8_t*)(&encoderOffset)+1)
*((uint8_t*)(&encoderOffset)+1)

4.9 Read multi turns angle command (one frame)


The host sends command to read the multi-turn angle of the motor
Data field Description Data
DATA[0] Command byte 0x92
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1.Motorangle, int64_t type data, positive value indicates clockwise cumulative angle, negative value
indicates counterclockwise cumulative angle, unit 0.01°/LSB.
Data field Description Data
DATA[0] Command byte 0x92
DATA[1] Anglelowbyte1 DATA[1]=*(uint8_t*)(&motorAngle)
DATA[2] Anglebyte2 DATA[2] =*((uint8_t*)(&motorAngle)+1)
DATA[3] Anglebyte3 DATA[3] =*((uint8_t*)(&motorAngle)+2)
DATA[4] Anglebyte4 DATA[4] =*((uint8_t*)(&motorAngle)+3)
DATA[5] Anglebyte5 DATA[5] =*((uint8_t*)(&motorAngle)+4)
DATA[6] Anglebyte6 DATA[6] =*((uint8_t*)(&motorAngle)+5)
DATA[7] Anglebyte7 DATA[7] =*((uint8_t*)(&motorAngle)+6)

11 / 26
SMC POWERS LTD
4.10 Read single circle angle command(1 frame)
The host sends command to read the single circle angle of the motor
Data field Description Data
DATA[0] Command byte 0x94
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1.CircleAngle, uint16_t type data, starting from the encoder zero point, increased by clockwise rotation,
and returning to zero when it reaches zero again, the unit is 0.01°/LSB.
Data field Description Data
DATA[0] Command byte 0x94
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] Single angle low byte DATA[6]=*(uint8_t*)(&circleAngle)
DATA[7] Single angle high byte DATA[7] =*((uint8_t*)(&circleAngle)+1)

4.11 Make motor current position as zero position


The command makes the current position as zero position, cl
clear
ear single angle and multi angle data. It will be invalid when power
off.
Data field Description Data
DATA[0] Command byte 0x95
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data is the same as the host sent

4.12 Read motor status1 and error flag commands(one frame)


This command reads the motor's error status and voltage, temperature and other information.
ation.
Data field Description Data
DATA[0] Command byte 0x9A
DATA[1] NULL 0x00
DATA[2] NULL 0x00
12 / 26
SMC POWERS LTD
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type, unit 1℃/LSB)。
2. Voltage(uint16_t type, unit 0.1V/LSB
0.1V/LSB)。
3. ErrorState(uint8_t type, Each bit represents a different motor state)
Data field Description Data
DATA[0] Command byte 0x9A
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] NULL 0x00
DATA[3] Voltage low byte DATA[3]=*(uint8_t*)(&voltage)
DATA[4] Voltage high byte DATA[4]=*((uint8_t*)(&voltage)+1)
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] Error State byte DATA[7]=errorState
Memo:
Error State:The specific status table of each bit is as follows

ErrorState Statusde 0 1
scription
0 Voltage status Normal Low voltage
protection
1 invalid
2 invalid
3 Temperature Normal Over temperature
status protection
4 invalid
5 invalid
6 invalid
7 invalid

4.13 Clear motor error flag command (one frame)


This command clears the error status of the current motor
Data field Description Data
DATA[0] Command byte 0x9B
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00

13 / 26
SMC POWERS LTD
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type, unit 1℃/LSB)
2. Voltage(uint16_t type, unit 0.1V/LSB
0.1V/LSB)
3. ErrorState(uint8_t type, Each bit represents a different motor state)
Data field Description Data
DATA[0] Command byte 0x9A
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] NULL 0x00
DATA[3] Voltage low byte DATA[3] =*(uint8_t*)(&voltage)
DATA[4] Voltage high byte DATA[4]=*((uint8_t*)(&voltage)+1)
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] Error State byte DATA[7]=errorState

Memo: the error flag cannot be cleared when the motor status does not return to normal.
ErrorState: the specific status
tus table of each bit is as follows
Error State Status 0 1
description
0 Voltage status Normal Low voltage
protection
1 invalid
2 invalid
3 Temperature Normal Over temperature
status protection
4 invalid
5 invalid
6 invalid
7 invalid

4.14 Read motor status2 (one frame)


This command reads motor temperature, voltage, speed, encoder position
Data field Description Data
DATA[0] Command byte 0x9C
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type, unit 1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048, real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type, 1dps/LSB
1dps/LSB)

14 / 26
SMC POWERS LTD
4. Encoder position value(uint16_t
uint16_t type, 14 bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0x9C
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

4.15 Read motor status3(one frame)


This command reads the phase current status data of the motor.
Data field Description Data
DATA[0] Command byte 0x9D
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor returns to the host after receiving the command. The frame data contains three-phase
phase current data,
the data type is int16_t type, corresponding to the actual phase current is 1A/64LSB.
Datafield Description Data
DATA[0] Command byte 0x9D
DATA[1] NULL 0x00
DATA[2] PhaseA current low byte DATA[2]=*(uint8_t*)(&iA)
DATA[3] PhaseA current high byte DATA[3]=*((uint8_t*)(&iA)+1)
DATA[4] PhaseB current low byte DATA[4]=*(uint8_t*)(&iB)
DATA[5] PhaseB current high byte DATA[5]=*((uint8_t*)(&iB)+1)
DATA[6] PhaseC current low byte DATA[6]=*(uint8_t*)(&iC)
DATA[7] PhaseC current high byte DATA[7]=*((uint8_t*)(&iC)+1)

4.16 Motor off command(one frame)


Turn off motor, while clearing the motor operating status and previously received control commands
Data field Description Data
DATA[0] Command byte 0x80
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00

15 / 26
SMC POWERS LTD
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data is the same as the host sent

4.17 Motor stop command(one frame)


Stop motor, but do not clear the motor operating state and previously received control commands
Data field Description Data
DATA[0] Command byte 0x81
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data is the same as the host sent

4.18 Motor running command(one frame)


Resume motor operation from motor stop command (Recovery control mode before stop motor)
Data field Description Data
DATA[0] Command byte 0x88
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] NULL 0x00
DATA[5] NULL 0x00
DATA[6] NULL 0x00
DATA[7] NULL 0x00

Drive reply(one frame)


The motor responds to the host after receiving the command, the frame data is the same as the host sent

16 / 26
SMC POWERS LTD

5.1 Torque open-loop command (one frame)


The host sends the command to control torque current output of the motor. powerControlControl is int16_t type, the
value range:-850~850, (the bus current and the actual torque of the motor vary with different motors)

Data field Description Data


DATA[0] Command byte 0xA0
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Power value low byte DATA[4] =*(uint8_t*)(& powerControl)
DATA[5] Torque value high byte DATA[5]=*((uint8_t*)(& powerControl)+1)
)+1)
DATA[6] NULL 0x00
DATA[7] NULL 0x00

Memo:
1. powerControl int his command is not limited by the MaxTorque Current value in the host computer.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor Power(int16_t type, Range:
Range:-850~850)
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range0~16383)
Data field Description Data
DATA[0] Command byte 0xA0
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position byte high DATA[7] =*((uint8_t*)(&encoder)+1)

17 / 26
SMC POWERS LTD
5.2 Torque closed-loop command (one frame)
The host sends the command to control torque current output of the motor. IqControl is int16_t type, the value
range:-2048~2048, corresponding to the actual torque current range -16.5A~16.5A
16.5A~16.5A for MF, RMD-L
RMD motors, -
32A~32A for MG motors (the bus current and the actual torque of the motor vary with different motors)
Data field Description Data
DATA[0] Command byte 0xA1
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Torque current low byte DATA[4] =*(uint8_t*)(&iqControl)
DATA[5] Torque current high byte DATA[5]=*((uint8_t*)(&iqControl)+1)
*((uint8_t*)(&iqControl)+1)

DATA[6] NULL 0x00


DATA[7] NULL 0x00

Memo:
2. IqControl int his command is not limited by the MaxTorque Current value in the host computer.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
5. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
6. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048, real torque current range -16.5A~16.5A for
MF, RMD-L motors, -32A~32A for MG motors)
7. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
8. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range0~16383)
Data field Description Data
DATA[0] Command byte 0xA1
DATA[1] Motor temperature
ture DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position byte high DATA[7] =*((uint8_t*)(&encoder)+1)

18 / 26
SMC POWERS LTD

5.3 Speed closed-loop command (one frame)


The host sends this command to control the speed of the motor. SpeedControl is int32_t, which corresponds to the
actual speed of 0.01dps/LSB.
Data field Description Data
DATA[0] Command byte 0xA2
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Speed control low byte DATA[4]=*(uint8_t*)(&speedControl)
DATA[5] Speed control DATA[5]=*((uint8_t*)(&speedControl)+1)
l)+1)
DATA[6] Speed control DATA[6]=*((uint8_t*)(&speedControl)+2)
*((uint8_t*)(&speedControl)+2)
DATA[7] Speed control high byte DATA[7]=*((uint8_t*)(&speedControl)+3)
*((uint8_t*)(&speedControl)+3)
Memo:
1. The maximum torque current 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.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type, unit 1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048, real torque current range:-33A~33A
33A~33A)
3. Motor speed(int16_t type, 1dps/LSB
1dps/LSB)
4. Encoder position value(uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA2
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

19 / 26
SMC POWERS LTD

5.4 Multi loop Angle control command(one frame)


The host sends this command to control the position of the motor (multi-turn angle). AngleControl
Control is int32_t type, and
the actual position is 0.01degree/LSB, 36000 represents 360°. The motor rotation direction is determined by the
difference between the target position and the current position.
Data field Description Data
DATA[0] Command byte 0xA3
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Position control low byte DATA[3]=*(uint8_t*)(&angleControl)
DATA[5] Position control DATA[4]=*((uint8_t*)(&angleControl)+1)
DATA[6] Position control DATA[5]=*((uint8_t*)(&angleControl)+2)
DATA[7] Position control high byte DATA[6]=*((uint8_t*)(&angleControl)+3)

Memo:
1. Angle Control under this command is limited by the Max Angle value in the host computer.
2. The maximum speed under this command is limited by the MaxSpeed value in the host computer.
3. In this control mode, the maximum acceleration of the motor is limited by the Max Acceleration
value in the host computer.
4. In this control mode, the maximum torque current of the motor is limited by the Max Torque
Current value in the host computer.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A
33A~33A)
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA3
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

20 / 26
SMC POWERS LTD

5.5 Multi loop Angle & speed control command (one frame)
The host sends this command to control the position of the motor (multi-turn angle). AngleControl is int32_t type, and
the actual position is 0.01degree/LSB, 36000 represents 360°. The motor rotation direction is determined by the
difference between the target position and the currentposition.
The control value maxSpeed limits the maximum speed at which the motor rotates, uint16_t type, corresponding to
the actual speed of 1dps/LSB.
Data field Description Data
DATA[0] Command byte 0xA4
DATA[1] NULL 0x00
DATA[2] Speed limited low byte DATA[3] =*(uint8_t*)(&maxSpeed)
DATA[3] Speed limited high byte DATA[4]=*((uint8_t*)(&maxSpeed)+1)
DATA[4] Position control low byte DATA[3]=*(uint8_t*)(&angleControl)
DATA[5] Position control DATA[4]=*((uint8_t*)(&angleControl)+1)
*)(&angleControl)+1)
DATA[6] Position control DATA[5]=*((uint8_t*)(&angleControl)+2)
*)(&angleControl)+2)
DATA[7] Position control high byte DATA[6]=*((uint8_t*)(&angleControl)+3)
*)(&angleControl)+3)
Memo:
1. Angle Control under this command is limited by the MaxAngle value in the host computer.
2. In this control mode, the maximum acceleration of the motor is limited by the
MaxAcceleration value in the host computer.
3. In this control mode, the maximum torque current of the motor is limited by the MaxTorque
Current value in the host computer.

Drive reply(one frame)


The motor responds to the host after receiving the command, the frame data contains the following parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range0~16383)
Data field Description Data
DATA[0] Command byte 0xA4
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte
yte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

21 / 26
SMC POWERS LTD
5.6 Single loop Angle control command (one frame)
The host sends this command to control
ontrol the position of the motor (single-turn angle). AngleControl is uint16_t
type, the value range is 0~35999, and the actual position is 0.01degree/LSB, the actual angle range is 0°~359.99°
The control values pinDirection sets the direction in which the motor rotates, which is uint8_t type, 0x00 for
clockwise and 0x01 for counterclockwise.
Data field Description Data
DATA[0] Command byte 0xA5
DATA[1] SpinDirection byte DATA[1]=spinDirection
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Position control low byte DATA[4]=*(uint8_t*)(&angleControl)
DATA[5] Position control high byte DATA[5]=*((uint8_t*)(&angleControl)+1)
*)(&angleControl)+1)
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Memo:
1. The maximum speed under this command is limited by the MaxSpeed 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.
3. In this control mode, the maximum torque current of the motor is limited by the Max Torque
Current value in the host computer.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following
parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA5
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

22 / 26
SMC POWERS LTD

5.7 Single loop Angle & speed control (one frame)


The host sends this command to control the position of the motor (single-turn angle)
1. AngleControl is uint16_t type, the value range is 0~35999, and the actual position is 0.01degree/LSB, the
actual angle range is 0°~359.99°。
2. The control value spinDirection sets the direction in which the motor rotates, which is uint8_t type, 0x00 for
clockwise and 0x01 for counterclockwise.
3. Max Speed limits the maximum speed of motor rotation, which is uint16_t type, corresponding to the actual
speed of 1dps/LSB.
Data field Description Data
DATA[0] Command byte 0xA6
DATA[1] SpinDirection byte DATA[1]=spinDirection
DATA[2] Speed limited low byte DATA[2] =*(uint8_t*)(&maxSpeed)
DATA[3] Speed limited high byte DATA[3]=*((uint8_t*)(&maxSpeed)+1)
DATA[4] Position control low byte DATA[4]=*(uint8_t*)(&angleControl)
DATA[5] Position control high byte DATA[5]=*((uint8_t*)(&angleControl)+1)
*)(&angleControl)+1)
DATA[6] NULL 0x00
DATA[7] NULL 0x00
Memo:
1. In this control mode, the maximum acceleration of the motor is limited by the MaxAcceleration value
in the host computer.
2. In this control mode, the maximum torque current of the motor is limited by the MaxTorque
Max
Current value in the host computer.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following
parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA6
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

23 / 26
SMC POWERS LTD

5.8 Increasement Angle control (one frame)


The host sends this command to control the angle increasement of the motor
AngleControl is int32_t type, the actual position is 0.01degree/LSB. The direction of rotation is determined by
positive or negative.
Datafield Description Data
DATA[0] Command byte 0xA7
DATA[1] NULL 0x00
DATA[2] NULL 0x00
DATA[3] NULL 0x00
DATA[4] Position control low byte DATA[4]=*(uint8_t*)(&angleControl)
DATA[5] Position control DATA[5]=*((uint8_t*)(&angleControl)+1)
*)(&angleControl)+1)
DATA[6] Position control DATA[6]=*((uint8_t*)(&angleControl)+2)
*)(&angleControl)+2)
DATA[7] Position control high byte DATA[7]=*((uint8_t*)(&angleControl)+3)
*)(&angleControl)+3)

Memo:
In this control mode, the maximum
m acceleration of the motor is limited by the Max Acceleration value in
the PC setting tool.
In this control mode, the maximum torque current of the motor is limited by the Max Torque Current
value in the PC setting tool.
Drive reply(one frame)
The motor responds to the host after receiving the command, the frame data contains the following
parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type,1dps/LSB
e,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA7
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

24 / 26
SMC POWERS LTD

5.9 Increasement Angle & Speed control (one frame)


The host sends this command to control the angle increasement of the motor
AngleControl is int32_t type, the actual position is 0.01degree/LSB. The direction of rotation is determined by
positive or negative.
MaxSpeed limits the maximum speed of motor rotation, which is uint16_t type, corresponding to the actual speed
of 1dps/LSB.
Data field Description Data
DATA[0] Command byte 0xA8
DATA[1] NULL 0x00
DATA[2] Speed limited low byte DATA[2] =*(uint8_t*)(&maxSpeed)
DATA[3] Speed limited high byte DATA[3]=*((uint8_t*)(&maxSpeed)+1)
DATA[4] Position control low byte DATA[4]=*(uint8_t*)(&angleControl)
DATA[5] Position control DATA[5]=*((uint8_t*)(&angleControl)+1)
*)(&angleControl)+1)
DATA[6] Position control DATA[6]=*((uint8_t*)(&angleControl)+2)
+2)
DATA[7] Position control high byte DATA[7]=*((uint8_t*)(&angleControl)+3)
*)(&angleControl)+3)

The following is a sample for sending


ing the comman
command to make the motor to rotate 30 degrees at 36dps
30 degrees = 3000 = 0x0B B8
0 0 0
dps is Degree Per Second, /s. 1 dps is equal to 0.16666666666667 rpm. 1 rad = 360 /(2*3.14159) =5 57 17’45”.
36dps = 3600 = 0x0E 10
ID Len Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Format Forma Type
141 8 A8 00 10 0E B8 0B 00 00 Standard Data
Cmd Speed Increasing Angle
0.01dps/LSB 0.01degree/LSB
The following is a sample for sending
ing the comman
command to make the motor to rotate -30 degrees at 36dps
ID Len Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Format Forma Type
141 8 A8 00 10 0E 48 F4 FF FF Standard Data
Cmd Speed Increasing Angle
0.01dps/LSB 0.01degree/LSB

Memo:
In this control mode, the maximum acceleration of the motor is limited by the MaxAcceleration value in
the PC setting tool.
In this control mode, the maximum torque current of the motor is limited by the Max Torque Current
value in the PC setting tool.
Drive reply(one frame)
The motor responds to host after receiving the command, the frame data contains following parameters.
1. Motor temperature(int8_t type,unit
type,unit1℃/LSB)
2. Motor torque current(Iq)(int16_t
int16_t type, Range:-2048~2048,real torque current range:-33A~33A)
range:
3. Motor speed(int16_t type,1dps/LSB
type,1dps/LSB)
4. Encoder position value(uint16_t
uint16_t type, 14bit encoder value range 0~16383)
Data field Description Data
DATA[0] Command byte 0xA8
DATA[1] Motor temperature DATA[1]=*(uint8_t*)(&temperature)
DATA[2] Torque current low byte DATA[2]=*(uint8_t*)(&iq)
DATA[3] Torque current high byte DATA[3]=*((uint8_t*)(&iq)+1)
DATA[4] Speed low byte DATA[4]=*(uint8_t*)(&speed)
DATA[5] Speed high byte DATA[5] =*((uint8_t*)(&speed)+1)
DATA[6] Encoder position low byte DATA[6] =*(uint8_t*)(&encoder)
DATA[7] Encoder position high byte DATA[7]=*((uint8_t*)(&encoder)+1)

25 / 26
SMC POWERS LTD

6 Multi motors control command


6.1 Multiple motor torque closed loop control commands (one frame)
The format of the message used to send commands to multiple motors at the same time, as followed:

Identifier:0x280
Frame format: DATA
Frame type: standard frame
DLC:8byte

The host simultaneously sends this command to control the torque current output up to 4motors. The
control value iqControl is int16_t type, the value range is-2000~2000, corresponding to the actual torque current
range-32A~32A(The bus current and the actual torque of the motor vary from motor to motor).
Data field Description Data
DATA[0] Torque current1 control value DATA[0]=*(uint8_t*)(&iqControl_1)
low byte
DATA[1] Torque current1 control value DATA[1]=*((uint8_t*)(&iqControl_1)+1)
nt8_t*)(&iqControl_1)+1)
high byte
DATA[2] Torque current2 control value DATA[2]=*(uint8_t*)(&iqControl_2)
low byte
DATA[3] Torque current2 control value DATA[3]=*((uint8_t*)(&iqControl_2)+1)
*((uint8_t*)(&iqControl_2)+1)
high byte
DATA[4] Torque current3 control value DATA[4]=*(uint8_t*)(&iqControl_3)
low byte
DATA[5] Torque current3 control value DATA[5]=*((uint8_t*)(&iqControl_3)+1)
*((uint8_t*)(&iqControl_3)+1)
high byte
DATA[6] Torque current4 control value DATA[6]=*(uint8_t*)(&iqControl_4)
low byte
DATA[7] Torque current4 control value DATA[7]=*((uint8_t*)(&iqControl_4)+1)
int8_t*)(&iqControl_4)+1)
high byte

6.2 Driver reply(one frame)


The message format of each motor reply command is as follows:

Identifier:0x140+ID(1-4)
Frame format: DATA
Frame type: standard frame
DLC:8byte

Each motor reply according to the ID from small to large, and the reply data of each motor is the same as the
single motor torque closed-loop control command reply data.

Note: We have different coder type from 12bit to 18bit, so the reply encoder value range varies from motor to motor. It
depends on which type you purchased.

26 / 26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy