Example Code

Convert an ASCII String to Hex String without Changing Values

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: Sometimes it maybe desirable to convert an ASCII value into a Hex value while preserving its representation.


Description:

If we have the value 6C in ASCII and we want it in Hex to also be 6C, we would have to perform an operation to convert it. This VI performs the conversion by reversing the process in this community example.


Requirements: LabVIEW 2012 (or compatible), Hardware: none.


Steps to Implement or Execute Code:

 1. Enter ASCII string.
2. Run the VI.


Additional Information or References: 

 

 

Convert an ASCII String to Hex FP.png

 

Convert an ASCII String to Hex sn.png

 

It only handles the first four characters as is.


**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
tinpham
Member
Member
on

Hello...  Can someone convert this to Labview 8.5?  Thanks

Paco145
Member
Member
on

Thank you, it worked perfectly with labview 2015 Ver 15.0