...
- this VI is nearly identical to the other sanitizing VI, except this one ensures that a position is never written that defies the limits of operation of the valve as a mechanical device (for the valve in our lab, the min and max positions are, respectively, 0 and 3 turns, which in the VI are immediately converted into steps).
- The input is still collected in steps and the sanitized input is still returned in steps, but in a value that is able to be read into the motor controlling the valve without breaking it.
Manual Mode
Automatic Mode
Creating the Proportional-Integral-Derivative (PID) Response
...
The PID response operates by calculating an error from the designated target level and corrects that by using proportional, integral and derivative terms.
The above picture shows the code which creates the PID response.
The image above (from top to bottom) shows how the current level is subtracted from the target level for each iteration, and this data is then used to produce the error graph, which plots the current error from the target level with respect to time.
...