Keithley KUSB-3100 User Manual

KUSB-3100
User’s Manual
KUSB3100-900-01 Rev. A / January 2005
www.keithley.com
A GR
EATER MEASURE OF CONFIDENCE
WARRANTY
Keithley Instruments, Inc. warrants the following items for 90 days from the date of shipment: probes, cables, rechargeable batteries, diskettes, and documentation.
During the warranty period, we will, at our option, either repair or replace any product that proves to be defective.
To exercise this warranty, write or call your local Keithley representative, or contact Keithley headquarters in Cleveland, Ohio. You will be given prompt assistance and return instructions. Send the product, transportation prepaid, to the indicated service facility. Repairs will be made and the product returned, transportation prepaid. Repaired or replaced products are warranted for the balance of the original warranty period, or at least 90 days.
LIMITATION OF WARRANTY
This warranty does not apply to defects resulting from product modification without Keithley’s express written consent, or misuse of any product or part. This warranty also does not apply to fuses, software, non-rechargeable batteries, damage from battery leak age, or problems arising from normal wear or failure to follow instructions.
THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REMEDIES.
-
NEITHER KEITHLEY INSTRUMENTS, INC. NOR ANY OF ITS EMPLOYEES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF ITS INSTRU MENTS AND SOFTWARE EVEN IF KEITHLEY INSTRUMENTS, INC., HAS BEEN ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. SUCH EXCLUDED DAMAGES SHALL INCLUDE, BUT ARE NOT LIMITED TO: COSTS OF REMOVAL AND INSTALLATION, LOSSES SUSTAINED AS THE RESULT OF INJURY TO ANY PERSON, OR DAMAGE TO PROPERTY.
A G R E A T E R M E A S U R E O F C O N F I D E N C E
-
Keithley Instruments, Inc.
Corporate Headquarters • 28775 Aurora Road • Cleveland, Ohio 44139
440-248-0400 • Fax: 440-248-6168 • 1-888-KEITHLEY (534-8453) • www.keithley.com
12/04
KUSB-3100
User’s Manual
©2005, Keithley Instruments, Inc.
All rights reserved.
First Printing, January 2005
Cleveland, Ohio, U.S.A.
Document Number: KUSB3100-900-01 Rev. A

Manual Print History

The print history shown below lists the printing dates of all Revisions and Addenda created for this manual. The Revi­sion Level letter increases alphabetically as the manual undergoes subsequent updates. Addenda, which are released between Revisions, contain important change information that the user should incorporate immediately into the manual. Addenda are numbered sequentially. When a new Revision is created, all Addenda associated with the previous Revision of the manual are incorporated into the new Revision of the manual. Each new Revision includes a revised copy of this print history page.
Revision A (Document Number KUSB3100-900-01A) ...................................................................... January 2005
All Keithley product names are trademarks or registered trademarks of Keithley Instruments, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders.

Safety Precautions

