Quote:
Originally Posted by JasonStern
Our team has noticed a couple of areas in the (Java) CAN Jaguar code we would like to modify:
* Always send speed and position references no matter the control type
* Adding the ability to switch control types on the fly
|
Jason,
First of all, I don't see what would keep you from switching control types on the fly. The control method of the Jag is set AFTER initialization. In fact, the messages sent to the Jag have the control mode as part of the data packet (if one could call it that). You have to be sure to enable and disable your closed loop controls though, if you switch between voltage mode and one of the closed loop modes. I wonder to what modification are you referring?
Secondly, why do you need feedback if you're in open loop mode? This is a contradiction. If you receive feedback your are by definition in a closed loop mode. If you need both position and speed in open loop mode, then just connect your encoder to the a set of digital inputs and calculate it all on the cRio. There is a handy encoder class that will keep track of everything for you.
- Bryce