06-06-2016 01:53 PM
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
Solved! Go to Solution.
06-06-2016 02:37 PM
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.
06-06-2016 02:52 PM
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.
06-06-2016 03:17 PM - edited 06-06-2016 03:19 PM
Take a look at this and see if it helps.
06-06-2016 03:33 PM
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.
06-06-2016 03:47 PM
How about this then? You just need to dig out the scale names.
06-06-2016 04:01 PM
Amazing, Many thanks I can see this being used many times!
06-24-2020 12:29 PM - edited 06-24-2020 12:30 PM
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.