LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible bug with units

I know the answer is probably "just don't use units"!  But this is a bit strange - can anyone see what's going on here?

 

I've attached a file which only contains a Numeric constant with units of kg, and a value of 5 (kg).  Change the units to g and the value changes to 5000 (as it should), but the Numeric doesn't resize to fit.  Now change the value to 5 (units g) and the value shows as 0.005 (g).  Change to mg and enter a value of 5 (mg) and it reads 5E-6 (mg).  Huh?  Now change to mm and type 5, and it shows 0.005 (mm), so it's clearly relative to the base unit - units of in and a value of 5 reads 0.127 (in).

 

I've checked this on 2012 and 2014 (Windows 32 and 64-bit) and see the same thing.  I've obviously got the constant in some unknown state which it can't get out of, even if I remove and re-add units.  If I change to Control then back to Constant, everything has reset and works properly, but not if I Create Constant directly.

 

0 Kudos
Message 1 of 3
(2,685 Views)

I agree.  It seems to be buggy, both in terms of graphical appearance and the conversion calculations.  It seems to deserve a CAR.

 

And "Don't use Units" is good advice to follow.

0 Kudos
Message 2 of 3
(2,660 Views)

We find units very useful.  Test specs in our database contain upper/lower limits, comparison type, and units.  Our test code modules output physical quantities.  Unit conversions are handled automatically under the hood.  So for example if a test measurement is 0.5 volts and the test spec in the database has a LL of 400, a UL of 600, and units of mV, the test result checker will pass the test.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 3
(2,577 Views)