The following safety precautions should be observed before using this product and any associated instrumentation. Although some in struments and accessories would normally be used with non-haz­ardous voltages, there are situations where hazardous conditions may be present.
This product is intended for use by qualified personnel who recog­nize shock hazards and are familiar with the safety precautions re­quired to avoid possible injury. Read and follow all installation, operation, and maintenance information carefully before using the product. Refer to the manual for complete product specifications.
If the product is used in a manner not specified, the protection pro­vided by the product may be impaired.
The types of product users are:
Responsible body is the individual or group responsible for the use and maintenance of equipment, for ensuring that the equipment is operated within its specifications and operating limits, and for en suring that operators are adequately trained.
Operators use the product for its intended function. They must be trained in electrical safety procedures and proper use of the instru ment. They must be protected from electric shock and contact with hazardous live circuits.
Maintenance personnel perform routine procedures on the product to keep it operating properly, for example, setting the line voltage or replacing consumable materials. Maintenance procedures are de­scribed in the manual. The procedures explicitly state if the operator may perform them. Otherwise, they should be performed only by service personnel.
Service personnel are trained to work on live circuits, and perform safe installations and repairs of products. Only properly trained ser vice personnel may perform installation and service procedures.
Keithley products are designed for use with electrical signals that are rated Measurement Category I and Measurement Category II, as described in the International Electrotechnical Commission (IEC) Standard IEC 60664. Most measurement, control, and data I/O sig nals are Measurement Category I and must not be directly connect­ed to mains voltage or to voltage sources with high transient over­voltages. Measurement Category II connections require protection for high transient over-voltages often associated with local AC mains connections. Assume all measurement, control, and data I/O connections are for connection to Category I sources unless other wise marked or described in the Manual.
Exercise extreme caution when a shock hazard is present. Lethal voltage may be present on cable connector jacks or test fixtures. The American National Standards Institute (ANSI) states that a shock hazard exists when voltage levels greater than 30V RMS,
42.4V peak, or 60VDC are present. A good safety practice is to ex
pect that hazardous voltage is present in any unknown circuit before measuring.
Operators of this product must be protected from electric shock at
-
all times. The responsible body must ensure that operators are pre vented access and/or insulated from every connection point. In some cases, connections must be exposed to potential human con tact. Product operators in these circumstances must be trained to protect themselves from the risk of electric shock. If the circuit is capable of operating at or above 1000 volts, no conductive part of
the circuit may be exposed.
Do not connect switching cards directly to unlimited power circuits. They are intended to be used with impedance limited sources. NEVER connect switching cards directly to AC mains. When con necting sources to switching cards, install protective devices to limit fault current and voltage to the card.
Before operating an instrument, make sure the line cord is connect­ed to a properly grounded power receptacle. Inspect the connecting cables, test leads, and jumpers for possible wear, cracks, or breaks
­before each use.
When installing equipment where access to the main power cord is restricted, such as rack mounting, a separate main input power dis
­connect device must be provided, in close proximity to the equip-
ment and within easy reach of the operator.
For maximum safety, do not touch the product, test cables, or any other instruments while power is applied to the circuit under test. ALWAYS remove power from the entire test system and discharge any capacitors before: connecting or disconnecting cables or jump ers, installing or removing switching cards, or making internal changes, such as installing or removing jumpers.
Do not touch any object that could provide a current path to the com­mon side of the circuit under test or power line (earth) ground. Always
­make measurements with dry hands while standing on a dry, insulated
surface capable of withstanding the voltage being measured.
The instrument and accessories must be used in accordance with its specifications and operating instructions or the safety of the equip ment may be impaired.
­Do not exceed the maximum signal levels of the instruments and ac-
cessories, as defined in the specifications and operating informa­tion, and as shown on the instrument or test fixture panels, or switching card.
When fuses are used in a product, replace with same type and rating
­for continued protection against fire hazard.
Chassis connections must only be used as shield connections for measuring circuits, NOT as safety earth ground connections.
If you are using a test fixture, keep the lid closed while power is ap­plied to the device under test. Safe operation requires the use of a lid interlock.
-
-
-
-
-
-
-
5/03
If a screw is present, connect it to safety earth ground using the wire recommended in the user documentation.
!
The symbol on an instrument indicates that the user should re­fer to the operating instructions located in the manual.
The symbol on an instrument shows that it can source or mea­sure 1000 volts or more, including the combined effect of normal and common mode voltages. Use standard safety precautions to avoid personal contact with these voltages.
The symbol indicates a connection terminal to the equipment frame.
The WA RN ING heading in a manual explains dangers that might result in personal injury or death. Always read the associated infor­mation very carefully before performing the indicated procedure.
The CAUTION heading in a manual explains hazards that could damage the instrument. Such damage may invalidate the warranty.
Instrumentation and accessories shall not be connected to humans.
Before performing any maintenance, disconnect the line cord and all test cables.
To maintain protection from electric shock and fire, replacement components in mains circuits, including the power transformer, test leads, and input jacks, must be purchased from Keithley Instru­ments. Standard fuses, with applicable national safety approvals, may be used if the rating and type are the same. Other components that are not safety related may be purchased from other suppliers as long as they are equivalent to the original component. (Note that se lected parts should be purchased only through Keithley Instruments to maintain accuracy and functionality of the product.) If you are unsure about the applicability of a replacement component, call a Keithley Instruments office for information.
To clean an instrument, use a damp cloth or mild, water based cleaner. Clean the exterior of the instrument only. Do not apply cleaner directly to the instrument or allow liquids to enter or spill on the instrument. Products that consist of a circuit board with no case or chassis (e.g., data acquisition board for installation into a com puter) should never require cleaning if handled according to instruc­tions. If the board becomes contaminated and operation is affected, the board should be returned to the factory for proper cleaning/ser vicing.
-
-
-

