User Manual
RoboClaw Series
Brushed DC Motor Controllers
RoboClaw Series User Manual
94
BASICMICRO
39 - Drive M2 With Signed Speed And Acceleration
Drive M2 with a signed speed and acceleration value. The sign indicates which direction the
motor will run. The acceleration value is not signed. This command is used to drive the motor
by quad pulses per second and using an acceleration value for ramping. Dierent quadrature
encoders will have dierent rates at which they generate the incoming pulses. The values used
will dier from one encoder to another. Once a value is sent the motor will begin to accelerate
incrementally until the rate dened is reached.
Send: [Address, 39, Accel(4 Bytes), Speed(4 Bytes), CRC(2 bytes)]
Receive: [0xFF]
The acceleration is measured in speed increase per second. An acceleration value of 12,000
QPPS with a speed of 12,000 QPPS would accelerate a motor from 0 to 12,000 QPPS in 1 second.
Another example would be an acceleration value of 24,000 QPPS and a speed value of 12,000
QPPS would accelerate the motor to 12,000 QPPS in 0.5 seconds.
40 - Drive M1 / M2 With Signed Speed And Acceleration
Drive M1 and M2 in the same command using one value for acceleration and two signed speed
values for each motor. The sign indicates which direction the motor will run. The acceleration
value is not signed. The motors are sync during acceleration. This command is used to drive
the motor by quad pulses per second and using an acceleration value for ramping. Dierent
quadrature encoders will have dierent rates at which they generate the incoming pulses. The
values used will dier from one encoder to another. Once a value is sent the motor will begin to
accelerate incrementally until the rate dened is reached.
Send: [Address, 40, Accel(4 Bytes), SpeedM1(4 Bytes), SpeedM2(4 Bytes), CRC(2 bytes)]
Receive: [0xFF]
The acceleration is measured in speed increase per second. An acceleration value of 12,000
QPPS with a speed of 12,000 QPPS would accelerate a motor from 0 to 12,000 QPPS in 1 second.
Another example would be an acceleration value of 24,000 QPPS and a speed value of 12,000
QPPS would accelerate the motor to 12,000 QPPS in 0.5 seconds.
41 - Buered M1 Drive With Signed Speed And Distance
Drive M1 with a signed speed and distance value. The sign indicates which direction the motor
will run. The distance value is not signed. This command is buered. This command is used to
control the top speed and total distance traveled by the motor. Each motor channel M1 and M2
have separate buers. This command will execute immediately if no other command for that
channel is executing, otherwise the command will be buered in the order it was sent. Any
buered or executing command can be stopped when a new command is issued by setting the
Buer argument. All values used are in quad pulses per second.
Send: [Address, 41, Speed(4 Bytes), Distance(4 Bytes), Buer, CRC(2 bytes)]
Receive: [0xFF]
The Buer argument can be set to a 1 or 0. If a value of 0 is used the command will be buered
and executed in the order sent. If a value of 1 is used the current running command is stopped,
any other commands in the buer are deleted and the new command is executed.