Example Code

Writing String '\' Codes Display to File

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

Coding that exemplifies how to access the "\" codes display for a string.

 

Description

Set the Display for the String control you would like the Codes display for and set it to '\' Codes by right-clicking it on the front panel and selecting '\' Codes Display. On the block diagram right click the control and select Create»Property Node»Text»Text.

If you want to write to a file the ASCII representation for un-displayable characters you can use this example.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Write the string you would like to obtain the "\" characters.
2. Run the VI.

 

Additional Information or References

Snippet.png

Bryan H.

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