10-30-2014 04:29 AM
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
10-31-2014 10:57 AM
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.