Enum Constant
- Updated2025-03-14
- 2 minute(s) read
Enum Constant
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.
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.

FPGA Module Details
The following details apply when you use this object in an FPGA VI.
Single-Cycle Timed Loop | Supported. |
Usage | N/A |
Timing | This function requires no clock cycles to execute and never includes an internal register. |
Resources | This function alone consumes no FPGA resources. However, when you wire the constant to a logical operation, the constant uses FPGA lookup table resources. |