Example Code

Latch Value with Keyboard Shortcut

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:

Shows how to use a control as Switch Until Released with a keyboard key.

 

Description:

This code demonstrates how to maintain the Switch Until Released functionality with keyboard keys, by using the detection of user interaction present in the Event Structures instead of the Toggle functionality in the controls properties.

 

Requirements:

LabVIEW 2012 or compatible.

 

Steps to Implement or Execute Code:
1. Run the VI.
2. Use the Mouse to activate both controls and see that they behave the same way.
3. Use the F2 and F3 keys to actiavet the controls and see how the F2 functions as expected.

 

Additional Information or References: 

Boolean Switch Until Released from keyboard - LV 2012 NI Verified.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.