Need Help With Position Controller Commands
I've got the Parallax Motor Mount and Wheel Kit set up on a test stand. First I wired it up to run the motors directly with HB-25s. No problem. Then I wired in the Position Controllers and ran MPC_Roll_Demo.spin from OBEX. No problem, and wow, I love the quality and smoothness of the whole setup.
But now I'm stuck. I understand how to get the wheels to travel a set distance, forward or backwards at max speed, but not how to set a slower speed, so a bot can travel more slowly or turn.
I'd appreciate any help on what to do or where to look.
Thanks!
/John
But now I'm stuck. I understand how to get the wheels to travel a set distance, forward or backwards at max speed, but not how to set a slower speed, so a bot can travel more slowly or turn.
I'd appreciate any help on what to do or where to look.
Thanks!
/John
Comments
I'm sure I'm missing something obvious, and I'm hoping to get to the point of saying "duh!" Not there yet.
/John
I hope this helps
I found Wheel_Controller.spin in Obex and it has methods for doing everything you could want with the position controllers. Works great. So the practical problem is solved.
But I'd still love to understand what's going on. I'm just not able to figure out from the PASM in this object how it works. So I'm still looking for help understanding how to get the controllers to tell HB25s to go slow.
/John
Hi John,
Acording the product manual that metioned "Franklin" you must change the SMAX (Command#8) focus on page 16 of 19
It says: "*While not recommended, it is possible to change the maximum speed value in mid-travel.
Keep in mind that this value is the maximum speed that the position controller is allowed
to travel. During motion, if the Position Controller receives a new speed maximum which
is greater than the current speed maximum, it will begin accelerating at the speed ramp
rate up to the new speed maximum. If the Position Controller receives a new speed
maximum which is lower than the current speed maximum, the speed will instantly be
clipped to the new value which will generally be abrupt and undesirable." The maximum speed is the SMAX.
It works properly with Bs2 code. I haven't tried yet with Spin code.
/John