LabVIEW Wiki Home
Menu
Navigation

. Home
. Contents
. Recent changes
. Random page
. Help
. Donations

Toolbox

. What links here
. Related changes
. Upload file
. Special pages
. Printable version
. Permanent link










> Enumerated type

Contents

Located under the Ring & Enum palette, a LabVIEW enumerated type is used to associate a sequential numerical value to a programmer defined string

Potential Uses

Enum's can be used with a case selector to provide the programmer an easy way to select a case based on a constant name instead of a number or a string.

Typedef'd Enum's are often used in State Machines to provide the programmer an easy way to select new cases without having to worry about spelling mistakes.

Recommendations

Enums are most commonly used to define a fixed list of cases. If the enum will be used as an input or output on the connector pane of a VI, it should be defined as a typedef. Any changes to the typedef can be automatically propagated to controls, indicators and constants created from the vi's connector pane.

Shortcomings

LabVIEW enumerated types do not allow for non-sequential values, or what might be known as sparse enum's.

External Links


Content is available under Creative Commons Attribution License 3.0  About LabVIEW Wiki  Disclaimers  LabVIEW™ is a Trademark of National Instruments Corp.
Creative Commons Attribution License 3.0
IpbWikiPowered by MediaWiki
Powered by WebRing.