Case Structure Selector Label Only Displays Numeric Values With Enumerated Control

Updated Aug 7, 2018

Reported In

Software

  • LabVIEW Full

Issue Details

The selector label of my case structure isn't displaying the string values of my enumerated control that I have wired into the case selector. Why am I seeing this behavior?

Solution

This behavior is caused when other enumerated constants or controls used in the transition from one state to the next don't match with the enumerated control that is wired into the case selector. When this happens you will see coercion dots as shown below.

These coercion dots indicate that the data doesn't match between the enumerated constants. However, these coercion dots will show up in each subdiagram of the case structure, even in those in which the enumerated constant data does match. This means that you need to go through and check each enumerated constant in each subdiagram to verify that it does match. In this example, the enumerated constant in case 0 had a misspelling which caused the problem. as seen below.

By fixing this misspelling, the selector label will automatically update with the string values of the enumerated constants, shown below.

This is one of the reasons why it is highly recommended to create a type definition for your enumerated control/constant. A type definition will allow you to make updates to a single file which will update all the instances linked to the type definition in your application. This will ensure that all the enumerated constants/controls that are used in your application always have matching data.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful