|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
|LabVIEW 2020 Help|
Owning Palette: Numeric Functions
Requires: Base Development System
Use the enumerated 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.
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.