U6 Pro Sample Rate in LabVIEW while loop | LabJack
 

U6 Pro Sample Rate in LabVIEW while loop

2 posts / 0 new
Last post
muasskinr
muasskinr's picture
U6 Pro Sample Rate in LabVIEW while loop

I built up an application in labview that measures a single strain gauge voltage with a U6 Pro, as well as interfaces with many other instruments and NI hardware. The program was built by first using the example labview code U6 Single AIN Example. I shoved that code into while loop and started adding everything else in. Everything works properly and the values are correct but the "loop time" is very slow. In total, each loop takes about 0.82 seconds to complete. I narrowed down what is taking so long by placing timing blocks on each side of what I deemed culprit blocks. I found that the labjack code that I started with was the culprit. Specifically, the "LJUD eGetS" block takes about 0.75 seconds to execute, where as ALL the other code takes about 0.07 seconds. I should note that all the "other" code is far more complicated and deep than the simple AIN voltage measurement so it seems labjack is not measuring as fast as it could be. How do I get around this? I need to speed up my DAQ rate. Thanks!

LabJack Support
LabJack Support's picture
Use the information in

Use the information in Section 3.1 to estimate how long your call should take:

https://labjack.com/support/datasheets/u6/operation/command-response

You need to know the number of channes, ResolutionIndex, and Range for each channel.

Also, you can use the example "U6 CR Speed Test.vi" to confirm these numbers.