Developer

Motor Settings Commands

The command list related to Motor Settings (Registers).

byte[0] Command Name Description
0x02 maxSpeed Set the maximum speed
0x03 minSpeed Set the minimum speed
0x05 curveType Set the acceleration or deceleration curve
0x07 acc Set the acceleration
0x08 dec Set the deceleration
0x0E maxTorque Set the maximum torque
0x18 qCurrentP Set q-axis current PID P gain
0x19 qCurrentI Set q-axis current PID I gain
0x1A qCurrentD Set q-axis current PID D gain
0x1B speedP Set speed PID P gain
0x1C speedI Set speed PID I gain
0x1D speedD Set speed PID D gain
0x1E positionP Set position PID P gain
0x22 resetPID Reset PID Controller gains
0x3A ownColor Set the own LED color
0x40 readRegister Read a specified register
0x41 saveAllRegisters Save all registers
0x4E resetRegister Reset a specified register
0x4F resetAllRegisters Reset all registers

 

0x02 : maxSpeed

Set the maximum speed of motor.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x02 uint16_t identifier float maxSpeed uint16_t crc16
description command task identifier maxSpeed [radian / second]
(Positive value)
CRC16
error-detecting

 

0x03 : minSpeed

Set the minimum speed of motor.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x03

uint16_t identifier

float minSpeed uint16_t crc16
description command task identifier minimum speed [radian / second]
(Positive value)
CRC16
error-detecting

 

0x05 : curveType

Set the acceleration or deceleration curve.
(Motion control setting)

byte [0] [1] [2] [3] [4] [5]
value 0x05 uint16_t identifier uint8_t curveType uint16_t crc16
description command task identifier acc. dec. curve
see below
CRC16
error-detecting
typedef enum curveType =
{
    CURVE_TYPE_NONE = 0, // Turn off Motion control
    CURVE_TYPE_TRAPEZOID = 1, // Turn on Motion control with trapezoidal curve
}

 

0x07 : acc

Set the acceleration.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x07

uint16_t identifier

float acc uint16_t crc16
description command task identifier acceleration [radian / second^2]
(Positive value)
CRC16
error-detecting

 

0x08 : dec

Set the deceleration.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x08

uint16_t identifier

float dec uint16_t crc16
description command task identifier deceleration [radian / second^2]
(Positive value)
CRC16
error-detecting

 

0x0E : maxTorque

Set the maximum torque.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x0E

uint16_t identifier

float maxTorque uint16_t crc16
description command task identifier maximum torque [N*m]
(Positive value)
CRC16
error-detecting

 

0x18 : qCurrentP

Set the q-axis current PID controller's Proportional gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x18

uint16_t identifier

float qCurrentP uint16_t crc16
description command task identifier q-current P gain
(Positive value)
CRC16
error-detecting

 

0x19 : qCurrentI

Set the q-axis current PID controller's Integral gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x19

uint16_t identifier

float qCurrentI uint16_t crc16
description command task identifier q-current I gain
(Positive value)
CRC16
error-detecting

 

0x1A : qCurrentD

Set the q-axis current PID controller's Differential gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x1A

uint16_t identifier

float qCurrentD uint16_t crc16
description command task identifier

q-current D gain
(Positive value)

CRC16
error-detecting

 

0x1B : speedP

Set the speed PID controller's Proportional gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x1B

uint16_t identifier

float speedP uint16_t crc16
description command task identifier speed P gain
(Positive value)
CRC16
error-detecting

 

0x1C : speedI

Set the speed PID controller's Integral gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x1C

uint16_t identifier

float speedI uint16_t crc16
description command task identifier speed I gain
(Positive value)
CRC16
error-detecting

 

0x1D : speedD

Set the speed PID controller's Differential gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x1D

uint16_t identifier

float speedD uint16_t crc16
description command task identifier speed D gain
(Positive value)
CRC16
error-detecting

 

0x1E : positionP

Set the position PID controller's Proportional gain.

byte [0] [1] [2] [3] [4] [5] [6] [7] [8]
value 0x1E

uint16_t identifier

float positionP uint16_t crc16
description command task identifier position P gain
(Positive value)
CRC16
error-detecting

 

0x22 : resetPID

Reset all the PID parameters to the firmware default settings.

byte [0] [1] [2] [3] [4]
value 0x22

uint16_t identifier

uint16_t crc16
description command task identifier CRC16
error-detecting

 

0x3A : ownColor

Set the own LED color.

byte [0] [1] [2] [3] [4] [5] [6] [7]
value 0x3A

uint16_t identifier

uint8_t red uint8_t green uint8_t blue uint16_t crc16
description command task identifier red color
0-255
green color
0-255
blue color
0-255
CRC16
error-detecting

 

0x40 : readRegister

Read a specified setting (register).

byte [0] [1] [2] [3] [4] [5]
value 0x40

uint16_t identifier

uint8_t register uint16_t crc16
description command task identifier register

(commandと同じ)
CRC16
error-detecting

 

0x41 : saveAllRegisters

Save all settings (registers) in flash memory.

byte [0] [1] [2] [3] [4]
value 0x41

uint16_t identifier

uint16_t crc16
description command task identifier CRC16
error-detecting

 

0x4E : resetRegister

Reset a specified register value to the firmware default setting.

byte [0] [1] [2] [3] [4] [5]
value 0x4E

uint16_t identifier

uint8_t register uint16_t crc16
description command task identifier register CRC16
error-detecting

 

0x4F : resetAllRegisters

Reset all register values to the firmware default setting.

byte [0] [1] [2] [3] [4]
value 0x4F

uint16_t identifier

uint16_t crc16
description command task identifier CRC16
error-detecting