|
Re: Mecanum - use of gyro
Since the PID VI is a subVI, it is intended to be placed after the sensor and before the actuator. Placing this into a user's loop, timed loop, or callback lets the user control the timing and priority. If these are placed into a timed loop set at a higher priority, the PID and other VIs will inherit the higher priority.
If this were flipped and the PID were an object that owned the loop, you could do this by registering the sensor, actuator, timing, priority, and other elements with it. I believe this is how it was done with Java and C++.
I'm assuming this was useful because the PID may need to spin up a new thread and this handles it for the user. Meanwhile in LV, it is easy to draw a parallel loop if that is what you want.
Different strokes.
Greg McKaskle
|