43 - Buffered Drive M1 / M2 With Signed Speed And Distance
Posted: Sat Oct 24, 2015 12:32 am
Using this command (43) with negative speed does not appear to stop after the specified distance.
I send (hex)
80 2B 00 00 12 07 00 00 03 00 00 00 12 07 00 00 03 00 01 E4
Which is giving m1/m2 speed of 4615, m1/m2 max distance of 768, override previous commands (none were executing).
The motors move forward, m1 moved 875 encoder pulses, m2 moved 862. All is good.
After some delay after the motors have stopped, I send
80 2B FF FF ED F9 00 00 03 00 FF FF ED F9 00 00 03 00 01 FA
Which is giving m1/m2 speed of -4615, m1/m2 max distance (again) of 768, override previous commands (none were executing).
The controller moves the motors backwards well beyond the 768 pulses until I issue a stop command (same command, all zero values).
When I finally have stopped, m1 encoder has moved from 1056 (before the backward move) to -1515 (i.e., 2571 pulses) and m2 has moved from -138 to -2716 (i.e., 2578 pulses). The controller did not stop after 768 pulses.
Can you explain what I might have done incorrectly?
This is the 30A RoboClaw. m1 PID=226.353, 13.354, 0, m2 PID=267.171, 14.510, 0. m1/m2 Qpps=2810. Motor currents are under 1 Amp. Main voltage is 6.2 and logic voltage is 12.0. No error status bits were found during the whole execution. Firmware version is "USB Roboclaw 2x30a v4.1.10". During the execution of the motor commands, I repeatedly poll the RoboClaw to gather status for monitoring. This commands include:
0x10 (m1 encoder)
0x11 (m2 encoder)
0x18 (main batter level)
0x19 (logic battery level)
0x31 (motor currents)
0x37 (m1 PIDQ)
0x38 (m2 PIDQ)
0x5a (error status)
I send (hex)
80 2B 00 00 12 07 00 00 03 00 00 00 12 07 00 00 03 00 01 E4
Which is giving m1/m2 speed of 4615, m1/m2 max distance of 768, override previous commands (none were executing).
The motors move forward, m1 moved 875 encoder pulses, m2 moved 862. All is good.
After some delay after the motors have stopped, I send
80 2B FF FF ED F9 00 00 03 00 FF FF ED F9 00 00 03 00 01 FA
Which is giving m1/m2 speed of -4615, m1/m2 max distance (again) of 768, override previous commands (none were executing).
The controller moves the motors backwards well beyond the 768 pulses until I issue a stop command (same command, all zero values).
When I finally have stopped, m1 encoder has moved from 1056 (before the backward move) to -1515 (i.e., 2571 pulses) and m2 has moved from -138 to -2716 (i.e., 2578 pulses). The controller did not stop after 768 pulses.
Can you explain what I might have done incorrectly?
This is the 30A RoboClaw. m1 PID=226.353, 13.354, 0, m2 PID=267.171, 14.510, 0. m1/m2 Qpps=2810. Motor currents are under 1 Amp. Main voltage is 6.2 and logic voltage is 12.0. No error status bits were found during the whole execution. Firmware version is "USB Roboclaw 2x30a v4.1.10". During the execution of the motor commands, I repeatedly poll the RoboClaw to gather status for monitoring. This commands include:
0x10 (m1 encoder)
0x11 (m2 encoder)
0x18 (main batter level)
0x19 (logic battery level)
0x31 (motor currents)
0x37 (m1 PIDQ)
0x38 (m2 PIDQ)
0x5a (error status)