To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Use an event structure to control that only one element of boolean is on at any given time.
Description
The attached code uses an event structure to monitor an array of boolean switches for value changes. Whenever a value change is detected, the event structure executes a case to reset the switch that was previously "on" to "off", so only one switch will be "on" at any point in time.
Note that this does not take an initial "all off" state into consideration.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Run the VI.
2. Switch the boolean controls, and notice that only one is On.
3. Stop the VI.
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.