Example Code

Control LED Flash Rate

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

Overview

This is a basic example on how to control the rate that any indicator gets updated;an LED in this case.

 

Description

To control the rate of the LED in the example:

  1. Create a While Loop.
  2. Drop a Wait (ms) VI on the block diagram.
  3. Place an LED on the Front Panel.
  4. Place a Not gate on the block diagram.
  5. Connect the elements as seen in the VI attached below.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Change the value of Milliseconds to Wait to control the rate of LED flash.

 

Additional Information or References  

Front Panel

 

LED rate.jpg

 

VI Snippet

1.png

 

 

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

Applications Engineer
National Instruments

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