From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read daqmx unit property from a task

Solved!
Go to solution

Looking for a way to read the units of channels in a task. Right now the only way that I know of doing that is to actually read data then query the data. In this instance I do not want to do it that way I'm looking to read the units from the task. I do have custom scales applied so I know that complicates things.

 

Thanks

 

0 Kudos
Message 1 of 8
(3,287 Views)

There is a DAQmx scale node that will give you the scaled units.  Go to the pallette  DAQmx - Advanced - scale setup - scale node.  You will have to break down the task into channels and then into scales.  Take a look around the pallette and you should be able to put something together. 

0 Kudos
Message 2 of 8
(3,274 Views)

Yes I have that setup but have not gotten anywhere. Not nearly as easy as some other properties to query. Any ideas based on the snag of the attached code. Element and CI.CustomScaleName return empty. Which obviously element will since the other is empty. The task is setup with custom scaling simple freq to RPM conversion including naming the output units. 

 

 

0 Kudos
Message 3 of 8
(3,269 Views)

Take a look at this and see if it helps.

 

 

 

0 Kudos
Message 4 of 8
(3,259 Views)

Nice I like that I should have thought of that.  Must be something about using the project based task and scale that is diff that or the CI.  I'll keep experimenting.  Very interesting that it returns a blank array.

0 Kudos
Message 5 of 8
(3,241 Views)
Solution
Accepted by topic author randy1815

How about this then?  You just need to dig out the scale names.

Message 6 of 8
(3,235 Views)

Amazing, Many thanks I can see this being used many times!

0 Kudos
Message 7 of 8
(3,216 Views)

I realize this is an old thread, and that the OP accepted an answer as a solution, but I had a problem; this only works for custom scales and not the scales built into signal conditioning channels (like thermocouple, strain/bridge, or accelerometer input devices).  I made a solution (LabVIEW 2017 version) to what I felt was the larger problem, and attached it here.  I hope that some will find it useful. 

 

Please use with caution, as I have not tested it with every permutation.

0 Kudos
Message 8 of 8
(1,897 Views)