Example Code

Running Lights Front Panel Animation in 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

1. Overview

This examples shows how to implement graphical running lights, where an area defined through a picture object is repeatedly filled by a sequence of lights or any graphical object read from a file.

 

2. Description

For industrial applications, like conveyor belts or material or energy flow, you may want to implement running or moving graphic objects on the front panel. This examples shows how to implement graphical running lights, where an area defined through a picture object is repeatedly filled by a sequence of lights or any graphical object read from a file. These graphic is shifted in a loop so that the objects are running through. Pre-allocating the graphics makes this much more CPU efficient as using Property nodes to move graphics around on the front panel. During movement, each light or graphical object can be switched on and off. Direction of movement is automatically determined by largest dimension of picture, or can be set manually. Supports JPG PNG and BMP pictures.

 

3. Requirements

  • NI LabVIEW Base Development System 2012 (or compatible).

 

4. Steps to Implement or Execute Code

  1. Download, unzip and open the compressed project "Running Lights Front Panel Animation LabVIEW 2012 NIVerified.lvproj".
  2. Open "RL_Example.vi".
  3. Run the VI.
  4. Switch the Light states to turn the color arrows on and off.
  5. Click Stop when finished testing.

 

5. Additional Information or References

Running Lights Front Panel Animation Screenshot.PNG

 

Running Lights Front Panel Animation FP Screenshot.PNG

 

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

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