Day 02: Your First VI

NI Self-Paced Online Training

In the next two LabVIEW Core 1 lessons we get down to business of learning about programming with LabVIEW.  It is crucial that you carefully consume these videos and make note of any areas that you do not understand.  We will have opportunities to ask questions about them later in class.  Watch all of module 5 – Exploring an Existing Application  which describes LabVIEW projects, parts of a VI and the very important concept of dataflow.  Then view the first two sections (Creating a New Project and VI and LabVIEW Data Types) of module 6 – Creating Your First Application.  We will return to the final two sections of module 6 which focus on using DAQmx in a few days.

Access LabVIEW Core 1 Course
  • 5. Exploring an Existing Application
  • 6. Creating Your First Application (§1+2)
Checking Out Your myDAQ

Study the following provide pages that provide information aimed at giving you a better understanding of how to get the most out of your myDAQ.

An Example Application

First, study the links below that describe how to use the TMP36, an extremely simple temperature sensor, and an LED.

We will use this sensor throughout the first part of the semester to illustrate several data acquisition and LabVIEW programming concepts.  You should wire this sensor up in the far corner of your breadboard so that it can be easily used even with primarily working with other sensors.

This first video describes how to connect your TMP-36 sensor and an LED and how to use a pair of pre-built subVIs that will read the voltage from the temperature sensor and that will control the state of the LED.

The next video gives a step-by-step guide to writing a program that will read the output of the sensor, scale the resulting voltage into a proper temperature, compare that temperature to a desired temperature range, and turn on an LED if the temperature is in that range.  

This program will use a pair of (provided) subVIs that (1) read two analog output channels from the myDAQ and (2) set the state of a digital output.  These subVIs will also be used in your first assignment.  You will learn how to use the underlying DAQmx driver routines for performing these data acquisition tasks later and use this information in the second assignment.  You should attempt to follow along in the video, pausing and restarting as necessary, as you build this virtual instrument for practice.  We will expand on this example for the next several class sessions.

Using an Accelerometer

Your first application will be to use an accelerometer to measure the angle of your myDAQ relative to the horizontal.  Class time today will be spent getting a good start on this application.

Print Friendly, PDF & Email