Example Code

Simplified Queued Message Handler

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.


  • LabVIEW

Code and Documents


Download All


This example has an implementation of a producer/consumer architecture communicated by a queue. 

-The producer loop captures the user events and includes the corresponding actions in the queue.

-The consumer loop executes the action. 

The action in this example is to toggle a boolean indicator until the "OK" button is pressed.  

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.