‎02-07-2010 03:25 AM
How can I to create a polymorphic vi where the user can enter either volume or temperature.
how can Labwiev test for the base unit entered
pseudocode example:
input X
if X.base_unit == m^3 do .......
thanks for any suggestion to resolve or avoid my problem
Solved! Go to Solution.
‎02-07-2010 11:19 AM
‎02-07-2010 11:45 AM
‎02-07-2010 12:19 PM - edited ‎02-07-2010 12:21 PM
Hi schaerm,
you have to dig deeper.
An idea is this one:
The red marked word is containing the unit - in a coded way. Somewhere in the LV help you can find the description of this coding (I remember a chapter on memory representations of all LV datatypes...). (There surely is an easier or better way - but the example is done quic&dirty.)
You can also format the number into a string and analyze the unit here...
‎02-07-2010 12:49 PM
Thank you GerdW!
The variant solution works perfect!
(LV does not allow to format a number with unit to a string)
Best regards Mark
‎02-07-2010 01:01 PM
‎02-07-2010 01:15 PM
Sorry, I was testing the the wrong functions (number2nstring)
just getting tired
Best regards Mark