Tektronix Using Keithley DriverLINX with KPCI-3108 or KPCI-3107 (1.4MB) User manual

Keithley KPCI-3108 Series
Using DriverLINX with Your
Hardware
SCIENTIFIC SOFTWARE TOOLS, INC. SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RELATED TO THE USE OF THIS PRODUCT. THIS PRODUCT IS NOT DESIGNED WITH COMPONENTS OF A LEVEL OF RELIABILITY SUITABLE FOR USE IN LIFE SUPPORT OR CRITICAL APPLICATIONS.
This document may not, in whole or in part, be copied, photocopied, reproduced, translated or reduced to any electronic medium or machine readable form without prior written consent from Scientific Software Tools, Inc.
Keithley KPCI-3108 Series: Using DriverLINX with Your Hardware Copyright 1999, 2002 by Scientific Software Tools, Inc. All rights reserved.
First Printing. SST 26-0202-1
DriverLINX, SSTNET, and LabOBJX are registered trademarks and DriverLINX/VB is a trademark of Scientific Software Tools, Inc. MetraByte is a trademark of Keithley Instruments, Inc. Microsoft and Windows are registered trademarks and Visual C++ and Visual Basic are trademarks of Microsoft Corporation. Borland is a registered trademark and Borland C++ and Delphi are trademarks of Borland International, Inc. All other brand and product names are trademarks or registered trademarks of their respective companies.
Contents
Preface 7
Software License and Software Disclaimer of Warranty............................................................7
About DriverLINX.....................................................................................................................9
About This User’s Guide...........................................................................................................9
Conventions Used in This Manual...........................................................................................11
Configuring the KPCI-3108 Series 13
Introduction..............................................................................................................................13
Configure DriverLINX Device Dialog.....................................................................................14
Using the KPCI-3108 Series with DriverLINX 27
Introduction..............................................................................................................................27
KPCI-3108 Series Hardware Features .....................................................................................27
DriverLINX Hardware Model for KPCI-3108 Series..............................................................28
Connecting Signals to the KPCI-3108 Series...........................................................................33
Device Subsystem....................................................................................................................39
Analog Input Subsystem ..........................................................................................................40
Device Subsystem Page.............................................................................................15
Analog Input Subsystem Page ...................................................................................20
Analog Output Subsystem Page.................................................................................21
Digital Input Subsystem Page....................................................................................22
Digital Output Subsystem Page .................................................................................24
Counter/Timer Subsystem Page.................................................................................26
DriverLINX Subsystems............................................................................................28
DriverLINX Modes ...................................................................................................28
DriverLINX Operations and Events..........................................................................30
Logical Channels.......................................................................................................32
Buffers.......................................................................................................................32
Analog Input Subsystem Signals................................................................................33
Analog Output Subsystem Signals.............................................................................35
Digital Input Subsystem Signals................................................................................36
Digital Output Subsystem Signals..............................................................................37
Counter/Timer Subsystem Signals.............................................................................37
Device Modes............................................................................................................39
Device Operations .....................................................................................................39
Analog Input Modes..................................................................................................40
Analog Input Operations............................................................................................40
Analog Input Pacing, Triggering and Gating Options................................................40
Analog Input Timing Events......................................................................................42
Analog Input Start Events..........................................................................................52
Analog Input Stop Events..........................................................................................55
Analog Input Channels...............................................................................................58
Keithley KPCI-3108 Series Contents 3
Analog Input Expansion Channels.............................................................................64
Analog Input Buffers .................................................................................................66
Analog Input Data Coding.........................................................................................67
Analog Input Messages..............................................................................................68
Analog Output Subsystem........................................................................................................69
Analog Output Modes................................................................................................69
Analog Output Operations.........................................................................................69
Analog Output Pacing, Triggering and Gating Options.............................................69
Analog Output Timing Events...................................................................................71
Analog Output Start Events .......................................................................................81
Analog Output Stop Events........................................................................................81
Analog Output Channels............................................................................................82
Analog Output Channel Gains ...................................................................................84
Analog Output Buffers...............................................................................................85
Analog Output Data Coding.......................................................................................85
Analog Output Messages ...........................................................................................87
Digital Input Subsystem...........................................................................................................88
Digital Input Modes...................................................................................................88
Digital Input Operations.............................................................................................88
Digital Input Pacing, Triggering and Gating Options................................................89
Digital Input Timing Events.......................................................................................89
Digital Input Start Events...........................................................................................93
Digital Input Stop Events...........................................................................................93
Digital Input Channels...............................................................................................94
Digital Input Buffers..................................................................................................97
Digital Input Messages...............................................................................................98
Digital Output Subsystem.........................................................................................................99
Digital Output Modes ................................................................................................99
Digital Output Operations..........................................................................................99
Digital Output Pacing, Triggering and Gating Options............................................100
Digital Output Timing Events..................................................................................100
Digital Output Start Events......................................................................................104
Digital Output Stop Events......................................................................................104
Digital Output Channels...........................................................................................104
Digital Output Buffers.............................................................................................108
Digital Output Messages..........................................................................................108
Counter/Timer Subsystem......................................................................................................110
Counter/Timer Channel Usage.................................................................................110
Clock Sources and Modes........................................................................................111
Gate Settings............................................................................................................113
Counter/Timer Tasks ...............................................................................................113
Counter/Timer Messages.........................................................................................115
Uninstalling DriverLINX 117
How do I uninstall DriverLINX? ...........................................................................................117
Troubleshooting 121
Solving Problems...................................................................................................................121
Solving Problems Recognizing and Installing Drivers.............................................121
Solving Problems Configuring the Drivers..............................................................122
Solving Problems Loading Drivers..........................................................................122
Generating a DriverLINX Configuration Report....................................................................125
What is in the Report?..............................................................................................125
4 Contents Keithley KPCI-3108 Series
How do I Generate the Report?...............................................................................125
Glossary of Terms 126
Keithley KPCI-3108 Series Contents 5
Preface
Software License and Software Disclaimer of Warranty
This is a legal document whic h is an agreement between you, the Licensee, and Scientific Software Tools, Inc. By opening this sealed diskette package, Licensee agrees to bec ome bound by the terms of this Agreement, which include the S oftware License and Software Disclaimer of Warranty.
This Agreement constit utes the complete Agreement between Licensee and Scient ific Software Tools, Inc. If Licensee does not agree to the terms of this Agreement, do not open the dis kette package. Promptly return the unopened diskette package and the other items (including written materials , binders or other containers, and hardware, if any) that are part of this product to S cientific Software Tools, Inc. for a full refund. No ref unds will be given for products that have opened disk packages or missing components.
Licensing Agreement
Copyright. The software and doc umentation is owned by Scient ific Software Tools, Inc. and is prot ected by both United States
copyright laws and int ernational treaty provisions. Scient ific Software Tools, Inc. authoriz es the original purchaser only (Licensee) to either (a) make one copy of t he software solely for backup or archival purposes, or (b) transf er the software to a si ngle hard disk only. The written materials acc om panying the software may not be duplicated or copied for any reason.
Trade Secret. Licensee understands and agrees that the sof tware is the propriet ary and confident ial property of Scientifi c Software Tools, Inc. and a valuable t rade secret. Li censee agrees to us e the software only for the intended us e under this License, and shall not disclose the soft ware or i t s contents to any third part y.
Copy Restrictions. The Licensee may not modify or trans late the program or related documentation without the prior written consent of Scientific Software Tools, Inc. All modifications, adapt ations, and me rged portions of the s oftware const itute the s oftware
licensed to t he Licensee, and the terms and conditions of this agreement apply to same. Licens ee may not distribut e copies, inc luding electronic transfer of c opies, of the modif ied, adapted or m erged software or ac company ing written m aterials to others. Licensee agrees not to reverse engineer, decompil e or di sassemble any part of the s of tware.
Unauthorized copying of the soft ware, including sof tware that has been m odified, merged, or i ncluded with other s oftware, or of t he written materials is ex pressly forbidden. Licens ee may not rent, transfer or leas e the software to any third parties. Licens ee agrees to
take all reasonable steps to protect Scientific Software Tools’ software from theft, disclosure or use contrary to the terms of the Licens e.
License. Scientific S oftware Tools, I nc. grants t he Licensee only a non-exclusiv e right to use the serialized copy of the software on a single terminal connected t o a single computer. The Licens ee may not network the s oftware or use it on more t han one computer or computer terminal at the s ame time.
Term. This Lic ense is effective until terminated. This License will terminate automatic ally without notice from Scientific Software Tools, Inc. if Lic ensee fail s to com ply wit h any term or c ondition of this Licens e. The Licensee agrees upon such termination to ret urn or destroy the written materi als and all copies of t he software. The Licensee may terminate the agreement by ret urning or destroying the program and documentation and all copies thereof.
Keithley KPCI-3108 Series Preface 7
Limited Warranty
Scientific Software Tools, I nc. warrants that the software will perform subs tantially in acc ordance with the written mat erials and that the program disk, instructi onal manuals and reference mat erials are free from defec ts in materials and workmanship under normal us e for 90 days from the date of receipt. All express or im pl i ed warranties of the software and related materials are limited to 90 days.
Except as specif icall y set f orth herein, t he soft ware and accompany ing writt en materials (includi ng instruc tions f or use) are provided
“as is” without warranty of any kind. Further, Sc ientific Soft ware Tools, Inc. does not warrant , guarantee, or make any represe ntations regarding the use, or the results of t he use, of the s of tware or writ ten mat erial s in terms of correct ness , acc uracy , reliabil ity, currentness, or otherwise. The entire risk as to the results and perform ance of the software is as sumed by Licensee and not by Scienti fic Software Tools, Inc. or its distributors, agents or employees.
EXCEPT AS SET F ORTH HE REI N, THE RE ARE NO OTHER WARRANT IE S, EI THER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE, THE ACCOMPANYING WRITTEN MATERIALS, AND ANY ACCOMP ANYING HARDWARE.
Remedy. Scientific S oftware Tools’ ent ire liabilit y and the Licens ee’s ex clus ive remedy shall be, at Sc ientific Sof tware Tools’ opt ion,
either (a) return of the price paid or (b) repair or replac ement of the software or accompanying m aterials. In the event of a defect in material or workmans hip, the item may be returned wit hin the warranty period to Scientific S oftware Tools for a replacement without charge, provided the lic ensee previously s ent in the limited warrant y registration board t o Scientific Software Tools, I nc., or can furnis h proof of the purchase of the program. This remedy is void if failure has resulted from accident, abuse, or misapplication. Any replacement will be warranted for the remainder of the original warranty period.
NEITHER SCIENTIFIC SOFTWARE TOOLS, INC. NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, SALE OR DELI VERY OF THIS PRODUCT S HALL BE LIABLE FOR ANY DIRE CT, INDIRECT, CONSEQUENTI AL, OR INCIDENTAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION AND THE LIKE) ARISING OUT OF T HE USE OF OR THE INABI LITY TO USE SUCH PRODUCT EVEN IF SCIENTIFIC SOFTWARE TOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR LIMITATI ONS ON DURATION OF AN IMPLIED WARRANTY, THE ABOVE LIM ITATIONS MAY NOT APPLY TO LICENSEE.
This agreement is governed by the laws of the Commonwealth of Pennsylvania.
8 Preface Keithley KPCI-3108 Series
About DriverLINX
Welcome to DriverLINX for Microsoft Windows, the high-performance real­time data-acquisition device drivers for Windows application development.
DriverLINX is a language- and hardware-indepe ndent applic ation programming
interface designed to support hardware manufacturers’ high-speed analog, digital, and counter/timer data-acquisition boards in Windows. DriverLINX is a multi-user and multitasking data-acquisition resource manager providing more than 100 services for foreground and background data acquisition tasks.
Included with your DriverLINX package are the following items:
The DriverLINX API DLLs and drivers supporting your data-
acquisition hardware
Analog I/O Panel, a DriverLINX program that verifies the installation
and configuration of DriverLINX for your analog input/output board and demonstrates several virtual bench-top instruments
Source code for the sample programs
The DriverLINX Application Programming Interface files for your
compiler
DriverLINX On-line Help System
DriverLINX 4.0 Installation and Configuration Guide
DriverLINX Analog I/O Programming Guide
DriverLINX Technical Reference Manual
Supplemental Documentation on DriverLINX and your data-acquisition
hardware
About This User’s Guide
The purpose of this manual is to help you quickly learn how to configure and use t he
hardware features of Keithley’s KPCI-3108 Series boards with DriverLINX.
For help installing and configuring your hardware and Dr iverLINX,
please see the manual that accompanied your hardware and the DriverLINX 4.0 Installation and Configuration Guide for your version of Windows.
For more information on the DriverLINX API, please see the
DriverLINX Technical Reference Manual.
For additional help programming your board, please examine the source
code examples on the Distribution Disks.
This manual contains the following chapters: Configuring the KPCI-3108 Series Shows how to configure the KPCI-3108 Series using the Configure DriverLINX
Device dialog box.
Using the KPCI-3108 Series with DriverLINX
Keithley KPCI-3108 Series Preface 9
Shows how to set up DriverLINX with the Edit Service Request dialog box to use KPCI-3108 Series hardware features.
Uninstalling DriverLINX Describes how to remove DriverLINX hardware drivers and other files.
Troubleshooting
Gives troubleshooting tips for installing, configur ing, and loading D riverLINX drivers.
10 Preface Keithley KPCI-3108 Series
Conventions Used in This Manual
The following notational conventions are used in this manual:
A round bullet (•) identifies itemized lists.
Numbered lists indicate a step-by-step procedure.
DriverLINX Application Programming Interface and Windows macro
and function names are set in bold when mentioned in the text.
DriverLINX indicates the exported function name of the device driver
DLL while DriverLINX indicates the product as a whole.
DriverLINX Application Programming Interface identifiers, menu
items, and Dialog Box names are italicized when mentioned in the text.
Italics are used for emphasis.
Source code and data structure examples are displayed in Courier
typeface and bounded by a box with a single line.
Code
A box with a double line bound tables of information.
Tables
Concept
Important concepts and notes are printed in the left margin.
Keithley KPCI-3108 Series Preface 11
Configuring the KPCI-3108 Series
Introduction
The installation program provides general instructions for installing and configuring DriverLINX. This manual explains the steps and special features that apply to
Keithley’s KPCI-3108 Series boards. Installing and configuring DriverLINX for a Keithley KPCI-3108 Series board
requires three steps:
1. Install DriverLINX. Follow the instructions given by the installation
program. The Read Me First instructions explain the components and drivers you can install.
2. Install your KPCI-3108 hardware. Follow the instructions in your
hardware manual.
Windows NT
3. Configure DriverLINX. This creates a Logical Device, which stores
configuration information for your board. See “Configure Dri verLINX Device Dialog” on page 14 for configuration options specific to a Keithley KPCI-3108 Series model. Configuration is automatic under Windows 2000/XP but you may want to customize the settings.
After installing your b oard, configuring DriverLINX, and restarting Windows (if required), reopen the DriverLINX Configuration Panel to make sure that DriverLINX loaded the Logical Device for your board. If the Logical Device is not loaded, the Event Log may have a message from the driver that explains why. You can check the Event Log using the DriverLINX Event Viewer on the Windows Start Menu.
Under Windows NT 4.0, a Logical Device may not load because the operating system does not always configure Plug-and-Play PCI devices properly. To work around this, set your computer’s BIOS to configure Plug-and-Play devi ces before it starts the operating system. On various computers the BIOS setting is called “Plug­and-Play Aware OS – Disabled” or “Plug & Play OS – No”.
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 13
Configure DriverLINX Device Dialog
DriverLINX uses a standardized configuration protocol for all data-acquisition hardware. Configur ation assigns an identi fying device number to a specific KPCI­3108 Series board in your computer and allows you to enable or disable bus mastering.
The installation program automatically starts the DriverLINX Configuration Panel. To start it now, use the shortcut on the Windows Start Menu.
When you click the Configure… button on the DriverLINX Configuration Panel, DriverLINX displays the Configure DriverLINX Device dialog. The dialog has a page for each subsystem on the Keithley KPCI-3108 Series. The following sections describe your choices in configuring DriverLINX to work with your board.
14 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
Device Subsystem Page
Use the Device subsystem page to tell DriverLINX the model name of, and, optionally, the accessories connected to your KPCI-3108 Series board.
Vendor
The Vendor property displays “Keithley Instruments, Inc.” It is a read-only property.
Device
Windows NT
Windows 95/98
The Device property designates the Logical Device you are configuring. It is a read­only property. To change it, first save (OK) or quit (Cancel) the current configuration. Then select or create a new Logical Device using the DriverLINX Configuration Panel.
Model
The Model property selects or indicates the hardware model of the board you’re configuring.
Select one of the following models:
KPCI-3108 KPCI-3107
Windows 95 automatically determines the model of your board so DriverLINX disables Model selection.
Board Id
The Board Id property associates this Logical Device with a specific board. DriverLINX automatically enters the KPCI-3108’s serial number in this field. DriverLINX use s the board’s ser ial number to uniquely recognize boards if you have installed multiple boards of the same model into your computer.
Windows NT
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 15
Under Windows NT, Board Id is initially blank. DriverLINX will use the Model setting to match this Logical Device to the first available board and then enter that board’s serial number.
Windows 95/98
Windows 95/98 automatically determines which board to associate with this Logical Device. DriverLINX enters the serial number of the board when it starts the configuration.
Detect
The Detect property enables and disables DriverLINX’s hardware detection and testing algorithms. For maximum system reliability, always leave this check-box marked.
Calibrate
The Calibrate property enables and disables hardware auto-calibration. This option is grayed-out for the KPCI-3108 Series because it does not support automatic calibration.
Special…
The Special… button displays the following dialog box of KPCI-3108 Series-specific configuration options:
Enable Bus Mastering
Bus Mastering is a mode that PCI devices use to perform DMA data transfers. The KPCI-3108 Series can use bus mastering on motherboards that support it. With bus mastering disabled, the board will operate in interrupt mode when the Service Request asks for DMA mode. For maximum throughput, enable bus mastering if your motherboard supports it.
Motherboards compliant with revision 2.1 of the PCI specification support bus mastering. Almost all newer motherboards support bus mastering but some require BIOS settings to enable it for a particular PCI slot. Older motherboards may not support bus mastering at all and may cause the system to hang, risking loss of unwritten disk data and requiring you to reboot. Consult your computer manufacturer’s documentation to determine if your motherboard supports bus
mastering.
16 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
To test bus-mastering, check the Enable Bus Mastering box, click OK as necessary to exit the DriverLINX Configuration Panel and restart Windows. Close all other applications, wait until all disk activity stops, and then run the DriverLINX AIO Panel. If the AIO Panel can display an input signal then your motherboard is compatible with your KPCI-3108 Series board. As long as your BIOS has enabled bus mastering for the PCI slot your board is in, DriverLINX can use DMA mode.
Use 8254 Gate for AI
The KPCI-3108 Series supports analog input gating from two sources. The TGIN signal directly controls the analog-to-digital converter and is programmable as active high or low. Analog input is normally paced with the three-channel 8254 counter/timer chip. Two of the channels have an active high input available for gating. For compatibility with other Keithley products, DriverLINX normally uses the TGIN signa l when an applicatio n requests gating. However, you can configure the device to use the counter/timer gate instead.
The two gate sources have the following features and advantages: TGIN
High or low level active
Compatible with portable DriverLINX applications
C/T Gate
High level active only
TGIN pin is available for triggering with tasks that require both
triggering and gating
Digital Output OP0..4 Setup
The OP0 to OP4 pins output one of three groups of control or data signals. DriverLINX does not automatically select a signal group but allows you to choose which group the boa rd outputs through t hese connections.
Choose one the following groups of signals:
Group Signal Description Pin
General purpose I/O GP0 Digital output data line OP0 GP1 Digital output data line OP1 GP2 Digital output data line OP2 GP3 Digital output data line OP3 GP4 Digital output data line OP4
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 17
Group Signal Description Pin
SSH control/Clock output SSHO SSH control signal OP0
CLK0 Output of 8254 clock 0 (Logical Channel 1) OP1 CLK1 Output of 8254 clock 1 (Logical Channel 2) OP2 CLK2 Output of 8254 clock 2 (Logical Channels 0 and
3)
PCLK Emits a pulse for each analog input conversion OP4 Expansion accessory control xA0 Expansion accessory address line OP0
xA1 Expansion accessory address line OP1 xA2 Expansion accessory address line OP2 xA3 Expansion accessory address line OP3 K Expansion accessory gain control OP4
OP3
Notes:
It is important that you correctly configure digital channel 0 so that the
attached accessories or user hardware receive the intended signals.
Any one of the clock signals is also available from the OP5 depending
on the Trigger/Clock Output Selection.
General purpose output
The General purpose output option enables writing 5-bits of digital data to the OP0..4 pins. DriverLINX addresses these pins as Logical Channel 0 in the Digital Output subsystem.
To enable the KPCI-3108’s 5-bit digital output, perform the following step in the
“Digital Output OP0..4 Setup” section of the Configure KPCI-3108 Options dialog box:
1. Click the General purpose output option
Clock Output
To enable the KPCI-3108’s three 8254 counter outputs, perform the following step in the “Digital Output OP0..4 Setup” section of the Configure KPCI-3108 Options dialog box:
2. Click the SSH control & CLKOUTs option
Note: Any one of the clock signals is also available from the OP5 pin depending on the OP5 Setup.
Expansion accessory control
You can expand the number of analog input channels connected to your KPCI-3108 Series board by using one or more expansion accessories. Each expansion accessory
18 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
is 1-to-16 multiplexer that replaces one onboard channel with sixteen expansion channels. Configure your DriverLINX Logical Device to use the additional channels by enabling the expansion accessory here.
To enable the KPCI-3108’s expansion accessory control signals and allow
applications to access expansion channels, perform the following steps:
1. In the “Digital Output OP0..4 Setup” section of the Configure KPCI-
3108 Options dialog box, click the Enable EXP addressing option
2. On the Analog Input Page, configure the subsystem for 16 single-ended channels
For information on programming a task to access expansion channels, see “Analog Input Expansion Channels” on page 64.
OP5 Setup
The OP5 pin outputs one of se veral triggering and clock output signals. DriverLINX does not automatically select an output signal but allows you to choose which signal the board outputs through this connection.
Choose one of the following signals:
TGOUT—Relays the TGIN signal when using external triggering or gating, or is high during software-triggered analog input sampling
CLK0—Output of 8254 clock 0 (Logical Channel 1)
CLK1—Output of 8254 clock 1 (Logical Channel 2)
CLK2—Output of 8254 clock 2 (Logical Channels 0 and 3)
PCLK—Emits a pulse for each analog input conversion
Note: The clock signals are also available from the OP1 to OP3 pins when the Digital Output OP0..4 Setup option is SSH control & CLKOUTs.
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 19
Analog Input Subsystem Page
Use the Analog Input subsystem page to choose between 16 single-ended or 8 differential analog input channels as a default configuration.
Channels
On the KPCI-3108 Series, each Analog Input channel can use single-ended or differential termination modes. When configuring the Analog Input Subsystem, you choose a default configuration for all channels. Applications can use the default configuration or specify the termination mode for each channel that it uses. This scheme supports applications that use KPCI-3108-specific features as well as those that use only generic features. For applications that do specify the termination mode, configure the subsystem for 16 channels.
For information on programming the termination mode, see “Analog Input Channels” on page 58.
Range
The analog input ranges for the KPCI-3108 Series are fully software programmable. DriverLINX grays out this property in the configuration dialog.
Interrupt
Windows automatically determines the interrupt level for the KPCI-3108 Series board. DriverLINX disables this property.
DMA
The KPCI-3108 Series does not use DMA channels for direct memory transfers. PCI devices use bus mastering for DMA. DriverLINX initially disables bus mastering for your KPCI-3108 Series board. See “Special…” on page 16 for more information.
Calibrate
The KPCI-3108 Series supports semi-automatic calibration only. You can start the calibration utility from the Windows Start menu. Additionally, applications can request automatic zero-reference adjustments (offset calibration). For more information, see “Analog Input Zero-Reference Adjustment” on page 63.
20 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
Analog Output Subsystem Page
Use the Analog Output subsystem page to set or view the initial output voltages.
Channels
Lists the analog output channels on the board and selects a channel for the Volts and Initialize properties.
Range
The analog output ranges for the KPCI-3108 Series are fully software programmable. DriverLINX grays out this property in the configuration dialog.
Volts
The Initialization Value property specifies the analog output value DriverLINX will write to the selected Logical Channel upon hardware initialization. DriverLINX only writes this value if you enable the In
itialize check box.
Interrupt
Windows automatically determines the interrupt level for the KPIC-3108 board. DriverLINX disables this property.
DMA
The KPCI-3108 Series does not use DMA channels for direct memory transfers. DriverLINX disables this property.
Initialize
Checking the Initialize check box instructs DriverLINX to use the Volts property for to initialize the selected analog output channel.
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 21
Digital Input Subsystem Page
Use the Digital Input subsystem page to set configurable digital channels as input or output.
Channels
The Channels proper ty allows you to select a Lo gical Channel for configuration or
viewing the channel’s range. The KPCI-3108 Series supports both fixed and configurable digital channels.
DriverLINX defines the following Logical Channels for the KPCI-3108 Series Digital Input Subsystem:
Logical Channel DriverLINX Function KPCI-3108 Series External
Connector
0 Standard Digital Input IP0 … IP5 1 Digital Input/Output Bit 0 … Bit 7 2 Digital Input/Output Bit 8 … Bit 15 3 Digital Input/Output Bit 16 … Bit 23 4 Digital Input/Output Bit 24 … Bit 31 5 External Clock XPCLK 6 External Trigger TGIN
Range
The Range property specifies the supported digital input range for the selected Logical Channel. This is a read-only property.
Interrupt
Windows automatically determines the interrupt level for the KPIC-3108 board. DriverLINX disables this property.
DMA
The KPCI-3108 Series does not use DMA channels for direct memory transfers. DriverLINX disables this property.
22 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
Configuration Setup
The Configuration Setup property specifies the hardware configuration of the digital I/O ports. Logical Channels 1 through 4 are configurable as i nput or output. Enter 1 to initially configure the selected channel as input or 0 to configure it as output.
Initialize
Checking the Initialize check box instructs DriverLINX to use the Configuration S
etup property to configure the selected digital I/O channel.
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 23
Digital Output Subsystem Page
Use the Digital Output subsystem page to change the default digital output port initialization values.
Channels
The Channels property allows you to select a Logical Channel for initialization or
viewing the channel’s range.
Logical Channel DriverLINX Function KPCI-3108 Series External
Connector
0 Standard Digital Output OP0 … OP4 1 Digital Input/Output Bit 0 … Bit 7 2 Digital Input/Output Bit 8 … Bit 15 3 Digital Input/Output Bit 16 … Bit 23 4 Digital Input/Output Bit 24 … Bit 31
Note: To use Logic al Channel 0, you configure pins OP0. .4 as General purpose output on the Special… dialog.
Range
The Range property specifies the supported digital output range for the selected Logical Channel. This is a read-only property.
Interrupt
Windows automatically determines the interrupt level for the KPIC-3108 board. DriverLINX disables this property.
DMA
The KPCI-3108 Series does not use DMA channels for direct memory transfers. DriverLINX disables this property.
24 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
Initialization Value
The Initialization Value property specifies the digital output value DriverLINX will write to the selected Logical Channel upon hardware initialization. DriverLINX only writes this value if you enable the In
itialize check box.
Initialize
Checking the Initialize check box instructs DriverLINX to use the Initialization V
alue property for digital output port initialization.
Dec
This check box converts the Initialization Value property to decimal.
Hex
This check box converts the Initialization Value property to hexadecimal.
Keithley KPCI-3108 Series Configuring the KPCI-3108 Series 25
Counter/Timer Subsystem Page
Use the Counter/Timer subsystem page to set the default clock source frequency.
Resolution
The Resolution property specifies the default clock frequency of the master oscillator. All models have a programmable 10 MHz, 5 MHz, 1 MHz or 100 kHz clock source for pacing input/output tasks. This setting selects the default frequency. Applications can use the default or specify a frequency for each task.
Interrupt
Windows automatically determines the interrupt level for the KPIC-3108 board. DriverLINX disables this property.
26 Configuring the KPCI-3108 Series Keithley KPCI-3108 Series
Using the KPCI-3108 Series with DriverLINX
Introduction
See the Analog I /O Programming Guide for an
overview of DriverLINX programming.
This chapter shows you how to set up and use KPCI-3108 Series hardware features with DriverLINX.
The descriptions here use the Edit Service Request dialog for language and API
independence. For the corr ect syntax with the language you’re using, p lease see the DriverLINX Technical Reference Manuals. For DriverLINX examples in your programming language, p lease see the sourc e code examples in the subdirectories of your DriverLINX installation directory or on the original distribution media.
KPCI-3108 Series Hardware Features
The KPCI-3108 Series offers your data-acquisition application a wide variety of useful features. Analog inputs support mixed gains, termination modes and polarities, as well as auto-zeroing, digital pre-, post- and about-triggering, and analog pre- and about-triggering. Analog outputs are waveform-quality. The counter/timers are user­accessible. DriverLINX accesses these feats through its hardware independent Applications Programming Interface (API).
The following table is a cross-reference between hardware features and the DriverLINX features that access them.
Hardware Feature DriverLINX Feature
Calibration of each anal og input and output range
Auto-zeroing of analog input channels Analog Input Zero-Reference Adjustment Analog triggering Analog Stop Event (Pre- and About-
Digital triggering Digital Start Event (Post-Triggering)
DriverLINX provides a stand-alone KPCI- 3108 Calibration Utility.
Triggering)
Digital Stop Event (Pre- and About­Triggering)
Hardware Feature DriverLINX Feature
Programmable single-ended or differential termination modes
Programmable gains Analog Input Channel Gains
Waveform-quality analog outputs Analog Output Subsystem User-accessible counter/timers Counter/Timer Subsystem
Analog Input Channel Termination modes
Analog Output Channel Gains
DriverLINX Hardware Model for KPCI-3108 Series
DriverLINX provides a portable, hardware-independent API for data-acquisition boards while still allowing applications to access unique or proprietary hardware features of specific products. To achieve this goal, DriverLINX maps a hardware­independent, or abstract, data-acquisition model onto KPCI-3108 Series hardware capabilities.
The following sections describe how DriverLINX implements KPCI-3108 Series hardware features as Subsystems, Modes, Operations, Events, Logical Channels, Buffers, and Messages.
DriverLINX Subsystems
The KPCI-3108 Series supports the following DriverLINX subsystems:
1. Device—refers to a KPCI-3108 Series board as a whole.
2. Analog Input—refers to the analog input channels, clocks, and control
signals.
3. Analog Output—refers to the analog output channels, clocks, and
control signals.
4. Digital Input—refers to the digital input port as well as 1-bit digital
input (TTL) control signals, such as TGIN.
5. Digital Output—refers to the digital output port.
6. Counter/Timer—refers to the onboard counter/timer channels for
pacing analog input/output or performing measuring and waveform generation funct ions.
DriverLINX Modes
Applications use modes in Service Requests to advise DriverLINX on their preferred hardware data transfer technique. The DriverLINX modes fall into two general classes:
Foreground or synchronous modes. The calling application doesn’t
regain control until DriverLINX completes the Service Request. DriverLINX supports this mode for simple, single value I/O operations or software housekeeping functions that DriverLINX can complete without a significant delay.
28 Using the KPCI-3108 Series with DriverLINX Keithley KPCI-3108 Series
Background or asynchronous modes. The calling application regains
control as soon as DriverLINX initiates the task. The calling application must synchronize with the data-acquisition task using status polling or
DriverLINX’s messages (preferred). DriverLINX supports this mode for buffered data transfers or for commands that require a significant time to complete.
DriverLINX supports four modes with the KPCI-3108 Series for its commands (Service Requests).
Polled Mode—This is a foreground or synchronous op eration. DriverLINX supports this mode for simple, single-value I/O operations that the data-acquisition board can complete without significant delay.
Interrupt Mode—T his is a background or asynchronous op eration. DriverLINX transfers data between the computer’s memory and the data-acquisition board using hardware interrupts and programmed I/O transfers.
DMA Mode—This is a backgro und or asynchronous o peration. DriverLINX programs the data-acquisition board to transfer data between the computer’s memory and the board.
Other Mode—This i s a foreground or synchronous operation. DriverLINX supports this mode for initialization, configuration, calibration, data conversion, and timebase operations.
The following table summarizes the data acquisition modes that DriverLINX supports for each subsystem with the Keithley KPCI-3108 Series.
Subsystem Polled Interrupt DMA Other
Analog Input ¥ ¥ ¥ ¥ Analog Output ¥ ¥ ¥ ¥ Digital Input ¥ ¥ Digital Output ¥ ¥ Counter/Timer ¥ ¥ Device
KPCI-3108 Series Supported DriverLINX Modes.
¥ ¥ ¥ ¥
DriverLINX Operations and Events
Applications construct DriverLINX data-acquisition tasks by combining a small number of DriverLINX operations and events in many possible ways. The following table summarizes the operations and events that DriverLINX supports for the Keithley KPCI-3108 Series. Later sections for each DriverLINX subsystem will describe the operations and events in more detail.
Note: In addition to the operations shown in the table below, all subsystems allow the MESSAGE operation in any Mode.
Subsystem Operation Events
Mode Timing Start Stop
Analog Input
Polled Start null null, cmd null, TC Interrupt Start, Stop,
Status, Convert
DMA Start, Stop,
Status, Convert
Other Initialize
Analog Output
Polled Start null null, cmd null, TC Interrupt Start, Stop,
Status, Convert
DMA Start, Stop,
Status, Convert
Other Initialize
Digital Input
Polled Start null null, cmd null, TC Interrupt Start, Stop,
Status
Other Initialize,
Configure
dig, rate cmd, dig cmd, TC, dig
dig, rate cmd, dig cmd, TC, ana,
dig
rate cmd cmd, TC
rate cmd cmd, TC
rate cmd cmd, TC
DIO Setup
30 Using the KPCI-3108 Series with DriverLINX Keithley KPCI-3108 Series
Loading...
+ 99 hidden pages