LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change units based on user's input

Hello:
can anyone tell me how they allow the users to change the units of measure at runtime?
Thanks
Mike
0 Kudos
Message 1 of 3
(3,195 Views)
You can use enum control with case structure and the "convert unit" function. You list your units in the enum from which users select their choice. The case structure with it's enclosed convert unit function captures and converts input value to the corresponding unit.
0 Kudos
Message 2 of 3
(3,195 Views)
Best is to wire your program using the units feature of LabVIEW. This is one of the least utilized jewels in labVIEW.
Assign pertinent units to controls and anunciators. You do not have to worry anywhere in your program about unit conversion factors or about wiring incompatible parameters.
Unit conversion is performed automatically even when not in RUN mode.
In the front panel, leave visible the units of those elements you want the user to be able to change.
Take care!
0 Kudos
Message 3 of 3
(3,195 Views)