Jump to content

Functions Palette/Programming/Synchronization/Queue Operations: Difference between revisions

From LabVIEW Wiki
m Logmanoriginal moved page Functions Palette/Programming/Synchronization/Queue Operations to Queue over redirect: Doesn't belong on the Programming Palette
Added palette items
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
==Location in palette==
{{LabVIEW Palette
Functions >> Synchronization >> Queue Operations
|image  = QueuePalette.png
[[File:QueuePalette.png|thumb|Queue Operations Palette]]
|title  = Queue Operations palette
|1 = Obtain Queue function{{!}}Obtain Queue
|2 = Enqueue Element function{{!}}Enqueue Element
|3 = Preview Queue Element function{{!}}Preview Queue Element
|4 = Get Queue Status function{{!}}Get Queue Status
|5 = Release Queue function{{!}}Release Queue
|11 = Lossy Enqueue Element function{{!}}Lossy Enqueue Element
|12 = Enqueue Element At Opposite End function{{!}}Enqueue Element At Opposite End
|13 = Dequeue Element function{{!}}Dequeue Element
|14 = Flush Queue function{{!}}Flush Queue
}}
 
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Synchronization{{!}}Synchronization palette|type=palette}}
 
Use the '''Queue Operations''' functions to create a queue for communicating data between sections of a block diagram or from another VI.
 
Unlike the [[Functions Palette/Programming/Synchronization/Notifier Operations|Notifier Operations]] functions, the Queue Operations functions buffer data.
 
 
 
== Functions ==
{| class="wikitable sortable"
! Icon
! Name
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Obtain Queue.png|frameless|border|Obtain Queue|link=Obtain Queue function]]
| [[Obtain Queue function|Obtain Queue]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Enqueue Element.png|frameless|border|Enqueue Element|link=Enqueue Element function]]
| [[Enqueue Element function|Enqueue Element]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Preview Queue Element.png|frameless|border|Preview Queue Element|link=Preview Queue Element function]]
| [[Preview Queue Element function|Preview Queue Element]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Get Queue Status.png|frameless|border|Get Queue Status|link=Get Queue Status function]]
| [[Get Queue Status function|Get Queue Status]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Release Queue.png|frameless|border|Release Queue|link=Release Queue function]]
| [[Release Queue function|Release Queue]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Lossy Enqueue Element.png|frameless|border|Lossy Enqueue Element|link=Lossy Enqueue Element function]]
| [[Lossy Enqueue Element function|Lossy Enqueue Element]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Enqueue Element At Opposite End.png|frameless|border|Enqueue Element At Opposite End|link=Enqueue Element At Opposite End function]]
| [[Enqueue Element At Opposite End function|Enqueue Element At Opposite End]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Dequeue Element.png|frameless|border|Dequeue Element|link=Dequeue Element function]]
| [[Dequeue Element function|Dequeue Element]]
|-
! style="text-align: center;" |  [[File:Queue Operations Palette - Flush Queue.png|frameless|border|Flush Queue|link=Flush Queue function]]
| [[Flush Queue function|Flush Queue]]
|}
 
== History ==
{{ambox|text=History information is needed.  What changes have occurred over previous versions?}}
{| class="wikitable"
! Version
! Change(s)
|-
|[[File:LV2018.png|frameless|border|64x64px|LabVIEW 2018|link=LabVIEW 2018]]
|More info to come.
|}
==Concept==
==Concept==
(From [http://www.ni.com NI.com])
(From [http://www.ni.com NI.com])
Line 15: Line 76:
#[https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7OfSAK&l=en-US NI.com - What Is a Queue]
#[https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7OfSAK&l=en-US NI.com - What Is a Queue]


[[Category:Synchronization]]
[[Category:Queue Operations Palette]]
[[Category:Synchronization]]

Latest revision as of 19:53, 22 June 2020

Obtain QueueEnqueue ElementPreview Queue ElementGet Queue StatusRelease QueueLossy Enqueue ElementEnqueue Element At Opposite EndDequeue ElementFlush Queue
Queue Operations palette (Click on a function to navigate, or on the arrow to go to parent palette)
Object information
Owning palette(s) Synchronization palette
Type Palette
Requires Basic Development Environment

Use the Queue Operations functions to create a queue for communicating data between sections of a block diagram or from another VI.

Unlike the Notifier Operations functions, the Queue Operations functions buffer data.


Functions

Icon Name
Obtain Queue Obtain Queue
Enqueue Element Enqueue Element
Preview Queue Element Preview Queue Element
Get Queue Status Get Queue Status
Release Queue Release Queue
Lossy Enqueue Element Lossy Enqueue Element
Enqueue Element At Opposite End Enqueue Element At Opposite End
Dequeue Element Dequeue Element
Flush Queue Flush Queue

History

Version Change(s)
LabVIEW 2018 More info to come.

Concept

(From NI.com)

A queue maintains a first in/first out (FIFO) order of data items. For instance, the customers waiting in line at a fast food restaurant are in a queue.

A queue is useful in producer/consumer situations, where one portion of code is creating data to be used by another portion. The advantage of using a queue is that the producer and consumer rates do not have to be identical. If consumption is slower than production, the queue will become full and the producer code will be forced to wait until the consumer has dequeued an element before a new element can be queued up.

Unlike an array, it is not possible to randomly access elements in a queue. It is strictly a buffer that provides you the ability to enqueue (add/insert) and dequeue (subtract/remove) elements. The only way to view all the elements in a queue is to dequeue them one by one. You cannot perform data manipulation to all the elements in a queue either.

Example use cases

Queued State Machines (Also known as Queue Driven State Machines, or QDSMs).

External Links

  1. NI.com - What Is a Queue