Example Code

Framework for controlling LED Fans Using LabVIEW with DAQmx

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.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This VI is a template that allows you to control LEDs and at the same time drive a motor.


Description
The first loop in the VI controls the flashing of the LEDs. There is a flat sequence in the first loop with three frames. The first frame writes on the LEDs; the second frame waits and the third frame writes the next pattern of the LED. The Wait time(ms) in the first loop is used to adjust the loop time according to the speed of the motor.

The second loop simply outputs a constant voltage to the motor.

This VI only switches between 2 different states and can hence not display whole letter and must be expanded to display a whole letter.


Requirements

  • LabVIEW 2013 (or compatible)
  • NI DAQmx


Steps to Implement or Execute Code

  1. Know what voltage your fan needs and depending on that you can set the input voltage
  2. Set ports and lines of your hardware.
  3. Set the loop time according to your fan speed and then the code is ready to run.
  4. Extend the code depending on how many letters you would like to display on your LED Fan.

 

Additional Information or References
VI Snippet

3-184.png3-184.png

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

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