Data Translation DT9816 Instruction Manual

UM-21336-C
DT9816 User’s Manual
Third Edition March, 2006
Copyright © 2006 by Data Translation, Inc.
All rights reserved.
Information furnished by Data Translation, Inc. is believed to be accurate and reliable; however, no responsibility is assumed by Data Translation, Inc. for its use; nor for any infringements of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent rights of Data Translation, Inc.
Use, duplication, or disclosure by the United States Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer software clause at 48 C.F.R, 252.227-7013, or in subparagraph (c)(2) of the Commercial computer Software ­Registered Rights clause at 48 C.F.R., 52-227-19 as applicable. Data Translation, Inc., 100 Locke Drive, Marlboro, MA 01752
Data Translation® is a registered trademark of Data Translation, Inc. DT-Open Layers DataAcq SDK
TM
Link
, and DTx-EZTM are trademarks of Data
TM
, DataAcq OMNI CDTM, DT-LV
TM
,
Translation, Inc.
Data Translation, Inc. 100 Locke Drive Marlboro, MA 01752-1192 (508) 481-3700 www.datatranslation.com
Fax: (508) 481-8620 E-mail: info@datx.com
All other brand and product names are trademarks or registered trademarks of their respective companies.
Radio and Television Interference
This equipment has been tested and found to comply with CISPR EN55022 Class A, and EN50082-1 (CE) requirements and also 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 will be required to correct the interference at his own expense.
Changes or modifications to this equipment not expressly approved by Data Translation could void your authority to operate the equipment under Part 15 of the FCC Rules.
Note: This product was verified to meet FCC requirements under test conditions that included use of shielded cables and connectors between system components. It is important that you use shielded cables and connectors to reduce the possibility of causing interference to radio, television, and other electronic devices.
Canadian Department of Communications Statement
This digital apparatus does not exceed the Class A limits for radio noise emissions from digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications.
Le présent appareil numérique n’émet pas de bruits radioélectriques dépassant les limites applicables aux appareils numériques de la class A prescrites dans le Règlement sur le brouillage radioélectrique édicté par le Ministère des Communications du Canada.
Table of Contents
About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
How this Manual is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Conventions Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . 11
Related Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Where To Get Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 1: Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Key Hardware Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Simultaneous Analog Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . 14
Counter/Timer Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Clocks and Triggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Getting Started Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Part 1: Getting Started . . . . . . . . . . . . . . . . . . . . 19
Chapter 2: Preparing to Use a Module. . . . . . . . . . . . . . . . . 21
Unpacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Checking the System Requirements . . . . . . . . . . . . . . . . . . . . . . . 23
Installing the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter 3: Setting Up and Installing
the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Attaching Modules to the Computer . . . . . . . . . . . . . . . . . . . . . . 27
Connecting Directly to the USB Ports . . . . . . . . . . . . . . . . . . 28
Connecting to an Expansion Hub. . . . . . . . . . . . . . . . . . . . . . 29
Changing the Name of a Module (Optional) . . . . . . . . . . . . . . . . 31
5
Contents
Chapter 4: Wiring Signals to the Module. . . . . . . . . . . . . . . 33
Preparing to Wire Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Wiring Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Wiring Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Connecting Single-Ended Analog Input Signals . . . . . . . . . . . . . 37
Connecting Digital I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Connecting Counter/Timer Signals . . . . . . . . . . . . . . . . . . . . . . . 39
Connecting Signals for Event Counting . . . . . . . . . . . . . . . . 39
Connecting Signals for Frequency Measurement . . . . . . . . 41
Connecting Signals for Rate Generation . . . . . . . . . . . . . . . . 42
Chapter 5: Verifying the Operation
of a Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Using the Oscilloscope Function . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using the Chart Recorder Function . . . . . . . . . . . . . . . . . . . . . . . 48
Using the Voltmeter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Using the File Viewer Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Using the Digital Input Function . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using the Digital Output Function . . . . . . . . . . . . . . . . . . . . . . . . 52
Using the Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using the Rate Generator Function . . . . . . . . . . . . . . . . . . . . . . . 54
Part 2: Using Your Module . . . . . . . . . . . . . . . . . 55
Chapter 6: Principles of Operation . . . . . . . . . . . . . . . . . . . 57
Analog Input Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Input Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Analog Input Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Specifying a Single Analog Input Channel . . . . . . . . . 60
Specifying One or More Analog Input Channels . . . . 60
6
Input Ranges and Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Input Sample Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Analog Input Conversion Modes . . . . . . . . . . . . . . . . . . . . . 61
Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . 61
Continuous Scan Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Input Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Data Format and Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Digital I/O Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Digital I/O Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Operation Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Counter/Timer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
C/T Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
C/T Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Gate Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Pulse Duty Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Counter/Timer Operation Modes . . . . . . . . . . . . . . . . . . . . . 69
Event Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Frequency Measurement . . . . . . . . . . . . . . . . . . . . . . . . . 70
Rate Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Contents
Chapter 7: Supported Device Driver Capabilities. . . . . . . . 73
Data Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Buffering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
DMA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Triggered Scan Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Synchronous Digital I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7
Contents
Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Counter/Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Chapter 8: Programming Flowcharts. . . . . . . . . . . . . . . . . . 87
Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Continuous A/D Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Event Counting Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Frequency Measurement Operations . . . . . . . . . . . . . . . . . . . . . . 95
Pulse Output Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Chapter 9: Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . 107
General Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
If Your Module Needs Factory Service . . . . . . . . . . . . . . . . . . . . 112
Appendix A: Specifications . . . . . . . . . . . . . . . . . . . . . . . . 113
Appendix B: Screw Terminal Assignments . . . . . . . . . . . 119
Appendix C: Reading from or Writing to the Digital Registers
121
8
The first part of this manual describes how to install and set up your DT9816 module and software, and verify that your module is working properly.
The second part of this manual describes the features of the DT9816 module and device driver, and how to program these modules using the DT-Open Layers™ software. It also provides troubleshooting information. Unless otherwise specified, all references to the DT9816 module refer to both the DT9816 and DT9816-A model numbers.

Intended Audience

This document is intended for engineers, scientists, technicians, or others responsible for using and/or programming the DT9816 module for analog input, digital I/O, or counter/timer operations in the Microsoft® Windows® 2000 or Windows XP operating system. It is assumed that you have some familiarity with data acquisition principles and that you understand your application.

About this Manual

How this Manual is Organized

This manual is organized as follows:
Chapter 1, “Overview,” describes the major features of the DT9816 module, as well as the supported software and accessories for the module.
Chapter 2, “Preparing to Use a Module,” describes how to unpack the module, check the system requirements, and install the software.
Chapter 3, “Setting Up and Installing the Module,” describes how to install the module and how to configure the device driver.
9
About this Manual
Chapter 4, “Wiring Signals to the Module,” describes how to wire signals to the module.
Chapter 5, “Verifying the Operation of a Module,” describes how to verify the operation of the module with the GO! application.
Chapter 6, “Principles of Operation,” describes all of the features of the DT9816 module and how to use them in your application.
Chapter 7, “Supported Device Driver Capabilities,” lists the supported subsystems and the associated capabilities accessible using the device driver for the DT9816 module.
Chapter 8, “Programming Flowcharts,” describes the processes you must follow to program the subsystems of a DT9816 module using DT-Open Layers-compliant software.
Chapter 9, “Troubleshooting,” provides information that you can use to resolve problems with a DT9816 module, should they occur.
Appendix A, “Specifications,” lists the specifications of the DT9816 module.
10
Appendix B, “Screw Terminal Assignments,” shows the screw terminal assignments of the DT9816 module.
Appendix C, “Reading from or Writing to the Digital Registers,” describes how to access the module’s registers directly.
• An index completes this manual.

Conventions Used in this Manual

The following conventions are used in this manual:
• Notes provide useful information or information that requires special emphasis, cautions provide information to help you avoid losing data or damaging your equipment, and warnings provide information to help you avoid catastrophic damage to yourself or your equipment.
• Items that you select or type are shown in bold.

Related Information

Refer to the following documents for more information on using the DT9816 module:
Benefits of the Universal Serial Bus for Data Acquisition. This white paper describes why USB is an attractive alternative for data acquisition. It is available on the Data Translation web site (www.datatranslation.com).
About this Manual
• DT Measure Foundry Getting Started Manual (UM-19298) and
online help. These documents describe how to use DT Measure Foundry™ to build drag-and-drop test and measurement applications for Data Translation® data acquisition devices without programming.
DataAcq SDK User’s Manual (UM-18326). For programmers who are developing their own application programs using the Microsoft C compiler, this manual describes how to use the DT-Open Layers DataAcq SDK™ to access the capabilities of Data Translation data acquisition devices.
DTx-EZ Getting Started Manual (UM-15428). This manual describes how to use the ActiveX controls provided in DTx-EZ to access the capabilities of Data Translation data acquisition devices in Microsoft Visual Basic® or Visual C++®.
11
About this Manual

