Hello. Is there a way to remove the unit label from the output of a numeric control? I need to store the number from a numeric control in an array and LabView gives me an error message. Thanks for any help.
In the numeric --> conversion palette, you find the "convert unit" node which either cast your pure number to a unit, or the opposite if used on a number with a unit label already. See the help for the details.
you may try CastUnitBases:
I think it is better to use Convert Unit function. The help for Cast Unit Bases seems to agree.
For what it's worth, the reason you should use "convert unit" instead is because sometimes the "base" unit isn't what you think it is.
One primary example is that temperature units are stored in Kelvin, so if you try to convert 25C in that way then you get 298.15, which may not be what you would expect.
Another is weight. You might think the base unit is grams, since it's the unit with no prefix, but NI uses SI units as the base, and the SI unit for weight is the kilogram, so your 2500 gram numeric turns into a "base unit" of 2.5.
There's probably other cases out there too. Best to always explicitly convert.