Example Code

Queue Names

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview: This basic example demonstrates how to access the Queue in different loops and subVIs by using the queue name.


Description

Queues are very helpful, particularly in Producer/Consumer architecture. We typically pass the Queue Reference between loops and subVIs in order to access its elements, but you can also just use the queue name. This example shows a queue being accessed in a subVI that is only passed the name of the queue. This could also apply across multiple loops.


Requirements: LabVIEW 2012 (or compatible). Hardware: none.


Steps to Implement or Execute Code: 

1. Press Enqueued Element.
2. Run the VI.
3. See element's queued.


Additional Information or References: 

 

Queue Names FP.png

 

Queue Names sn.png


**This document has been updated to meet the current required format for the NI Code Exchange.**

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com

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