Lesson 9-11

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 26

Lesson 9

Data Acquisition and Waveforms

TOPICS
Plug-in DAQ devices
Data Acquisition in LabVIEW
Analog Input
Data Logging
Analog Output
Counters
Digital I/O

1
Overview and Configuration
Fundamental task of a DAQ system is to
measure or generate real-world physical
signals

DAQ system consists of:


•Transducers
•Signal Conditioning
•Plug-in DAQ device
•Driver
•Software

2
Measurement
Software
Framework

NI-DAQ contains:
•Traditional NI-DAQ
•NI-DAQmx

3
DAQ Hardware Configuration

Measurement & Automation Explorer (MAX)

4
Channels and Tasks
Channel names
Sine Wave 1
ai 0
Signals Sine Wave 2
ai 1
ai 2 Sine Wave 3

Tasks
Timing and Triggering

5
The DAQ Signal Accessory
NI-DAQmx versus Traditional NI-DAQ
Feature NI-DAQmx Traditional NI-DAQ
Test Panels  
DAQ Assistant with code generation  no
Productivity
On-line diagnostics  
Scaling to voltage and physical units  
50 kS/s with single point I/O  
Performance
Measurement multithreading  
Instant calibration  
Accuracy Automatic selection of optimal gains  
Guaranteed lossless data  
650 Alliance members  
Quality Integration with LabVIEW  
Developer Exchange discussion forum    Best
Good
Compatibility Compatible with Legacy ISA Boards no  Fair

7
Data Acquisition in LabVIEW

Traditional NI-DAQ NI-DAQmx


Specific VIs for Next generation driver:
performing: • VIs for performing a
• Analog Input task
• Analog Output • One set of VIs for all
• Digital I/O measurement types
• Counter operations

8
NI-DAQmx Data Acquisition

Single set of VIs used to perform analog


I/O, digital I/O, and counter operations

DAQ Assistant Express VI


• Quickly and easily program the DAQ device
• Creates a local task
• Most applications can use the DAQ
Assistant Express VI

9
NI-DAQmx Data Acquisition Task Types

Measurement type
can be:
•Analog Input
•Analog Output
•Counter Input
•Counter Output
•Digital I/O

10
Analog Input

Analog Input task


is specific to the
measurement

11
Analog Input Task Timing and Triggering

Configures the number of


samples and sample rate for
the task

Configures the start and


reference triggers for the task

12
Data Logging
• It is often necessary to permanently store data that is acquired
from the DAQ device
• LabVIEW includes the ability to read and write a LabVIEW
Measurement File
• LabVIEW Measurement File is an ASCII text file

13
Analog Output

Analog Output task


is specific to the
generation type

14
Analog Output Task Timing and Triggering

Configures the number of


samples and sample rate for
the task

Configures the start and


reference triggers for the task

15
Counters
A counter is a digital timing device
Typical uses of a counter:
• Event counting Gate Output
• Frequency measurement
Count Register
• Period measurement
• Position measurement Source
• Pulse generation
Count register – Stores the current count of the counter
Source – Input that causes the counter to increment each time it toggles
Gate – Input that is used to enable or disable the function of the counter
Output – Signal that generates pulses or a series of pulses

16
Digital Input and Output
• Digital I/O can
read from or write
to a line or an
entire digital port
• A digital port is a
collection of digital
lines

17
Summary
• MAX is the primary configuration and testing utility that is
available for the DAQ device.
• The DAQ Assistant is used to configure the DAQ device and
perform data acquisition.
• Most application can use the DAQ Assistant. For applications
that require advanced timing and synchronization use the VIs
that come with NI-DAQmx.
• The DAQ Assistant can perform Analog Input, Analog Output,
Digital I/O, and Counter operations.

18
Lesson 11
VI Customization

TOPICS
Configuring Appearance of Front Panel
SubVI Front Panels
Keyboard Shortcuts
VI Properties
Customizing Palettes

19
Customizing VI Properties
• Access VI Properties by right-clicking the icon pane or selecting it
from the File menu
• Affects every instance of that VI in all applications

20
Window Appearance
Only affects VI panel while VI is running

21
Window Size
• Set minimum and current panel size
• Adjust size of panel relative to the monitor
• Scale objects on
panel as window
resizes

22
Creating Pop-Up Panels – Every Instance
• Use Top-Level Application Window or Dialog appearance types
• Create custom window appearance

23
Creating Pop-Up Panels – Single Instance
Access SubVI Node Setup by right-clicking on subVI icon on
calling VI’s diagram

24
Key Navigation
Assigns keyboard strokes to
front panel controls

25
Summary
• Use VI Properties to set VI execution, window, and documentation
options
• Use SubVI Node Setup to set execution options for a single
instance of a subVI
• Use the Key Navigation option to assign front panel controls to a
keyboard key combination
• Use the Save with Options from the file menu to make backups of
your VIs
• You can often edit VIs by aborting them from the diagram of
another VI

26

You might also like