LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set the value of an enumeration programatically

Solved!
Go to solution
I feel all lthe question here is due to the OP's wordings of contradiction in the question title & the message body, "set" & "select". Smiley Wink
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 11 of 18
(2,105 Views)

Hi Joshuatree,

 

"the other gets the current numeric value."

 

Your first example is kinda RubeGoldbergish: To get the (numeric) value of an enum you simply wire the terminal (or it's local variable, when it is an indicator)... No need to use a property node to read the text (as string) from the digital display and convert that to a number Smiley Wink

 

Hint: enum wires are blue like any other integer datatype...

Message Edited by GerdW on 10-21-2009 08:42 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 18
(2,099 Views)

Thanks all.

 

I think a previous discussion about using type def enums to define queues answered solved the problem I was trying to deal with.  By type def and converting to constant the enum, you can use that to define and access states listed in the enum definition...AND ... the state names are updated in all the constants if you use copies of the type definition to configure them. 

 

You guys are leading me through the very darkest part of the forest here...thanks.

 

Hummer1...learning new stuff every day.

 

 

0 Kudos
Message 13 of 18
(2,078 Views)

Hummer1 wrote:

Thanks all.

 

I think a previous discussion about using type def enums to define queues answered solved the problem I was trying to deal with.  By type def and converting to constant the enum, you can use that to define and access states listed in the enum definition...AND ... the state names are updated in all the constants if you use copies of the type definition to configure them. 

 

You guys are leading me through the very darkest part of the forest here...thanks.

 

Hummer1...learning new stuff every day.

 

 


 

that should read "... the dorkest part of the forest..." Smiley Tongue

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 18
(2,066 Views)

Ben,

 

Dorkest...Right!

 

Here is a little demo ap that I have been working on to figure all this out...it is an event/state/error recovery pattern with error trapping queue.  I tried to explain the "wonders" of what this did for me to the wife the other night...and got that ("does this mean you want to buy another ham radio?") look?

 

Thanks for all the help.

 

Hummer1

Message 15 of 18
(2,032 Views)
OOPS ... wrong file....try this one.
0 Kudos
Message 16 of 18
(2,027 Views)
0 Kudos
Message 17 of 18
(2,026 Views)

Sorry, here is the zip of the whole thing...

 

Hum(ble)

0 Kudos
Message 18 of 18
(2,021 Views)