LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in Simple PID

The LabVIEW supplied "Simple PID" vi contains an error which disables the Integral function. The "First Call?" node is located outside of the main loop and is therefore only evaluated once. Consequently, each time around the loop the value selected for "prev error sum" is always 0. Moving the "First Call?" node to the inside of the loop cures the problem.
0 Kudos
Message 1 of 2
(2,530 Views)
I have run this VI, and it performs as it is supposed to with the first call node outside the main loop.

This VI is meant to be inserted into a while loop. Its own while loop is only there to retain the previous values (in the shift registers); it doesn't execute more than once on its own.

By placing the entire Simple PID.vi into another while loop and running, you'll see that the first call node works properly.
0 Kudos
Message 2 of 2
(2,530 Views)