We start off today looking at Module 9 of LabVIEW Core 1 called Working with Groups of Data. This module focuses on the concepts of both arrays and waveforms which are two approaches to grouping data in LabVIEW. The four sections in this module are:
- 1. Sets of Data in LabVIEW
- 2. Working with Single Channel Acquisition Data
- 3. Working with N-Channel Acquisition Data
- 4. Additional Array Examples
Sections 2 and 3 contain a bit more detail than we will need at this point. In the current exercise you will be creating an application that acquires N channels, 1 sample at a time. Later in the semester we will create an application that acquires multiple channels, multiple samples at a time and stores the result in an array of waveforms. Sections 1 and 4 are the primary focus for us here where you will get a good introduction to both arrays and waveforms to group data.
Access LabVIEW Core 1 Course- Core 1: 9. Working With Groups of Data
You are also asked to study your first module out of the Data Acquisition Using NI-DAQmx and LabVIEW course. Be careful which module you view here as I am asking you to watch the first module in the DAQmx section of this course. This module gives a rather in-depth overview of how to use the DAQmx API.
Access Using NI-DAQmx Course- DAQmx: 1. Programming with the NI-DAQmx API
When performing data acquisition it is very important that you be able to control specifically when measurements are made. In some cases the time between measurements is large enough that the computer can control the timing. In this approach, called software timing, we use timing VIs to control the rate the program collects data. However, as the time between measurements decreases (i.e. the sampling rate increases) we reach a limit where the computer-based, software timing can’t keep up. In those cases, we have to use physical timing chips on board the data acquisition device to control the data collection. We will use this approach, called hardware timing, later in the course. The following two links provide some background on the timing VIs that are available in LabVIEW and how we use them to perform software timed data acquisition.
In the following video we return to our example project with the TMP-36 temperature sensor and we re-write the top-level VI using the DAQmx API to control the data acquisition tasks of reading the output of the temperature sensor (analog input) and controlling the state of the LED (digital output). The DAQmx VIs are all exposed at the top-level VI in this approach. This will be a nearly identical approach to what you will use in the second assignment for the course.We start off today with an introduction to the VI Analyzer Toolkit. This is a tool that can be used to do a static analysis of your LabVIEW code.
Today in class we will focus on building the top-level VI for Assignment 2. In this assignment you will write code that will control two DAQmx tasks: one for reading the temperature of a thermistor and one for controlling the state of an LED. The DAQmx VIs used in these tasks will be exposed at the top-level of your application. Later we will learn how to encapsulate these tasks into subVIs that will allow us greater flexibility.