LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read units from DAQmx task

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?

 

 

0 Kudos
Message 1 of 5
(3,031 Views)

How about this:

 

 

Message Edited by smercurio_fc on 09-10-2008 09:09 AM
Message 2 of 5
(3,026 Views)
The channels in my task use a mixture of units, some of the channels are scaled. There doesn't appear to be an option to select units from the DAQmx channel property node properties list. How can I extract the units?
0 Kudos
Message 3 of 5
(2,804 Views)

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

Message Edited by Norbert B on 03-31-2010 09:57 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 5
(2,791 Views)

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.

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