Where To Get Help

DT-LV Link Getting Started Manual (UM-15790). This manual describes how to use DT-LV Link™ with the LabVIEW graphical programming language to access the capabilities of Data Translation data acquisition devices.
DAQ Adaptor for MATLAB (UM-22024). This document describes how to use Data Translation’s DAQ Adaptor to provide an interface between the MATLAB Data Acquisition subsystem from The MathWorks and Data Translation’s DT-Open Layers architecture.
• Microsoft Windows 2000 or Windows XP documentation.
• USB web site (http://www.usb.org).
Should you run into problems installing or using a DT9816 module, the Data Translation Technical Support Department is available to provide technical assistance. Refer to Chapter 9 for more information. If you are outside the United States or Canada, call your local distributor, whose number is listed on Data Translation’s web site (www.datatranslation.com).
12
1

Overview

Key Hardware Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Getting Started Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
13
Chapter 1

Key Hardware Features

The DT9816 module is part of the ECONseries of economy, multifunction mini-instruments. Tab le 1 lists the key features of the module.
Table 1: Key Features of the DT9816 Module
Analog
Analog
Module
DT9816 6 SE 16-bit ±10 V
DT9816-A 6 SE 16-bit ±10 V
a. Actual maximum is 153.846 kHz. If you use the olDaSetClockFrequency function to set
150 kHz, the olDaGetClockFrequency function will not return the true value (153.846 kHz) until after you invoke the olDaConfig function.
Inputs
Input
Resolution
I/O
Range
or ± 5 V
or ± 5 V
Analog Input Sample Rate
50 kS/s per channel
150 kS/s per channel
a
Digital
I/O
8 in/ 8 out
8 in/ 8 out
The DT9816 is a low-power device (less than 100 mA draw).

Simultaneous Analog Inputs

The DT9816 module features six independent, 16-bit, successive-approximation A/D converters with track-and-hold circuitry. Each converter uses a common clock and trigger for simultaneous sampling of all six analog input signals at up to 50 kHz per channel (DT9816) or up to 150 kHz per channel (DT9816-A). All channels in the channel-gain list are read simultaneously on a single pulse of the internal clock.
C/T
1
1
14
The DT9816 module provides gains of 1 and 2, for effective full-scale input signal ranges of
±10 V and ±5 V.

Counter/Timer Channel

Overview
The DT9816 module supports one 16-bit counter/timer channel. This counter/timer allows you to perform event counting, frequency measurement, and continuous pulse output (rate generation) operations.

Clocks and Triggers

The DT9816 modules supports an internal trigger and clock or an external trigger and clock.
Use the internal trigger to start an analog input operation based on a software command, or use the external trigger to start an analog input operation based on an external event.
Use the external clock signal to pace an analog input operation at a rate not available with the internal clock or when you want to pace at uneven intervals.

Supported Software

The following software is available for use with the DT9816 module, and is provided on the ECON CD:
1
1
1
1
1
1
Device Driver – The DT9816 Device Driver allows you to use a DT9816 module with any of the supported software packages or utilities. Refer to Chapter 2 for more information on loading the device driver.
GO! application − The GO! application provides a quick way to measure and control data from a DT9816 module right out of the box. The following instrument views make acquiring data and controlling signals easy: oscilloscope, chart recorder, file viewer, digital voltmeter, digital input, digital output, frequency counter,
1
1
1
15
Chapter 1
and rate generator. Refer to Chapter 5 for more information on this application.
DT Measure Foundry – An evaluation version of this software is included or provided via a link on the ECON CD. DT Measure Foundry is drag-and-drop test and measurement application builder designed to give you top performance with ease-of-use development. Order the full development version of this software package to develop your own application using real hardware.
DataAcq SDK – Use the Data Acq SDK if you want to develop your own application software for the DT9816 module using the Microsoft C compiler; the DataAcq SDK complies with the DT-Open Layers standard.
DTx-EZ – Use this optional software package if you want to use ActiveX controls to access the capabilities of the DT9816 module using Microsoft Visual Basic or Visual C++; DTx-EZ complies with the DT-Open Layers
standard.
DAQ Adaptor for MATLAB – Data Translation’s DAQ Adaptor provides an interface between the MATLAB Data Acquisition (DAQ) subsystem from The MathWorks and Data Translation’s DT-Open Layers architecture.
16
DT-LV Link – Use this optional software package if you want to use the LabVIEW graphical programming language to access the capabilities of the DT9816 module.

Getting Started Procedure

The flow diagram shown in Figure 1 illustrates the steps needed to get started using the DT9816 module. This diagram is repeated in each chapter; the shaded area in the diagram shows you where you are in the getting started procedure.
Prepare to Use the Module
(see Chapter 2 starting on page 21)
Set Up and Install the Module
(see Chapter 3 starting on page 25)
Overview
1
1
1
Wire Signals to the Module
(see Chapter 4 starting on page 33)
Verify the Operation of the Module
(see Chapter 5 starting on page 43)
Figure 1: Getting Started Flow Diagram
1
1
1
1
1
1
17
Chapter 1
18

Part 1: Getting Started

2

Preparing to Use a Module

Unpacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Checking the System Requirements . . . . . . . . . . . . . . . . . . . . . . . 23
Installing the Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
21
Chapter 2
Prepare to Use the Module
(this chapter)
Set Up and Install the Module
(see Chapter 3 starting on page 25)
Wire Signals to the Module
(see Chapter 4 starting on page 33)
Verify the Operation of the Module
(see Chapter 5 starting on page 43)

Unpacking

Open the shipping box and verify that the following items are present:
22
• DT9816 module
• ECON CD
•USB cable
If an item is missing or damaged, contact Data Translation. If you are in the United States, call the Customer Service Department at (508) 481-3700. An application engineer will guide you through the appropriate steps for replacing missing or damaged items. If you are located outside the United States, call your local distributor (see Data Translation’s web site (www.datatranslation.com) for contact information).
Once you have unpacked your module, check the system requirements, as described in the next section.
Preparing to Use a Module

Checking the System Requirements

For reliable operation, your DT9816 module requires the following:
• Windows 2000 or Windows XP (Professional Edition) operating system.
For USB Ver. 2.0 support, make sure that you install Service Pack 2 (for Windows XP) or Service Pack 4 (for Windows 2000). In addition, for some systems, you may have to disable standby mode. If you are not sure whether you are using USB Ver. 1.1 or Ver. 2.0, run the Open Layers Control Panel applet, described on
page 27.
• One or more USB ports (Ver. 2.0 or Ver. 1.1). USB Ver. 2.0 is recommended for optimal performance.
•One CD-ROM drive.
Once you have verified that your system meets the system requirements, install the software, as described in the next section.
2
2
2
2
2
2
2
2
2
23
Chapter 2

Installing the Software

To install the device driver, Data Acq SDK, DTx-EZ, and the GO! application, do the following:
1. Insert the ECON CD into your CD-ROM drive. If the software runs automatically (the default condition), continue with step 4.
2. If the software does not run automatically, click Start from the Task Bar, and then click Run. The Run dialog box appears.
3. In the Command Line edit box, enter D:\Setup.Exe.
If your CD-ROM is not in drive D:, enter the letter of the drive where your CD-ROM is located. The welcome screen appears.
4. Click Install Drivers and GO!
5. Click Install now!
The installation wizard appears.
6. Click Next.
The wizard prompts you for the destination location.
24
7. Either change the directory path and/or name using Browse or accept the default directory (C:\Program Files\Data Translation), and then click Next.
8. Click Next to copy the files.
9. Click Finish.
10. If you want to install DT-LV Link, click Install Additional Software, click Install now! under the LabVIEW Link section,
and follow the installation prompts.
11. When you have finished the installation process, click Quit Installer.
Continue with the instructions in Chapter 3 starting on page 25.
3
Setting Up and Installing
the Module
Attaching Modules to the Computer. . . . . . . . . . . . . . . . . . . . . . . 27
Changing the Name of a Module (Optional) . . . . . . . . . . . . . . . . 31
25
Chapter 3
Prepare to Use the Module
(see Chapter 2 starting on page 21)
Set Up and Install the Module
(this chapter)
Wire Signals to the Module
(see Chapter 4 starting on page 33)
Verify the Operation of the Module
(see Chapter 5 starting on page 43)
Note: The DT9816 module is factory-calibrated and requires no further adjustment.
26
Setting Up and Installing the Module

Attaching Modules to the Computer

This section describes how to attach a DT9816 module to the host computer.
Note: Most computers have several USB ports that allow direct connection to USB devices. If your application requires more DT9816 modules than you have USB ports for, you can expand the number of USB devices attached to a single USB port by using expansion hubs. For more information, refer to page 29.
You can unplug a module, and then plug it in again, if you wish, without causing damage. This process is called hot-swapping. Your application may take a few seconds to recognize a module once it is plugged back in.
3
3
3
3
3
3
3
3
3
27
Chapter 3

Connecting Directly to the USB Ports

To connect DT9816 modules directly to the USB ports of your computer, do the following:
1. Attach one end of the USB cable to the USB port on the module.
2. Attach the other end of the USB cable to one of the USB ports on
the host computer, as shown in Figure 2.
The operating system automatically detects the USB module and starts the Found New Hardware wizard.
DT9816 Modules
USB Ports
Host Computer
28
USB Cable
Figure 2: Attaching the Module to the Host Computer
3. Click Next and/or Finish in the wizard. Once the firmware is loaded, the wizard restarts to initiate the firmware to accept commands. Click Next and/or Finish again.
If the power supply and module are attached correctly, the LED turns green.
4. Repeat the steps to attach another DT9816 module to the host computer, if desired.

Connecting to an Expansion Hub

Setting Up and Installing the Module
Expansion hubs are powered by their own external power supply. Theoretically, you can connect up to five expansion hubs to a USB port on the host computer. However, the practical number of DT9816 modules that you can connect to a single USB port depends on the throughput you want to achieve. Each of the hubs supports up to four modules.
To connect multiple DT9816 modules to an expansion hub, do the following:
1. Attach one end of the USB cable to the module and the other end of the USB cable to an expansion hub.
2. Connect the power supply for the expansion hub to an external power supply.
3. Connect the expansion hub to the USB port on the host computer using another USB cable.
The operating system automatically detects the USB module and starts the Found New Hardware wizard.
4. Click Next and/or Finish in the wizard. Once the firmware is loaded, the wizard restarts to initiate the firmware to accept commands. Click Next and/or Finish again.
If the power supply and module are attached correctly, the LED turns green.
3
3
3
3
3
3
5. Repeat these steps until you have attached the number of expansion hubs (up to five) and modules (up to four per hub) that you require. Refer to Figure 3.
The operating system automatically detects the USB devices as they are installed.
3
3
3
29
Chapter 3
Host Computer
DT9816 Module
USB Cables
USB Cable
Power Supply for Hub
DT9816 Module
USB Cables
DT9816 Module
USB Cable
Expansion Hubs
DT9816 Module
Figure 3: Attaching Multiple DT9816 Modules
Using Expansion Hubs
Power Supply for Hub
30
Setting Up and Installing the Module

Changing the Name of a Module (Optional)

To change the name of a DT9816 module, configure the device driver as follows:
1. From the Windows Start menu, select Settings|Control Panel.
2. From the Control Panel, double-click Open Layers Control Panel.
The Data Acquisition Control Panel dialog box appears.
3. If you want to rename the module, click the DT9816 module that you want to rename, and then click Edit Name.
3
3
3
4. Enter a new name for the module, and then click OK. The name is used to identify the module in all subsequent applications.
5. When you are finished configuring the module, click Close.
6. Repeat steps 3 to 5 for the other modules that you want to
configure.
7. Close the Data Acquisition Control Panel dialog box.
Continue with the instructions on wiring in Chapter 4 starting on
page 33.
3
3
3
3
3
3
31
Chapter 3
32
4

Wiring Signals to the Module

Preparing to Wire Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Connecting Single-Ended Analog Input Signals . . . . . . . . . . . . . 37
Connecting Digital I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Connecting Counter/Timer Signals . . . . . . . . . . . . . . . . . . . . . . . 39
33
Chapter 4
Prepare to Use a Module
(see Chapter 2 starting on page 21)
Set Up and Install the Module
(see Chapter 3 starting on page 25)
Wire Signals to the Module
(this chapter)
Verify the Operation of the Module
(see Chapter 5 starting on page 43)
34

Preparing to Wire Signals

CAUTION:
Wiring Signals to the Module
4
To avoid electrostatic sensitivity, unplug your DT9816 module from the computer before wiring signals.
This section provides recommendations and information about wiring signals to a DT9816 module.

Wiring Recommendations

Keep the following recommendations in mind when wiring signals to a DT9816 module:
• Use individually shielded twisted-pair wire (size 16 to 26 AWG) in highly noisy electrical environments.
• Separate power and signal lines by using physically different wiring paths or conduits.
• To avoid noise, do not locate the box and cabling next to sources that produce high electromagnetic fields, such as large electric motors, power lines, solenoids, and electric arcs, unless the signals are enclosed in a mumetal shield.
• Prevent electrostatic discharge to the I/O while the box is operational.
4
4
4
4
4
4
• Connect all unused analog input channels to analog ground.

Wiring Locations

You wire signals to the DT9816 module using the screw terminals on the module. Tabl e 2 lists the screw terminal assignments.
4
4
35
Chapter 4
Table 2: DT9816 Screw Terminal Assignments
Terminal Signal Terminal Signal
20 USB +5 V Out 40 Ext Trigger
19 Ground 39 Ext Clock
18 Counter 0 In 38 Ground
17 Counter 0 Out 37 Digital Output 7
16 Counter 0 Gate 36 Digital Output 6
15 Ground 35 Digital Output 5
14 Reserved 34 Digital Output 4
13 Reserved 33 Digital Output 3
12 Reserved 32 Digital Output 2
11 Reserved 31 Digital Output 1
10 2.5 V Reference 30 Digital Output 0
36
9 Analog Ground 29 Ground
8 Reserved 28 Digital Input 7
7 Reserved 27 Digital Input 6
6 Analog Input CH5 26 Digital Input 5
5 Analog Input CH4 25 Digital Input 4
4 Analog Input CH3 24 Digital Input 3
3 Analog Input CH2 23 Digital Input 2
2 Analog Input CH1 22 Digital Input 1
1 Analog Input CH0 21 Digital Input 0
Wiring Signals to the Module

Connecting Single-Ended Analog Input Signals

The DT9816 supports 6 single-ended analog input channels. Figure 4 shows how to connect single-ended voltage input signals (channels 0 and 1, in this case) to the screw terminals of a DT9816 module.
4
4
Analog Ground
-
source 1
V
-
Vsource 0
Signal Source
Figure 4: Connecting Single-Ended Inputs
+
+
Analog In 1
Analog In 0
9
2
1
DT9816 Module
4
4
4
4
4
4
4
37
Chapter 4

Connecting Digital I/O Signals

Figure 5 shows how to connect digital input signals (lines 0 and 1, in
this case) to the screw terminals of a DT9816 module.
29
22
21
DT9816 Module
Ground
Digital Input 1
Digital Input 0
TTL Inputs
Figure 5: Connecting Digital Inputs
Figure 6 shows how to connect digital output signals (line 0, in this
case) to the screw terminals of a DT9816 module.
38
30
DT9816 Module
Ground
8 Out = LED On
Digital Output 0
500 Ω
+
5 V
-
38
Figure 6: Connecting Digital Outputs
Wiring Signals to the Module

Connecting Counter/Timer Signals

The DT9816 module provides one counter/timer that you can use for the following operations:
• Event counting
• Frequency measurement
• Continuous pulse output (rate generation)
4
4
This section describes how to connect counter/timer signals for these operation modes. Refer to Chapter 6 for more information about using the counter/timers.

Connecting Signals for Event Counting

Figure 7 shows how to connect counter/timer signals to the screw
terminals on the DT9816 module to perform an event counting operation using an external gate.
In this example, the counter counts the number of rising edges that occur on the Counter 0 In signal when the Counter 0 Gate signal is in the active state (as specified by software). Refer to Chapter 6 for more information.
4
4
4
4
4
4
4
39
Chapter 4
Signal Source
Ground
19
Counter 0 In
External Gating Switch
Counter 0 Gate
Ground
18
16
DT9816 Module
Figure 7: Connecting Counter/Timer Signals for an Event Counting
Operation Using an External Gate
Figure 8 shows how to connect counter/timer signals to the screw
terminals on the DT9816 module to perform an event counting operation without using a gate (also called a software gate). The counter counts the number of rising edges that occur on the Counter 0 In signal.
Ground
Signal Source
19
40
Counter 0 In
18
DT9816 Module
Figure 8: Connecting Counter/Timer Signals for an Event Counting
Operation Without Using a Gate
Wiring Signals to the Module

Connecting Signals for Frequency Measurement

Signal Source
One way to measure frequency is to use the same wiring as a standard event counting application that does not use a gate (see
Figure 8), and then use software (if using the SDK, call the
olDaMeasureFrequency function) to determine the duration over which to count the number of pulses connected to the Counter 0 In signal. The frequency of the Counter 0 In signal is the number of counts divided by the duration of the olDaMeasureFrequency function.
If you need more accuracy than the olDaMeasureFrequency function provides, you can connect a pulse of a known duration to the Counter 0 Gate signal, as shown in Figure 9. In this case, the frequency of the Counter 0 In signal is the number of counts divided by the period of the signal connected to the Counter 0 Gate input.
Ground
Counter 0 In (Number of pulses counted during gate period)
Counter 0 Gate
Known Signal Source
(Determines period for count)
19
18
16
DT9816 Module
4
4
4
4
4
4
4
Figure 9: Connecting Counter/Timer Signals for a Frequency Measurement
Operation Using an External Pulse
4
4
41
Chapter 4

Connecting Signals for Rate Generation

Figure 10 shows how to connect counter/timer signals to the screw
terminals of a DT9816 module to perform a rate generation (continuous pulse output) operation.
Ground
Heater Controller
19
Counter 0 Out
17
DT9816 Module
Figure 10: Connecting Counter/Timer Signals for a Rate Generation
Operation
42
5
Verifying the Operation
of a Module
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Using the Oscilloscope Function . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using the Chart Recorder Function. . . . . . . . . . . . . . . . . . . . . . . . 48
Using the Voltmeter Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Using the File Viewer Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Using the Digital Input Function . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using the Digital Output Function . . . . . . . . . . . . . . . . . . . . . . . . 52
Using the Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using the Rate Generator Function . . . . . . . . . . . . . . . . . . . . . . . . 54
43
Chapter 5
Prepare to Use a Module
(see Chapter 2 starting on page 21)
Set Up and Install the Module
(see Chapter 3 starting on page 25)
Wire Signals to the Module
(see Chapter 4 starting on page 33)
Verify the Operation of the Module
(this chapter)
44

Overview

The GO! application allows you to measure and control signals from your DT9816 module right out of the box. Simply install the ECONseries software, connect your module to the PC, connect your signals to the module, and run the GO! application from the Data Translation, Inc|ECONseries program group.
The GO! application provides the following instrument-like functions for data acquisition, control, and display (the software shows only those functions that are supported by your module):
• Oscilloscope
Verifying the Operation of a Module
5
5
5
Stream, plot, and analyze data from up to six analog input
channels
Zoom in or out of live signals
Select the trigger type, level, and channel
Print your data or save it to an Excel file
• Chart Recorder
Record up to 31,990 data points from up to six analog input
channels
Log data to an Excel file
• Voltmeter
Measure data from up to six analog input channels and view
it in a 5-digit digital display
Display the maximum or true root mean square (RMS) value
• File Viewer
Load a previously saved Excel file
Scroll, zoom, or print your data
Digital Input − Monitor the status of the digital inputs using LEDs
5
5
5
5
5
5
45
Chapter 5
Digital Output − Control the state of the digital outputs using switches
Counter − Count pulses from the counter/timer for 1, 2, or 5 seconds or for an unlimited time
Rate Generator − Control the frequency of a continuous pulse output signal from the counter/timer
The GO! application automatically detects and configures the first installed ECONseries module. If you have multiple ECONseries modules installed, you can select the module to use.
Notes: If no module is connected, a message box is displayed. If you want to continue with the GO! application, plug a DT9816 module into any USB port of your PC, and then click Rescan. Otherwise, click Quit to exit from the GO! application.
If you have multiple DT9816 modules, you can run multiple instances of the GO! application, if you wish. Each instance of the application detects the available (not already in use) modules for your convenience.
46
Press F1 at any time to get help on any of the functions of the GO! application.
Verifying the Operation of a Module

Using the Oscilloscope Function

The verify the analog input operation of your DT9816 module using the Oscilloscope function of the GO! application, do the following:
1. Connect a known voltage source, such as the output of a function generator, to analog input channel 0 on the DT9816 module (single-ended mode). Refer to page 37 for an example of how to connect a single-ended analog input.
5
5
2. Under Visible Channels on the Oscilloscope tab, ensure that only channel 0 is selected.
The analog input data from channel 0 is continuously displayed.
3. Zoom in on your data by using your left mouse button to create a zoom rectangle around the region that you are interested in.
4. When you are finished, snap back to the standard voltage range of the module by clicking the Unzoom button.
5
5
5
5
5
5
5
47
Chapter 5

Using the Chart Recorder Function

To verify the analog input operation of your DT9816 module using the Chart Recorder function of the GO! application, do the following:
1. Connect a known voltage source, such as the output of a function generator, to analog input channel 0 on the DT9816 module (single-ended mode). Refer to page 37 for an example of how to connect a single-ended analog input.
2. Under Visible Channels on the Chart Recorder tab, ensure that only channel 0 is selected.
3. Click Start Recording, and enter Te st for the filename.
The analog input data from channel 0 is displayed on the screen and logged to the Test.xls file.
4. After a few seconds, click Stop Recording.
5. Launch Excel and open the file called Test.xls to review the data
you just recorded.
48

Using the Voltmeter Function

To verify the analog input operation of your DT9816 module using the Voltmeter function of the GO! application, do the following:
1. Connect a known voltage source, such as the output of a function generator, to analog input channel 0 on the DT9816 module (single-ended mode). Refer to page 37 for an example of how to connect a single-ended analog input.
Verifying the Operation of a Module
5
5
2. Under Visible Channels on the Voltmeter tab, ensure that only channel 0 is selected.
3. Click Normal under Display Settings.
The analog input data from analog input channel 0 is converted into digital format and displayed.
Note that the 5-digit display is refreshed twice per second.
5
5
5
5
5
5
5
49
Chapter 5

Using the File Viewer Tab

To verify the analog input operation of your DT9816 module using the File Viewer function of the GO! application, do the following:
1. Connect a known voltage source, such as the output of a function generator, to analog input channel 0 on the DT9816 module (single-ended mode). Refer to page 37 for an example of how to connect a single-ended analog input.
2. Under Visible Channels on the Chart Recorder tab, ensure that only channel 0 is selected.
3. Click Start Recording, and enter Te st for the filename.
The analog input data from channel 0 is displayed on the screen and logged to the Test.xls file.
4. After a few seconds, click Stop Recording.
5. Click on the File Viewer tab, and click Open File.
6. Click on the filename Te s t .x l s .
7. Click Open.
50
8. Scroll through the data in the file using the slider at the bottom of the File Viewer screen.
Verifying the Operation of a Module

Using the Digital Input Function

To verify the digital input operation of your DT9816 module using the Digital Input function of the GO! application, do the following:
1. Connect a digital input signal to a digital input line on the module. Refer to page 38 for an example of how to connect a digital input.
2. Read the status of the LEDs.
If digital input line 0 is high, the LED for line 0 turns green (on). If digital input line 0 is low, the LED for line 0 turns gray (off).
The DT9816 module supports 8 digital input lines; the GO! application supports all 8 lines.
5
5
5
5
5
5
5
5
5
51
Chapter 5

Using the Digital Output Function

To verify the digital output operation of your DT9816 module using the Digital Output function of the GO! application, do the following:
1. Connect a device to a digital output line on the module. Refer to
page 38 for an example of how to connect a digital output.
2. Click the switches to change the state of your device.
3. Check that the device has been changed as expected.
For example, if you connect a simple set of LEDs, the LED corresponding to a line you switch on with the Digital Output function should turn green (on).
The DT9816 module supports 8 digital output lines; the GO! application supports all 8 lines.
52

Using the Counter Function

To verify the event counting operation of your module using the Counter function of the GO! application, do the following:
1. Wire an external clock source to the Counter 0 In signal on your DT9816 module. (Refer to page 41 for an example of how to connect an external clock to the counter/timer channel.)
2. Click 2 Seconds, and click Start Counting.
The number of counts is displayed on the screen. When 2 seconds have elapsed, the operation stops automatically.
Verifying the Operation of a Module
5
5
5
5
5
5
5
5
5
53
Chapter 5

Using the Rate Generator Function

To verify the rate generation operation of your module using the Rate Generator function of the GO! application, do the following:
1. Connect a scope or similar device that accepts a pulse output signal to the Counter 0 Out signal of your DT9816 module. (Refer to page 42 for an example of how to connect signals for rate generation.)
2. Use the slider to change the frequency of the continuous pulse output signal.
If you are using a scope, you can see the frequency of the pulse output signal change as you move the slider.
54

Part 2: Using Your Module

6

Principles of Operation

Analog Input Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Digital I/O Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Counter/Timer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
57
Chapter 6
Figure 11 shows a block diagram of the DT9816 module.
Reference
A/D Ch5
A/D Ch4
A/D Ch3
A/D Ch2
A/D Ch1
A/D Ch0
External
Clock
External
Trigger
ESD Buffered to 4000 V
A/D Clock
A/D Trigger
+2.5 V
16
16
16
16
16
16
From USB
Por t
Powe r
Supply
16-Bit
Counter/Timer
Digital
Out
Digital
In
ESD Buffered to 4000 V
+5 V
C/T Out 0 C/T Gate 0
C/T In 0
DOUT 7
DOUT 0
DIN 7
DIN 0
58
USB 2.0 Port
Input FIFO
Figure 11: Block Diagram of the DT9816 Module

Analog Input Features

This section describes the following features of analog input (A/D) operations on the DT9816 module:
• Input resolution, described below
• Analog input channels, described below
• Input ranges and gains, described on page 60
Principles of Operation
6
6
• Input sample clock sources, described on page 61
• Analog input conversion modes, described on page 61
• Input triggers, described on page 63
• Data format and transfer, described on page 63
• Error conditions, described on page 64

Input Resolution

The resolution of the A/D subsystem on the DT9816 module is 16-bits. This resolution is fixed; it cannot be programmed in software.

Analog Input Channels

The DT9816 provides six single-ended simultaneous analog input channels. You can acquire data from a single analog input channel or from a group of analog input channels on the module.
Note: To maintain simultaneous operation, all analog input connections must have the same lead lengths.
6
6
6
6
6
6
The following subsections describe how to specify the channels.
6
59
Chapter 6
Specifying a Single Analog Input Channel
The simplest way to acquire data from a single analog input channel is to specify the channel for a single-value analog input operation using software; refer to page 61 for more information about single-value operations.
You can also specify a single channel using the analog input channel-gain list, described in the next section.
Specifying One or More Analog Input Channels
You can read data from one or more analog input channels using an analog input channel-gain list. Group the channels in the list sequentially (starting either with 0 or with any other analog input channel) in ascending order. You cannot specify the same channel more than once in the list.
Using software, specify the channels you want to sample. You can enter up to 6 entries in the channel-gain list for this module. Refer to
page 61 for more information about the supported conversion modes.
60

Input Ranges and Gains

The DT9816 provides an input range of -10 to +10 V or -5 to +5 V. Use software to specify the range as -10 to +10 V with a gain of 1, or -5 to +5 V with a gain of 2.
Note: This is the range for the entire analog input subsystem, not the range per channel.

Input Sample Clock Sources

Principles of Operation
You can pace an analog input operation on a DT9816 module using a software clock source. Using software, specify the clock source as internal, then specify the clock frequency at which to pace the operation. The DT9816-A supports an A/D clock frequency of 60 Hz to 150 MHz; the DT9816 supports an A/D clock frequency of 60 Hz to 50 MHz.
According to sampling theory (Nyquist Theorem), specify a frequency that is at least twice as fast as the input’s highest frequency component. For example, to accurately sample a 2 kHz signal, specify a sampling frequency of at least 4 kHz. Doing so avoids an error condition called aliasing, in which high frequency input components erroneously appear as lower frequencies after sampling.

Analog Input Conversion Modes

The DT9816 supports the following conversion modes:
• Single-value operations
• Continuous scan operations
The following subsections describes the conversion modes in more detail.
6
6
6
6
6
6
Single-Value Operations
Single-value operations are the simplest to use. Using software, you specify the range, gain, and analog input channel. The module acquires the data from the specified channel and returns the data immediately. For a single-value operation, you cannot specify a clock source, trigger source, scan mode, or buffer.
Single-value operations stop automatically when finished; you cannot stop a single-value operation.
6
6
6
61
Chapter 6
Continuous Scan Mode
Use continuous scan mode if you want to accurately control the period between successive simultaneous conversions of all channels in a channel-gain list.
When it receives a software trigger, the module cycles through the channel-gain list, acquiring and converting the data for each entry in the list (this process is defined as the scan). The module then wraps to the start of the channel-gain list and repeats the process continuously until either the allocated buffers are filled or until you stop the operation. Refer to page 63 for more information about buffers.
The conversion rate is determined by the frequency of the internal sample clock; refer to page 61 for more information about the internal sample clock. The sample rate, which is the rate at which a single entry in the channel-gain list is sampled, is the same as the conversion rate due to the simultaneous nature of the module.
To select continuous scan mode, use software to specify the data flow as continuous.
62
Figure 12 illustrates continuous scan mode using a channel-gain list
with three entries: channel 0, channel 1, and channel 2. In this example, analog input data is acquired simultaneously on all channels on each clock pulse of the input sample clock. Data is acquired continuously.
Principles of Operation
Chan 0
Chan 1
Chan 2
Internal Sample Clock
Software trigger occurs
Figure 12: Continuous Scan Mode

Input Triggers

The DT9816 supports a software trigger or an external TTL trigger for starting an analog input operation. When the computer issues a write to the DT9816 module, data acquisition begins. Acquisition stops when the specified number of samples has been acquired (if the buffer wrap mode is none, described on page 64), or when you stop the operation. Note that when you stop the operation, the module completes the reading of the channel-gain list.
Chan 0
Chan 1
Chan 2
Chan 0
Chan 1
Chan 2
Data is acquired continuously
Chan 0
Chan 1
Chan 2
Chan 0
Chan 1
Chan 2
Chan 0
Chan 1
Chan 2
Chan 0
Chan 1
Chan 2
6
6
6
6
6
6
Using software, specify the trigger source as a software trigger or an external trigger. The external trigger is initiated by a high to low transition on the A/D external TTL trigger input.

Data Format and Transfer

DT9816 modules use binary data encoding, where 0000 represents negative full-scale, and FFFFh represents positive full-scale. Use software to specify the data encoding as binary. The ADC outputs FFFFh for above-range signals, and 0000 for below-range signals.
6
6
6
63
Chapter 6
Before you begin acquiring data, you must allocate buffers to hold the data. A Buffer Done message is returned whenever a buffer is filled. This allows you to move and/or process the data as needed.
We recommend that you allocate a minimum of three buffers for analog input operations, specifying one of the following buffer wrap modes in software:
None − Data is written to multiple allocated input buffers continuously; when no more empty buffers are available, the operation stops. If wrap mode is none, the module guarantees gap-free data.
Multiple − Data is written to multiple allocated input buffers continuously; if no more empty buffers are available, the module overwrites the data in the current buffer, starting with the first location in the buffer. This process continues indefinitely until you stop it. If wrap mode is multiple, the module does not guarantee gap-free data.

Error Conditions

64
An overrun condition is reported if the A/D sample clock rate is too fast. This error is reported if a new A/D sample clock pulse occurs while the ADC is busy performing a conversion from the previous A/D sample clock pulse. The host computer can clear this error. To avoid this error, use a slower sampling rate or increase the buffer size and/or number of buffers.

Digital I/O Features

This section describes the following features of digital I/O operations on the DT9816:
• Digital I/O lines
•Resolution
•Operation modes
Principles of Operation
6
6

Digital I/O Lines

The DT9816 module includes 8 digital input and 8 digital output lines.
Using DT-Open Layers, you can specify the digital I/O line that you want to read or write in a single-value digital I/O operation. Refer to
page 66 for more information about single-value operations.
A digital line is high if its value is 1; a digital line is low if its value is
0. On power up or reset, a low value (0) is output from each of the digital output lines.
Note: You can also read or write to the digital I/O lines using functions that access the hardware registers on the module directly. Refer to Appendix C starting on page 121 for more information on these functions.

Resolution

6
6
6
6
6
6
The DT9816 provides 16 digital lines that are dedicated, 8 each, to the DIN and DOUT subsystems. By default, these lines are organized as two 8-bit ports. Because these are dedicated lines, you cannot combine the digital ports into one port to change resolution.
6
65
Chapter 6

Operation Modes

The DT9816 supports single-value digital I/O operations only. For a single-value operation, use software to specify the digital I/O port (the gain is ignored). The DT9816 then reads data from or writes data to the digital lines associated with that port (determined by the resolution setting).
Single-value operations stop automatically when finished; you cannot stop a single-value operation.
66

Counter/Timer Features

This section describes the following features of counter/timer (C/T) operations on the DT9816 module:
• C/T channel, described below
• C/T clock sources, described on page 68
• Gate types, described on page 68
Principles of Operation
6
6
• Pulse types and duty cycles, described on page 69
• C/T operation modes, described on page 69

C/T Channel

The DT9816 module provides one 16-bit counter/timer. The counter accepts a clock input signal and gate input signal and outputs a pulse (pulse output signal), as shown in Figure 13.
Clock Input Signal (internal or external)
Counter
Gate Input Signal
(software or external input)
Figure 13: Counter/Timer Channel
6
6
6
Pulse Output Signal
6
6
6
6
67
Chapter 6

C/T Clock Sources

The following clock sources are available for the counter/timer:
Internal clock – Through software, specify the clock source as internal, and specify the frequency at which to pace the counter/timer operation. The frequency of the internal C/T clock can range from 60 Hz to 6 MHz.
External clock – An external clock is useful when you want to pace counter/timer operations at rates not available with the internal clock or if you want to pace at uneven intervals.
Connect an external clock with a maximum recommended frequency of 6 MHz to the Counter 0 In signal on the DT9816 module. Using software, specify the C/T clock source as external, and specify a clock divider between 2 and 65534 to determine the actual frequency at which to pace the counter/timer operation. For example, if you connect a 6 MHz external C/T clock and use a clock divider of 2, the resulting C/T output frequency is 3 MHz. Counter/timer operations start on the falling edge of the Counter 0 In signal.
68

Gate Types

The edge or level of the Counter 0 Gate signal determines when a counter/timer operation is enabled. Using software, you can specify one of the following gate types:
None − A software command enables any counter/timer operation immediately after execution.
Logic-high level external gate input − Enables a counter/timer operation when Counter 0 Gate is high, and disables a counter/timer operation when Counter 0 Gate is low. Note that this gate type is used for event counting and rate generation modes; refer to page 69 for more information about these modes.

Pulse Duty Cycles

Principles of Operation
Counter/timer output signals from the DT9816 module are high-to-low going signals. The low portion of the total pulse output period is the active portion of the counter/timer clock output signal.
The duty cycle (or pulse width) indicates the percentage of the total pulse output period that is active. In rate generation mode, the duty cycle is fixed at 50% for the DT9816 module. Figure 14 illustrates a high-to-low going output pulse with a duty cycle of 50%.
Total Pulse Period
high pulse
low pulse
Active Pulse Width
Figure 14: Example of a Pulse Output SIgnal with a 50% Duty Cycle
(High-to-Low Going)
6
6
6
6
6
6

Counter/Timer Operation Modes

The DT9816 module supports the following counter/timer operation modes:
• Event counting
• Frequency measurement
• Rate generation
6
6
6
69
Chapter 6
Event Counting
Use event counting mode if you want to count the number of falling edges that occur on Counter 0 In when the gate is active (high-level). Refer to page 68 for information about specifying the active gate type.
You can count a maximum of 65,536 events before the counter rolls over to 0 and starts counting again.
For event counting operations, use software to specify the counter/timer mode as count, the C/T clock source as external, and the active gate type as high-level.
Make sure that the signals are wired appropriately. Refer to
Chapter 4 for an example of connecting an event counting
application.
Frequency Measurement
Using software, specify the counter/timer mode as count, the clock source as external, and then call the olDaMeasureFrequency function.
70
Our function uses the Windows timer (which has a resolution of 1 ms) to specify the duration. If you need more accuracy than the Windows timer provides, you can connect a pulse of a known duration to the Counter 0 Gate signal.
If you are using a known pulse connected to the gate pin for the duration, specify the active gate in software (high level). When the operation starts, read the number of counts that occurred when the gate was active.
You can determine the frequency of the clock input signal using the following equation:
Frequency Measurement = Number of Events Measurement Period
Make sure that the signals are wired appropriately. Refer to
Chapter 4 for an example of connecting a frequency measurement
application.
Rate Generation
Use rate generation mode to generate a continuous pulse output signal from Counter 0 Out; this mode is sometimes referred to as continuous pulse output or pulse train output.
Principles of Operation
6
6
The pulse output operation is enabled whenever the Counter 0 Gate signal is active (high level or software gate). While the pulse output operation is enabled, the counter outputs a high-to-low going pulse with a pulse width of 50% continuously. As soon as the operation is disabled, rate generation stops.
The frequency of the output is determined by the C/T clock source (either internal or external) and, for an external clock source, the clock divider used. You can generate an output signal from Counter 0 Out with a frequency of 60 Hz to 6 MHz.
To specify rate generation mode, use software to specify the counter/timer mode as rate, the C/T clock source as either internal or external, the clock divider (2 to 65534) if external, and the active gate type (low-level, high-level, or software gate). Refer to page 68 for more information about gate types.
Make sure that the signals are wired appropriately. Refer to
Chapter 4 for an example of connecting a rate generation application.
6
6
6
6
6
6
6
71
Chapter 6
72
7
Supported Device Driver
Capabilities
Data Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Buffering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
DMA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Triggered Scan Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Synchronous Digital I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Counter/Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
73
Chapter 7
The DT9816 Device Driver provides support for the analog input (A/D), digital input (DIN), digital output (DOUT), and counter/timer (C/T) subsystems on the DT9816 module.
Table 3: DT9816 Series Subsystems
DT9816 A/D D/A DIN DOUT C/T
Total Subsystems on Module 1 0 1 1 1
The tables in this chapter summarize the features available for use with the DataAcq SDK and the DT9816 module. The DataAcq SDK provides functions that return support information for specified subsystem capabilities at run-time.
The first row in each table lists the subsystem types. The first column in each table lists all possible subsystem capabilities. A description of each capability is followed by the parameter used to describe that capability in the DataAcq SDK.
74
Note: Blank fields represent unsupported options.
The DataAcq SDK uses the functions olDaGetSSCaps (for those queries starting with OLSSC) and olDaGetSSCapsEx (for those queries starting with OLSSCE) to return the supported subsystem capabilities for a device.
For more information, refer to the description of these functions in the DataAcq SDK online help. See the DataAcq User’s Manual for information on launching this help file.
Supported Device Driver Capabilities

Data Flow

Table 4: DT9816 Data Flow Options
DT9816 A/D D/A DIN DOUT C/T
Single-Value Operation Support
OLSSC_SUP_SINGLEVALUE Yes Yes Yes No
Continuous Operation Support
OLSSC_SUP_CONTINUOUS Yes Yes
Continuous Operation until Trigger Event Support
OLSSC_SUP_CONTINUOUS_PRETRIG
Continuous Operation before & after Trigger Event
OLSSC_SUP_CONTINUOUS_ABOUTTRIG
DT-Connect Support
OLSSC_SUP_DTCONNECT
Continuous DT-Connect Support
OLSSC_SUP_DTCONNECT_CONTINUOUS
Burst DT-Connect Support
OLSSC_SUP_DTCONNECT_BURST
7
7
7
7
7
7
7
7
7
75
Chapter 7

Buffering

Table 5: DT9816 Buffering Options
DT9816 A/D D/A DIN DOUT C/T
Buffer Support
OLSSC_SUP_BUFFERING Yes
Single Buffer Wrap Mode Support
OLSSC_SUP_WRPSINGLE Yes
Multiple Buffer Wrap Mode Support
OLSSC_SUP_WRPMULTIPLE Yes
Inprocess Buffer Flush Support
OLSSC_SUP_INPROCESSFLUSH Yes
Waveform Generation Mode Support
OLSSC_SUP_WAVEFORM_MODE
DMA
76
Table 6: DT9816 DMA Options
DT9816 A/D D/A DIN DOUT C/T
Number of DMA Channels
OLSSC_NUMDMACHANS 0 0 0 0
Supports Gap Free Data with No DMA
OLSSC_SUP_GAPFREE_NODMA Yes
Supports Gap Free Data with Single DMA
OLSSC_SUP_GAPFREE_SINGLEDMA
Supports Gap Free Data with Dual DMA
OLSSC_SUP_GAPFREE_DUALDMA
Supported Device Driver Capabilities

Triggered Scan Mode

Table 7: DT9816 Triggered Scan Mode Options
DT9816 A/D D/A DIN DOUT C/T
Triggered Scan Support
OLSSC_SUP_TRIGSCAN
Maximum Number of CGL Scans per Trigger
OLSSC_MAXMULTISCAN 0 0 0 0
Supports Scan per Trigger Event Triggered Scan
OLSSC_SUP_RETRIGGER_SCAN_PER_
TRIGGER
Supports Internal Retriggered Triggered Scan
OLSSC_SUP_RETRIGGER_INTERNAL
Extra Retrigger Support
OLSSC_SUP_RETRIGGER_EXTRA
Maximum Retrigger Frequency
OLSSCE_MAXRETRIGGER 0 0 0 0
Minimum Retrigger Frequency
OLSSCE_MINRETRIGGER 0 0 0 0
7
7
7
7
7
7
7
7
7
77
Chapter 7

Gain

Table 8: DT9816 Gain Options
DT9816
Maximum Channel-Gain List Depth
OLSSC_CGLDEPTH 6
Sequential Channel-Gain List Support
OLSSC_SUP_SEQUENTIAL_CGL Yes
Zero Start Sequential Channel-Gain List Support
OLSSC_SUP_ZEROSEQUENTIAL_CGL Yes
Random Channel-Gain List Support
OLSSC_SUP_RANDOM_CGL Yes
Simultaneous Sample-and-Hold Support
OLSSC_SUP_SIMULTANEOUS_SH Yes
Channel List Inhibit Support
OLSSC_SUP_CHANNELLIST_INHIBIT
Programmable Gain Support
OLSSC_SUP_PROGRAMGAIN Yes
Number of Gains
OLSSC_NUMGAINS 2 1 1 0
Noncontiguous Channels in Channel-Gain List
OLSSC_NONCONTIGUOUS_CHANNELNUM 16 0 0 0
AutoRanging Support
OLSSC_SUP_SINGLEVALUE_AUTORANGE
A/D D/A DIN DOUT C/T
a
b
0 0 0
78
a. You cannot specify the same channel more than once in the list. b. Place channels in your CGL in ascending order. All channels are sampled simultaneously
with data returned in ascending channel order; if your CGL does not match, you will have unexpected results.

Synchronous Digital I/O

Table 9: DT9816 Synchronous Digital I/O Options
Supported Device Driver Capabilities
7
DT9816
Synchronous Digital I/O Support
OLSSC_SUP_SYNCHRONOUS_DIGITALIO
Maximum Synchronous Digital I/O Value
OLSSC_MAX_DIGITALIOLIST_VALUE 1 0 0 0
A/D D/A DIN DOUT C/T

Channels

Table 10: DT9816 Channel Options
DT9816
Number of Channels
OLSSC_NUMCHANNELS 6
SE Support
OLSSC_SUP_SINGLEENDED Yes
SE Channels
OLSSC_MAXSECHANS 6 0 0 0
DI Support
OLSSC_SUP_DIFFERENTIAL Yes Yes Yes
DI Channels
OLSSC_MAXDICHANS 0 1 1 1
DT2896 Channel Expansion Support
OLSSC_SUP_EXP2896
DT727 Channel Expansion
OLSSC_SUP_EXP727
A/D D/A DIN DOUT C/T
a
1 1 1
7
7
7
7
7
7
7
a. The DT9816 provides analog input channels 0 to 5.
7
79
Chapter 7

Filters

Table 11: DT9816 Filter Options
DT9816 A/D D/A DIN DOUT C/T
Filter/Channel Support
OLSSC_SUP_FILTERPERCHAN
Number of Filters
OLSSC_NUMFILTERS 1 1 1 0

Ranges

Table 12: DT9816 Range Options
DT9816 A/D D/A DIN DOUT C/T
80
Number of Voltage Ranges
OLSSC_NUMRANGES 1
Range per Channel Support
OLSSC_SUP_RANGEPERCHANNEL Yes
a. The input range for the module is -10 to +10 V.
a
000
Supported Device Driver Capabilities

Resolution

Table 13: DT9816 Resolution Options
DT9816 A/D D/A DIN DOUT C/T
Software Programmable Resolution
OLSSC_SUP_SWRESOLUTION Yes Yes
Number of Resolutions
OLSSC_NUMRESOLUTIONS 1
a. The DT9816 provides 16-bit resolution. b. The DIN and DOUT subsystems are configured as two separate 8-bit ports. c. The resolution of the counter/timer subsystem is 16.
a
1
b
1b 1
c
7
7
7
7
7
7
7
7
7
81
Chapter 7

Triggers

Table 14: DT9816 Trigger Options
DT9816 A/D D/A DIN DOUT C/T
Software Trigger Support
OLSSC_SUP_SOFTTRIG Yes Yes
External Trigger Support
OLSSC_SUP_EXTERNTRIG No
Positive Threshold Trigger Support
OLSSC_SUP_THRESHTRIGPOS
Negative Threshold Trigger Support
OLSSC_SUP_THRESHTRIGNEG
Analog Event Trigger Support
OLSSC_SUP_ANALOGEVENTTRIG
Digital Event Trigger Support
OLSSC_SUP_DIGITALEVENTTRIG
Timer Event Trigger Support
OLSSC_SUP_TIMEREVENTTRIG
Number of Extra Triggers
OLSSC_NUMEXTRATRIGGERS 1
a
a
000
Ye s
82
a. Falling-edge external triggers are supported through the OLSCC_NUMEXTRATRIGGERS
capability.
Supported Device Driver Capabilities

Clocks

Table 15: DT9816 Clock Options
DT9816 A/D D/A DIN DOUT C/T
Internal Clock Support
OLSSC_SUP_INTCLOCK Yes Yes
External Clock Support
OLSSC_SUP_EXTCLOCK Yes Yes
Simultaneous Input/Output on a Single Clock
Signal
OLSSC_SIMULTANEOUS_CLOCKING Yes
Number of Extra Clocks
OLSSC_NUMEXTRACLOCKS 0 0 0 0
Base Clock Frequency
OLSSCE_BASECLOCK 48 MHz 0 0 12 MHz
Maximum External Clock Divider
OLSSCE_MAXCLOCKDIVIDER 2 1 1 65534
Minimum External Clock Divider
OLSSCE_MINCLOCKDIVIDER 1 1 1 2
Maximum Throughput
OLSSCE_MAXTHROUGHPUT 150 kHz 0 0 6 MHz
Minimum Throughput
OLSSCE_MINTHROUGHPUT 60 Hz 0 0 60 Hz
7
7
7
7
a
7
7
a. The module only supports even number values for the clock divider. Odd values are rounded
down.
7
7
7
83
Chapter 7

Counter/Timers

Table 16: DT9816 Counter/Timer Options
DT9816 A/D D/A DIN DOUT C/T
Cascading Support
OLSSC_SUP_CASCADING
Event Count Mode Support
OLSSC_SUP_CTMODE_COUNT Yes
Generate Rate Mode Support
OLSSC_SUP_CTMODE_RATE Yes
One-Shot Mode Support
OLSSC_SUP_CTMODE_ONESHOT
Repetitive One-Shot Mode Support
OLSSC_SUP_CTMODE_ONESHOT_RPT
Up/Down Counting Mode Support
OLSSC_SUP_CTMODE_UP_DOWN
Edge-to-Edge Measurement Mode Support
OLSSC_SUP_CTMODE_MEASURE
Continuous Edge-to-Edge Measurement Mode
Support
OLSSC_SUP_CTMODE_CONT_MEASURE
High to Low Output Pulse Support
OLSSC_SUP_PLS_HIGH2LOW Yes
Low to High Output Pulse Support
OLSSC_SUP_PLS_LOW2HIGH
None (internal) Gate Type Support
OLSSC_SUP_GATE_NONE Yes
High Level Gate Type Support
OLSSC_SUP_GATE_HIGH_LEVEL Yes
Low Level Gate Type Support
OLSSC_SUP_GATE_LOW_LEVEL
High Edge Gate Type Support
OLSSC_SUP_GATE_HIGH_EDGE
84
Supported Device Driver Capabilities
Table 16: DT9816 Counter/Timer Options (cont.)
DT9816 A/D D/A DIN DOUT C/T
Low Edge Gate Type Support
OLSSC_SUP_GATE_LOW_EDGE
Level Change Gate Type Support
OLSSC_SUP_GATE_LEVEL
High Level Gate Type with Input Debounce
OLSSC_SUP_GATE_HIGH_LEVEL_DEBOUNCE
Low Level Gate Type with Input Debounce Support
OLSSC_SUP_GATE_LOW_LEVEL_DEBOUNCE
High Edge Gate Type with Input Debounce
OLSSC_SUP_GATE_HIGH_EDGE_DEBOUNCE
Low Edge Gate Type with Input Debounce Support
OLSSC_SUP_GATE_LOW_EDGE_DEBOUNCE
Level Change Gate Type with Input Debounce
OLSSC_SUP_GATE_LEVEL_DEBOUNCE
Fixed Pulse Width Support
OLSSC_SUP_FIXED_PULSE_WIDTH Yes
Quadrature Decoder
OLSSC_SUP_QUADRATURE_DECODER
a. The pulse width (duty cycle) if fixed at 50% when rate generation mode is used.
7
7
7
7
a
7
7
7
7
7
85
Chapter 7

Miscellaneous

Table 17: DT9816 Miscellaneous Options
DT9816 A/D D/A DIN DOUT C/T
Simultaneous Start List Support
OLSSC_SUP_SIMULTANEOUS_START
Pause Operation Support
OLSSC_SUP_PAUSE
Asynchronous Operation Support
OLSSC_SUP_POSTMESSAGE Yes
Binary Encoding Support
OLSSC_SUP_BINARY Yes Yes Yes Yes
Twos Complement Support
OLSSC_SUP_2SCOMP
Interrupt Support
OLSSC_SUP_INTERRUPT Yes
FIFO in Data Path Support
OLSSC_SUP_FIFO Yes
Output FIFO Size
OLSSC_FIFO_SIZE_IN_K
Data Processing Capability
OLSSC_SUP_PROCESSOR Yes Yes
Software Calibration Support
OLSSC_SUP_SWCAL
86
8

Programming Flowcharts

Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Continuous A/D Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Event Counting Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Frequency Measurement Operations . . . . . . . . . . . . . . . . . . . . . . 95
Pulse Output Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
87
Chapter 8
The following flowcharts show the steps required to perform analog input, digital I/O, and counter/timer operations on the DT9816 module using DT-Open Layers. For illustration purposes, the DataAcq SDK functions are shown; however, the concepts apply to all DT-Open Layers-compatible software.
Note that many steps represent several substeps; if you are unfamiliar with the detailed operations involved with any one step, refer to the indicated page for detailed information. Optional steps appear in shaded boxes.
88

Single-Value Operations

Initialize the device driver and get the
device handle with olDaInitialize.
Get a handle to the subsystem with
olDaGetDASS.
a
Programming Flowcharts
8
8
Set the data flow to
OL_DF_SINGLEVALUE using
olDaSetDataFlow.
Set the resolution with
olDaSetResolution.
Configure the subsystem using
olDaConfig.
Go to the next page.
a
Specify A/D subsystem 0 for an analog input operation, DIN subsystem 0 for a digital input
operation, or DOUT subsystem 1 for a digital output operation.
b. The DIN and the DOUT subsystems use separate digital I/O lines. The resolution of the DIN
and DOUT subsystems is fixed at 8-bits.
b
8
8
8
8
8
8
8
89
Chapter 8
Single-Value Operations (cont.)
Continued from previous page.
For the A/D subsystem, read a single analog input value from the specified channel (0 to 5). For the DIN subsystem, read the value of the digital input port.
Acquiring
data?
No
Ye s
Acquire a single value using
olDaGetSingleValue.
Output a single value using
olDaPutSingleValue.
For the DOUT subsystem, output a value to the digital output port.
Release the driver and terminate the
Acquire/
output
Ye s
another
value?
No
Release the subsystem using
olDaReleaseDASS.
session using olDaTerminate.
90

Continuous A/D Operations

Initialize the device driver and get the
device handle with olDaInitialize.
Get a handle to the A/D subsystem
with olDaGetDASS.
Set the data flow using
olDaSetDataFlow.
Specify OL_DF_CONTINUOUS (the default value).
Programming Flowcharts
8
8
8
Set up the analog input
channel-gain list (see page 99).
Set up the clocks and triggers
(see page 99).
Go to the next page.
8
8
8
8
8
8
91
Chapter 8
Continuous A/D Operations (cont.)
Continued from previous page.
Set up buffering (see page 100).
Configure the subsystem using
olDaConfig.
Start the operation with olDaStart.
Deal with messages and buffers
(see page 101).
Stop the operation (see page 104).
Clean up the operation (see page 105).
After you configure the subsystem, you can use olDaGetClockFrequency to return the actual frequency of the internal clock.
92

Event Counting Operations

Initialize the device driver and get the
device handle with olDaInitialize.
Programming Flowcharts
8
8
Get a handle to the C/T subsystem with
olDaGetDASS.
Specify the clock source as
OL_CLK_EXTERNAL using
olDaSetClockSource.
Specify the clock divider using
olDaSetExternalClockDivider
Specify the gate type as high-level
(OL_GATE_HIGH_LEVEL) or low-level
(OL_GATE_LOW_LEVEL) using
olDaSetGateType
Specify the mode as OL_CTMODE_COUNT
using olDaSetCTMode.
Configure the subsystem using
olDaConfig.
Specify C/T subsystem/element 0.
8
Attach an external C/T with a maximum recommended frequency of 6 MHz to the Counter 0 In signal.
8
Specify a clock divider between 2 (the
default) and 65534.
8
8
8
Go to the next page.
8
8
93
Chapter 8
Event Counting Operations (cont.)
Continued from previous page.
Start the operation using olDaStart.
Read the events counted using
olDaReadEvents.
Get update
of events
total?
No
Stop the operation (see page 104).
Release each subsystem with
olDaReleaseDASS.
Release the device driver and terminate
the session with olDaTerminate.
Ye s
94
Programming Flowcharts

Frequency Measurement Operations

The following flowchart shows the steps required to perform a frequency measurement operation using the Windows timer. If you need more accuracy the Windows timer provides, refer to page 70 of this manual or to your DataAcq SDK User’s Manual for more information.
8
8
Initialize the device driver and get the
device handle with olDaInitialize.
Get a handle to the C/T subsystem with
olDaGetDASS.
Specify the clock source as
OL_CLK_EXTERNAL using
olDaSetClockSource.
Specify the clock divider using
olDaSetExternalClockDivider
Specify the mode as OL_CTMODE_COUNT
using olDaSetCTMode.
Go to the next page.
Specify C/T subsystem/element 0.
Attach an external C/T with a maximum recommended frequency of 6 MHz to the Counter 0 In signal.
Specify a clock divider between 2 (the
default) and 65534.
8
8
8
8
8
8
8
95
Chapter 8
Frequency Measurement Operations (cont.)
Continued from previous page.
Configure the subsystem using
olDaConfig.
Start the frequency measurement
operation using olDaMeasureFrequency.
Message is in the form
Measure
done
message
returned?
No
Ye s
OLDA_WM_MEASURE_DONE.
Use the LongtoFreq (IParam) macro to get
the measured frequency value:
float = Freq;
Freq = LongtoFreq (IParam);
96
Release each subsystem with
olDaReleaseDASS.
Release the device driver and terminate
the session with olDaTerminate.

Pulse Output Operations

Initialize the device driver and get the
device handle with olDaInitialize.
Programming Flowcharts
8
8
Get a handle to the C/T subsystem
with olDaGetDASS.
Using an
internal clock?
No
Specify OL_CLK_EXTERNAL
using olDaSetClockSource.
Specify the clock divider using
olDaSetExternalClockDivider
Specify the gate type using
olDaSetGateType
Go to the next page.
Ye s
Specify C/T subsystem/element 0.
Specify OL_CLK_INTERNAL
using olDaSetClockSource.
Attach an external C/T with a maximum recommended frequency of 6 MHz to the Counter 0 In signal.
Specify a clock divider between 2 (the
default) and 65534.
Specify OL_GATE_HIGH_LEVEL for a high-level gate or OL_GATE_LOW_LEVEL for a low-level gate.
8
8
8
8
8
8
8
97
Chapter 8
Pulse Output Operations (cont.)
Continued from previous page.
Specify the mode using
olDaSetCTMode.
Specify the output pulse type using
olDaSetPulseType.
Configure the subsystem using
olDaConfig.
Start the operation using olDaStart.
Stop the operation (see page 104).
Release each subsystem with
olDaReleaseDASS.
Release the device driver and
terminate the session with
olDaTerminate.
Specify OL_CTMODE_RATE for rate generation mode.
Must be a high-to-low pulse. The duty cycle is fixed at 50%.
98
Set Up Channel List and Channel Parameters
Programming Flowcharts
8
olDaSetChannelListSize
olDaSetChannelListEntry
olDaSetGainListEntry
Set Clocks and Triggers
olDaSetClockSource
Specify OL_CLK_INTERNAL (the default) to select the internal clock.
Use to specify the size of the analog input channel-gain list (the default is 1).
Use to set up the analog input channel-gain list. Channels 0 to 5 are available; you can specify up to 6 channels in the channel-gain list.
Specify a gain of 1.
8
8
8
8
8
olDaSetClockFrequency
olDaSetTrigger
Use to specify the frequency of the internal clock. Values
8
range from 60 Hz to 6 MHz. The driver sets the actual frequency as closely as possible to the number specified.
8
Use to specify the trigger source. Specify OL_TRG_SOFT (the default) to select a software trigger.
8
99
Chapter 8
Set Up A/D Buffering
Using main
window to
handle
messages?
No
olDaSetWrapMode
olDmAllocBuffer
olDaPutBuffer
Ye s
olDaSetWndHandle
Use to specify the buffer wrap mode (OL_WRP_NONE for guaranteed gap-free operation; OL_WRP_ MULTIPLE for not guaranteed gap-free operation).
Use to allocate a buffer of the specified number of samples; each sample is 2 bytes.
Use to put the buffer on the ready queue.
Use to specify the window in which to post messages.
100
Allocate
more
buffers?
Ye s
A minimum of three buffers is recommended.
Loading...