From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Backspace Display Example

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

Download All

Overview
This is a simple illustrates how to display a backspace character as a physically deleted character using LabVIEW.


Description
This code uses a Search and Replace string function to find the backspace character. It then splits the string into two substrings that do not include the backspace character. Finally, it recombines the two substrings back together to display the original text with the backspace implemented. There are some limitations to this code. As it is currently setup, it will only operate correctly if there is just one backspace character in the input. It could be modified to loop through and check for all backspace characters if you desire. It is also important to note that the controls and indicators on the front panel display are in 'Slashcode Display' mode to make the backspace character visible. You can change this mode by right clicking on the controls and indicators and selecting Normal Mode.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open the VI and Run
  2. Modify the input code to your own text and watch the backspace character execute in the Output indicator

Additional Information or References
VI Block Diagram

 5-355.png

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

 

 

Applications Engineer
National Instruments

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