LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I retrieve the digital display value of an enum?

I have an enum as a control on a VI that I am using in TestStand. I like using the enum as a control because TestStand then shows the dropdown list of the enum to select the input to the VI. What I need inside the VI is the numeric value of the input selected. I have been all over the properties for the enum and cannot seem to find a property that basically gives you the value of the digital display of the enum. Thanks in advance for any help.

 

Troy

0 Kudos
Message 1 of 8
(3,470 Views)

The enum already is a numeric! You can wire the enum directly to math functions if you want to, or you can explicitely convert it to numeric representation (for instance to I32).

 

Message Edited by dan_u on 03-26-2009 03:36 PM
Message 2 of 8
(3,464 Views)

Format into string will retun the string associated with the current value of the enum.

 

If those string are numerics in your case then the returned string from format into stirng will then have to be converted to a number.

 

Are we getting close?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 8
(3,458 Views)

Ok, I was digging too deap into this one. I guess I am looking too forward to the weekend. Thanks for the help.

 

Troy

0 Kudos
Message 4 of 8
(3,454 Views)
A picture is worth a thousand words
Danny Thomson AshVire Ltd
Message 5 of 8
(3,452 Views)

 

Thank you Danny!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(3,441 Views)

Of course, this bit:

 

should really be done this way: Smiley Wink

 

Message Edited by smercurio_fc on 03-26-2009 01:13 PM
Download All
Message 7 of 8
(3,412 Views)

Live and learn, it seems obvious when you see it

 

thanks for that

Danny Thomson AshVire Ltd
0 Kudos
Message 8 of 8
(3,386 Views)