Table of Contents

About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
What You Should Learn from this Manual. . . . . . . . . . . . . . . . . . xi
Conventions Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . xii
Related Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Where To Get Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Chapter 1: Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2: Principles of Operation . . . . . . . . . . . . . . . . . . . . 5
Analog Input Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Analog Input Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Specifying a Single Analog Input Channel . . . . . . . . . . . 7
Specifying One or More Analog Input Channels . . . . . . 8
Input Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Input Ranges and Gains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Specifying the Gain for a Single Channel . . . . . . . . . . . 10
Specifying the Gain for One or More Channels . . . . . . 10
Input Sample Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Analog Input Conversion Modes . . . . . . . . . . . . . . . . . . . . . . 11
Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Continuous Scan Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Input Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
vii
Contents
Analog Output Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Analog Output Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Specifying a Single Analog Output Channel . . . . . . . . 16
Specifying Analog Output Channels . . . . . . . . . . . . . . . 17
Output Resolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Output Ranges and Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Output Trigger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Output Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Output Conversion Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Continuous Output Mode . . . . . . . . . . . . . . . . . . . . . . . . 19
Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Digital I/O Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Digital I/O Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Resolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Operation Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Counter/Timer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
C/T Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
C/T Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Gate Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Pulse Duty Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Counter/Timer Operation Modes . . . . . . . . . . . . . . . . . . . . . 28
Event Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Frequency Measurement . . . . . . . . . . . . . . . . . . . . . . . . . 29
Edge-to-Edge Measurement . . . . . . . . . . . . . . . . . . . . . . 30
Rate Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
viii
Chapter 3: Supported Device Driver Capabilities. . . . . . . . 33
Chapter 4: Programming Flowcharts. . . . . . . . . . . . . . . . . . 43
Single-Value Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Continuous A/D Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Continuous D/A Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Event Counting Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Frequency Measurement Operations . . . . . . . . . . . . . . . . . . . . . . 53
Edge-to-Edge Measurement Operations . . . . . . . . . . . . . . . . . . . 55
Pulse Output Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Simultaneous Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 5: Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . 73
General Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Service and Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Chapter 6: Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using the KUSB-3100 Calibration Utility . . . . . . . . . . . . . . . . . . . 81
Calibrating the Analog Input Subsystem . . . . . . . . . . . . . . . . . . . 82
Connecting a Precision Voltage Source . . . . . . . . . . . . . . . . . 82
Using the Auto-Calibration Procedure . . . . . . . . . . . . . . . . . 82
Using the Manual Calibration Procedure . . . . . . . . . . . . . . . 83
Calibrating the Analog Output Subsystem . . . . . . . . . . . . . . . . . 85
Contents
Appendix A: Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 87
Appendix B: Connector Pin Assignments . . . . . . . . . . . . . 99
Appendix C: Reading from or Writing to the
Digital Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
ix
Contents
x

About this Manual

This manual describes the features of the KUSB-3100 module, the capabilities of the device driver, and how to program this module using DT-Open Layers software. Troubleshooting information is also provided.

Intended Audience

This document is intended for engineers, scientists, technicians, or others responsible for using and/or programming the KUSB-3100 module for data acquisition operations in Microsoft® Windows 2000 or Windows XP. It is assumed that you have some familiarity with data acquisition principles and that you understand your application.

What You Should Learn from this Manual

