National Instruments NI 6221, NI 6225, NI 6220, NI 6224, NI 6250, NI 6229 M, NI 6251, NI 6254, NI 6255, NI 6280, NI 6259 M, NI 6281, NI 6284, NI 6289 M User Manual
Worldwide Technical Support and Product Information
ni.com
National Instruments Corporate Headquarters
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 683 0100
Worldwide Offices
Australia 1800 300 800, Austria 43 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599,
Canada 800 433 3488, China 86 21 5050 9800, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00,
Finland 385 (0) 9 725 72511, France 01 57 66 24 24, Germany 49 89 7413130, India 91 80 41190000,
Israel 972 3 6393737, Italy 39 02 413091, Japan 81 3 5472 2970, Korea 82 02 3451 3400,
Lebanon 961 (0) 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 (0) 348 433 466,
New Zealand 0800 553 322, Norway 47 (0) 66 90 76 60, Poland 48 22 3390150, Portugal 351 210 311 210,
Russia 7 495 783 6851, Singapore 1800 226 5886, Slovenia 386 3 425 42 00, South Africa 27 0 11 805 8197,
Spain 34 91 640 0085, Sweden 46 (0) 8 587 895 00, Switzerland 41 56 2005151, Taiwan 886 02 2377 2222,
Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545
For further support information, refer to the Technical Support and Professional Services appendix. To comment
on National Instruments documentation, refer to the National Instruments Web site at
the info code
M Series devices are warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced
by receipts 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.
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in
materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments
will, at its option, repair or replace software media that do not execute programming instruc tions if National Instruments receives notice of such defects
during the warranty period. National Instruments does not warrant that the operation of the software shall be uninterrupted or error free.
A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before any
equipment will be accepted for warranty work. National Instruments will pay the shipping costs of returning to the owner parts which are covered by
warranty.
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical accuracy. In
the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document
without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National
Instruments be liable for any damages arising out of or related to this document or the information contained in it.
E
XCEPTASSPECIFIEDHEREIN, NATIONAL INSTRUMENTSMAKESNOWARRANTIES, EXPRESSORIMPLIED, ANDSPECIFICALLYDISCLAIMSANYWARRANTYOF
MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE. CUSTOMER’SRIGHTTORECOVERDAMAGESCAUSEDBYFAULTORNEGLIGENCEONTHEPARTOF NATIONAL
I
NSTRUMENTSSHALLBELIMITEDTOTHEAMOUNTTHERETOFOREPAIDBYTHECUSTOMER. NATIONAL INSTRUMENTSWILLNOTBELIABLEFORDAMAGESRESULTING
FROMLOSSOFDATA, PROFITS, USEOFPRODUCTS, ORINCIDENTALORCONSEQUENTIALDAMAGES, EVENIFADVISEDOFTHEPOSSIBILITYTHEREOF. This limitation of
the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including negligence. Any action against
National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in
performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfunctions, or service
failures caused by owner’s failure to follow the National Instruments installation, operation, or maintenance instructions; owner’s modification of the
product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside
reasonable control.
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying,
recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National
Instruments Corporation.
National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other
intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only
to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
Trademarks
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section
on
ni.com/legal for more information about National Instruments trademarks.
®
is the registered trademark of Apple Computer, Inc. Other product and company names mentioned herein are trademarks or trade names
FireWire
of their respective companies.
Members of the National Instruments Alliance Partner Program are business entities independent from National Instruments and have no agency,
partnership, or joint-venture relationship with National Instruments.
Patents
For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file
on your CD, or ni.com/patents.
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF
RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN
ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT
INJURY TO A HUMAN.
(2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE
IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY,
COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS
AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND HARDWARE
COMPATIBILITY PROBLEMS, MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES,
TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR MISUSES, OR
ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE HEREAFTER
COLLECTIVELY TERMED “SYSTEM FAILURES”). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD CREATE A RISK OF
HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD NOT BE RELIANT SOLELY
UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID DAMAGE, INJURY, OR DEATH,
THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES,
INCLUDING BUT NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS. BECAUSE EACH END-USER SYSTEM IS
CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS’ TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION
DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT
EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS, THE USER OR APPLICATION DESIGNER IS ULTIMATELY
RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER
NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT
LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.
Page 4
Compliance
Compliance with FCC/Canada Radio Frequency Interference
Regulations
Determining FCC Class
The Federal Communications Commission (FCC) has rules to protect wireless communications from interference. The FCC
places digital electronics into two classes. These classes are known as Class A (for use in industrial-commercial locations only)
or Class B (for use in residential or commercial locations). All National Instruments (NI) products are FCC Class A products.
Depending on where it is operated, this Class A product could be subject to restrictions in the FCC rules. (In Canada, the
Department of Communications (DOC), of Industry Canada, regulates wireless interference in much the same way.) Digital
electronics emit weak signals during normal operation that can affect radio, television, or other wireless products.
All Class A products display a simple warning statement of one paragraph in length regarding interference and undesired
operation. The FCC rules have restrictions regarding the locations where FCC Class A products can be operated.
Consult the FCC Web site at
FCC/DOC Warnings
This equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the instructions
in this manual and the CE marking Declaration of Conformity*, may cause interference to radio and television reception.
Classification requirements are the same for the Federal Communications Commission (FCC) and the Canadian Department
of Communications (DOC).
Changes or modifications not expressly approved by NI could void the user’s authority to operate the equipment under the
FCC Rules.
Class A
Federal Communications Commission
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC
Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated
in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this
equipment in a residential area is likely to cause harmful interference in which case the user is required to correct the interference
at their own expense.
www.fcc.gov for more information.
Canadian Department of Communications
This Class A digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations.
Cet appareil numérique de la classe A respecte toutes les exigences du Règlement sur le matériel brouilleur du Canada.
Compliance with EU Directives
Users in the European Union (EU) should refer to the Declaration of Conformity (DoC) for information* pertaining to the
CE marking. Refer to the Declaration of Conformity (DoC) for this product for any additional regulatory compliance
information. To obtain the DoC for this product, visit
and click the appropriate link in the Certification column.
* The CE marking Declaration of Conformity contains important supplementary information and instructions for the user or
installer.
ni.com/certification, search by model number or product line,
The M Series User Manual contains information about using the National
Instruments M Series data acquisition (DAQ) devices with NI-DAQ 8.6 and
later. M Series devices feature up to 80 analog input (AI) channels, and up
to four analog output (AO) channels, up to 48 lines of digital input/output
(DIO), and two counters.
Conventions
The following conventions are used in this manual:
<>Angle brackets that contain numbers separated by an ellipsis represent
a range of values associated with a bit or signal name—for example,
AO <3. .0>.
»The » symbol leads you through nested menu items and dialog box options
to a final action. The sequence File»Page Setup»Options directs you to
pull down the File menu, select the Page Setup item, and select Options
from the last dialog box.
This icon denotes a note, which alerts you to important information.
This icon denotes a caution, which advises you of precautions to take to
avoid injury, data loss, or a system crash.When this symbol is marked on a
product, refer to the Read Me First: Safety and Radio-Frequency Interference for information about precautions to take.
boldBold text denotes items that you must select or click in the software, such
as menu items and dialog box options. Bold text also denotes parameter
names.
italicItalic text denotes variables, emphasis, a cross-reference, or an introduction
to a key concept. Italic text also denotes text that is a placeholder for a word
or value that you must supply.
monospaceText in this font denotes text or characters that you should enter from the
keyboard, sections of code, programming examples, and syntax examples.
This font is also used for the proper names of disk drives, paths, directories,
PlatformText in this font denotes a specific platform and indicates that the text
following it applies only to that platform.
Related Documentation
Each application software package and driver includes information about
writing applications for taking measurements and controlling measurement
devices. The following references to documents assume you have
NI-DAQ 8.6 or later, and where applicable, version 7.0 or later of the
NI application software.
NI-DAQmx for Windows
The DAQ Getting Started Guide describes how to install your NI-DAQmx
for Windows software, how to install your NI-DAQmx-supported DAQ
device, and how to confirm that your device is operating properly. Select
Start»All Programs»National Instruments»NI-DAQ»DAQ Getting
Started Guide.
The NI-DAQ Readme lists which devices are supported by this version of
NI-DAQ. Select Start»All Programs»National Instruments»NI-DAQ»NI-DAQ Readme.
The NI-DAQmx Help contains general information about measurement
concepts, key NI-DAQmx concepts, and common applications that are
applicable to all programming environments. Select Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx Help.
NI-DAQmx for Linux
The DAQ Getting Started Guide describes how to install your
NI-DAQmx-supported DAQ device and confirm that your device is
operating properly.
The NI-DAQ Readme for Linux lists supported devices and includes
software installation instructions, frequently asked questions, and known
issues.
The C Function Reference Help describes functions and attributes.
M Series User Manualxvini.com
Page 16
The NI-DAQmx for Linux Configuration Guide provides configuration
instructions, templates, and instructions for using test panels.
Note All NI-DAQmx documentation for Linux is installed at
/usr/local/natinst/nidaqmx/docs.
Note USB-622x/625x devices are not supported in NI-DAQmx for Linux.
NI-DAQmx Base (Linux/Mac OS X/LabVIEW PDA 8.x)
The NI-DAQmx Base Getting Started Guide describes how to install your
NI-DAQmx Base software, your NI-DAQmx Base-supported DAQ device,
and how to confirm that your device is operating properly. In Windows,
select Start»All Programs»National Instruments»NI-DAQmx Base»Documentation»Getting Started Guide.
Getting Started with NI-DAQmx Base for Linux and Mac Users describes
how to install your NI-DAQmx Base software, your NI-DAQmx
Base-supported DAQ device, and how to confirm that your device is
operating properly on your Mac/Linux machine.
The NI-DAQmx Base Readme lists which devices are supported by this
version of NI-DAQmx Base. In Windows, select Start»All Programs»National Instruments»NI-DAQmx Base»DAQmx Base Readme.
About This Manual
The NI-DAQmx Base VI Reference Help contains VI reference and general
information about measurement concepts. In LabVIEW, select Help»NI-DAQmx Base VI Reference Help.
The NI-DAQmx Base C Reference Help contains C reference and general
information about measurement concepts. In Windows, select Start»All
Programs»National Instruments»NI-DAQmx Base»Documentation»
C Function Reference Help.
Note All NI-DAQmx Base documentation for Linux is installed at
/usr/local/natinst/nidaqmxbase/documentation.
Note All NI-DAQmx Base documentation for Mac OS X is installed at
If you are a new user, use the Getting Started with LabVIEW manual to
familiarize yourself with the LabVIEW graphical programming
environment and the basic LabVIEW features you use to build data
acquisition and instrument control applications. Open the Getting Started
with LabVIEW manual by selecting Start»All Programs»National
Instruments»LabVIEW»LabVIEW Manuals or by navigating to the
labview\manuals directory and opening LV_Getting_Started.pdf.
Use the LabVIEW Help, available by selecting Help»Search the
LabVIEW Help in LabVIEW, to access information about LabVIEW
programming concepts, step-by-step instructions for using LabVIEW, and
reference information about LabVIEW VIs, functions, palettes, menus, and
tools. Refer to the following locations on the Contents tab of the LabVIEW Help for information about NI-DAQmx:
•Getting Started»Getting Started with DAQ—Includes overview
information and a tutorial to learn how to take an NI-DAQmx
measurement in LabVIEW using the DAQ Assistant.
•VI and Function Reference»Measurement I/O VIs and Functions—Describes the LabVIEW NI-DAQmx VIs and properties.
•Taking Measurements—Contains the conceptual and how-to
information you need to acquire and analyze measurement data in
LabVIEW, including common measurements, measurement
fundamentals, NI-DAQmx key concepts, and device considerations.
LabWindows/CVI
The Data Acquisition book of the LabWindows/CVI Help contains
measurement concepts for NI-DAQmx. This book also contains Taking an NI-DAQmx Measurement in LabWindows/CVI, which includes
step-by-step instructions about creating a measurement task using the DAQ
Assistant. In LabWindows
Using LabWindows/CVI»Data Acquisition.
The NI-DAQmx Library book of the LabWindows/CVI Help contains
API overviews and function reference for NI-DAQmx. Select Library Reference»NI-DAQmx Library in the LabWindows/CVI Help.
M Series User Manualxviiini.com
™
/CVI™, select Help»Contents, then select
Page 18
Measurement Studio
If you program your NI-DAQmx-supported device in Measurement Studio
using Visual C++, Visual C#, or Visual Basic .NET, you can interactively
create channels and tasks by launching the DAQ Assistant from MAX or
from within Visual Studio .NET. You can generate the configuration code
based on your task or channel in Measurement Studio. Refer to the DAQ Assistant Help for additional information about generating code. You also
can create channels and tasks, and write your own applications in your
ADE using the NI-DAQmx API.
For help with NI-DAQmx methods and properties, refer to the NI-DAQmx
.NET Class Library or the NI-DAQmx Visual C++ Class Library included
in the NI Measurement Studio Help. For general help with programming in
Measurement Studio, refer to the NI Measurement Studio Help, which is
fully integrated with the Microsoft Visual Studio .NET help. To view
this help file in Visual Studio. NET, select Measurement Studio»NI Measurement Studio Help.
To create an application in Visual C++, Visual C#, or Visual Basic .NET,
follow these general steps:
1.In Visual Studio .NET, select File»New»Project to launch the New
2.Find the Measurement Studio folder for the language you want to
3.Choose a project type. You add DAQ tasks as a part of this step.
About This Manual
Project dialog box.
create a program in.
ANSI C without NI Application Software
The NI-DAQmx Help contains API overviews and general information
about measurement concepts. Select Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx Help.
The NI-DAQmx C Reference Help describes the NI-DAQmx Library
functions, which you can use with National Instruments data acquisition
devices to develop instrumentation, acquisition, and control applications.
Select Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx C Reference Help.
With the Microsoft .NET Framework version 1.1 or later, you can use
NI-DAQmx to create applications using Visual C# and Visual Basic .NET
without Measurement Studio. You need Microsoft Visual Studio .NET
2003 or Microsoft Visual Studio 2005 for the API documentation to be
installed.
The installed documentation contains the NI-DAQmx API overview,
measurement tasks and concepts, and function reference. This help is fully
integrated into the Visual Studio .NET documentation. To view the
NI-DAQmx .NET documentation, go to Start»Programs»National
Instruments»NI-DAQ»NI-DAQmx .NET Reference Help. Expand
NI Measurement Studio Help»NI Measurement Studio .NET Class
Library»Reference to view the function reference. Expand NI
Measurement Studio Help»NI Measurement Studio .NET Class
Library»Using the Measurement Studio .NET Class Libraries to view
conceptual topics for using NI-DAQmx with Visual C# and Visual Basic
.NET.
To get to the same help topics from within Visual Studio, go to Help»Contents. Select Measurement Studio from the Filtered By drop-down
list and follow the previous instructions.
Device Documentation and Specifications
The NI 622x Specifications contains all specifications for the NI 6220,
NI 6221, NI 6224, NI 6225, and NI 6229 M Series devices.
The NI 625x Specifications contains all specifications for the NI 6250,
NI 6251, NI 6254, NI 6255, and NI 6259 M Series devices.
The NI 628x Specifications contains all specifications for the NI 6280,
NI 6281, NI 6284, and NI 6289 M Series devices.
NI-DAQmx includes the Device Document Browser, which contains online
documentation for supported DAQ and SCXI devices, such as documents
describing device pinouts, features, and operation. You can find, view,
and/or print the documents for each device using the Device Document
Browser at any time by inserting the CD. After installing the Device
Document Browser, device documents are accessible from Start»
All Programs»National Instruments»NI-DAQ»Browse Device
Documentation.
M Series User Manualxxni.com
Page 20
Training Courses
If you need more help getting started developing an application with
NI products, NI offers training courses. To enroll in a course or obtain a
detailed course outline, refer to
Technical Support on the Web
For additional support, refer to ni.com/support or zone.ni.com.
Note You can download these documents at ni.com/manuals.
DAQ specifications and some DAQ manuals are available as PDFs. You
must have Adobe Acrobat Reader with Search and Accessibility 5.0.5 or
later installed to view the PDFs. Refer to the Adobe Systems Incorporated
Web site at
National Instruments Product Manuals Library at
updated documentation resources.
www.adobe.com to download Acrobat Reader. Refer to the
M Series devices feature up to 80 analog input (AI) channels, up to four
analog output (AO) channels, up to 48 lines of digital input/output (DIO),
and two counters. If you have not already installed your device, refer to the
DAQ Getting Started Guide. For specifications arranged by M Series
device family, refer to the specifications document for your device on
ni.com/manuals.
Before installing your DAQ device, you must install the software you plan
to use with the device.
Installing NI-DAQmx
The DAQ Getting Started Guide, which you can download at
ni.com/manuals, offers NI-DAQmx users step-by-step instructions for
installing software and hardware, configuring channels and tasks, and
getting started developing an application.
1
Installing Other Software
If you are using other software, refer to the installation instructions that
accompany your software.
Installing the Hardware
The DAQ Getting Started Guide contains non-software-specific
information about how to install PCI, PCI Express, PXI, PXI Express, and
USB devices, as well as accessories and cables.
Device Pinouts
Refer to Appendix A, Device-Specific Information, for M Series device
pinouts.
Refer to the specifications for your device, the NI 622x Specifications, the
NI 625x Specifications, or the NI 628x Specifications, available on the
NI-DAQ Device Document Browser or
detailed information about M Series devices.
ni.com/manuals, for more
Device Accessories and Cables
NI offers a variety of accessories and cables to use with your DAQ device.
Refer to Appendix A, Device-Specific Information, or
information.
ni.com for more
Applying the Signal Label to USB-622x/625x Screw
Terminal Devices
(USB-622x/625x Screw Terminal Devices) The supplied signal label can be
adhered to the inside cover of the USB-622x/625x Screw Terminal device
with supplied velcro strips as shown in Figure 1-1.
Figure 1-1. Applying the USB-622x/625x Screw Terminal Signal Label
M Series User Manual1-2ni.com
Page 23
USB Cable Strain Relief
(USB-622x/625x Screw Terminal and USB-622x/625x Mass Termination Devices)
Use the supplied strain relief hardware to provide strain relief for your USB
cable. Adhere the cable tie mount to the rear panel of the USB-622x/625x
Screw Terminal or USB-622x/625x Mass Termination device, as shown in
Figure 1-2. Thread a zip tie through the cable tie mount and tighten around
the USB cable.
Chapter 1Getting Started
Figure 1-2. USB Cable Strain Relief on USB-622x/625x Screw Terminal and
(USB-622x/625x BNC Devices) Thread a zip tie through two of the strain relief
holes on the end cap to provide strain relief for your USB cable as shown
in Figure 1-3. The strain relief holes can also be used as cable management
for signal wires to/from the screw terminals and BNC connectors.
Figure 1-3. USB Cable Strain Relief on USB-622x/625x BNC Devices
M Series User Manual1-4ni.com
Page 25
DAQ System Overview
r
Figure 2-1 shows a typical DAQ system, which includes sensors,
transducers, signal conditioning devices, cables that connect the various
devices to the accessories, the M Series device, programming software, and
PC. The following sections cover the components of a typical DAQ system.
2
Signal
Sensors and
Transducers
Conditioning
DAQ Hardware
Cables and
Accessories
Figure 2-1. Components of a Typical DAQ System
DAQ hardware digitizes signals, performs D/A conversions to generate
analog output signals, and measures and controls digital I/O signals.
Figure 2-2 features components common to all M Series devices.
The DAQ-STC2 and DAQ-6202 implement a high-performance digital
engine for M Series data acquisition hardware. Some key features of this
engine include the following:
•Flexible AI and AO sample and convert timing
•Many triggering modes
•Independent AI, AO, DI, and DO FIFOs
•Generation and routing of RTSI signals for multi-device
synchronization
•Generation and routing of internal and external timing signals
•Two flexible 32-bit counter/timer modules with hardware gating
•Digital waveform acquisition and generation
•Static DIO signals
•True 5 V high current drive DO
•DI change detection
•PLL for clock synchronization
•Seamless interface to signal conditioning accessories
•PCI/PXI interface
•Independent scatter-gather DMA controllers for all acquisition and
generation functions
Digital
Routing
and Clock
Generation
RTSI
Figure 2-2. General M Series Block Diagram
Bus
Interface
Bus
M Series User Manual2-2ni.com
Page 27
Calibration Circuitry
The M Series analog inputs and outputs have calibration circuitry to correct
gain and offset errors. You can calibrate the device to minimize AI and AO
errors caused by time and temperature drift at run time. No external
circuitry is necessary; an internal reference ensures high accuracy and
stability over time and temperature changes.
Factory-calibration constants are permanently stored in an onboard
EEPROM and cannot be modified. When you self-calibrate the device,
software stores new constants in a user-modifiable section of the EEPROM.
To return a device to its initial factory calibration settings, software can
copy the factory-calibration constants to the user-modifiable section of the
EEPROM. Refer to the NI-DAQmx Help or the LabVIEW Help in version
8.0 or later for more information about using calibration constants.
For a detailed calibration procedure for M Series devices, refer to the
B/E/M/S Series Calibration Procedure for NI-DAQmx by clicking Manual
Calibration Procedures on
Signal Conditioning
Chapter 2DAQ System Overview
ni.com/calibration.
Many sensors and transducers require signal conditioning before a
measurement system can effectively and accurately acquire the signal. The
front-end signal conditioning system can include functions such as signal
amplification, attenuation, filtering, electrical isolation, simultaneous
sampling, and multiplexing. In addition, many transducers require
excitation currents or voltages, bridge completion, linearization, or high
amplification for proper and accurate operation. Therefore, most
computer-based measurement systems include some form of signal
conditioning in addition to plug-in data acquisition DAQ devices.
Sensors and Transducers
Sensors can generate electrical signals to measure physical phenomena,
such as temperature, force, sound, or light. Some commonly used sensors
are strain gauges, thermocouples, thermistors, angular encoders, linear
encoders, and resistance temperature detectors (RTDs).
To measure signals from these various transducers, you must convert them
into a form that a DAQ device can accept. For example, the output voltage
of most thermocouples is very small and susceptible to noise. Therefore,
you may need to amplify or filter the thermocouple output before digitizing
it. The manipulation of signals to prepare them for digitizing is called
signal conditioning.
For more information about sensors, refer to the following documents.
•For general information about sensors, visit
•If you are using LabVIEW, refer to the LabVIEW Help by selecting
Help»Search the LabVIEW Help in LabVIEW and then navigate to
the Taking Measurements book on the Contents tab.
•If you are using other application software, refer to Common Sensors
in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later.
Signal Conditioning Options
SCXI
SCXI is a front-end signal conditioning and switching system for various
measurement devices, including M Series devices. An SCXI system
consists of a rugged chassis that houses shielded signal conditioning
modules that amplify, filter, isolate, and multiplex analog signals from
thermocouples or other transducers. SCXI is designed for large
measurement systems or systems requiring high-speed acquisition.
ni.com/sensors.
System features include the following.
•Modular architecture—Choose your measurement technology
•Expandability—Expand your system to 3,072 channels
•Integration—Combine analog input, analog output, digital I/O, and
switching into a single, unified platform
•High bandwidth—Acquire signals at high rates
•Connectivity—Select from SCXI modules with thermocouple
connectors or terminal blocks
Note SCXI is not supported on PCI-6221 (37-pin) or all variants of USB-622x/625x
devices.
M Series User Manual2-4ni.com
Page 29
Chapter 2DAQ System Overview
SCC
SCC is a front-end signal conditioning system for M Series plug-in data
acquisition devices. An SCC system consists of a shielded carrier that holds
up to 20 single- or dual-channel SCC modules for conditioning
thermocouples and other transducers. SCC is designed for small
measurement systems where you need only a few channels of each signal
type, or for portable applications. SCC systems also offer the most
comprehensive and flexible signal connectivity options.
System features include the following.
•Modular architecture—Select your measurement technology on a
per-channel basis
•Small-channel systems—Condition up to 16 analog input and
eight digital I/O lines
•Low-profile/portable—Integrates well with other laptop computer
measurement technologies
•High bandwidth—Acquire signals at rates up to 1.25 MHz
•Connectivity—Incorporates panelette technology to offer custom
connectivity to thermocouple, BNC, LEMO
MIL-Spec connectors
™
(B Series), and
Note PCI Express users should consider the power limits on certain SCC modules without
an external power supply. Refer to the specifications for your device, and the Disk Drive
Power Connector section of Chapter 3, Connector and LED Information, for information
about power limits and increasing the current the device can supply on the +5 V terminal.
Note SCC is not supported on the PCI-6221 (37-pin), USB-622x/625x Screw Terminal, or
USB-622x/625x BNC devices.
5B Series
5B is a front-end signal conditioning system for plug-in data acquisition
devices. A 5B system consists of eight or 16 single-channel modules that
plug into a backplane for conditioning thermocouples and other analog
signals. National Instruments offers a complete line of 5B modules,
carriers, backplanes, and accessories.
Note 5B is not supported on the PCI-6221 (37-pin), USB-622x/625x Screw Terminal, or
Note For more information about SCXI, SCC, and 5B Series products, refer to
ni.com/signalconditioning.
Cables and Accessories
NI offers a variety of products to use with M Series devices, including
cables, connector blocks, and other accessories, as follows:
•Shielded cables and cable assemblies, and unshielded ribbon cables
and cable assemblies
•Screw terminal connector blocks, shielded and unshielded
•RTSI bus cables
•SCXI modules and accessories for isolating, amplifying, exciting, and
multiplexing signals; with SCXI you can condition and acquire up to
3,072 channels
•Low-channel-count signal conditioning modules, devices, and
accessories, including conditioning for strain gauges and RTDs,
simultaneous sample and hold circuitry, and relays
Custom Cabling
For more specific information about these products, refer to
Refer to the Custom Cabling section of this chapter, the Field Wiring
Considerations section of Chapter 4, Analog Input, and Appendix A,
Device-Specific Information, for information about how to select
accessories for your M Series device.
NI offers cables and accessories for many applications. However, if you
want to develop your own cable, adhere to the following guidelines for best
results:
•For AI signals, use shielded, twisted-pair wires for each AI pair of
differential inputs. Connect the shield for each signal pair to the ground
reference at the source.
•Route the analog lines separately from the digital lines.
•When using a cable shield, use separate shields for the analog and
digital sections of the cable. Failure to do so results in noise coupling
into the analog signals from transient digital signals.
For more information about the connectors used for DAQ devices, refer to
the KnowledgeBase document, Specifications and Manufacturers for
ni.com.
M Series User Manual2-6ni.com
Page 31
Board Mating Connectors, by going to ni.com/info and entering the info
code
rdspmb.
Programming Devices in Software
National Instruments measurement devices are packaged with NI-DAQ
driver software, an extensive library of functions and VIs you can call from
your application software, such as LabVIEW or LabWindows/CVI, to
program all the features of your NI measurement devices. Driver software
has an application programming interface (API), which is a library of VIs,
functions, classes, attributes, and properties for creating applications for
your device.
NI-DAQ 7.3 and later includes two NI-DAQ drivers—Traditional NI-DAQ
(Legacy) and NI-DAQmx. M Series devices use the NI-DAQmx driver.
Each driver has its own API, hardware configuration, and software
configuration. Refer to the DAQ Getting Started Guide for more
information about the two drivers.
NI-DAQmx includes a collection of programming examples to help you get
started developing an application. You can modify example code and save
it in an application. You can use examples to develop a new application or
add example code to an existing application.
Chapter 2DAQ System Overview
To locate LabVIEW and LabWindows/CVI examples, open the National
Instruments Example Finder. In LabVIEW and LabWindows/CVI, select
Help»Find Examples.
Measurement Studio, Visual Basic, and ANSI C examples are located in the
following directories:
•NI-DAQmx examples for Measurement Studio-supported languages
are in the following directories:
–
MeasurementStudio\VCNET\Examples\NIDaq
–MeasurementStudio\DotNET\Examples\NIDaq
•NI-DAQmx examples for ANSI C are in the NI-DAQ\Examples\
Table 3-1 describes the signals found on the I/O connectors. Not all signals
are available on all devices.
Table 3-1. I/O Connector Signals
Signal NameReferenceDirectionDescription
AI GND——Analog Input Ground—These terminals are the
reference point for single-ended AI measurements in
RSE mode and the bias current return point for DIFF
measurements. All three ground references—AI GND,
AO GND, and D GND—are connected on the device.
AI <0..79>Va ri e sInputAnalog Input Channels 0 to 79—For single-ended
measurements, each signal is an analog input voltage
channel. In RSE mode, AI GND is the reference for these
signals. In NRSE mode, the reference for each
AI <0..15> signal is AI SENSE; the reference for each
AI <16..63> and AI <64..79> signal is AI SENSE 2.
For differential measurements, AI 0 and AI 8 are the
positive and negative inputs of differential analog input
channel 0. Similarly, the following signal pairs also form
differential input channels:
<AI 1, AI 9>, <AI 2, AI 10>, <AI 3, AI 11>,
<AI4,AI12>, <AI5,AI13>, <AI6,AI14>,
<AI 7, AI 15>, <AI 16, AI 24>, <AI 17, AI 25>,
<AI 18, AI 26>, <AI 19, AI 27>, <AI 20, AI 28>,
<AI 21, AI 29>, <AI 22, AI 30>, <AI 23, AI 31>,
<AI 32, AI 40>, <AI 33, AI 41>, <AI 34, AI 42>,
<AI 35, AI 43>, <AI 36, AI 44>, <AI 37, AI 45>,
<AI 38, AI 46>, <AI 39, AI 47>, <AI 48, AI 56>,
<AI 49, AI 57>, <AI 50, AI 58>, <AI 51, AI 59>,
<AI 52, AI 60>, <AI 53, AI 61>, <AI 54, AI 62>,
<AI 55, AI 63>, <AI 64, AI 72>, <AI 65, AI 73>,
<AI 66, AI 74>, <AI 67, AI 75>, <AI 68, AI 76>,
<AI 69, AI 77>, <AI 70, AI 78>, <AI 71, AI 79>
Also refer to the Connecting Ground-Referenced Signal
Sources section of Chapter 4, Analog Input.
AI SENSE,
AI SENSE 2
M Series User Manual3-2ni.com
—InputAnalog Input Sense—In NRSE mode, the reference for
each AI <0..15> signal is AI SENSE; the reference for
each AI <16..63> and AI <64..79> signal is
AI SENSE 2. Also refer to the Connecting
Ground-Referenced Signal Sources section of Chapter 4,
Analog Input
Page 34
Chapter 3Connector and LED Information
Table 3-1. I/O Connector Signals (Continued)
Signal NameReferenceDirectionDescription
AO <0..3>AO GNDOutputAnalog Output Channels 0 to 3—These terminals
supply the voltage output of AO channels 0 to 3.
AO GND——Analog Output Ground—AO GND is the reference for
AO <0..3>. All three ground references—AI GND,
AO GND, and D GND—are connected on the device.
D GND——Digital Ground—D GND supplies the reference
for P0.<0..31>, PFI <0..15>/P1/P2, and +5 V. All
three ground references—AI GND, AO GND, and
D GND—are connected on the device.
P0.<0..31>D GNDInput or
Output
APFI <0..1>AO GND/AI GNDInputAnalog Programmable Function Interface Channels
+5 VD GNDInput or
Output
PFI <0..7>/P1.<0..7>
PFI <8..15>/P2.<0..7>
D GNDInput or
Output
Port 0 Digital I/O Channels 0 to 31—You can
individually configure each signal as an input or output.
0 to 1—Each APFI signal can be used as AO external
reference inputs for AO <0..3>, AO external offset input,
or as an analog trigger input. APFI <0..1> are referenced
to AI GND when they are used as analog trigger inputs.
APFI <0..1> are referenced to AO GND when they are
used as AO external offset or reference inputs. These
functions are not available on all devices. Refer to the
specifications for your device.
+5 V Power Source—These terminals provide a fused
+5 V power source.
Programmable Function Interface or Digital I/O
Channels 0 to 7 and Channels 8 to 15—Each of these
terminals can be individually configured as a PFI
terminal or a digital I/O terminal.
As an input, each PFI terminal can be used to supply an
external source for AI, AO, DI, and DO timing signals or
counter/timer inputs.
As a PFI output, you can route many different internal AI,
AO, DI, or DO timing signals to each PFI terminal. You
also can route the counter/timer outputs to each PFI
terminal.
As a Port 1 or Port 2 digital I/O signal, you can
individually configure each signal as an input or output.
USER <1..2>——User-Defined Channels 1 and 2—On USB-62xx BNC
devices, the USER <1..2> BNC connectors allow you to
use a BNC connector for a digital or timing I/O signal of
your choice. The USER <1..2> BNC connectors are
internally routed to the USER <1..2> screw terminals.
Page 35
Chapter 3Connector and LED Information
Table 3-1. I/O Connector Signals (Continued)
Signal NameReferenceDirectionDescription
CHS GND
NC——No connect—Do not connect signals to these terminals.
*
USB-62xx Screw Terminal users can connect the shield of a shielded cable to the chassis ground lug for a ground
connection. The chassis ground lug is not available on all device versions.
*
——Chassis Ground*—This terminal connects to the
USB-62xx BNC device metal enclosure. You can connect
your cable’s shield wire to CHS GND for a ground
connection.
M Series User Manual3-4ni.com
Page 36
Chapter 3Connector and LED Information
M Series and E Series Pinout Comparison
The pinout of Connector 0 of 68-pin M Series devices is similar to the
pinout of 68-pin E Series devices. On M Series devices, some terminals
have enhanced functionality or other slight differences. Table 3-2
compares the two pinouts.
Table 3-2. M Series and E Series Device Pinout Comparison
ESeries
Terminal
1FREQ OUTPFI 14/P2.6E Series devices drive each of these terminals with one
2CTR 0 OUT
40CTR 1 OUT
45EXT STROBEPFI 10/P2.2
46AI HOLD COMP
3PFI 9/CTR 0 GATE
5PFI 6/AO START
6PFI 5/AO SAMP CLK
10PFI 1/AI REF TRIG
37PFI 8/CTR 0 SRC
38PFI 7/AI SAMP CLK
41PFI 4/CTR 1 GATE
42PFI 3/CTR 1 SRC
43PFI 2/AI CONV CLK
Te rm in a l
(GPCTR0_OUT)
(GPCTR1_OUT)
(SCANCLK)
(GPCTR0_GATE)
TRIG (WFTRIG)
(UPDATE)
(TRIG2)
(GPCTR0_SOURCE)
(STARTSCAN)
(GPCTR1_GATE)
(GPCTR1_SOURCE)
(CONVERT)
*
M Series
Terminal
PFI 12/P2.4
PFI 13/P2.5
PFI 11/P2.3
PFI 9/P2.1As a PFI input, the functionality of E Series and
PFI 6/P1.6
PFI 5/P1.5
PFI 1/P1.1
PFI 8/P2.0
PFI 7/P1.7
PFI 4/P1.4
PFI 3/P1.3
PFI 2/P1.2
particular internal timing signal.
M Series devices can drive each terminal with the same
signal as on E Series devices. On M Series devices, you
also can route many other internal timing signals to each
terminal.
On M Series devices, you also can use these terminals as
additional PFI inputs to drive internal timing signals.
On M Series devices, you also can use these terminals as
digital I/O signals.
Also refer to Chapter 8, PFI.
M Series devices is similar for these terminals.
E Series devices can drive each of these terminals with
one particular internal timing signal.
M Series devices can drive each terminal with the same
signal as on E Series devices. On M Series devices, you
also can route many other internal timing signals to each
terminal.
On M Series devices, you also can use these terminals as
digital I/O signals.
Table 3-2. M Series and E Series Device Pinout Comparison (Continued)
ESeries
Terminal
11PFI 0/AI START TRIG
16P0.6P0.6On both E Series and M Series devices, these terminals
48P0.7P0.7
20AO E XT REF
39D GNDPFI 15/P2.7On E Series devices, this is one of the D GND terminals.
*
In NI-DAQmx, National Instruments has revised terminal names so they are easier to understand and more consistent
among National Instruments hardware and software products. This column shows the NI-DAQmx terminal names
(Traditional NI-DAQ (Legacy) terminal names are shown in parentheses).
Te rm in a l
(TRIG1)
(EXTREF)
*
M Series
Terminal
PFI 0/P1.0On E Series devices, as an input, this terminal can either
be a PFI input or the analog trigger input.
On M Series devices, as an input, this terminal can only
be a PFI input. Analog triggers use the APFI <0..1>
terminals.
E Series devices can drive this terminal with the
AI START TRIG signal.
M Series devices, as an output, can drive this terminal
with the AI START TRIG signal. You also can route
many other internal timing signals to this terminal.
On M Series devices, you also can use this terminal as
the digital I/O signal, P1.0.
Also refer to Chapter 8, PFI.
are digital I/O signals. You can individually configure
each signal as an input or output.
On E Series devices, P0.6 and P0.7 also can control the
up/down signal of general-purpose Counters 0 and 1,
respectively.
On M Series devices, you have to use one of the PFI
terminals to control the up/down signal of
general-purpose Counters 0 and 1.
APFI 0On E Series devices, this terminal is the external
reference input for the AO circuitry.
On M Series devices, this terminal can be used as the
external reference input for the AO circuitry, the external
offset for the AO circuitry, or the analog trigger input.
These functions are not available on all devices. Refer to
the specifications for your device.
Note that this terminal is a no connect on some E Series
and M Series devices.
On M Series devices, this is the PFI 15/P2.7 terminal.
Differences
Refer to Appendix D, Upgrading from E Series to M Series, for more
information about the differences between these two device families.
M Series User Manual3-6ni.com
Page 38
+5 V Power Source
The +5 V terminals on the I/O connector supply +5 V referenced to
D GND. Use these terminals to power external circuitry. A self-resetting
fuse protects the supply from overcurrent conditions. The fuse resets
automatically within a few seconds after the overcurrent condition is
removed.
Caution Never connect the +5 V power terminals to analog or digital ground or to any
other voltage source on the M Series device or any other device. Doing so can damage the
device and the computer. NI is not liable for damage resulting from such a connection.
The power rating on most devices is +4.75 to +5.25 VDC at 1 A.
Refer to the specifications document for your device to obtain the device
power rating.
Note (NI PCIe-625x Devices Only) M Series PCI Express devices supply less than 1 A of
+5 V power unless you use the disk drive power connector.
Note The NI 6221 (37-pin) device does not have a +5 V terminal.
Chapter 3Connector and LED Information
USB Chassis Ground
For EMC compliance, the chassis of the USB M Series device must be
connected to earth ground through the chassis ground.
(NI PCIe-625x Devices Only) The disk drive power connector is a four-pin
hard drive connector on PCI Express devices that, when connected,
increases the current the device can supply on the +5 V terminal.
When to Use the Disk Drive Power Connector
M Series PCI Express devices without the disk drive power connector
installed perform identically to other M Series devices for most
applications and with most accessories. For most applications, it is not
necessary to install the disk drive power connector.
However, you should install the disk drive power connector in either of the
following situations:
•You need more power than listed in the device specifications
•You are using an SCC accessory without an external power supply,
such as the SC-2345
Refer to the specifications document for your device for more information
about PCI Express power requirements and power limits.
Disk Drive Power Connector Installation
Before installing the disk drive power connector, you must install and set
up the M Series PCI Express device as described in the DAQ Getting Started Guide. Complete the following steps to install the disk drive power
connector.
1.Power off and unplug the computer.
2.Remove the computer cover.
3.Attach the PC disk drive power connector to the disk drive power
connector on the device, as shown in Figure 3-1.
Note The power available on the disk drive power connectors in a computer can vary. For
example, consider using a disk drive power connector that is not in the same power chain
as the hard drive.
M Series User Manual3-8ni.com
Page 40
Chapter 3Connector and LED Information
1
1 Device Disk Drive Power Connector2 PC Disk Drive Power Connector
Figure 3-1. Connecting to the Disk Drive Power Connector
4.Replace the computer cover, and plug in and power on the computer.
5.Self-calibrate the PCI Express DAQ device in MAX by following the
instructions in Calibrating DAQ Devices in the Measurement & Automation Explorer Help.
Note Connecting or disconnecting the disk drive power connector can affect the analog
performance of your device. To compensate for this, NI recommends that you self-calibrate
after connecting or disconnecting the disk drive power connector.
USB Device Fuse Replacement
M Series USB devices have a replaceable 2A 250V (5 × 20 mm) fuse.
(USB-62xx Screw Terminal Devices) To remove the fuse from the USB-62xx
Screw Terminal, complete the following steps.
1.Power down and unplug the device.
2.Loosen the four Phillips screws that attach the back lid to the
enclosure, and remove the lid.
(USB-62xx Mass Termination Devices) To remove th e fuse from the USB -62xx
Mass Termination, complete the following steps.
1.Power down and unplug the device.
2.Loosen the four Phillips screws that attach the lid to the enclosure, and
remove the lid.
3.Replace the fuse while referring to Figure 3-4 for the fuse location.
Fuse
Figure 3-4. USB-62xx Mass Termination Fuse Location
4.Replace the lid and screws.
RTSI Connector Pinout
Refer to the RTSI Connector Pinout section of Chapter 9, Digital Routing
and Clock Generation, for information about the RTSI connector.
M Series User Manual3-12ni.com
Page 44
LED Patterns
Note USB-62xx BNC devices also have a POWER (+5 V) LED on the top panel. The
POWER (+5 V) LED indicates device power.
Chapter 3Connector and LED Information
(USB-62xx Devices Only) All variants of M Series USB devices have LEDs
labeled ACTIVE and READY. The ACTIVE LED indicates activity over
the bus. The READY LED indicates whether or not the device is
configured. Table 3-3 shows the behavior of the LEDs.
Table 3-3. LED Patterns
POWER (+5 V)
*
LED
ACTIVE
LED
READY
LED
USB Device State
OffOffOffThe device is not powered.
OnOffOffThe device is powered but not
connected to the host computer.
OnOffOnThe device is configured, but there is
no activity over the bus.
OnOnOnThe device is configured and there is
OnBlinkingOn
*
The POWER (+5 V) LED is available on USB-62xx BNC devices only.
Figure 4-1 shows the analog input circuitry of M Series devices.
4
AI <0..n>
AI SENSE
I/O Connector
AI GND
Mux
DIFF, RSE,
or NRSE
AI Terminal
Configuration
Selection
The main blocks featured in the M Series analog input circuitry are as
follows:
•I/O Connector—You can connect analog input signals to the M Series
•MUX—Each M Series device has one analog-to-digital converter
•Ground-Reference Settings—The analog input ground-reference
•Instrumentation Amplifier (NI-PGIA)—The NI programmable gain
NI-PGIA
Input Range
Selection
device through the I/O connector. The proper way to connect analog
input signals depends on the analog input ground-reference settings,
described in the Analog Input Ground-Reference Settings section. Also
refer to Appendix A, Device-Specific Information, for device I/O
connector pinouts.
(ADC). The multiplexers (MUX) route one AI channel at a time to the
ADC through the NI-PGIA.
settings circuitry selects between differential, referenced single-ended,
and non-referenced single-ended input modes. Each AI channel can
use a different mode.
instrumentation amplifier (NI-PGIA) is a measurement and instrument
class amplifier that minimizes settling times for all input ranges. The
NI-PGIA can amplify or attenuate an AI signal to ensure that you use
the maximum resolution of the ADC.
M Series devices use the NI-PGIA to deliver high accuracy even when
sampling multiple channels with small input ranges at fast rates.
M Series devices can sample channels in any order at the maximum
conversion rate, and you can individually program each channel in a
sample with a different input range.
•A/D Converter—The analog-to-digital converter (ADC) digitizes the
AI signal by converting the analog voltage into a digital number.
•AI FIFO—M Series devices can perform both single and multiple
A/D conversions of a fixed or infinite number of samples. A large
first-in-first-out (FIFO) buffer holds data during AI acquisitions to
ensure that no data is lost. M Series devices can handle multiple A/D
conversion operations with DMA, interrupts, or programmed I/O.
Analog Input Range
Input range refers to the set of input voltages that an analog input channel
can digitize with the specified accuracy. The NI-PGIA amplifies or
attenuates the AI signal depending on the input range. You can individually
program the input range of each AI channel on your M Series device.
The input range affects the resolution of the M Series device for an AI
channel. Resolution refers to the voltage of one ADC code. For example, a
16-bit ADC converts analog inputs into one of 65,536 (= 2
16
) codes—that
is, one of 65,536 possible digital values. These values are spread fairly
evenly across the input range. So, for an input range of –10 V to 10 V, the
voltage of each code of a 16-bit ADC is:
(10 V – (–10 V))
16
2
= 305 μV
M Series devices use a calibration method that requires some codes
(typically about 5% of the codes) to lie outside of the specified range. This
calibration method improves absolute accuracy, but it increases the nominal
resolution of input ranges by about 5% over what the formula shown above
would indicate.
Choose an input range that matches the expected input range of your signal.
A large input range can accommodate a large signal variation, but reduces
the voltage resolution. Choosing a smaller input range improves the voltage
resolution, but may result in the input signal going out of range.
M Series User Manual4-2ni.com
Page 47
Chapter 4Analog Input
For more information about setting ranges, refer to the NI-DAQmx Help or
the LabVIEW Help in version 8.0 or later.
Tables 4-1, 4-2, and 4-3 show the input ranges and resolutions supported by
each M Series device family.
A lowpass filter attenuates signals with frequencies above the cutoff
frequency while passing, with minimal attenuation, signals below the
cutoff frequency. The cutoff frequency is defined as the frequency at which
the output amplitude has decreased by 3 dB. Lowpass filters attenuate noise
and reduce aliasing of signals beyond the Nyquist frequency. For example,
if the signal of interest does not have frequency components beyond
40 kHz, then using a filter with a cutoff frequency at 40 kHz will attenuate
noise beyond the cutoff that is not of interest. The cutoff frequency of the
lowpass filter is also called the small signal bandwidth. The specifications
document for your DAQ device lists the small signal bandwidth.
Nominal Resolution Assuming
5% Over Range
On some devices, the filter cutoff is fixed. On other devices, this filter is
programmable and can be enabled for a lower frequency. For example, the
NI 628x devices have a programmable filter with a cutoff frequency of
40 kHz that can be enabled. If the programmable filter is not enabled, the
cutoff frequency is fixed at 750 kHz. If the cutoff is programmable, choose
the lower cutoff to reduce measurement noise. However, a filter with a
lower cutoff frequency increases the settling time of your device, as shown
in the specifications, which reduces its maximum conversion rate.
Therefore, you may have to reduce the rate of your AI Convert and AI
Sample Clocks. If that reduced sample rate is too slow for your application,
select the higher cutoff frequency.
Add additional filters to AI signals using external accessories, as described
in the Cables and Accessories section of Chapter 2, DAQ System Overview.
M Series User Manual4-4ni.com
Page 49
Analog Input Ground-Reference Settings
M Series devices support the analog input ground-reference settings shown
in Table 4-4.
Table 4-4. Analog Input Ground-Reference Settings
AI Ground-Reference
Settings
DIFFIn differential (DIFF) mode, the M Series device measures the
difference in voltage between two AI signals.
RSEIn referenced single-ended (RSE) mode, the M Series device measures
the voltage of an AI signal relative to AI GND.
NRSEIn non-referenced single-ended (NRSE) mode, the M Series device
measures the voltage of an AI signal relative to one of the AI SENSE or
AI SENSE 2 inputs.
The AI ground-reference setting determines how you should connect your
AI signals to the M Series device. Refer to the Connecting Analog Input
Signals section for more information.
Description
Chapter 4Analog Input
Ground-reference settings are programmed on a per-channel basis. For
example, you might configure the device to scan 12 channels—four
differentially-configured channels and eight single-ended channels.
M Series devices implement the different analog input ground-reference
settings by routing different signals to the NI-PGIA. The NI-PGIA is a
differential amplifier. That is, the NI-PGIA amplifies (or attenuates) the
difference in voltage between its two inputs. The NI-PGIA drives the ADC
with this amplified voltage. The amount of amplification (the gain), is
determined by the analog input range, as shown in Figure 4-2.
Table 4-5 shows how signals are routed to the NI-PGIA.
Table 4-5. Signals Routed to the NI-PGIA
Signals Routed to the Positive
Input of the NI-PGIA (V
in+
Signals Routed to the Negative
)
Input of the NI-PGIA (V
AI <16..79>AI SENSE 2
AI <16..23>AI <24..31>
AI <32..39>, AI <48..55>,
AI <64..71>
AI <40..47>, AI <56..63>,
AI <72..79>
+
Measured
Voltage
–
in–
)
Notice that some M Series devices do not support the AI <16..79> signals.
For differential measurements, AI 0 and AI 8 are the positive and negative
inputs of differential analog input channel 0. For a complete list of signal
pairs that form differential input channels, refer to the I/O Connector Signal
Descriptions section of Chapter 3, Connector and LED Information.
Caution The maximum input voltages rating of AI signals with respect to ground (and for
differential signals with respect to each other) are listed in the specifications document for
your device. Exceeding the maximum input voltage of AI signals distorts the measurement
results. Exceeding the maximum input voltage rating also can damage the device and the
computer. NI is not liable for any damage resulting from such signal connections.
M Series User Manual4-6ni.com
Page 51
AI ground-reference setting is sometimes referred to as AI terminal
configuration.
Configuring AI Ground-Reference Settings in Software
You can program channels on an M Series device to acquire with different
ground references.
Chapter 4Analog Input
To enable multimode scanning in LabVIEW, use
Virtual Channel.vi
each channel or group of channels configured in a different input mode. In
Figure 4-3, channel 0 is configured in differential mode, and channel 1 is
configured in RSE mode.
Figure 4-3. Enabling Multimode Scanning in LabVIEW
To configure the input mode of your voltage measurement using the DAQ
Assistant, use the Terminal Configuration drop-down list. Refer to the DAQ Assistant Help for more information about the DAQ Assistant.
To configure the input mode of your voltage measurement using the
NI-DAQmx C API, set the terminalConfig property. Refer to the
NI-DAQmx C Reference Help for more information.
of the NI-DAQmx API. You must use a new VI for
Multichannel Scanning Considerations
NI-DAQmx Create
M Series devices can scan multiple channels at high rates and digitize the
signals accurately. However, you should consider several issues when
designing your measurement system to ensure the high accuracy of your
measurements.
In multichannel scanning applications, accuracy is affected by settling
time. When your M Series device switches from one AI channel to another
AI channel, the device configures the NI-PGIA with the input range of the
new channel. The NI-PGIA then amplifies the input signal with the gain for
the new input range. Settling time refers to the time it takes the NI-PGIA to
amplify the input signal to the desired accuracy before it is sampled by the
ADC. The specifications document for your DAQ device lists its settling
time.
M Series devices are designed to have fast settling times. However, several
factors can increase the settling time which decreases the accuracy of your
measurements. To ensure fast settling times, you should do the following
(in order of importance):
•Use Low Impedance Sources
•Use Short High-Quality Cabling
•Carefully Choose the Channel Scanning Order
•Avoid Scanning Faster Than Necessary
Use Low Impedance Sources
To ensure fast settling times, your signal sources should have an impedance
of <1 kΩ. Large source impedances increase the settling time of the
NI-PGIA, and so decrease the accuracy at fast scanning rates.
Settling times increase when scanning high-impedance signals due to a
phenomenon called charge injection. Multiplexers contain switches,
usually made of switched capacitors. When one of the channels, for
example channel 0, is selected in a multiplexer, those capacitors
accumulate charge. When the next channel, for example channel 1, is
selected, the accumulated charge leaks backward through channel 1. If the
output impedance of the source connected to channel 1 is high enough, the
resulting reading of channel 1 can be partially affected by the voltage on
channel 0. This effect is referred to as ghosting.
If your source impedance is high, you can decrease the scan rate to allow
the NI-PGIA more time to settle. Another option is to use a voltage follower
circuit external to your DAQ device to decrease the impedance seen by the
DAQ device. Refer to the KnowledgeBase document, How Do I Create a Buffer to Decrease the Source Impedance of My Analog Input Signal?,
by going to
ni.com/info and entering the info code rdbbis.
Use Short High-Quality Cabling
Using short high-quality cables can minimize several effects that degrade
accuracy including crosstalk, transmission line effects, and noise. The
capacitance of the cable also can increase the settling time.
National Instruments recommends using individually shielded,
twisted-pair wires that are 2 m or less to connect AI signals to the device.
Refer to the Connecting Analog Input Signals section for more information.
M Series User Manual4-8ni.com
Page 53
Carefully Choose the Channel Scanning Order
Avoid Switching from a Large to a Small Input Range
Switching from a channel with a large input range to a channel with a small
input range can greatly increase the settling time.
Suppose a 4 V signal is connected to channel 0 and a 1 mV signal is
connected to channel 1. The input range for channel 0 is –10 V to 10 V and
the input range of channel 1 is –200 mV to 200 mV.
When the multiplexer switches from channel 0 to channel 1, the input to the
NI-PGIA switches from 4 V to 1 mV. The approximately 4 V step from 4 V
to 1 mV is 1,000% of the new full-scale range. For a 16-bit device to settle
within 0.0015% (15 ppm or 1 LSB) of the ±200 mV full-scale range on
channel 1, the input circuitry must settle to within 0.000031% (0.31 ppm or
1/50 LSB) of the ±10 V range. Some devices can take many microseconds
for the circuitry to settle this much.
To avoid this effect, you should arrange your channel scanning order so that
transitions from large to small input ranges are infrequent.
In general, you do not need this extra settling time when the NI-PGIA is
switching from a small input range to a larger input range.
Chapter 4Analog Input
Insert Grounded Channel between Signal Channels
Another technique to improve settling time is to connect an input channel
to ground. Then insert this channel in the scan list between two of your
signal channels. The input range of the grounded channel should match the
input range of the signal after the grounded channel in the scan list.
Consider again the example above where a 4 V signal is connected to
channel 0 and a 1 mV signal is connected to channel 1. Suppose the input
range for channel 0 is –10 V to 10 V and the input range of channel 1 is
–200mV to 200mV.
You can connect channel 2 to AI GND (or you can use the internal ground
signal; refer to Internal Channels in the NI-DAQmx Help). Set the input
range of channel 2 to –200 mV to 200 mV to match channel 1. Then scan
channels in the order: 0, 2, 1.
Inserting a grounded channel between signal channels improves settling
time because the NI-PGIA adjusts to the new input range setting faster
when the input is grounded.
When scanning between channels that have the same input range, the
settling time increases with the voltage step between the channels. If you
know the expected input range of your signals, you can group signals with
similar expected ranges together in your scan list.
For example, suppose all channels in a system use a –5 to 5 V input range.
The signals on channels 0, 2, and 4 vary between 4.3 V and 5 V. The signals
on channels 1, 3, and 5 vary between –4 V and 0 V. Scanning channels in
the order 0, 2, 4, 1, 3, 5 produces more accurate results than scanning
channels in the order 0, 1, 2, 3, 4, 5.
Avoid Scanning Faster Than Necessary
Designing your system to scan at slower speeds gives the NI-PGIA more
time to settle to a more accurate level. Here are two examples to consider.
Example 1
Averaging many AI samples can increase the accuracy of the reading by
decreasing noise effects. In general, the more points you average, the more
accurate the final result. However, you may choose to decrease the number
of points you average and slow down the scanning rate.
Suppose you want to sample 10 channels over a period of 20 ms and
average the results. You could acquire 500 points from each channel at a
scan rate of 250 kS/s. Another method would be to acquire 1,000 points
from each channel at a scan rate of 500 kS/s. Both methods take the same
amount of time. Doubling the number of samples averaged (from 500 to
1,000) decreases the effect of noise by a factor of 1.4 (the square root of 2).
However, doubling the number of samples (in this example) decreases the
time the NI-PGIA has to settle from 4 µs to 2 µs. In some cases, the slower
scan rate system returns more accurate results.
Example 2
If the time relationship between channels is not critical, you can sample
from the same channel multiple times and scan less frequently. For
example, suppose an application requires averaging 100 points from
channel 0 and averaging 100 points from channel 1. You could alternate
reading between channels—that is, read one point from channel 0, then one
point from channel 1, and so on. You also could read all 100 points from
channel 0 then read 100 points from channel 1. The second method
M Series User Manual4-10ni.com
Page 55
switches between channels much less often and is affected much less by
settling time.
Analog Input Data Acquisition Methods
When performing analog input measurements, you either can perform
software-timed or hardware-timed acquisitions. Hardware-timed
acquisitions can be buffered or non-buffered.
Software-Timed Acquisitions
With a software-timed acquisition, software controls the rate of the
acquisition. Software sends a separate command to the hardware to initiate
each ADC conversion. In NI-DAQmx, software-timed acquisitions are
referred to as having on-demand timing. Software-timed acquisitions are
also referred to as immediate or static acquisitions and are typically used
for reading a single sample of data.
Hardware-Timed Acquisitions
With hardware-timed acquisitions, a digital hardware signal
(ai/SampleClock) controls the rate of the acquisition. This signal can be
generated internally on your device or provided externally.
Chapter 4Analog Input
Hardware-timed acquisitions have several advantages over software-timed
acquisitions.
•The time between samples can be much shorter.
•The timing between samples is deterministic.
•Hardware-timed acquisitions can use hardware triggering.
Hardware-timed operations can be buffered or non-buffered. A buffer is a
temporary storage in computer memory for to-be-generated samples.
Buffered
In a buffered acquisition, data is moved from the DAQ device’s onboard
FIFO memory to a PC buffer using DMA or interrupts before it is
transferred to application memory. Buffered acquisitions typically allow
for much faster transfer rates than non-buffered acquisitions because data
is moved in large blocks, rather than one point at a time.
One property of buffered I/O operations is the sample mode. The sample
mode can be either finite or continuous.
Finite sample mode acquisition refers to the acquisition of a specific,
predetermined number of data samples. Once the specified number of
samples has been read in, the acquisition stops. If you use a reference
trigger, you must use finite sample mode.
Continuous acquisition refers to the acquisition of an unspecified number
of samples. Instead of acquiring a set number of data samples and stopping,
a continuous acquisition continues until you stop the operation. Continuous
acquisition is also referred to as double-buffered or circular-buffered acquisition.
If data cannot be transferred across the bus fast enough, the FIFO becomes
full. New acquisitions will overwrite data in the FIFO before it can be
transferred to host memory. The device generates an error in this case. With
continuous operations, if the user program does not read data out of the PC
buffer fast enough to keep up with the data transfer, the buffer could reach
an overflow condition, causing an error to be generated.
Non-Buffered
In non-buffered acquisitions, data is read directly from the FIFO on the
device. Typically, hardware-timed, non-buffered operations are used to
read single samples with known time increments between them.
Analog Input Triggering
Analog input supports three different triggering actions:
•Start trigger
•Reference trigger
•Pause trigger
Refer to the AI Start Trigger Signal, AI Reference Trigger Signal, and
AI Pause Trigger Signal sections for information about these triggers.
An analog or digital trigger can initiate these actions. All M Series devices
support digital triggering, but some do not support analog triggering. To
find your device triggering options, refer to the specifications document for
your device.
M Series User Manual4-12ni.com
Page 57
Connecting Analog Input Signals
Table 4-6 summarizes the recommended input configuration for both types
of signal sources.
Refer to the Analog Input Ground-Reference Settings section for descriptions of the RSE, NRSE, and DIFF modes and
to measured signal.
software considerations.
†
Refer to the Connecting Ground-Referenced Signal Sources section for more information.
M Series User Manual4-14ni.com
Page 59
Chapter 4Analog Input
Connecting Floating Signal Sources
What Are Floating Signal Sources?
A floating signal source is not connected to the building ground system, but
has an isolated ground-reference point. Some examples of floating signal
sources are outputs of transformers, thermocouples, battery-powered
devices, optical isolators, and isolation amplifiers. An instrument or device
that has an isolated output is a floating signal source.
When to Use Differential Connections with Floating Signal Sources
Use DIFF input connections for any channel that meets any of the following
conditions:
•The input signal is low level (less than 1 V).
•The leads connecting the signal to the device are greater than 3 m
(10 ft).
•The input signal requires a separate ground-reference point or return
signal.
•The signal leads travel through noisy environments.
•Two analog input channels, AI+ and AI–, are available for the signal.
DIFF signal connections reduce noise pickup and increase common-mode
noise rejection. DIFF signal connections also allow input signals to float
within the common-mode limits of the NI-PGIA.
Refer to the Using Differential Connections for Floating Signal Sources
section for more information about differential connections.
When to Use Non-Referenced Single-Ended (NRSE) Connections with
Floating Signal Sources
Only use NRSE input connections if the input signal meets the following
conditions.
•The input signal is high-level (greater than 1 V).
•The leads connecting the signal to the device are less than 3 m (10 ft).
DIFF input connections are recommended for greater signal integrity for
any input signal that does not meet the preceding conditions.
In the single-ended modes, more electrostatic and magnetic noise couples
into the signal connections than in DIFF configurations. The coupling is the
result of differences in the signal path. Magnetic coupling is proportional
to the area between the two signal conductors. Electrical coupling is a
function of how much the electric field differs between the two conductors.
With this type of connection, the NI-PGIA rejects both the common-mode
noise in the signal and the ground potential difference between the signal
source and the device ground.
Refer to the Using Non-Referenced Single-Ended (NRSE) Connections for
Floating Signal Sources section for more information about NRSE
connections.
When to Use Referenced Single-Ended (RSE) Connections with Floating
Signal Sources
Only use RSE input connections if the input signal meets the following
conditions.
•The input signal can share a common reference point, AI GND, with
other signals that use RSE.
•The input signal is high-level (greater than 1 V).
•The leads connecting the signal to the device are less than 3 m (10 ft).
DIFF input connections are recommended for greater signal integrity for
any input signal that does not meet the preceding conditions.
In the single-ended modes, more electrostatic and magnetic noise couples
into the signal connections than in DIFF configurations. The coupling is the
result of differences in the signal path. Magnetic coupling is proportional
to the area between the two signal conductors. Electrical coupling is a
function of how much the electric field differs between the two conductors.
With this type of connection, the NI-PGIA rejects both the common-mode
noise in the signal and the ground potential difference between the signal
source and the device ground.
Refer to the Using Referenced Single-Ended (RSE) Connections for
Floating Signal Sources section for more information about RSE
connections.
Using Differential Connections for Floating Signal Sources
It is important to connect the negative lead of a floating source to AI GND
(either directly or through a bias resistor). Otherwise, the source may float
M Series User Manual4-16ni.com
Page 61
Chapter 4Analog Input
out of the maximum working voltage range of the NI-PGIA and the DAQ
device returns erroneous data.
The easiest way to reference the source to AI GND is to connect the
positive side of the signal to AI+ and connect the negative side of the signal
to AI GND as well as to AI– without using resistors. This connection works
well for DC-coupled sources with low source impedance (less than 100 Ω).
AI+
Floating
Signal
Source
Inpedance
<100 Ω
+
V
s
–
AI–
AI SENSE
AI GND
Figure 4-4. Differential Connections for Floating Signal Sources without Bias Resistors
However, for larger source impedances, this connection leaves the DIFF
signal path significantly off balance. Noise that couples electrostatically
onto the positive line does not couple onto the negative line because it is
connected to ground. This noise appears as a DIFF-mode signal instead of
a common-mode signal, and thus appears in your data. In this case, instead
of directly connecting the negative line to AI GND, connect the negative
line to AI GND through a resistor that is about 100 times the equivalent
source impedance. The resistor puts the signal path nearly in balance,
so that about the same amount of noise couples onto both connections,
yielding better rejection of electrostatically coupled noise. This
configuration does not load down the source (other than the very high input
impedance of the NI-PGIA).
Floating
Signal
Source
R is about
100 times
source
impedance
of sensor
+
V
s
–
R
AI+
AI–
AI SENSE
AI GND
Figure 4-5. Differential Connections for Floating Signal Sources
You can fully balance the signal path by connecting another resistor of
the same value between the positive input and AI GND, as shown in
Figure 4-6. This fully balanced configuration offers slightly better noise
rejection, but has the disadvantage of loading the source down with the
series combination (sum) of the two resistors. If, for example, the source
impedance is 2 kΩ and each of the two resistors is 100 kΩ, the resistors
load down the source with 200 kΩ and produce a –1% gain error.
AI+
Bias
Resistors
(see text)
Instrumentation
Amplifier
+
PGIA
AI–
–
V
m
+
Measured
Voltage
–
Input Multiplexers
AI SENSE
AI GND
I/O Connector
M Series Device Configured in DIFF Mode
Figure 4-6. Differential Connections for Floating Signal Sources
with Balanced Bias Resistors
Both inputs of the NI-PGIA require a DC path to ground in order for the
NI-PGIA to work. If the source is AC coupled (capacitively coupled), the
NI-PGIA needs a resistor between the positive input and AI GND. If the
source has low-impedance, choose a resistor that is large enough not to
significantly load the source but small enough not to produce significant
input offset voltage as a result of input bias current (typically 100 kΩ to
M Series User Manual4-18ni.com
Page 63
Chapter 4Analog Input
1MΩ). In this case, connect the negative input directly to AI GND. If the
source has high output impedance, balance the signal path as previously
described using the same value resistor on both the positive and negative
inputs; be aware that there is some gain error from loading down the source,
as shown in Figure 4-7.
AC Coupled
Floating
Signal
Source
AC Coupling
+
V
s
–
AI+
AI–
AI SENSE
AI GND
Figure 4-7. Differential Connections for AC Coupled Floating Sources
with Balanced Bias Resistors
Using Non-Referenced Single-Ended (NRSE) Connections for Floating
Signal Sources
It is important to connect the negative lead of a floating signals source to
AI GND (either directly or through a resistor). Otherwise the source may
float out of the valid input range of the NI-PGIA and the DAQ device
returns erroneous data.
Figure 4-8 shows a floating source connected to the DAQ device in NRSE
mode.
Floating
Signal
Source
+
V
s
–
R
AI
AI SENSE
AI GND
Figure 4-8. NRSE Connections for Floating Signal Sources
All of the bias resistor configurations discussed in the Using Differential
Connections for Floating Signal Sources section apply to the NRSE bias
resistors as well. Replace AI– with AI SENSE in Figures 4-4, 4-5, 4-6,
and 4-7 for configurations with zero to two bias resistors. The noise
rejection of NRSE mode is better than RSE mode because the AI SENSE
connection is made remotely near the source. However, the noise rejection
of NRSE mode is worse than DIFF mode because the AI SENSE
connection is shared with all channels rather than being cabled in a twisted
pair with the AI+ signal.
Using the DAQ Assistant, you can configure the channels for RSE or NRSE
input modes. Refer to the Configuring AI Ground-Reference Settings in
Software section for more information about the DAQ Assistant.
Using Referenced Single-Ended (RSE) Connections for Floating Signal
Sources
Figure 4-9 shows how to connect a floating signal source to the M Series
device configured for RSE mode.
n
>
AI <0..
Programmable Gain
Floating
Signal
Source
+
V
s
–
I/O Connector
Input Multiplexers
AI SENSE
AI GND
Selected Channel in RSE Configuration
Instrumentation
+
PGIA
–
Amplifier
V
m
+
Measured
Voltage
–
Figure 4-9. RSE Connections for Floating Signal Sources
Using the DAQ Assistant, you can configure the channels for RSE or NRSE
input modes. Refer to the Configuring AI Ground-Reference Settings in
Software section for more information about the DAQ Assistant.
M Series User Manual4-20ni.com
Page 65
Chapter 4Analog Input
Connecting Ground-Referenced Signal Sources
What Are Ground-Referenced Signal Sources?
A ground-referenced signal source is a signal source connected to the
building system ground. It is already connected to a common ground point
with respect to the device, assuming that the computer is plugged into the
same power system as the source. Non-isolated outputs of instruments and
devices that plug into the building power system fall into this category.
The difference in ground potential between two instruments connected to
the same building power system is typically between 1 and 100 mV, but the
difference can be much higher if power distribution circuits are improperly
connected. If a grounded signal source is incorrectly measured, this
difference can appear as measurement error. Follow the connection
instructions for grounded signal sources to eliminate this ground potential
difference from the measured signal.
When to Use Differential Connections with Ground-Referenced Signal
Sources
Use DIFF input connections for any channel that meets any of the following
conditions:
•The input signal is low level (less than 1 V).
•The leads connecting the signal to the device are greater than 3 m
(10 ft).
•The input signal requires a separate ground-reference point or return
signal.
•The signal leads travel through noisy environments.
•Two analog input channels, AI+ and AI–, are available.
DIFF signal connections reduce noise pickup and increase common-mode
noise rejection. DIFF signal connections also allow input signals to float
within the common-mode limits of the NI-PGIA.
Refer to the Using Differential Connections for Ground-Referenced Signal
Sources section for more information about differential connections.
When to Use Non-Referenced Single-Ended (NRSE) Connections with
Ground-Referenced Signal Sources
Only use non-referenced single-ended input connections if the input signal
meets the following conditions.
•The input signal is high-level (greater than 1 V).
•The leads connecting the signal to the device are less than 3 m (10 ft).
•The input signal can share a common reference point with other
signals.
DIFF input connections are recommended for greater signal integrity for
any input signal that does not meet the preceding conditions.
In the single-ended modes, more electrostatic and magnetic noise couples
into the signal connections than in DIFF configurations. The coupling is the
result of differences in the signal path. Magnetic coupling is proportional
to the area between the two signal conductors. Electrical coupling is a
function of how much the electric field differs between the two conductors.
With this type of connection, the NI-PGIA rejects both the common-mode
noise in the signal and the ground potential difference between the signal
source and the device ground.
Refer to the Using Non-Referenced Single-Ended (NRSE) Connections for
Ground-Referenced Signal Sources section for more information about
NRSE connections.
When to Use Referenced Single-Ended (RSE) Connections with
Ground-Referenced Signal Sources
Do not use RSE connections with ground-referenced signal sources. Use
NRSE or DIFF connections instead.
As shown in the bottom-rightmost cell of Table 4-6, there can be a potential
difference between AI GND and the ground of the sensor. In RSE mode,
this ground loop causes measurement errors.
M Series User Manual4-22ni.com
Page 67
Chapter 4Analog Input
Using Differential Connections for Ground-Referenced Signal Sources
Figure 4-10 shows how to connect a ground-referenced signal source to the
M Series device configured in DIFF mode.
+
AI
Ground-
Referenced
Signal
Source
Common-
Mode
Noise and
Ground
Potential
I/O Connector
+
V
s
–
AI–
+
V
cm
–
Input Multiplexers
AI SENSE
AI GND
M Series Device Configured in DIFF Mode
Instrumentation
Amplifier
+
PGIA
–
V
m
+
Measured
Voltage
–
Figure 4-10. Differential Connections for Ground-Referenced Signal Sources
With this type of connection, the NI-PGIA rejects both the common-mode
noise in the signal and the ground potential difference between the signal
source and the device ground, shown as V
in the figure.
cm
AI+ and AI– must both remain within ±11 V of AI GND.
Using Non-Referenced Single-Ended (NRSE) Connections for
Ground-Referenced Signal Sources
Figure 4-11 shows how to connect ground-reference signal sources in
NRSE mode.
I/O Connector
Ground-
Referenced
Signal
Source
Common-
Mode
Noise
and Ground
Potential
AI <0..15>
or AI <16..
+
V
s
–
Input Multiplexers
+
V
cm
AI GND
–
M Series Device Configured in NRSE Mode
n
>
AI SENSE
or AI SENSE 2
Instrumentation
Amplifier
+
PGIA
–
V
m
+
Measured
Voltage
–
Figure 4-11. Single-Ended Connections for Ground-Referenced Signal Sources
(NRSE Configuration)
AI+ and AI– must both remain within ±11 V of AI GND.
To measure a single-ended, ground-referenced signal source, you must use
the NRSE ground-reference setting. Connect the signal to one of
AI <0..15> and connect the signal local ground reference to AI SENSE.
You also can connect the signal to one of AI <16..79> and connect the
signal local ground reference to AI SENSE 2. AI SENSE (or AI SENSE 2)
is internally connected to the negative input of the NI-PGIA. Therefore, the
ground point of the signal connects to the negative input of the NI-PGIA.
Any potential difference between the device ground and the signal ground
appears as a common-mode signal at both the positive and negative inputs
of the NI-PGIA, and this difference is rejected by the amplifier. If the input
circuitry of a device were referenced to ground, as it is in the RSE
ground-reference setting, this difference in ground potentials would appear
as an error in the measured voltage.
M Series User Manual4-24ni.com
Page 69
Using the DAQ Assistant, you can configure the channels for RSE or NRSE
input modes. Refer to the Configuring AI Ground-Reference Settings in
Software section for more information about the DAQ Assistant.
Field Wiring Considerations
Environmental noise can seriously affect the measurement accuracy of the
device if you do not take proper care when running signal wires between
signal sources and the device. The following recommendations apply
mainly to AI signal routing to the device, although they also apply to signal
routing in general.
Minimize noise pickup and maximize measurement accuracy by taking the
following precautions.
•Use DIFF AI connections to reject common-mode noise.
•Use individually shielded, twisted-pair wires to connect AI signals to
the device. With this type of wire, the signals attached to the positive
and negative input channels are twisted together and then covered with
a shield. You then connect this shield only at one point to the signal
source ground. This kind of connection is required for signals traveling
through areas with large magnetic fields or high electromagnetic
interference.
Chapter 4Analog Input
Refer to the NI Developer Zone document, Field Wiring and Noise
Considerations for Analog Signals, for more information. To access this
document, go to
ni.com/info and enter the info code rdfwn3.
Analog Input Timing Signals
In order to provide all of the timing functionality described throughout this
section, M Series devices have a flexible timing engine. Figure 4-12
summarizes all of the timing options provided by the analog input timing
engine. Also refer to the Clock Routing section of Chapter 9, Digital
M Series devices use ai/SampleClock and ai/ConvertClock to perform
interval sampling. As Figure 4-13 shows, ai/SampleClock controls the
sample period, which is determined by the following equation:
1/Sample Period = Sample Rate
Channel 0
Channel 1
Convert Period
Sample Period
Figure 4-13. Interval Sampling
ai/ConvertClock controls the Convert Period, which is determined by the
following equation:
1/Convert Period = Convert Rate
M Series User Manual4-26ni.com
Page 71
Chapter 4Analog Input
Typically, this rate is the sampling rate for the task multiplied by the
number of channels in the task.
Note The sampling rate is the fastest you can acquire data on the device and still achieve
accurate results. For example, if an M Series device has a sampling rate of 250 kS/s, this
sampling rate is aggregate—one channel at 250 kS/s or two channels at 125 kS/s per
channel illustrates the relationship.
Posttriggered data acquisition allows you to view only data that is acquired
after a trigger event is received. A typical posttriggered DAQ sequence is
shown in Figure 4-14. The sample counter is loaded with the specified
number of posttrigger samples, in this example, five. The value decrements
with each pulse on ai/SampleClock, until the value reaches zero and all
desired samples have been acquired.
ai/StartTrigger
ai/SampleClock
ai/ConvertClock
Sample Counter
Figure 4-14. Posttriggered Data Acquisition Example
13042
Pretriggered data acquisition allows you to view data that is acquired before
the trigger of interest, in addition to data acquired after the trigger.
Figure 4-15 shows a typical pretriggered DAQ sequence. ai/StartTrigger
can be either a hardware or software signal. If ai/StartTrigger is set up to be
a software start trigger, an output pulse appears on the ai/StartTrigger line
when the acquisition begins. When the ai/StartTrigger pulse occurs, the
sample counter is loaded with the number of pretriggered samples, in this
example, four. The value decrements with each pulse on ai/SampleClock,
until the value reaches zero. The sample counter is then loaded with the
number of posttriggered samples, in this example, three.
Figure 4-15. Pretriggered Data Acquisition Example
n/a
3
012
10222
If an ai/ReferenceTrigger pulse occurs before the specified number of
pretrigger samples are acquired, the trigger pulse is ignored. Otherwise,
when the ai/ReferenceTrigger pulse occurs, the sample counter value
decrements until the specified number of posttrigger samples have been
acquired.
M Series devices feature the following analog input timing signals.
•AI Sample Clock Signal
•AI Sample Clock Timebase Signal
•AI Convert Clock Signal
•AI Convert Clock Timebase Signal
•AI Hold Complete Event Signal
•AI Start Trigger Signal
•AI Reference Trigger Signal
•AI Pause Trigger Signal
AI Sample Clock Signal
Use the AI Sample Clock (ai/SampleClock) signal to initiate a set of
measurements. Your M Series device samples the AI signals of every
channel in the task once for every ai/SampleClock. A measurement
acquisition consists of one or more samples.
You can specify an internal or external source for ai/SampleClock. You also
can specify whether the measurement sample begins on the rising edge or
falling edge of ai/SampleClock.
M Series User Manual4-28ni.com
Page 73
Chapter 4Analog Input
Using an Internal Source
One of the following internal signals can drive ai/SampleClock.
•Counter n Internal Output
•AI Sample Clock Timebase (divided down)
•A pulse initiated by host software
A programmable internal counter divides down the sample clock timebase.
Several other internal signals can be routed to ai/SampleClock through
RTS I. Refe r to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
Using an External Source
Use one of the following external signals as the source of ai/SampleClock:
•PFI <0..15>
•RTSI <0..7>
•PXI_STAR
•Analog Comparison Event (an analog trigger)
Routing AI Sample Clock Signal to an Output
Term inal
You can route ai/SampleClock out to any PFI <0..15> or RTSI <0..7>
terminal. This pulse is always active high.
You can specify the output to have one of two behaviors. With the pulse
behavior, your DAQ device briefly pulses the PFI terminal once for every
occurrence of ai/SampleClock.
With level behavior, your DAQ device drives the PFI terminal high during
the entire sample.
All PFI terminals are configured as inputs by default.
Other Timing Requirements
Your DAQ device only acquires data during an acquisition. The device
ignores ai/SampleClock when a measurement acquisition is not in progress.
During a measurement acquisition, you can cause your DAQ device to
ignore ai/SampleClock using the ai/PauseTrigger signal.
A counter on your device internally generates ai/SampleClock unless you
select some external source. ai/StartTrigger starts this counter and either
software or hardware can stop it once a finite acquisition completes. When
using an internally generated ai/SampleClock, you also can specify a
configurable delay from ai/StartTrigger to the first ai/SampleClock pulse.
By default, this delay is set to two ticks of the ai/SampleClockTimebase
signal. When using an externally generated ai/SampleClock, you must
ensure the clock signal is consistent with respect to the timing requirements
of ai/ConvertClock. Failure to do so may result in ai/SampleClock pulses
that are masked off and acquisitions with erratic sampling intervals. Refer
to AI Convert Clock Signal for more information about the timing
requirements between ai/ConvertClock and ai/SampleClock.
Figure 4-16 shows the relationship of ai/SampleClock to ai/StartTrigger.
ai/SampleClockTimebase
ai/StartTrigger
ai/SampleClock
Delay
From
Start
Trigger
Figure 4-16. ai/SampleClock and ai/StartTrigger
AI Sample Clock Timebase Signal
You can route any of the following signals to be the AI Sample Clock
Timebase (ai/SampleClockTimebase) signal:
•20 MHz Timebase
•100 kHz Timebase
•PXI_CLK10
•RTSI <0..7>
•PFI <0..15>
•PXI_STAR
•Analog Comparison Event (an analog trigger)
M Series User Manual4-30ni.com
Page 75
ai/SampleClockTimebase is not available as an output on the I/O connector.
ai/SampleClockTimebase is divided down to provide one of the possible
sources for ai/SampleClock. You can configure the polarity selection for
ai/SampleClockTimebase as either rising or falling edge.
AI Convert Clock Signal
Use the AI Convert Clock (ai/ConvertClock) signal to initiate a single A/D
conversion on a single channel. A sample (controlled by the AI Sample
Clock) consists of one or more conversions.
You can specify either an internal or external signal as the source of
ai/ConvertClock. You also can specify whether the measurement sample
begins on the rising edge or falling edge of ai/ConvertClock.
With NI-DAQmx 7.4 and later, the driver chooses the fastest conversion
rate possible based on the speed of the A/D converter and adds 10 µs of
padding between each channel to allow for adequate settling time. This
scheme enables the channels to approximate simultaneous sampling and
still allow for adequate settling time. If the AI Sample Clock rate is too fast
to allow for this 10 µs of padding, NI-DAQmx chooses the conversion rate
so that the AI Convert Clock pulses are evenly spaced throughout the
sample.
Chapter 4Analog Input
With NI-DAQmx 7.3, the driver chooses a conversion rate so the AI
Convert Clock pulses are evenly spaced throughout the sample. This allows
for the maximum settling time between conversions. To approximate
simultaneous sampling, manually increase the conversion rate.
To explicitly specify the conversion rate, use AI Convert Clock Rate DAQmx Timing property node or function.
Caution Setting the conversion rate higher than the maximum rate specified for your
One of the following internal signals can drive ai/ConvertClock:
•AI Convert Clock Timebase (divided down)
•Counter n Internal Output
A programmable internal counter divides down the AI Convert Clock
Timebase to generate ai/ConvertClock. The counter is started by
ai/SampleClock and continues to count down to zero, produces an
ai/ConvertClock, reloads itself, and repeats the process until the sample is
finished. It then reloads itself in preparation for the next ai/SampleClock
pulse.
Using an External Source
Use one of the following external signals as the source of ai/ConvertClock:
•PFI <0..15>
•RTSI <0..7>
•PXI_STAR
•Analog Comparison Event (an analog trigger)
Routing AI Convert Clock Signal to an Output
Term inal
You can route ai/ConvertClock (as an active low signal) out to any
PFI <0..15> or RTSI <0..7> terminal.
All PFI terminals are configured as inputs by default.
Using a Delay from Sample Clock to Convert Clock
When using an internally generated ai/ConvertClock, you also can specify
a configurable delay from ai/SampleClock to the first ai/ConvertClock
pulse within the sample. By default, this delay is three ticks of
ai/ConvertClockTimebase.
M Series User Manual4-32ni.com
Page 77
ai/ConvertClockTimebase
ai/SampleClock
ai/ConvertClock
Chapter 4Analog Input
Figure 4-17 shows the relationship of ai/SampleClock to ai/ConvertClock.
Delay
From
Sample
Clock
Convert
Perio d
Figure 4-17. ai/SampleClock and ai/ConvertClock
Other Timing Requirements
The sample and conversion level timing of M Series devices work such that
clock signals are gated off unless the proper timing requirements are met.
For example, the device ignores both ai/SampleClock and ai/ConvertClock
until it receives a valid ai/StartTrigger signal. Once the device recognizes
an ai/SampleClock pulse, it ignores subsequent ai/SampleClock pulses
until it receives the correct number of ai/ConvertClock pulses.
Similarly, the device ignores all ai/ConvertClock pulses until it recognizes
an ai/SampleClock pulse. Once the device receives the correct number of
ai/ConvertClock pulses, it ignores subsequent ai/ConvertClock pulses until
it receives another ai/SampleClock. Figures 4-18, 4-19, 4-20, and 4-21
show timing sequences for a four-channel acquisition (using AI channels 0,
1, 2, and 3) and demonstrate proper and improper sequencing of
ai/SampleClock and ai/ConvertClock.
• Improperly Matched Sample Clock and Convert Clock
• Leads to Aperiodic Sampling
1230
Figure 4-20. ai/SampleClock and ai/ConvertClock Improperly Matched
0
M Series User Manual4-34ni.com
Page 79
ai/SampleClock
ai/ConvertClock
Chapter 4Analog Input
Channel Measured1 2 30
Sample #1Sample #2Sample #3
• Properly Matched Sample Clock and Convert Clock
Figure 4-21. ai/SampleClock and ai/ConvertClock Properly Matched
12301230
It is also possible to use a single external signal to drive both
ai/SampleClock and ai/ConvertClock at the same time. In this mode, each
tick of the external clock will cause a conversion on the ADC. Figure 4-22
shows this timing relationship.
ai/SampleClock
ai/ConvertClock
Channel Measured
• One External Signal Driving Both Clocks
Figure 4-22. Single External Signal Driving ai/SampleClock and ai/ConvertClock
1230
Sample #1 Sample #2 Sample #3
Simultaneously
12301…0
AI Convert Clock Timebase Signal
The AI Convert Clock Timebase (ai/ConvertClockTimebase) signal is
divided down to provide on of the possible sources for ai/ConvertClock.
Use one of the following signals as the source of
ai/ConvertClockTimebase:
•ai/SampleClockTimebase
•20 MHz Timebase
ai/ConvertClockTimebase is not available as an output on the I/O
connector.
The AI Hold Complete Event (ai/HoldCompleteEvent) signal
generates a pulse after each A/D conversion begins. You can route
ai/HoldCompleteEvent out to any PFI <0..15> or RTSI <0..7> terminal.
The polarity of ai/HoldCompleteEvent is software-selectable, but is
typically configured so that a low-to-high leading edge can clock external
AI multiplexers indicating when the input signal has been sampled and can
be removed.
AI Start Trigger Signal
Use the AI Start Trigger (ai/StartTrigger) signal to begin a measurement
acquisition. A measurement acquisition consists of one or more samples.
If you do not use triggers, begin a measurement with a software command.
Once the acquisition begins, configure the acquisition to stop:
•When a certain number of points are sampled (in finite mode)
•After a hardware reference trigger (in finite mode)
•With a software command (in continuous mode)
An acquisition that uses a start trigger (but not a reference trigger) is
sometimes referred to as a posttriggered acquisition.
Using a Digital Source
To use ai/StartTrigger with a digital source, specify a source and an edge.
The source can be any of the following signals:
•PFI <0..15>
•RTSI <0..7>
•Counter n Internal Output
•PXI_STAR
The source also can be one of several other internal signals on your DAQ
device. Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
You also can specify whether the measurement acquisition begins on the
rising edge or falling edge of ai/StartTrigger.
M Series User Manual4-36ni.com
Page 81
Using an Analog Source
When you use an analog trigger source, the acquisition begins on the first
rising edge of the Analog Comparison Event signal.
Routing AI Start Trigger to an Output Terminal
You can route ai/StartTrigger out to any PFI <0..15> or RTSI <0..7>
terminal.
The output is an active high pulse.
All PFI terminals are configured as inputs by default.
The device also uses ai/StartTrigger to initiate pretriggered DAQ
operations. In most pretriggered applications, a software trigger generates
ai/StartTrigger. Refer to the AI Reference Trigger Signal section for a
complete description of the use of ai/StartTrigger and ai/ReferenceTrigger
in a pretriggered DAQ operation.
AI Reference Trigger Signal
Use a reference trigger (ai/ReferenceTrigger) signal to stop a measurement
acquisition. To use a reference trigger, specify a buffer of finite size and a
number of pretrigger samples (samples that occur before the reference
trigger). The number of posttrigger samples (samples that occur after the
reference trigger) desired is the buffer size minus the number of pretrigger
samples.
Chapter 4Analog Input
Once the acquisition begins, the DAQ device writes samples to the buffer.
After the DAQ device captures the specified number of pretrigger samples,
the DAQ device begins to look for the reference trigger condition. If the
reference trigger condition occurs before the DAQ device captures the
specified number of pretrigger samples, the DAQ device ignores the
condition.
If the buffer becomes full, the DAQ device continuously discards the oldest
samples in the buffer to make space for the next sample. This data can be
accessed (with some limitations) before the DAQ device discards it. Refer
to the KnowledgeBase document, Can a Pretriggered Acquisition be Continuous?, for more information. To access this KnowledgeBase, go to
When the reference trigger occurs, the DAQ device continues to write
samples to the buffer until the buffer contains the number of posttrigger
samples desired. Figure 4-23 shows the final buffer.
Reference Trigger
Pretrigger Samples
Complete Buffer
Figure 4-23. Reference Trigger Final Buffer
Posttrigger Samples
Using a Digital Source
To use ai/ReferenceTrigger with a digital source, specify a source and an
edge. The source can be any of the following signals:
•PFI <0..15>
•RTSI <0..7>
•PXI_STAR
The source also can be one of several internal signals on your DAQ device.
Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
You also can specify whether the measurement acquisition stops on the
rising edge or falling edge of ai/ReferenceTrigger.
Using an Analog Source
When you use an analog trigger source, the acquisition stops on the first
rising edge of the Analog Comparison Event signal.
Routing AI Reference Trigger Signal to an Output
Term inal
You can route ai/ReferenceTrigger out to any PFI <0..15> or RTSI <0..7>
terminal.
All PFI terminals are configured as inputs by default.
M Series User Manual4-38ni.com
Page 83
AI Pause Trigger Signal
You can use the AI Pause Trigger (ai/PauseTrigger) signal to pause and
resume a measurement acquisition. The internal sample clock pauses while
the external trigger signal is active and resumes when the signal is inactive.
You can program the active level of the pause trigger to be high or low.
Using a Digital Source
To use ai/SampleClock, specify a source and a polarity. The source can be
any of the following signals:
•PFI <0..15>
•RTSI <0..7>
•PXI_STAR
The source also can be one of several other internal signals on your DAQ
device. Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
Using an Analog Source
When you use an analog trigger source, the internal sample clock pauses
when the Analog Comparison Event signal is low and resumes when the
signal goes high (or vice versa).
Chapter 4Analog Input
Routing AI Pause Trigger Signal to an Output
Term inal
You can route ai/PauseTrigger out to RTSI <0..7>.
Note Pause triggers are only sensitive to the level of the source, not the edge.
You can use the M Series device in the following analog input applications.
•Single-point analog input
•Finite analog input
•Continuous analog input
You can perform these applications through DMA, interrupt, or
programmed I/O data transfer mechanisms. Some of the applications also
use start, reference, and pause triggers.
Note For more information about programming analog input applications and triggers in
software, refer to the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later.
M Series User Manual4-40ni.com
Page 85
Analog Output
Many M Series devices have analog output functionality. M Series devices
that support analog output have either two or four AO channels that are
controlled by a single clock and are capable of waveform generation. Refer
to Appendix A, Device-Specific Information, for information about the
capabilities of your device.
Figure 5-1 shows the analog output circuitry of M Series devices.
5
AO 0
AO 1
AO 2
AO 3
DAC0
DAC1
AO FIFO
DAC2
DAC3
Figure 5-1. M Series Analog Output Circuitry
The main blocks featured in the M Series analog output circuitry are as
follows:
•DACs—Digital-to-analog converters (DACs) convert digital codes to
analog voltages.
•AO FIFO—The AO FIFO enables analog output waveform
generation. It is a first-in-first-out (FIFO) memory buffer between the
computer and the DACs. It allows you to download the points of a
waveform to your M Series device without host computer interaction.
AO Data
AO Sample Clock
AO Offset Select
AO Reference Select
•AO Sample Clock—The AO Sample Clock signal reads a sample
from the DAC FIFO and generates the AO voltage.
•AO Offset and AO Reference Selection—AO offset and AO
reference selection signals allow you to change the range of the analog
outputs.
AO Offset and AO Reference Selection
AO offset and AO reference selection allow you to set the AO range. The
AO range describes the set of voltages the device can generate. The digital
codes of the DAC are spread evenly across the AO range. So, if the range
is smaller, the AO has better resolution; that is, the voltage output
difference between two consecutive codes is smaller. Therefore, the AO is
more accurate.
The AO range of a device is all of the voltages between:
(AO Offset – AO Reference) and (AO Offset + AO Reference)
The possible settings for AO reference depend on the device model. For
models not described below, refer to the specifications for your device.
(NI 622x Devices) On NI 622x devices, the AO offset is always 0 V
(AO GND). The AO reference is always 10 V. So, for NI 622x devices,
the AO Range = ±10 V.
(NI 625x Devices) On NI 625x devices, the AO offset is always 0 V
(AO GND). The AO reference of each analog output (AO <0..3>) can be
individually set to one of the following:
•±10 V
•±5V
•±APFI<0..1>
You can connect an external signal to APFI <0..1> to provide the AO
reference. The AO reference can be a positive or negative voltage. If AO
reference is a negative voltage, the polarity of the AO output is inverted.
The valid ranges of APFI <0..1> are listed in the device specifications.
You can use one of the AO <0..3> signals to be the AO reference for a
different AO signal. However, you must externally connect this channel to
APFI 0 or APFI 1.
M Series User Manual5-2ni.com
Page 87
Chapter 5Analog Output
(NI 628x Devices) On NI 628x devices, the AO offset of each analog output
can be individually set to one of the following:
•0V (AOGND)
•5V
•APFI<0..1>
•AO <0..3>
You can connect an external signal to APFI <0..1> to provide the AO offset.
You can route the output of one of the AO <0..3> signals to be the AO offset
for a different AO <0..3> signal. For example, AO 0 can be routed to be the
AO offset of AO 1. This route is done on the device; no external
connections are required.
You cannot route an AO channel to be its own offset.
On NI 628x devices, the AO reference of each analog output can be
individually set to one of the following:
•±10 V
•±5V
•±APFI<0..1>
•±AO<0..3>
You can connect an external signal to APFI <0..1> to provide the AO
reference.
You can route the output of one of the AO <0..3> signals to be the AO
reference for a different AO <0..3> signal. For example, AO 0 can be
routed to be the AO reference of AO 1. This route is done on the device;
no external connections are required.
You cannot route an AO channel to be its own reference.
The AO reference can be a positive or negative voltage. If AO reference is
a negative voltage, the polarity of the AO output is inverted.
When you use a DAC to generate a waveform, you may observe glitches on
the output signal. These glitches are normal; when a DAC switches from
one voltage to another, it produces glitches due to released charges. The
largest glitches occur when the most significant bit of the DAC code
changes. You can build a lowpass deglitching filter to remove some of these
glitches, depending on the frequency and nature of the output signal. Visit
ni.com/support for more information about minimizing glitches.
Analog Output Data Generation Methods
When performing an analog output operation, you either can perform
software-timed or hardware-timed generations. Hardware-timed
generations can be non-buffered or buffered.
Software-Timed Generations
With a software-timed generation, software controls the rate at which data
is generated. Software sends a separate command to the hardware to initiate
each DAC conversion. In NI-DAQmx, software-timed generations are
referred to as on-demand timing. Software-timed generations are also
referred to as immediate or static operations. They are typically used for
writing a single value out, such as a constant DC voltage.
Hardware-Timed Generations
With a hardware-timed generation, a digital hardware signal controls the
rate of the generation. This signal can be generated internally on your
device or provided externally.
Hardware-timed generations have several advantages over software-timed
acquisitions:
•The time between samples can be much shorter.
•The timing between samples can be deterministic.
•Hardware-timed acquisitions can use hardware triggering.
Hardware-timed operations can be buffered or non-buffered. A buffer is a
temporary storage in computer memory for to-be-generated samples.
M Series User Manual5-4ni.com
Page 89
Chapter 5Analog Output
Non-Buffered
In non-buffered acquisitions, data is written directly to the DACs on the
device. Typically, hardware-timed, non-buffered operations are used to
write single samples with good latency and known time increments
between them.
Buffered
In a buffered acquisition, data is moved from a PC buffer to the DAQ
device’s onboard FIFO using DMA or interrupts for NI
PCI/PCIe/PXI/PXIe devices or USB Signal Streams for USB devices
before it is written to the DACs one sample at a time. Buffered acquisitions
typically allow for much faster transfer rates than non-buffered acquisitions
because data is moved in large blocks, rather than one point at a time.
One property of buffered I/O operations is the sample mode. The sample
mode can be either finite or continuous.
Finite sample mode generation refers to the generation of a specific,
predetermined number of data samples. Once the specified number of
samples has been written out, the generation stops.
Continuous generation refers to the generation of an unspecified number of
samples. Instead of generating a set number of data samples and stopping,
a continuous generation continues until you stop the operation. There are
several different methods of continuous generation that control what data is
written. These methods are regeneration, FIFO regeneration and
non-regeneration modes.
Regeneration is the repetition of the data that is already in the buffer.
Standard regeneration is when data from the PC buffer is continually
downloaded to the FIFO to be written out. New data can be written to the
PC buffer at any time without disrupting the output.
With FIFO regeneration, the entire buffer is downloaded to the FIFO and
regenerated from there. Once the data is downloaded, new data cannot be
written to the FIFO. To use FIFO regeneration, the entire buffer must fit
within the FIFO size. The advantage of using FIFO regeneration is that it
does not require communication with the main host memory once the
operation is started, thereby preventing any problems that may occur due to
excessive bus traffic.
With non-regeneration, old data will not be repeated. New data must be
continually written to the buffer. If the program does not write new data to
the buffer at a fast enough rate to keep up with the generation, the buffer
will underflow and cause an error.
Analog Output Triggering
Analog output supports two different triggering actions:
•Start trigger
•Pause trigger
An analog or digital trigger can initiate these actions. All M Series devices
support digital triggering, but some do not support analog triggering. To
find your device’s triggering options, refer to the specifications document
for your device. Refer to the AO Start Trigger Signal and AO Pause Trigger
Signal sections for more information about these triggering actions.
Connecting Analog Output Signals
AO <0..3> are the voltage output signals for AO channels 0, 1, 2, and 3.
AO GND is the ground reference for AO <0..3>.
Figure 5-2 shows how to make AO connections to the device.
Analog Output Channels
+
Load
Load
Connector 0 (AI 0–15)
V OUT
V OUT
–
–
+
AO 0
AO GND
AO 1
Channel 0
Channel 1
M Series Device
Load
Load
Connector 1 (AI 16–31)
V OUT
V OUT
Figure 5-2. Analog Output Connections
M Series User Manual5-6ni.com
Analog Output Channels
AO 2
+
–
AO GND
–
+
AO 3
M Series Device
Channel 2
Channel 3
Page 91
Analog Output Timing Signals
Figure 5-3 summarizes all of the timing options provided by the analog
output timing engine.
PFI, RTSI
PXI_STAR
Analog Comparison
Event
20 MHz Timebase
100 kHz Timebase
PXI_CLK10
ao/SampleClock
Timebase
Analog Comparison Event
Figure 5-3. Analog Output Timing Options
PXI_STAR
Ctr
n
Internal Output
Programmable
Clock
Divider
Chapter 5Analog Output
PFI, RTSI
ao/SampleClock
M Series devices feature the following AO (waveform generation) timing
signals.
•AO Start Trigger Signal
•AO Pause Trigger Signal
•AO Sample Clock Signal
•AO Sample Clock Timebase Signal
AO Start Trigger Signal
Use the AO Start Trigger (ao/StartTrigger) signal to initiate a waveform
generation. If you do not use triggers, you can begin a generation with a
software command.
Using a Digital Source
To use ao/StartTrigger, specify a source and an edge. The source can be
one of the following signals:
The source also can be one of several internal signals on your DAQ device.
Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
You also can specify whether the waveform generation begins on the rising
edge or falling edge of ao/StartTrigger.
Using an Analog Source
When you use an analog trigger source, the waveform generation begins on
the first rising edge of the Analog Comparison Event signal. Refer to the
Triggering with an Analog Source section of Chapter 11, Triggering, for
more information.
Routing AO Start Trigger Signal to an Output
Term inal
You can route ao/StartTrigger out to any PFI <0..15> or RTSI <0..7>
terminal.
The output is an active high pulse.
PFI terminals are configured as inputs by default.
AO Pause Trigger Signal
Use the AO Pause trigger signal (ao/PauseTrigger) to mask off samples in
a DAQ sequence. That is, when ao/PauseTrigger is active, no samples
occur.
ao/PauseTrigger does not stop a sample that is in progress. The pause does
not take effect until the beginning of the next sample.
When you generate analog output signals, the generation pauses as soon as
the pause trigger is asserted. If the source of your sample clock is the
onboard clock, the generation resumes as soon as the pause trigger is
deasserted, as shown in Figure 5-4.
M Series User Manual5-8ni.com
Page 93
Chapter 5Analog Output
Pause Trigger
Sample Clock
Figure 5-4. ao/PauseTrigger with the Onboard Clock Source
If you are using any signal other than the onboard clock as the source of
your sample clock, the generation resumes as soon as the pause trigger is
deasserted and another edge of the sample clock is received, as shown in
Figure 5-5.
Pause Trigger
Sample Clock
Figure 5-5. ao/PauseTrigger with Other Signal Source
Using a Digital Source
To use ao/PauseTrigger, specify a source and a polarity. The source can be
one of the following signals:
•PFI <0..15>
•RTSI<0..7>
•PXI_STAR
The source also can be one of several other internal signals on your DAQ
device. Refer to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
You also can specify whether the samples are paused when ao/PauseTrigger
is at a logic high or low level.
When you use an analog trigger source, the samples are paused when the
Analog Comparison Event signal is at a high level. Refer to the Triggering
with an Analog Source section of Chapter 11, Triggering, for more
information.
Routing AO Pause Trigger Signal to an Output
Term inal
You can route ao/PauseTrigger out to RTSI <0..7>.
AO Sample Clock Signal
Use the AO Sample Clock (ao/SampleClock) signal to initiate AO samples.
Each sample updates the outputs of all of the DACs. You can specify an
internal or external source for ao/SampleClock. You also can specify
whether the DAC update begins on the rising edge or falling edge of
ao/SampleClock.
Using an Internal Source
One of the following internal signals can drive ao/SampleClock.
•AO Sample Clock Timebase (divided down)
•Counter n Internal Output
A programmable internal counter divides down the AO Sample Clock
Timebase signal.
Using an External Source
Use one of the following external signals as the source of ao/SampleClock:
•PFI <0..15>
•RTSI<0..7>
•PXI_STAR
•Analog Comparison Event (an analog trigger)
Routing AO Sample Clock Signal to an Output
Term inal
You can route ao/SampleClock (as an active low signal) out to any
PFI <0..15> or RTSI <0..7> terminal.
M Series User Manual5-10ni.com
Page 95
Chapter 5Analog Output
Other Timing Requirements
A counter on your device internally generates ao/SampleClock unless you
select some external source. ao/StartTrigger starts the counter and either the
software or hardware can stop it once a finite generation completes. When
using an internally generated ao/SampleClock, you also can specify a
configurable delay from ao/StartTrigger to the first ao/SampleClock pulse.
By default, this delay is two ticks of ao/SampleClockTimebase.
Figure 5-6 shows the relationship of ao/SampleClock to ao/StartTrigger.
ao/SampleClockTimebase
ao/StartTrigger
ao/SampleClock
Delay
From
Start
Trigger
Figure 5-6. ao/SampleClock and ao/StartTrigger
AO Sample Clock Timebase Signal
The AO Sample Clock Timebase (ao/SampleClockTimebase) signal is
divided down to provide a source for ao/SampleClock.
You can route any of the following signals to be the AO Sample Clock
Timebase (ao/SampleClockTimebase) signal:
•20MHzTimebase
•100 kHz Timebase
•PXI_CLK10
•PFI <0..15>
•RTSI<0..7>
•PXI_STAR
•Analog Comparison Event (an analog trigger)
ao/SampleClockTimebase is not available as an output on the I/O
connector.
You might use ao/SampleClockTimebase if you want to use an external
sample clock signal, but need to divide the signal down. If you want to use
an external sample clock signal, but do not need to divide the signal, then
you should use ao/SampleClock rather than ao/SampleClockTimebase.
Getting Started with AO Applications in Software
You can use an M Series device in the following analog output applications.
•Single-point (on-demand) generation
•Finite generation
•Continuous generation
•Waveform generation
You can perform these generations through programmed I/O, interrupt, or
DMA data transfer mechanisms. Some of the applications also use start
triggers and pause triggers.
Note For more information about programming analog output applications and triggers in
software, refer to the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later.
M Series User Manual5-12ni.com
Page 97
Digital I/O
6
M Series devices contain up to 32 lines of bidirectional DIO signals on
Port 0. In addition, M Series devices have up to 16 PFI signals that can
function as static DIO signals.
M Series devices support the following DIO features on Port 0:
•Up to 32 lines of DIO
•Direction and function of each terminal individually controllable
•Static digital input and output
•High-speed digital waveform generation
•High-speed digital waveform acquisition
•DI change detection trigger/interrupt
Figure 6-1 shows the circuitry of one DIO line. Each DIO line is similar.
The following sections provide information about the various parts of the
DIO circuit.
The DIO terminals are named P0.<0..31> on the M Series device I/O
connector.
The voltage input and output levels and the current drive levels of the DIO
lines are listed in the specifications of your device.
Each of the M Series DIO lines can be used as a static DI or DO line. You
can use static DIO lines to monitor or control digital signals. Each DIO can
be individually configured as a digital input (DI) or digital output (DO).
All samples of static DI lines and updates of DO lines are software-timed.
P0.6 and P0.7 on 68-pin M Series devices also can control the up/down
input of general-purpose counters 0 and 1, respectively. However, it is
recommended that you use PFI signals to control the up/down input of the
counters. The up/down control signals, Counter 0 Up_Down and Counter 1
Up_Down, are input-only and do not affect the operation of the DIO lines.
M Series User Manual6-2ni.com
Page 99
Digital Waveform Triggering
M Series devices do not have an independent DI or DO Start Trigger for
digital waveform acquisition or generation. To trigger a DI or DO
operation, first select a signal to be the source of DI Sample Clock or DO
Sample Clock. Then, generate a trigger that initiates pulses on the source
signal. The method for generating this trigger depends on which signal is
the source of DI Sample Clock or DO Sample Clock.
For example, consider the case where you are using AI Sample Clock as the
source of DI Sample Clock. To initiate pulses on AI Sample Clock (and
therefore on DI Sample Clock), you use AI Start Trigger to trigger the start
of an AI operation. The AI Start Trigger causes the M Series device to
begin generating AI Sample clock pulses, which in turn generates DI
Sample clock pulses, as shown in Figure 6-2.
Chapter 6Digital I/O
(AI Start Trigger)
PFI 1
AI Sample Clock
DI Sample Clock
AI Start Trigger initiates
AI Sample Clock and DI Sample Clock.
Figure 6-2. Digital Waveform Triggering
Similarly, if you are using AO Sample Clock as the source of DI Sample
Clock, then AO Start Trigger initiates both AO and DI operations.
If you are using a Counter output as the source of DI Sample Clock, the
counter’s start trigger, enables the counter which drives DI Sample Clock.
If you are using an external signal (such as PFI x) as the source for DI
Sample Clock or DO Sample Clock, you must trigger that external signal.
Digital Waveform Acquisition
You can acquire digital waveforms on the Port 0 DIO lines. The DI
waveform acquisition FIFO stores the digital samples. M Series devices
have a DMA controller dedicated to moving data from the DI waveform
acquisition FIFO to system memory. The DAQ device samples the DIO
lines on each rising or falling edge of a clock signal, di/SampleClock.
You can configure each DIO line to be an output, a static input, or a digital
waveform acquisition input.
DI Sample Clock Signal
Use the DI Sample Clock (di/SampleClock) signal to sample the
P0.<0..31> terminals and store the result in the DI waveform acquisition
FIFO. M Series devices do not have the ability to divide down a timebase
to produce an internal DI Sample Clock for digital waveform acquisition.
Therefore, you must route an ex ternal signal or one of many inte rnal signals
from another subsystem to be the DI Sample Clock. For example, you can
correlate digital and analog samples in time by sharing your AI Sample
Clock or AO Sample Clock as the source of your DI Sample Clock. To
sample a digital signal independent of an AI, AO, or DO operation, you can
configure a counter to generate the desired DI Sample Clock or use an
external signal as the source of the clock.
If the DAQ device receives a di/SampleClock when the FIFO is full,
it reports an overflow error to the host software.
Using an Internal Source
To use di/SampleClock with an internal source, specify the signal source
and the polarity of the signal. The source can be any of the following
signals:
•AI Sample Clock
•AI Convert Clock
•AO Sample Clock
•Counter n Internal Output
•Frequency Output
•DI Change Detection Output
Several other internal signals can be routed to di/SampleClock through
RTS I. Refe r to Device Routing in MAX in the NI-DAQmx Help or the LabVIEW Help in version 8.0 or later for more information.
Using an External Source
You can route any of the following signals as di/SampleClock:
•PFI <0..15>
•RTSI <0..7>
M Series User Manual6-4ni.com
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.