Skip to content Skip to navigation

Connexions

You are here: Home » Content » Queues in LabVIEW

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

Queues in LabVIEW

Module by: Felix Annan

Summary: This describes the function of Queues in transferring data between virtual instruments in National Instruments LabVIEW

Queues, as the name suggests, queue data. This data is stored in a buffer in memory until it is read from the queue. There are generally two forms of queues available, there is the First In First Out (FIFO) queue and there is also the Last In First Out (LIFO) queue. Most of the time when you stand in a queue to receive a service or purchase something, that is a FIFO queue, the first person to get there is the first person served. LIFO queues generally do not occur often in social queue settings. When you stack tennis balls in a tube, the last ball in is the first ball you can get out, or when you stack books in a box or equipment in a van, generally the last bit to go in is the first bit that can be removed. Items can be previewed(read) from the queue without being removed from the queue or "Dequeued". However, once dequeued the data item will no more be available on the queue. Adding items to a queue is called ‘Enqueuing’. The end to which data items are enqueued determines whether the queue is a LIFO queue or a FIFO queue

The Advantage:

  1. They buffer and store all information written to them until it is read so nothing is lost.
  2. They can be created dynamically by changing the queue name

The Disadvantage:

  1. Queues must be polled continually to determine when data has arrived except when combined with a notifier

Generally a queue is very well suited for data streams like that of a waveform, especially data for which loss of information would be very undesirable.

Implementation:

A typical setup for reading from and writing to a queue is indicated in the Figure 1.

Figure 1: The VI on the left writes to a queue and the VI on the right reads from the queue
Queues
Queues (queue.jpg)

Comments, questions, feedback, criticisms?

Send feedback