Quote:
Originally Posted by arithehun
Does anyone have any experience with ramping motors in a command based system? I tried adding a for loop to a subsystem method but then I couldn't drive the robot asynchronously. So I tried adding a command to make the subsystem drive at a variable speed and then creating a command group that uses a for-loop to add a series of that command, each with an increasing parameter. This worked asynchronously, but I needed to be able to change the variables continually throughout the program, not have them be statically set like commands do (if you use them correctly, of course). I could. I know these are both terrible ways to accomplish this besides the caveats I mentioned (the second one particularly bad), but I was desperate.
In short, is there a better way to do this by making the variables both adjustable via the dashboard (instead of being initially set when the robot turns on) AND make this loop operate asynchronously?
|
Instead of trying to do what you want programatically, you might want to use built-in options for your motor controller.
If you are using jaguars, they have ramping modes built in(but disabled by default). To enable voltage ramping, you need to change some jumpers.(see in the attached manual p.12) You can even change the rate of ramping using the serial interface and some NI software.
Checkout page 11 of the attached manual to see if this is what you want. Look at coast/break jumper and the automatic ramp mode.