Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Bad update rate while trying to measure two differant signal periods

I am trying to measure the period of two signals (engine RPM and wheel speed) to display on two gauges. I can not get a decent refresh rate for either despite being placed in two separate while loops. I try to specify a 10 Hz update rate and am lucky to get 1 Hz. I have tried many differant example programs and am able to get them to work for reading one signal but not when measuring both in the same VI.
0 Kudos
Message 1 of 2
(3,092 Views)
Hello,

If you can run each VI independently then what you can try to do is call this VIs as subVI in your main VI and force LabVIEW to run in different threads. To do this, you need to open the VI properties of one of the subVIs , go to execution form the drop down list and on Preferred Execution Systems choose another option instead of the default.
You did not specify if you are using NI-DAQ or NI-DAQmx. The differences is that NI-DAQ is not multithread so even if you are doing separate loops or you are forcing LabVIEW to work on different threads, the driver will not let you. NI-DAQmx on the other hand, is multithread.
Another option if you are doing with traditional is to create a Task with all the channels you want to read,so that w
ay the board will multiplex in a certain time all the channels in one same thread.
Hope this helps.

Ricardo S.
National Instruments
0 Kudos
Message 2 of 2
(3,092 Views)