LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit conversion problems

While using units can be a great thing, LabVIEW has some errors and some more problems making the usage of units difficult.

 

1) Starting with LabVIEW 8.5 I found x^2 and sqrt(x) did not convert the units, such the results are wrong. The unit conversion for sqrt(x) seems to be corrected somewhere on the way to LV 2011, but x^2 still does not convert the unit in LV 2012.

 

Attached you find an example showing the errors in unit conversion (x_squared.vi). Although the unit for the power dissipation on a resistor should be W, it displays V or A depending on the way you calculate (using x^2 for voltage or current).

 

2) LabVIEW is still not able to create and thus display a waveform with a unit on the input data. This makes usage of units boring (see Waveform_units.vi). In best case the compiler could attach the unit to the waveform attributes and thus it would be passed even to the waveform plots.

 

3) Lots of signal processing functions like filters do not work unless you remove the unit at its input and reapply the unit at the output. This should be a task the compiler can do for the programmer (see Function_units.vi).

 

Hopefully at least 1 could be corrected soon (the bug has been reported with LabVIEW 8.5 some years ago). Getting 2 and 3 working would make units a very useful tools to get program code more consistent and robust, as it would prevent the programmer for example to add/subtract data with different scaling (e.g. add data in V to a value in mV will be handled correctly using units thruout the code.

 

Regards,

  Roland Exler

Download All
0 Kudos
Message 1 of 4
(3,406 Views)

Hi Roland,

 

the unit feature is a topic often mentioned here (mostly complaints like this or that) and in the Idea Exchange.

 

All your points should go to the Idea Exchange - create new ideas or just support existing ideas like that!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,401 Views)

I agree for 2 and 3, but 1 is a BUG known but not corrected for a long time!

0 Kudos
Message 3 of 4
(3,392 Views)

Hi Roland,

 

yes, it's a bug and you will find a CAR for it (or LV support should be able to tell you the CAR number).

 

But NI is setting the unit topic on a very low level, the feature is "as is" and they don't support it very well nor do they advise to use it...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(3,388 Views)