09-10-2008 08:28 AM
I'm wondering if it is possible to read the units that a given channel's measurements are in from the DAQmx task. Most of the channels I'm sampling are thermocouples and in measurement and automation explorer I am setting the units ad degrees F so I know that the unit information is stored somewhere within the task. Unfortunately, not all of my measurements are temperatures so it would really be nice to have a table indicator that does the following:
Column 1: Channel Name
Column 2: Current data for that channel
Column 3: Units for the channel
What I am doing is I have a drop down box in my main VI which is a DAQmx name control. This feeds into a modified DAQ assistant express VI so that the appropriate channels are read from the hardware. I can get the individual channel names from the task properties but I haven't seen anything that indicates I can get at the units. Any thoughts on how to do this in a programmatic way so that if I change what task I am reading the display will update appropriately?
09-10-2008 09:08 AM - edited 09-10-2008 09:09 AM
How about this:
03-31-2010 09:01 AM
03-31-2010 09:56 AM - edited 03-31-2010 09:57 AM
Since this is not too easy indeed, i do something i don't do very often: i attach a fully functional example......
Please note that i did not complete the "Lookuptable" (the ring control) in this example.
The example is written in LV 2009.
hope this helps,
Norbert
EDIT: The values for the rest of the lookup can be found in the LabVIEW help. Just search for "units" and order the hits by alphabet. The look for "Analog Input:"-items
03-31-2010 10:46 AM
Thanks for your help. I have managed to get the units from the waveform data now but it would be better to extract it from the task without having to take an unnecessary sample of data. I'm on LV 8.6 at the moment so I'll upgrade to the latest version tomorrow and try your example. Thanks again.