Day 04: Working with Projects

NI Self-Paced Online Training

Today we return to Module 6 of LabVIEW Core 1, Creating Your First Application, to finish the last two sections:

  • §3. Building an Acquire-Analyze-Visualize VI
  • §4. Building an Acquire-Analyze-Visualize VI (Non-NI Instrument) 

These sections focus on the details of how to build an application in LabVIEW that will make a measurement, perform some data analysis, and then visually represent the result to a user.  This capability is the strength of LabVIEW and really what makes it such a popular platform.  The most important of these sections for us is the first which focuses the DAQmx Application Programming Interface (API) that we will use with the myDAQ (and can be used with many other NI DAQ devices).  This section starts out talking about using the DAQ Assistant which is an OK (but limited) approach when just starting out either with LabVIEW or with a new sensor.  It then moves to what it calls the DAQmx Task Approach which you should notice as an intermediate-level approach that doesn’t give you full, real-time, control over all details of the data acquisition.  Finally, it covers the Full DAQmx API Approach which is what we will use throughout the rest of the course.  Here the steps of Create, Configure, Start, Read/Write, Clear are emphasized.  As we start out we will be using a method called software-timed data acquisition in which the Configure step is not required.  Later, when we get to using hardware-timed DAQ we will insert a VI in the DAQmx call chain for the Configure step.

In addition we will study Module 8, Executing Code Repeatedly Using Loops, which explains the differences between and how to use both For Loops and While Loops in LabVIEW.  This module also contains an important section on Timing in a Loop which we will dive deeper into very soon.  Finally, the section on Data Feedback in Loops will introduce the important concept of a shift register.  We will not be using shift registers right away but very soon they will become an extremely important tool in our programming toolbox.  You may need to return and review this section when we begin using shift registers.

Access LabVIEW Core 1 Course  

  • 6. Creating Your First Application (§ 3+4)
  • 8. Executing Code Repeatedly Using Loops
LabVIEW Projects

In your first assignment you were given a folder of files that included a project file with some subVIs already included in an auto-populating folder.  For the second and all subsequent assignments you will need to build your project from scratch.  The two links below provide additional details on the LabVIEW project concept and instructions on how to create your own project.

Using a Thermistor

A thermistor is basically a resistor whose resistance value varies with temperature.  If we can figure out how to measure the resistance, and how the resistance scales with temperature, then we can use a thermistor as a temperature sensor.  Unfortunately we cannot measure resistance directly with our myDAQ.  However, we do have the capability to measure voltage.  So, if we can arrange the thermistor in such a way that the voltage across it changes as its resistance changes then we should be able to compute the resistance.  We will do this by putting the thermistor in a voltage divider circuit as described in the first link below.  Now that we know the resistance we can convert the resistance to temperature using an equation called the Steinhart-Hart equation.  

Getting Ready for Using a Thermistor

Today in class we will deal with any lingering questions about Assignment 1, but spend the bulk of our time making sure we

  1. have a proper LabVIEW project set up for Assignment 2, and
  2. have the thermistor set up properly on the myDAQ breadboard.
Print Friendly, PDF & Email