Changing the Values of an Enum Constant

Updated Mar 26, 2019

Reported In

Software

  • LabVIEW

Issue Details

In my application, I need to change the values of an Enum Constant from 0, 1, 2, ... to arbitrary numbers, e.g. 0, 7, 1000. Is this possible somehow?

Solution

The values of an Enum Constant are always sequential and starting from zero.

A Ring Constant however allows defining arbitrary values:


The Ring Constant is located in Functions Palette » Programming » Numeric. Un-check Sequential values as shown in the screenshot above to allow editing the defined values.

Additional Information

Note: The default representation of a Ring Constant is U16 (0..65535). To allow other values and/or decimals, you need to change the representation:

WAS THIS ARTICLE HELPFUL?

Not Helpful