Workshop 7 of 7

21
Workshop 7 of 7 Welcome!

description

Welcome!. Workshop 7 of 7. Today's Topics. Data Acquisition MAX DAQ Assistant Express VI DAQmx API Create Task Configure Task Configure Trigger Start Task Read/Write Close Task Sampling Mode, Rate and Size myDAQ Activity. Data Acquisition (DAQ). Signal Terminal Block Cable - PowerPoint PPT Presentation

Transcript of Workshop 7 of 7

Page 1: Workshop  7 of 7

Workshop 7 of 7

Welcome!

Page 2: Workshop  7 of 7

Today's Topics Data Acquisition

MAX DAQ Assistant Express VI DAQmx API

Create Task Configure Task Configure Trigger Start Task Read/Write Close Task

Sampling Mode, Rate and Size

myDAQ Activity

Page 3: Workshop  7 of 7

Data Acquisition (DAQ)

1. Signal2. Terminal Block3. Cable4. DAQ Device5. Computer

3

Page 4: Workshop  7 of 7

Data Acquisition (DAQ) with myDAQ

1. Signal 2. myDAQ 3.Computer

4

USB

3.5mm cable

Page 5: Workshop  7 of 7

• NI-DAQmxDriver level softwareDetects DAQ devicesInstalls NI-DAQmx functions in LabVIEW

• Measurement & Automation ExplorerConfigure and test DAQ device

• DAQ AssistantConfigurable Express VI used to create a DAQ application

• DAQmx APIProvides a set of VIs to program DAQ applications

Data Acquisition (DAQ): Software

Page 6: Workshop  7 of 7

Measurement & Automation Explorer• Configure and test DAQ device

• Verify:- Installed devices- Installed software - Available remote

devices

• Access wiring diagrams

Page 7: Workshop  7 of 7

• Devices and Interfaces- list of installed devices (on local computer is under My System)

• Device currently installed• Device previously installed but not currently installed• Device ?????

Measurement & Automation Explorer• My System – the local computer;

the one you are currently using• Remote Systems – computers

or devices (cRIO, PXI) that are available to communicate with local computer through the internet

Page 8: Workshop  7 of 7

Demonstration: Using Measurement & Automation Explorer (MAX)

- Plug in your myDAQ and verify you can see it in MAX

Page 9: Workshop  7 of 7

DAQ terminology

• Task: DAQmx’s method of organizing Analog Input, Analog Output, Digital Input, Digital Output under-the-hood; cannot have AO and AI in the same task

• Channel: physical connection on the DAQ device; place where the wire(s) connect

• Virtual Channel: DAQmx’s representation of a corresponding physical channel

• Sampling Rate (Hz): how quickly a data point (sample) is acquired or generated.

• Sample Mode: method of acquiring data- one point, chunks or continuously

9

Page 10: Workshop  7 of 7

DAQ Assistant

• Quick way to create a VI that acquires data.• Place DAQ Assistant on block diagram ->

configuration window will pop up -> configure your device -> press OK and LabVIEW will build the DAQ task

10

Page 11: Workshop  7 of 7

Demonstration: Configuring the DAQ Assistant

Page 12: Workshop  7 of 7

DAQmx API

DAQmx API: set of DAQ functions

12

Page 13: Workshop  7 of 7

DAQ: Basic Flow

13

ConfigureTask

Acquire orGenerate

Data

ClearTask

CreateTask

StartTask

A basic DAQmx application involves the following process: only do read/write within the loop

Page 14: Workshop  7 of 7

DAQ: Example

14

Page 15: Workshop  7 of 7

ELVISmx

- Driver on top of DAQmx specifically for myDAQ and ELVIS instruments

Page 16: Workshop  7 of 7

myDAQ Activity: Audio Equalizer

https://decibel.ni.com/content/docs/DOC-843516

Page 17: Workshop  7 of 7

myDAQ Activity: Audio Equalizer

https://decibel.ni.com/content/docs/DOC-8435

DAQ Assistant 2: - Output >> Voltage

- Signal Output Range: -2 to 2 V

- Samples to Write: 100

- Generation Mode: Continuous

17

Filters-Lowpass:

- Cutoff Frequency 400 Hz

-Bandpass:- Low cutoff frequency: 450- High cutoff frequency: 2500

-Bandpass:- Low cutoff frequency: 3000- High cutoff frequency: 10000

DAQ Assistant 1: - Input >>Voltage

- Signal Input Range: -2 to 2 V- Acquisition Mode: Continuous- Samples to Read : 20k- Rate (Hz): 100k

Spectral Measurements - Power Spectrum

Simulate Signal - Add Noise- Amplitude: 0- Noise Amplitude: 0.6- Sampling Rate: 100,000- Number of Samples: 20,000

Page 18: Workshop  7 of 7

Demonstration: Completed Audio Equalizer

Page 19: Workshop  7 of 7

• Download NI DAQmx Driver (http://joule.ni.com/nidu/cds/view/p/id/2888/lang/en)oNi.comoClick on SupportoClick on Drivers and UpdatesoClick on NI DAQmxoClick on NI-DAQmx, version 9.5 (this will bring up the

instructions on how to download the DAQmx toolkit)

• myDAQ ideasoNi.com/myDAQzone

Resources

Page 20: Workshop  7 of 7

• Register for the CLAD by Friday March 23rd

• Work on creating a game• Study for CLAD • Go to ni.com/mst for CLAD Review Resources

• Take the practice exams• Review the Study Guide• Webcast for most missed problems

• Interested in being an LSA?• Student Design Competition

Homework

Page 21: Workshop  7 of 7

Proficiency Quiz