Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Real-Time FIFO Example for LabVIEW

Overview

This VI is meant to serve as a tutorial for learning the basics of LabVIEW Real-Time FIFOs (RT FIFOs).

 

Description

FIFO stands for First In First Out, and is similar to a queue. RT FIFOs are meant to be used for communicating data between a time critical thread and lower priority threads without harming determinism (as in the case of using queues, notifiers, and global variables). This method should be used to transfer data safely from a time-critical loop (thread) to a communication loop (thread) running at normal priority, which can then be used to transfer the data to the host machine without affecting the system determinism.This is just an example of how the functions that come with the LabVIEW Real-Time Module can be used.

 

Requirements

 Software

  • LabVIEW Full or Professional Development System 2012 (or compatible)
  • LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached file "Simple RT FIFO Demo LV2012 NIVerified.vi"
  2. Follow the instructions in Front Panel and run the program

 

Additional Information or References

Simple RT FIFO Demo LV2012 NIVerified.vi - Front Panel.png

 

Simple RT FIFO Demo LV2012 NIVerified.vi - Block Diagram.png

 

Note: This example does not show how to realize communication between different loops (threads). It's meant to demonstrate simple FIFO properties like having a fixed size which results in overwriting of elements if the FIFO is full. This is important for determinism. This example can be executed under windows and LabVIEW Real-Time targets fulfilling the requirements mentioned above.
 
If you need more detailed information about RT FIFOs and how to realize communication between loops, have a look at the Compact RIO Developers Guide - Chapter 3 - Interprocess Data Communication:
 
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Grant H.
National Instruments
LabVIEW Product Marketing Manager