Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to increase the frequency (of the while loop) of PID controller ?

Hi all,

I wrote a PID controller and found that I can not set the control frequency as high as I want. I attached the VIs for your reference.

I use a "wait" VI to set the frequency of the while loop and use a "tick count" to calculate the actual frequency. When I set frequency below 500 Hz, there is no problem and the actual frequency is the same as the set one. However, when I increase the set frequency up to 1KHz, the actual frequency shows only 500 Hz. I wrote another simple VI to test the logic and it seems OK. The reason they are not equal should be it takes some extra time to execute all the steps in the while loop. Am I right? How to increase the process speed in the while loop?

Thanks

best

Download All
0 Kudos
Message 1 of 2
(3,670 Views)

Your limitation seems to be the Analog Output write primarily.  I don't know if there is any way to improve the speed too much more without resorting to Real-Time/FPGA platforms.

Randall Pursley
0 Kudos
Message 2 of 2
(3,646 Views)