Example Code

Convert Enum Entries to Strings

Code and Documents

Attachment

Download All

Overview

This example VI demonstrates the use of Property Node to view the string text of an enum.

 

Description

Enums are a useful tool for many programming applications. They allow for the creation of State Machines and more advanced case customization than a boolean selector can offer. With this simple code snippet it is possible to view the string text of an enum which may be useful for telling which state a state machine is currently executing or performing any string-related functions.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the attached folder to your computer
  2. Open the VI " Enum To String 2012 NIVerified.vi"
  3. Choose from the Enum Control
  4. Run the program

 

Additional Information or References
VI Block Diagram

Block Diagram.PNG

 

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

 

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

Comments
jordankuehn
Member
Member
on

enum2string.png

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
FTI_Newton
Member
Member
on

oh snap