background image

NI myDAQ User Guide

|

© National Instruments

|

15

Digital I/O (DIO) and Counters/Timers

There are eight, software-timed DIO lines on the NI myDAQ that can be individually configured 
for input or output. Additionally, lines DIO <0..4> can be configured for counter/timer 
functionality. The input—accessed through DIO 0, DIO 1, and DIO 2 signals configured as a 
counter—is used for counter, timer, pulse width measuring, and quadrature encoding 
applications.

When using the counter/timer, the Source is accessed through DIO 0, the Gate through DIO 1, 
the Auxiliary Input through DIO 2, the Output through DIO 3, and the Frequency Output 
through DIO 4. When using the counter/timer as a quadrature encoder, A, Z, and B correspond 
to DIO 0, DIO 1, and DIO 2, respectively. In some instances, the software may refer to the 
output lines as PFI as opposed to DIO. Refer to Table 3 for a list of the corresponding 
counter/timer signals assignments through the DIO terminals.

For more information about event timing requirements, refer to the 

NI myDAQ Specifications

 

document. For more detailed information on using counter/timers with NI myDAQ, refer to the 
KnowledgeBase document 

How Do I Use the NI myDAQ Counter?

. To access this document, 

go to 

ni.com/info

 and enter the Info Code 

mydaqcounter

.

Table 3.  

NI myDAQ Counter/Timer Signal Assignments

NI myDAQ 

Signal

Programmable 

Function Interface 

(PFI)

Counter/Timer 

Signal 

Quadrature Encoder 

Signal

DIO 0

PFI 0

CTR 0 SOURCE

A

DIO 1

PFI 1

CTR 0 GATE

Z

DIO 2

PFI 2

CTR 0 AUX

B

DIO 3

*

PFI 3

CTR 0 OUT

DIO 4

PFI 4

FREQ OUT

*

 Pulse-width modulation (PWM) pulse train measurements are generated through DIO 3

Содержание myDAQ

Страница 1: ...AQ Hardware Overview 3 Analog Input AI 4 Analog Output AO 4 Digital Input Output DIO 5 Power Supplies 5 Digital Multimeter DMM 5 NI myDAQ Software Overview 6 NI ELVISmx Driver Software 6 NI LabVIEW an...

Страница 2: ...ple Measuring Signals Using the NI ELVISmx Oscilloscope Express VI with NI myDAQ 28 Using NI DAQmx with NI myDAQ 30 Example Measuring Audio Pass Through in LabVIEW with NI myDAQ 30 Texas Instruments C...

Страница 3: ...llation or when the product is connected to a test object To minimize the potential for the product to cause interference to radio and television reception or to experience unacceptable performance de...

Страница 4: ...digital to analog converter DAC so they can update simultaneously In general purpose mode you can generate up to 10 V signals In audio mode the two channels represent left and right stereo outputs Cau...

Страница 5: ...lators 5 V can be used to power digital components such as logic devices The total power available for the power supplies analog outputs and digital outputs is limited to 500 mW typical 100 mW minimum...

Страница 6: ...yDAQ with LabVIEW section Note NI ELVISmx supports LabVIEW 32 bit To use NI ELVISmx with LabVIEW on a 64 bit operating system you must have LabVIEW 32 bit installed NI myDAQ and NI Multisim You can us...

Страница 7: ...ELVISmx for NI ELVIS NI myDAQ NI ELVISmx Instrument Launcher Caution To ensure the specified EMC performance the USB cable must be less than 2 0 m 6 6 ft in length Making Signal Connections with NI m...

Страница 8: ...N Analog Input USB Power Supply Gain Analog Output Digital Input Output AUDIO OUT NI myDAQ System Diagram AI DIO 5 V 15 V DC toDC Converter Analog to Digital Converter Digital to Analog Converter Digi...

Страница 9: ...r DMM ports must be no longer than 3 m 10 ft Figure 4 NI myDAQ 20 Position Screw Terminal I O Connector Table 1 Screw Terminal Signal Descriptions Signal Name Reference Direction Description AUDIO IN...

Страница 10: ...ground point with respect to the NI myDAQ device assuming that the computer is plugged into the same power system Instruments or devices with nonisolated outputs that plug into the building power syst...

Страница 11: ...or or jumper wire to establish a local or onboard reference for the signal Otherwise the measured input signal varies as the source floats out of the common mode input range The easiest way to referen...

Страница 12: ...ce with 200 k and produce a 1 gain error Figure 9 Differential Connections for Floating Signal Sources with Two Resistors Both positive and negative analog input lines require a DC path to ground in o...

Страница 13: ...x Instrument Launcher 3 Select the Resistance mode by clicking the Resistance button 4 Click Run 5 If the fuse is blown the display will show Over indicating a disconnected circuit path Replace the fu...

Страница 14: ...1 25 A Fast Acting Littelfuse Part Number 02161 25 1 2 1 NI myDAQ NI myDAQ AUDIO IN Analog Input USB Power Supply Gain Analog Output Digital Input Output AUDIO OUT NI myDAQ System Diagram AI DIO 5 V...

