

At the end of the tutorial you are provided with an exercise to do it by yourself, and in the next tutorials I will assume that you have done those exercises and I will not explain the concept regarding them Water level indicator in LabView example VI Two LEDs will be installed one of which will turn ON if the water level is less than minimum limit and the other will turn ON if the water level is greater than the maximum limit specified by you. If the level of water goes beyond a certain minimum or maximum limit, specified by you, then an LED will be turned ON. It’s a good read - check it out.In this tutorial I will help you to design a mini project in LabView that will give you an indication of the water level in a water tank.

NI also has a good whitepaper about working with PID in LV. Just remember to reinitialize your PID VI (it’s another control - wire that input to a button on your front panel or something like that) to “apply” your changes. The best way to tune quickly is to probably run your code through a computer (using the Run button on Robot Main.vi - not building/running as startup) and modify that parameter cluster until you get satisfactory results. To do this in LabVIEW, you have your PID VI, and one of its inputs is a cluster of three doubles, which are the P,I, and D constants that you tune to your liking. There’s no really easy way to say it: it’s a long, time consuming process. It’s really dependant on your application and the type of feedback you want. In our robots, we’ve found that an I parameter is rarely needed - we usually get what we want with only PD (or sometimes just P) controllers. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly however, some systems cannot accept overshoot, in which case an over-damped closed-loop system is required, which will require a Kp setting significantly less than half that of the Kp setting causing oscillation. However, too much Kd will cause excessive response and overshoot. Finally, increase Kd, if required, until the loop is acceptably quick to reach its reference after a load disturbance. However, too much Ki will cause instability. Then increase Ki until any offset is corrected in sufficient time for the process. Increase the Kp until the output of the loop oscillates, then the Kp should be set to approximately half of that value for a “quarter amplitude decay” type response. If the system must remain online, one tuning method is to first set Ki and Kd values to zero.
