Solution
An
enumerated type (enum) is a list of string labels that correspond to numeric values. Internally, LabVIEW represents enums as unsigned integers (
U8,
U16 — default, or
U32), while displaying them as readable strings.
For example, we can have an enum to hold the four weather seasons, in which case we'll have a numeric value for each one:
0 - "Spring"1 - "Summer"2 - "Autumn"3 - "Winter"
When you wire an enum to the case selector of a
Case Structure, you are able to make different cases for each of the enum's values. To create a case for each of the enum values, right-click on the case structure frame and select
Add case for every value.
For example, if the enum holds the four weather seasons, you can have four different cases for each value "Spring", "Summer", "Autumn", and "Winter".
Furthermore, you can have multiple enum items in the same case. In the case Selector label, the string values of the enum are represented as strings in double-quotes. If you would like to add multiple items to one case, you can add their names in quotes separated by commas.
For example, if you want your Case Structure to handle Spring and Autumn together, for being equinoxes; and Summer and Winter together for being solstices, you can have: Case 1 - "Spring","Autumn". Case 2 - "Summer","Winter".
