Example Code

FIFO Queue VI (fixed array, replace oldest) Using LabVIEW

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

Download All

Overview

This VI creates a fixed array and replaces the oldest element when it fills up

 

Description

FIFO is an acronym for first in, first out, a method for organizing and manipulating a data buffer, where the oldest (first) entry, or 'head' of the queue, is processed first. It is analogous to processing a queue with first-come,first-served (FCFS) behavior: where the people leave the queue in the order in which they arrive. This VI implements a FIFO queue, using fixed array which replaces the oldest elements when it fills up.

 

Requirements

LabVIEW 2012 or compatible

  

Steps to Implement or Execute Code

  1. Insert Maximum Array Size
  2. Run the VI
  3. Insert Number to Add and observe how the Queue functions

 

Additional Information or References

VI Block Diagram

FIFO Queue LV2012 NI Verified BD.jpg

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

 

 

National Instruments
Applications Engineer

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