To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This code implements a deadman switch using the spacebar of a keyboard.
Description
When dangerous machinery is being operated, test operators may want to implement a deadman switch so that a keyboard key must remain depressed for the test to continue. This code will wait on the user to start executing and then the main loop will stop if the user releases the spacebar. The code uses two event structures, one to start the code to be controlled and one to stop the code.
Requirements
Software
LabVIEW 2013 (or compatible)
Steps to Implement or Execute Code
Additional Information or Reference
**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.