Example Code

Convert Hexadecimal String to Characters in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview:

This example takes an input string in the Normal mode that should be in Hexadecimal mode, and converts it to show the characters properly.

This example is useful because converts all Hexadecimal Codes to Characters. Writting these Hexadecimal Codes in a control and running the VI, it outputs the converted Characters.

 

Description:

Inputs a string and parses through each backlash (\) with a search, splitting the string further, and using a type cast.  Repeats with a while loop until all slash codes have been converted.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. The ‘Input String’ has some preset hex values, or you can edit this string control to put in new values.
  2. Run the VI
  3. String with Specials will display the resulting ASCII characters

 Additional Information or References

9252 Snippet.png

 

 

 

 

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

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com

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