LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-TC01 and loop rate

I'm attempting to utilize a USB-TC01 to log temperatures.  The vi isn't complete as I was experimenting with loop rate by watching the indicator named count on the front panel...anyway regardless of the value wired into the Wait until Next function, the loop seems to run at about 1Hz.  I'm assuming 1Hz by watching the value of the count indicator change.  Is this what I should expect using this device?

 

Thanks!

 

-Mike

tempMeas.png

0 Kudos
Message 1 of 5
(2,866 Views)

You fine gents have nothing for me?

0 Kudos
Message 2 of 5
(2,849 Views)

If you want to watch loop iterations you can just put an indicator on the iteration terminal (the "i" in the blue box).  A better method would be to use some timer VIs to accurately measure elapsed time.

 

In any case the TC-01 can only do 4 samples / second so you should be able to get better speed with your code but not by much.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 5
(2,845 Views)

Hi KSU Flyer,

 

NIquist is correct about the maximum number of samples the TC-01 is capable of taking. The actual sampling is software timed and the loop you are using will add 100 milliseconds to the time between samples, so you will most likely see a sample rate slower than the device maximum. As suggested, you could get a better idea of the sample rate by using a timing function such as Elapsed Time.

 

Timing.png

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 4 of 5
(2,835 Views)

Mike,

 

I would suggest that you add a DAQmx Start Task.vi before your while loop.  For an explanation, search for "task state model" and "implicit task state transitions" in DAQmx Help.  In the "implicit task state transitions, look though the "Operations That Require State Transitions" link.

 

By not starting your task, you are requiring DAQmx to make unnecessary transitions in its state machine, some of which involve communication with your TC-01 (which is relatively slow with HID devices).

 

Hope that helps,

Dan

0 Kudos
Message 5 of 5
(2,831 Views)