12
Digital Electronics and Computer Interfacing Tim Mewes 5. Computer Interfacing – DAQ cards

Digital Electronics and Computer Interfacing

  • Upload
    forest

  • View
    30

  • Download
    0

Embed Size (px)

DESCRIPTION

Digital Electronics and Computer Interfacing. Tim Mewes 5. Computer Interfacing – DAQ cards. 5.1 Basics. Data acquisition is the process of gathering a signal and digitizing it for presentation, analysis and storage on a computer Signals can be either Analog or Digital. - PowerPoint PPT Presentation

Citation preview

Page 1: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing

Tim Mewes

5. Computer Interfacing – DAQ cards

Page 2: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 2

5.1 Basics

• Data acquisition is the process of gathering a signal and digitizing it for presentation, analysis and storage on a computer

• Signals can be eitherAnalog or Digital

Page 3: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 3

5.1 Basics

• Today a wide variety of different DAQ devices are available:– PCI cards

– PCMCIA cards (Notebooks)

– USB solutions are becoming popular

• Most DAQ devices allow to acquire and create signals (Input/Output)

Page 4: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 4

5.2 DAQ Setup

• DAQ setup can be done using the Measurement and Automation Explorer (MAX)

• MAX also allows to test basic hardware functionality

• The latest version of DAQ device drivers are called NI-DAQmx

• A DAQ setup configuration is calledNI-DAQmx task

Page 5: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 5

5.2.1 Creating a new NI-DAQmx task

• Open MAX• Go to devices &

Interfaces• Select NI-DAQmx

devices

• Choose the card you want to use for the task(NI PCI-6014)

• Select “Create Task”

Page 6: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 6

5.2.1 Creating a new NI-DAQmx task

• Select the type of taskyou need (Digital I/O)

• Select whether you want to input or output data(example: Line Output)

• Select the physical channels you want to use(example: P0.0 – P0.3)

• Name the task

• Select Finish and thentest the hardware

Page 7: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 7

5.2.2 Using a NI-DAQmx task in LabVIEW

• Go to Measurement I/ONI-DAQmx

• Choose Read or Write

• Create a constant for the task input

• Select the task to be used as the constant

Page 8: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 8

5.2.2 Using a NI-DAQmx task in LabVIEW

• Configure the SubVI toinput/output data as needed

The NI-DAQmx VIs are examples for so called polymorphic VIs

Page 9: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 9

Polymorphic VIs

• Polymorphic VIs accept different data types for a single input or output terminal

• Polymorphic VIs automatically adapt to accept input data of different data types

Page 10: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 10

5.3 Counter

• A counter is a digital timing device• Can be used to

– Count rising and/or falling edges– Measure the frequency/period of a signal– Measure the pulse width of a signal

• The count register stores the current count of the counter

• Counter gates can be used to externally enable/disable counting

Page 11: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 11

5.3.1 Creating a NI-DAQmx counter task

• Open MAX• Select “Create Task”

• Choose “Counter Input”

• Example: “Frequency”

• The NI PCI-6014 has two counters choose one of them

Page 12: Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing 12

5.3.1 Creating a NI-DAQmx counter task

• Modify the task properties if necessary

• Save the settings

• Note the PIN to which the signal has to be connected!

• Make the physical connection

• Test it