We really like the Jaguar’s built-in PID control. However, we have two motors going into the same gearbox that need to operate together on the same control loop (essentially). Has anyone ever tried to use the Jag PID control loop with the required two separate jaguars for two CIMs?
Is there some more elegant way to link them that doesn’t involve many CAN transactions on the Crio? So far all we will be doing is just polling what voltage one Jag is set to and setting that voltage to the other Jag.
What’s the total time delay for these steps:
cRIO sends request for output voltage value to Jag1
Jag1 receives request
Jag1 sends requested voltage value back to cRIO
cRIO receives requested voltage value
cRIO sends new voltage command to Jag2
Jag2 receives new voltage command
You could run the control loops on the cRio side.
Then just copy the values to both motors.
I think his question is can it be done using the Jag’s PID.
cross-reference to similar thread
Since the motors are mechanically coupled, if you were going to do it that way would it not be better to use one encoder and one control loop and send the one computed command to both motors with a Y cable?
The short answer is unfortunately no. We tried all manner of permutations to try and do this in 2012, and ultimately we built a shooter that used only one motor.
The best we got d to read the voltage of the Jag doing the PID, and send that village to the other Jag operating in VBus mode.
It works, but not well. Good enough in some not so precise applications, like some drivetrain movements, but if you need a very tight PID there’s no way that arrangement will cut it.
In 2013 we moved to software PID on the cRIO and sent the motor values to two Jag running in VBus mode, as previously suggested.
Sorry to be the bearer of bad news, but we never did find a good solution.
For our shooter wheel last year we had 2 motors on the same gearbox with PID on the Jaguars. We had a hall-effect sensor with a magnet on the wheel for RPM feedback, then just fed that signal into both jaguar’s encoder input running the same PID routine. The same could be done with a normal encoder feedback.
You do have to be careful about how you wire the sensor to 2 Jags, as I recall the electrical team created an optocoupler splitter for the sensor, as there is a problem with directly connecting the encoder inputs between multiple Jags.
Initially we had just one motor on the shooter wheel, but upgraded to 2 for faster recovery while full-court shooting. It took re-tuning PID parameters for the new setup, but was otherwise the simplest solution for us. I think our tolerance band for shooting was ~80 RPM or less, and we could shoot again in less than a second with 2 motors, so this setup worked well with reasonably tight requirements.