To download NI software, including the products shown below, visit ni.com/downloads.
Overview: This VI uses a Key Down Filter Event to disregard the TAB key (and not swich front panel objects) while at the same time reading in the entered string.
Description:
This example program was written while use a USB barcode scanner to enter data. The scanner appends a TAB character after every scan to denote the end of the bar code. The TAB key by default changes front panel objects when pressed. So, in order to scan the next bar code, the user must reselect the sting control to enter the next bar code.
This VI uses a Key Down Filter Event to disregard the TAB key (and not swich front panel objects) while at the same time reading in the entered string.
Requirements: LabVIEW 2012 (or compatible). Hardware: none.
Steps to Implement or Execute Code:
1. Run the VI.
2. Start typing in the Input String.
3. Press the TAB key.
4. Notice that the "TAB Pressed" indicator is On.
5. Notice that the entered string is now in the Entered String.
6. Repeat steps 2-3. Notice that the user does not need to move hands from keyboard (or scanner) to enter the next string.
7. Stop stops the program.
Additional Information or References:
**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.
The VI Use the TAB Key to Register a String Without Changing Front Panel Objects LV2012 NI Verified.vi 31 ... does not work as expected.
To make it work, a Flat sequence must be added around the Input String control as shown below :
I am using LV 2020.