Overview
This VI is a template that build a producer/consumer design pattern with events to produce queue items.
Description
This VI takes the Producer Consumer Loop and programmatically adds an element to the Queue the first iteration. This VI takes the Programmatically Trigger Events Example and put it into a Producer Consumer Template.
Use this design pattern instead of the User Interface Event Handler pattern for user interfaces when you want to execute code asynchronously in response to an event without slowing the user interface responsiveness.
Requirements
- LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
- Run the VI.
- Click the rocker to Enqueue an item.
- Notice how the first time the rocker is pressed it goes to 2 because 1 element was automatically Enqueued.
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**