|This article is a stub. You can help LabVIEW Wiki by expanding it.
Please improve this article if you can.
|Owning palette(s)||Numeric palette|
|Requires||Basic Development Environment|
Use the Enum Constant to create a list of string labels with corresponding integer values you can select on the block diagram.
The enumerated constant is similar to a Ring Constant, but you cannot customize the corresponding numeric values for the string labels in an enumerated constant. The numeric value is always an integer from zero to n – 1, where n is the number of values in the enumerated constant.
Unlike the ring constant, the labels associated with an integer value are part of the data type. If you pass the value from an enumerated constant to an indicator, LabVIEW displays the string label instead of the numeric value.
The enumerated constant is only visible on the block diagram and cannot be viewed on the front panel. You also cannot change its value at run time, so you should select a value from the enumerated constant before you run the VI. Use an enumerated type control to allow the user to select an enumerated value from the front panel at run time.
You select, add or remove, and rearrange values in enumerated constants much the same way you do for ring and enumerated controls.
By default, the numeric representation of an enumerated constant is a 16-bit unsigned integer. You can change the representation of an enumerated constant to any unsigned integer data type except for an unsigned 64-bit integer data type.
|Specific use cases for this function.|
|History information is needed. What changes have occurred over previous versions?|
|More info to come.|
|Add links to external resources that would also help.|