Difference Between a Text Ring Control and an Enum in LabVIEW

Updated Nov 6, 2023

Reported In

Software

  • LabVIEW

Issue Details

Text ring controls and enumerated type controls seem very similar. What is the difference between the two?

Solution

Text ring controls and enums are similar in that both contain lists of strings paired with numeric values through which you can cycle. The major difference between the two is that enums require the numeric values to be sequential, unsigned integer values, while text rings allow you much more freedom in assigning a numeric value, as shown below in Figure 1.
 

Figure 1. Properties window of a text ring control
 
As shown in the figure above, when the Sequential values option is unchecked in a text ring, the user can set the Values field for each of the items. The options for the numeric values are controlled by the Representation selected on the Data Type tab. As seen in Figure 2 below, the values of the enum are required to be sequential integer values.
 

Figure 2. Properties window of an enum control

Additional Information

Refer to the Ring & Enum section of the Front Panel Controls and Indicators topic in the LabVIEW Help for further discussion of the differences and more detail about the various tabs in the Properties window.