RoboClaw Series
Brushed DC Motor Controllers
RoboClaw Series User Manual
98
BASICMICRO
53 - Drive M2 With Signed Duty And Acceleration
Drive M1 with a signed duty and acceleration value. The sign indicates which direction the motor
will run. The acceleration values are not signed. This command is used to drive the motor by
PWM and using an acceleration value for ramping. Accel is the rate at which the duty changes
from the current duty to the specified dury.
Send: [Address, 53, Duty(2 bytes), Accel(2 Bytes), CRC(2 bytes)]
Receive: [0xFF]
The duty value is signed and the range is -32768 to +32767 (eg. +-100% duty). The accel value
range is 0 to 655359 (eg maximum acceleration rate is -100% to 100% in 100ms).
54 - Drive M1 / M2 With Signed Duty And Acceleration
Drive M1 and M2 in the same command using acceleration and duty values for each motor.
The sign indicates which direction the motor will run. The acceleration value is not signed. This
command is used to drive the motor by PWM using an acceleration value for ramping. The
command syntax:
Send: [Address, CMD, DutyM1(2 bytes), AccelM1(4 Bytes), DutyM2(2 bytes),
AccelM1(4 bytes), CRC(2 bytes)]
Receive: [0xFF]
The duty value is signed and the range is -32768 to +32767 (eg. +-100% duty). The accel value
range is 0 to 655359 (eg maximum acceleration rate is -100% to 100% in 100ms).
55 - Read Motor 1 Velocity PID and QPPS Settings
Read the PID and QPPS Settings.
Send: [Address, 55]
Receive: [P(4 bytes), I(4 bytes), D(4 bytes), QPPS(4 byte), CRC(2 bytes)]
56 - Read Motor 2 Velocity PID and QPPS Settings
Read the PID and QPPS Settings.
Send: [Address, 56]
Receive: [P(4 bytes), I(4 bytes), D(4 bytes), QPPS(4 byte), CRC(2 bytes)]
61 - Set Motor 1 Position PID Constants
The RoboClaw Position PID system consist of seven constants starting with P = Proportional, I=
Integral and D= Derivative, MaxI = Maximum Integral windup, Deadzone in encoder counts,
MinPos = Minimum Position and MaxPos = Maximum Position. The defaults values are all zero.
Send: [Address, 61, D(4 bytes), P(4 bytes), I(4 bytes), MaxI(4 bytes),
Deadzone(4 bytes), MinPos(4 bytes), MaxPos(4 bytes), CRC(2 bytes)]
Receive: [0xFF]
Position constants are used only with the Position commands, 65,66 and 67 or when encoders
are enabled in RC/Analog modes.