This manual provides detailed information about the features of the KUSB-3100 module and the capabilities of the device driver. The manual is organized as follows:
Chapter 1, “Overview,” describes the major features of the KUSB-3100 module, as well as the supported software for the module.
Chapter 2, “Principles of Operation,” describes all of the features of the module and how to use them in your application.
Chapter 3, “Supported Device Driver Capabilities,” lists the data acquisition subsystems and the associated features accessible using the device driver.
xi
About this Manual
Chapter 4, “Programming Flowcharts,” describes the processes you must follow to program the subsystems on the KUSB-3100 module using DT-Open Layers-compliant software.
Chapter 5, “Troubleshooting,” provides information that you can use to resolve problems with the module and the device driver, should they occur.
Chapter 6, “Calibration,” describes how to calibrate the analog I/O circuitry of the KUSB-3100 module.
Appendix A, “Specifications,” lists the specifications of the module.
Appendix B, “Connector Pin Assignments,” shows the screw terminal assignments for the module.
Appendix C, “Reading from or Writing to the Digital Registers,” describes register-level functions you can use to program the digital I/O lines of the module.
• An index completes this manual.
xii

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 KUSB-3100 module:
KUSB-3100 Getting Started Manual provided with the module. This manual describes how to install and wire signals to the KUSB-3100 module.
DataAcq SDK User’s Manual. For programmers who are developing their own application programs using the Microsoft C compiler, this manual describes how to use the DT-Open
TM
Layers access the capabilities of your module.
DTx-EZ Getting Started Manual. This manual describes how to use the ActiveX controls provided in DTx-EZ capabilities of your module in Microsoft Visual Basic® or Visual C++®.
DT-LV Link Getting Started Manual. This manual describes how to use DT-LV Link language to access the capabilities of your module.
DataAcq SDKTM in Windows 2000 or Windows XP to
About this Manual
TM
to access the
TM
with the LabVIEW® graphical programming
• Microsoft Windows 2000 or Windows XP documentation.
• USB web site (http://www.usb.org).
• Omega Complete Temperature Measurement Handbook and Encyclopedia®. This document, published by Omega Engineering,
provides information on how to linearize voltage values into temperature readings for various thermocouple types.

Where To Get Help

Should you run into problems installing or using your KUSB-3100 module, please call the Keithley Technical Support Department.
xiii
About this Manual
xiv
1

Overview

Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1
Chapter 1

Features

The KUSB-3100 module is an economy, multifunction mini-instrument.
Table 1: Key Features of the KUSB-3100 Module
Analog
Inputs
Analog
Outputs
Table 1 lists the key features of the module.
Resolution
I/O
Range
Sample
Rate
Digital
I/O
Counter/
a
Timer
8 SE
a. This counter/timer channel allows you to perform event counting, frequency
measurement, edge-to-edge measurement, and continuous pulse output (rate generation) operations.
2
12-bit ±10 V
50 kS/s 8 in,
8 out
In addition, the KUSB-3100 module provides these features:
• 16-location channel-gain list. You can cycle through the channel-gain list using continuous scan mode or triggered scan mode.
• 2-location output channel list. You can update both analog output channels simultaneously at up to 50 kSamples/s.
• 8 fixed digital input lines and 8 fixed digital output lines.
• One 32-bit counter/timer (C/T) channel that performs event counting, frequency measurement, edge-to-edge measurement, and rate generation operations (the resolution of the C/T is 16-bits in this mode).
• Internal and external A/D clock sources.
• Internal and external A/D trigger sources.
1
• No external power supply required. These are low-power required (less than 100 mA draw).
2

Supported Software

The following software is provided with the KUSB-3100 module:
Device Driver – This software must be installed and loaded before you can use a KUSB-3100 module with any of the supported software packages or utilities.
The Quick Data Acq application – This application provides a quick way to get your module up and running. Using the Quick Data Acq application, you can verify the features of the module, display data on the screen, and save data to disk.
DataAcq SDK – This DT-Open Layers Software Develop Kit (SDK) allows programmers to develop application programs for the KUSB-3100 using the Microsoft C compiler in Windows 2000 or Windows XP.
DTx-EZ – This software package contains ActiveX controls that allow Microsoft Visual Basic® or Visual C++® programmers to access the capabilities of the KUSB-3100 module.
DT-LV Link – This software package allows LabVIEW® programmers to access the capabilities of the KUSB-3100 module.
Overview
1
1
1
1
1
1
1
1
1
3
Chapter 1
4
2

Principles of Operation

Analog Input Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Analog Output Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Digital I/O Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Counter/Timer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5
Chapter 2
Figure 1 shows a block diagram of the KUSB-3100 module.
+2.5 V Reference
8-Channel Multiplexer
A/D Ch7
A/D Ch6
A/D Ch5
A/D Ch4
A/D Ch3
A/D Ch2
A/D Ch1
A/D Ch0
ESD Protected to 4000 V
DAC 1
DAC 0
From USB
Por t
A/D Clock
12-Bit A/D Converter
12-Bit D/A Converter
Power
Supply
32-Bit
Counter/Timer
+5 V
C/T Out 0 C/T Gate 0
C/T In 0
External Clock
External Trigger
Digital
I/O
ESD Protected to 4000 V
DOUT7
DOUT0
DIN7
DIN0
USB 2.0 or 1.1
Por t
Input FIFO
Figure 1: Block Diagram of the KUSB-3100 Module
6

Analog Input Features

This section describes the following features of analog input (A/D) operations on the KUSB-3100 module:
• Analog input channels, described on this page;
• Input resolution, described on page 8;
• Input ranges and gains, described on page 9;
Principles of Operation
2
2
• Input sample clock sources, described on page 10;
• Analog input conversion modes, described on page 11;
• Input triggers, described on page 13;
• Data format and transfer, described on page 14; and
• Error conditions, described on page 15.

Analog Input Channels

The KUSB-3100 module provides eight single-ended analog input channels. The module can acquire data from a single analog input channel or from a group of analog input channels.
The following subsections describe how to specify the channels.
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 single-value operations.
page 11 for more information about
2
2
2
2
2
2
You can also specify a single channel using the analog input channel-gain list, described in the next section.
2
7
Chapter 2
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. You can group the channels in the list sequentially (starting either with 0 or with any other analog input channel) or randomly. You can also specify a single channel or the same channel more than once in the list.
Using software, specify the channels in the order you want to sample them. You can enter up to 16 entries in the channel-gain list. The channels are read in order from the first entry in the list to the last entry in the list. Refer to supported conversion modes.
The maximum rate at which the module can read the analog input channels is 50 channels in the channel-gain list, the maximum sampling rate is 25
kSamples/s for each channel. Likewise, if you specify 16 analog
input channels in the channel-gain list, the maximum sampling rate is
3.125 kSamples/s for each channel.
kSamples/s. Therefore, if you specify two analog input
page 11 for more information about the

Input Resolution

The KUSB-3100 module provides a resolution of 12-bits. Note that the resolution is fixed; it cannot be programmed in software.
8

Input Ranges and Gains

Principles of Operation
The KUSB-3100 module features an input range of ±10 V. Use software to specify the input range. Note that this is the range for the entire analog input subsystem, not the range per channel.
The KUSB-3100 module supports programmable gains to allow many more effective input ranges. effective input ranges for each module.
Table 2: Effective Input Range
Gain Bipolar Input Range
1 ±10 V
2 ±5 V
4 ±2.5 V
8 ±1.25 V
For each channel on the KUSB-3100 module, choose the gain that has the smallest effective range that includes the signal you want to measure. For example, if your analog input signal ranges between –2.0 V and +2.0, specify a gain of 4 for the channel; the effective input range for this channel is then –2.5 V to +2.5 best sampling accuracy for that channel.
Table 2 lists the supported gains and
V, which provides the
2
2
2
2
2
2
2
The way you specify gain depends on how you specified the channels, as described in the following subsections.
2
2
9
Chapter 2
Specifying the Gain for a Single Channel
The simplest way to specify gain for a single channel is to specify the gain for a single-value analog input operation using software; refer to
page 11 for more information about single-value operations.
You can also specify the gain for a single channel using an analog input channel-gain list, described in the next section.
Specifying the Gain for One or More Channels
You can specify the gain for one or more analog input channels using an analog input channel-gain list. Using software, set up the channel-gain list by specifying the gain for each entry in the list.
For example, assume the analog input channel-gain list contains three entries: channels 5, 6, and 7 and gains 2, 4, and 1. A gain of 2 is applied to channel 5, a gain of 4 is applied to channel 6, and a gain of 1 is applied to channel 7.
10

Input Sample Clock Sources

You can use one of the following clock sources to pace an analog input operation:
Internal clock – Using software, specify the clock source as internal and the clock frequency at which to pace the operation. The minimum frequency of the internal clock is 30 Hz; the maximum frequency of the internal clock is 50 kHz.
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.
Principles of Operation
External clock – An external clock is useful when you want to pace acquisitions at rates not available with the internal clock or when you want to pace at uneven intervals. The minimum frequency of the external clock can be less than 30 Hz; the maximum frequency of the external clock is 50 kHz.
2
Connect an external clock to the Ext Clock In signal on the KUSB-3100 module. Conversions start on the rising edge of the external clock input signal.
Using software, specify the clock source as external. The clock frequency is always equal to the frequency of the external sample clock input signal that you connect to the module.

Analog Input Conversion Modes

The KUSB-3100 module supports the following conversion modes:
• Single-value operations, described on this page.
• Continuous scan operations, described on page 12.
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.
2
2
2
2
2
2
Single-value operations stop automatically when finished; you cannot stop a single-value operation.
2
2
11
Chapter 2
Continuous Scan Mode
Use continuous scan mode if you want to accurately control the period between conversions of individual 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
The conversion rate is determined by the frequency of the internal sample clock; refer to sample clock. The sample rate, which is the rate at which a single entry in the channel-gain list is sampled, is determined by the frequency of the input sample clock divided by the number of entries in the channel-gain list.
To select continuous scan mode, use software to specify the data flow as continuous.
page 14 for more information about buffers.
page 10 for more information about the internal
12
Figure 2 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 on each clock pulse of the input sample clock. When it reaches the end of the channel-gain list, the module wraps to the beginning of the channel-gain list and repeats this process. Data is acquired continuously.
Principles of Operation
Chan 0
Chan 1
Input Sample Clock
Initial trigger event occurs
Figure 2: Continuous Scan Mode

Input Triggers

A trigger is an event that occurs based on a specified set of conditions. Acquisition starts when the module detects the initial trigger event and stops when the specified number of samples has been acquired (if the buffer wrap mode is none, described on
14), or when you stop the operation. Note that when you stop the
operation, the module completes the reading of the channel-gain list.
The KUSB-3100 module supports the following trigger sources:
Software trigger – A software trigger event occurs when you start the analog input operation (the computer issues a write to the module to begin conversions). Using software, specify the trigger source as a software trigger.
External digital (TTL) trigger – An external digital (TTL) trigger event occurs when the module detects a high-to-low transition on the Ext Trig In signal connected to the module. Using software, specify the trigger source as a falling-edge external digital trigger (trigger source extra).
Chan 2
Chan 0
Chan 1
Chan 2
Data acquired continuously
Chan 0
Chan 2
Chan 1
Chan 0
Chan 1
Chan 2
page
2
2
2
2
2
2
2
2
2
13
Chapter 2

Data Transfer

Before you begin acquiring data, you must allocate buffers to hold the data. During acquisition, a Buffer Done message is returned whenever a buffer is filled. This allows you to move and/or process the data as needed.
It is recommended 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. This wrap mode 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. This mode does not guarantee gap-free data.
14

Data Format

The KUSB-3100 module uses twos complement encoding to represent bipolar input ranges. In software, the analog input value is returned as a code.
To convert a twos complement code into a voltage, use the following formulas:
LSB = FSR = 20 V = 0.0048828 V 2N 4096
Code
Offset Binary
= Code
Twos Complement
XOR 2
N-1
Principles of Operation
Vin = Code
where,
FSR is the full-scale range (20 V).
N is the input resolution (12 bits).
LSB is the least significant bit (0.0048828 V).
Vin is the analog voltage.
Code represent the voltage in twos complement notation.
Offset is the actual minus full-scale value (–10 V).
Code the voltage in offset binary notation.
For example, assume that the software returns a code of 3072 for the analog input value. Determine the analog input voltage as follows:
Code
Code
Vin = 1024 * 0.0048828 V + –10 V
Offset Binary
Twos Com p lem ent
OffsetBinary
Offset Binary
Offset Binary
* LSB + Offset
is the raw count used by the software to
is the raw count used by the software to represent
= Code
= 3072 XOR 2048 = 1024
Twos Complement
XOR 2
N-1
2
2
2
2
2
2
Vin = –5.00 V

Error Conditions

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. It is up to the host application to handle this error either by ignoring the error or stopping acquisition. To avoid this error, use a slower sampling rate.
2
2
2
15
Chapter 2

Analog Output Features

This section describes the following features of analog output operations:
• Analog output channels, described on this page;
• Output resolution, described on page 17;
• Output ranges and gains, described on page 17;
• Output trigger, described on page 17,
• Output clock, described on page 18,
• Data format and transfer, described on page 21; and
• Error conditions, described on page 22.

Analog Output Channels

The KUSB-3100 module provides two analog output channels (DACs). The module can output data from a single analog output channel or from both analog output channels.
16
The following subsections describe how to specify the channels.
Specifying a Single Analog Output Channel
The simplest way to output data from a single analog output channel is to use single-value analog output mode, specifying the analog output channel that you want to update; refer to information about single-value operations.
You can also specify a single analog output channel using the output channel list, described in the next section.
page 18 for more
Loading...
+ 99 hidden pages