Страница 15: ...to DIO 0 DIO 1 and DIO 2 respectively In some instances the software may refer to the output lines as PFI as opposed to DIO Refer to Table 3 for a list of the corresponding counter timer signals assig...

Страница 16: ...directly modify the executable files but you can modify or enhance the functionality of these instruments by modifying the LabVIEW code which installs in the following location Windows XP 2000 C Docum...

Страница 17: ...instruments Figure 11 NI ELVISmx Instrument Launcher To launch an instrument click the button corresponding to the desired instrument Select the NI myDAQ device from the Device control pull down dial...

Страница 18: ...Resistance measurement Diode test Audible continuity test Make connections for measurements to the DMM banana jacks on the device This instrument has the following measurement parameters DC voltage 60...

Страница 19: ...instrument has the following measurement parameters Channel Source Channels AI 0 and AI 1 AudioInput Left and AudioInput Right You can use AI channels or AudioInput channels but not a combination of...

Страница 20: ...angle amplitude selection and frequency settings In addition the instrument offers DC offset setting frequency sweep capabilities and amplitude and frequency modulation The FGEN uses AO 0 or AO 1 on t...

Страница 21: ...linear and logarithmic display scales You can also invert the measured values of the input signal during Bode analysis by inverting the Op Amp signal polarity Refer to the NI ELVISmx Help for require...

Страница 22: ...rement It can either continuously make measurements or make a single scan You can also apply various window and filtering options to the signal This instrument has the following measurement parameters...

Страница 23: ...red waveforms Refer to the NI ELVISmx Help for more information about the Waveform Editor To access this help file go to Start All Programs National Instruments NI ELVISmx for NI ELVIS NI myDAQ NI ELV...

Страница 24: ...igital lines NI ELVISmx Digital Reader groups the I O lines into ports through which data can be read You can read one port at a time either continuously or as a single reading The lines are grouped i...

Страница 25: ...o 7 or an 8 bit pattern 0 to 7 You can also manually create a pattern or select predefined patterns such as ramp toggle or walking 1s This instrument can control a port of four or eight consecutive li...

Страница 26: ...ady to use After the myDAQ is connected to the system the blue LED by the connector lights indicating the device is ready for use 1 Connect the signal s you want to measure to the connector s on the s...

Страница 27: ...h instrument This enables you to develop LabVIEW applications without extensive programming expertise To access the NI ELVISmx Express VIs open a LabVIEW block diagram and select Measurement I O NI EL...

Страница 28: ...lloscope Express VI from the VI palette and place it on the block diagram The NI ELVISmx Oscilloscope configuration window opens 5 Connect the signal s you want to measure to the connector s on the si...

Страница 29: ...r from the menu This creates a Graph Indicator on the VI front panel to display the signal data Repeat this step for Channel 1 if you configured the NI ELVISmx Oscilloscope Express VI to enable Channe...

Страница 30: ...input signals and generation of output signals using the DAQ Assistant in LabVIEW This example forms the foundation for audio signal processing experimentation 1 Launch LabVIEW 2 In the Getting Starte...

Страница 31: ...10 Click OK to exit the DAQ Assistant configuration front panel The VI builds Click No on the Confirm Auto Loop Creation dialog box that displays 11 Place another DAQ Assistant Express VI to the righ...

Страница 32: ...t Generation Mode to Continuous Samples 17 Click OK to exit the DAQ Assistant configuration front panel The VI builds Click No on the Confirm Auto Loop Creation dialog box that displays 18 Wire the da...

Страница 33: ...layer to the AUDIO IN 3 5 mm jack and connect speakers to the AUDIO OUT jack You should hear the music on the speakers If you do not hear sound test the speakers on the music player to make sure there...

Страница 34: ...Li ion battery or from a two to three cell NiCd NiMH or alkaline battery Regulator TPS62003 LDO Regulator TPS71501 These are low dropout LDO voltage regulators offering the benefits of low noise low...

Страница 35: ...push pull output comparator that features a fast 6 s response time and 1 2 A max nanopower capability allowing operation from 1 8 V 5 5 V Operational Amplifier TLE2082 This is an operational amplifier...

Страница 36: ...s DMM Scope AI Scope Audio FGEN Bode DSA AI DSA Audio Arb AO Arb Audio DI 4 Lines DI 8 Lines DO 4 Lines DO 8 Lines DMM Scope AI Scope Audio FGEN Bode DSA AI DSA Audio Arb AO Arb Audio DI 4 Lines DI 8...

Страница 37: ...ures you use to build data acquisition and instrument control applications This document contains exercises that you can use to learn how to develop basic applications in LabVIEW Multisim Getting Star...

Страница 38: ...re sound or light DAC Digital to analog converter Device that converts digital code into analog signals DAQ Data acquisition Measuring an electrical or physical phenomenon such as voltage current or t...

Страница 39: ...or other documentation National Instruments will at its option repair or replace equipment that proves to be defective during the warranty period This warranty includes parts and labor For private in...

Отзывы: