Overview
This example demonstrates an easy and effective way to use boolean buttons as menu items. (producer - consumer loop)
Description
Many LabVIEW application has some kind of a menu bar at the top which controls the application (changing a tab on a tab control, sending messages from one loop to another etc.). I also have seen many overly convoluted solutions as many developers tend to handle the buttons individually. That is fine if you have 2-3 buttons, but complicates the code a lot and in many cases the scalabilty of the application start to decrease.
The example I have attached demonstrates how to use the producer consumer architecture processing all the buttons within one case of an event structure with high scalablilty, maintainability and readibility.
Note: I wanted to keep this example one-vi-only. Its highly recommended to make some elements of the code a typedef if you reuse this example. Also the block diagram can be made smaller by creating subVIs.
Steps to Implement or Execute Code
Requirements
Software
LabVIEW 13.0
Hardware
None
Additional Images or Video
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.