10-25-2013 01:02 PM
Hi all,
I'm using the TC01 with the DAQ assistant (from a simple TC01 example Labview file), and I need to read the temp value in a repeating sequence where I'm also getting data from other devices. The fastest new temperature reading on my system in ~240mS.
But there is a second issue, the call/response time. If the request between measurements is delayed, for example on my system by 210mS, then the call/response time is ~ 30mS. But beyond that, if the measurement delay is increased further, the 30mS call/response lower time limit remains)
30mS is much slower than the call/response time I get with other USB devices on my system (~5mS per measurement), and in my larger program this 30mS is slowing entire sequence down.
I'm guessing/hoping that the TC01 would ideally be initialized outside the repeating loop and then a simple measurement request call/response might not take so long. Even if I could only call the device every 240mS, that would be okay, but 30mS wait per call/response seems unnecessarily high.
Is there a better way to communicate with the TC01 than the DAQ assistant? Examples or code corrections would be very helpful
I'm including an example based on the simple sample file.
System: Windows 7, Labview 2011
10-25-2013 01:12 PM
DAQ Assistant is a great place to start, in my opinion it should not be used in any software other then to debug if something is working. As soon as you want to use it tin a real application you should use the lower level DAQmx VIs. Luckily you can convert from a DAQ Assistant call to the DAQmx VIs easily.
Setup your DAQ Assistant the way you want it to work. The key things are the Acquisition Mode where you may read one data point at a time (software timing) where there will be lots of jitter, or N Samples reading so many samples hardware timed, or Continuous Sampling where you read so many samples but the DAQ hardware keeps reading data and it is expected that you will continue to read that data in your program continuously.
Once you have it working the way you want right click the DAQ Assistant and select Convert to DAQmx Code. One reason why your code is so slow is I suspect you are openeing and closing references to the DAQ hardware over and over again. With the low level DAQmx Code you can choose to open the reference once, use it and then close it at the end once.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-25-2013 02:32 PM - edited 10-25-2013 02:33 PM
The 'Convert to DAQmx Code' looked like it was going to work, but some of the parts automatically created couldn't be edited further on my system for some reason so it ultimately didn't work, though the VI attached (based on a Labview thermocouple example file) looks very similar so the idea was correct.
The limit of 240mS per reading remains, but now the call/response time can be as low as 6mS in my system, as the initialization has been moved outside the loop. This is on a par with other USB devices I work with.
Thanks!