LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] How to make an enum use non-consecutive values

Solved!
Go to solution

LV2010...  I need to create an enum contstant that uses non-consecutive values.  I need it to have two items, one equal to 0x00000000 and the other equal to 0xFFFFFFFF.  It's only letting me use 0 and 1.  Thanks.

0 Kudos
Message 1 of 5
(3,320 Views)
Solution
Accepted by topic author rickford66

You can use the Ring constant which will look just like enum. You can go and Un-select the Sequential Values option and use your own values.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 5
(3,314 Views)

From the help file:

 

Note  You cannot allow the user to enter undefined values in enumerated type controls, and you cannot assign specific numeric values to items in enumerated type controls. If you need this functionality, use a ring control.

 

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/enumerated_type_controls/


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 3 of 5
(3,313 Views)

Duplicate - Please Ignore!


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 5
(3,310 Views)

That worked, thanks.

0 Kudos
Message 5 of 5
(3,307 Views)