|
Re: Possibility of Controller Overload using Compressor
I'm not sure what we are discussing here. The compressor runs an independent VI, but VIs do not own a thread. The behavior, if not constantly told to start, is that twice a second the loop will run. If enabled, it will test the switch and update the relay.
This could be coded in many ways. You can put the code to test in teleop, but what if you want it in auto. You'll also be checking the relay 50 times per second when the pressure cannot really change that much in 20ms. WPILib implementation allows control over multiple compressors and makes state data for each instance so that you can Start, Stop, and Check the state at various places in your app. In other words, the parallel loop seems like a reasonable way to do this. It could be simpler, but it isn't particularly complex either.
As for the behavior of RT FIFOs, feel free to read the help, experiment, or ask others.
Greg McKaskle
|