Example Code

Enum to Parts

Code and Documents

Attachment

Overview
This vi takes an enum control or constant and converts it into its string and numeric parts.

 


Description
Enums are great for use in things like state machines but some times you only need the text or numeric value of the Enum. This vi takes an enum control or constant and converts it into its string and numeric parts. Please consider that like most things in LabVIEW, enums are 0 indexed.

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attachment to your computer
  2. Open the VI "Enum To Parts 2012 NIVerified.vi"
  3. Run the VI

 

Additional Information or References
VI Snippet

 4-253.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
gt3000
NI Employee (retired)
on

A succint solution to a commonly overcomplicated problem.

George T.
Senior Applications Engineer
National Instruments UK and Ireland