Information in this document is subject to change without notice. T he software
described is this document is furnished under a license agreement. The software may
be used or copied only in accordance with the terms of the agreement.
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 APP LICATIONS.
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-3140 Series: Using DriverLINX with Your Hardware
Copyright 2000 by Scientific Software Tools, Inc.
All rights reserved.
First Printing.
SST 28-0100-3
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
Preface5
Software License and Software Disclaimer of Warranty...........................................................5
About DriverLINX.....................................................................................................................7
About This User’s Guide...........................................................................................................7
Conventions Used in This Manual.............................................................................................9
Generating a DriverLINX Configuration Report..................................................................... 73
What is in the Report? ...............................................................................................73
How do I Generate the Report? .................................................................................73
Preface
Software License and Software Disclaimer of Warranty
This is a legal document which is an agreement between you, the Licensee, and Scientific Software Tools, Inc. By opening this
sealed diskette package, Licensee agrees to become bound by the terms of this Agreement, which i nclude the Software License and
Software Disclaimer of Warranty.
This Agreement constitutes the complete Agreement between Licensee and Scientific Software Tools, Inc. If Licensee does not
agree to the terms of this Agreement, do not open the diskette 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 Scientific Software
Tools, Inc. for a full refund. No refunds will be given for products that have opened disk packages or missing components.
Licensing Agreement
Copyright. The software and documentation is owned by Scientific Software Tools, Inc. and is protected by both United States
copyright laws and international treaty provisions. Scientific Software Tools, Inc. authorizes the original purchaser only (Licensee) to
either (a) make one copy of the software solely for backup or archival purposes, or (b) transfer the software to a s ingle hard disk only.
The written materials accompanying the software may not be duplicated or copied for any reason.
Trade Secret. Licensee understands and agrees that the software is the proprietary and confidential property of Scientific Software
Tools, Inc. and a valuable trade secret. Licensee agrees to use the software only for the intended use under this License, and shall not
disclose the software or its contents to any third party.
Copy Restrictions. The Licensee may not modify or translate the program or related documentation without the prior written
consent of Scientific Software Tools, Inc. All modifications, adaptations, and merged portions of the software constitute the software
licensed to the Licensee, and the terms and conditions of this agreement apply to same. Licensee may not distribute copies, including
electronic transfer of copies, of the modified, adapted or merged software or accompanying written materials to others. Lic ensee agrees
not to reverse engineer, decompile or disassemble any part of the software.
Unauthorized copying of the software, including software that has been modified, merged, or included with other soft ware, or of the
written materials is expressly forbidden. Licensee may not rent, transfer or lease the software t o any third parties. Licensee agrees to
take all reasonable steps to protect Scientific Software Tools’ software from theft, disclosure or use contrary to the terms of the License.
License. Scientific Software Tools, Inc. grants the Licensee only a non-exclusive right to use the serialized copy of the software on a
single terminal connected to a single computer. The Licensee may not network the software or use it on more than one computer or
computer terminal at the same time.
Term. This License is effectiv e until terminated. This License will terminate automatically without notice from Scientific Software
Tools, Inc. if Licensee fails to comply with any term or condition of this License. The Licensee agrees upon such termination to return or
destroy the written materials and all copies of the software. The Licensee may terminate the agreement by returning or dest roying the
program and documentation and all copies thereof.
Using DriverLINX with Your Keithley KPCI-3140 SeriesPreface • 5
Limited Warranty
Scientific Software Tools, Inc. warrants that the software will perform substantially in accordance with the written materials and that
the program disk, instructional manuals and reference materials are free from defects in materials and workmanship under normal use for
90 days from the date of receipt. All express or implied warranties of the software and related materials are limited to 90 days.
Except as specifically set forth herein, the software and accompanying writt en materials (including i nstructions f or use) are provided
“as is” without warranty of any kind. Further, Scientific Software Tools, Inc. does not warrant, guarantee, or make any representa tions
regarding the use, or the results of the use, of the software or written materials in terms of correctness, accuracy , reliabil ity, current ness,
or otherwise. The entire risk as to the results and performance of the software is assumed by Licensee and not by Scientific Softwa re
Tools, Inc. or its distributors, agents or employees.
EXCEPT AS SET FORTH HEREIN, THERE ARE NO OT HER WARRANTIES, EITHER E XPRESS OR IMPL IED, I NCLUDING BUT
NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH
RESPECT TO THE SOFTWARE, THE ACCOMPANYING WRITTE N MATERIALS, AND ANY ACCOMPANYING HARDWARE.
Remedy. Scientific Software Tools’ entire liability and the Licensee’s exclusive remedy shall be, at Scientific Software Tools’ option,
either (a) return of the price paid or (b) repair or replacement of the software or accompanying materials. In the event of a defect in
material or workmanship, the item may be returned within the warranty period to Scientific Software Tools for a replacement without
charge, provided the licensee previously sent in the limited warranty registrat ion board to Scientific Software Tools, Inc., or can furnish
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 DELIVERY OF THIS PRODUCT SHALL BE LIABLE FOR ANY DIRECT, INDI RECT, CONSEQUENTIAL,
OR INCIDENTAL DAMAGES (INCLUDING DAMAGES FO R LOSS OF BUSINES S PROFI TS, BUSI NESS IN TERRUPTI ON, LOSS OF
BUSINESS INFORMATION AND THE LIKE) ARISING OUT OF THE USE OF OR THE INABILITY 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 LIMITATIONS ON DURATION OF AN IMPLIED WARRANTY, THE ABOVE LIMITATIONS MAY NOT APPLY TO
LICENSEE.
This agreement is governed by the laws of the Commonwealth of Pennsylvania.
6 • PrefaceUsing DriverLINX with Your Keithley KPCI-3140 Series
About DriverLINX
Welcome to DriverLINX for Microsoft Windows, the high-performance realtime data-acquisition device drivers for Windo ws application development.
DriverLINX is a language- and hardware-independent application 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 Analog I/O Programming Guide
•DriverLINX Digital I/O Programming Guide
•DriverLINX Counter/Timer 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 the
hardware features of Keithley’s KPCI-3140 Series boards with DriverLINX.
•For help installing and configuring your hardware and DriverLIN X,
please see the manual that accompanied your hardware.
•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-3140 Series
Shows how to configure the KPCI-3140 Series using the Configure DriverLINX
Device dialog box.
Using the KPCI-3140 Series with DriverLINX
Using DriverLINX with Your Keithley KPCI-3140 SeriesPreface • 7
Shows how to set up DriverLINX with the Edit Service Request dialog box to use
KPCI-3140 Series hardware features.
Uninstalling DriverLINX
Describes how to remove DriverLINX hardware drivers and other files.
Troubleshooting
Gives troubleshooting tips for insta lling, conf i guring, and loading DriverLINX
drivers.
8 • PrefaceUsing DriverLINX with Your Keithley KPCI-3140 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.
Table
Concept
•Important concepts and notes are printed in the left margin.
Using DriverLINX with Your Keithley KPCI-3140 SeriesPreface • 9
Configuring the KPCI-3140 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-3140 Series boards.
Installing and configuring DriverLINX for a Keithley KPCI-3140 Series board
requires three steps:
1. Install DriverLINX. Follow the instruct ions given by the installation
program. The Read Me First instructions explain the components and
drivers you can install.
2. Configure DriverLINX. This creates a Logical Device, which stores
configuration information for your board. See “Configure DriverLINX
Device Dialog” on page 12 for configuration options specific to a
Keithley KPCI-3140 Series model.
Windows NT
3. Install yourKPCI-3140 hardware. Follow the instructions in your
hardware man ua l.
After configuring DriverLINX, insta l ling your b oard and rest arting Windo ws, 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 config ure Plug-and-Play devices before it
starts the operating system. On various computers the BIOS setting is called “Plugand-Play Aware OS – Disabled” or “Plug & Play OS – No”.
Using DriverLINX with Your Keithley KPCI-3140 SeriesConfiguring the KPCI-3140 Series • 11
Configure DriverLINX Device Dialog
DriverLINX uses a standardized configuration protocol for all data-acquisitio n
hardware. Configuration assigns an identifying device number to a specific KPCI3140 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-3140 Series. The following sections
describe your choices in configuring DriverLINX to work with your board.
12 • Configuring the KPCI-3140 SeriesUsing DriverLINX with Your Keithley KPCI-3140 Series
Device Subsystem Page
Use the Device subsystem page to tell DriverLINX the model name of your KPCI 3140 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 readonly 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 the following model:
KPCI-3140
Windows 95 automatically determines the model of your board so DriverLINX
disables Model selection.
Board Id
The KPCI-3140 Series boards do not have unique serial numbers that DriverLINX
can use to match a Logical Device to a board while loading the driver. Under
Windows 95/98, DriverLINX can match a Logical Device to a board based on the
bus slot. Under Windows NT, DriverLINX matches Logical Devices in the sequence
that Windows enumerates them on the bus.
Windows NT
Using DriverLINX with Your Keithley KPCI-3140 SeriesConfiguring the KPCI-3140 Series • 13
DriverLINX does not use the Board Id property.
Windows 95/98
DriverLINX assigns a Board Id based on bus slot.
Digital Input Subsystem Page
Use the Digital Input subsystem page to set configurable digital channels as input or
output.
Channels
The Channels property allows you to select a Logical Channel for configuration or
viewing the channel’s range.
The KPCI-3140 Series supports both fixed and configurable digital channels.
DriverLINX defines the following Logical Channels for the KPCI-3140 Series
Digital Input Subsystem:
Model KPCI-3140
Logical
Channel
0Digital Input/OutputDigital I/O Bank A 0 … 7
1Digital Input/OutputDigital I/O Bank B 0 … 7
2Digital Input/OutputDigital I/O Bank C 0 … 7
3Digital Input/OutputDigital I/O Bank D 0 … 7
4
5
6
7
8External Trigger (edge-
DriverLINX
Function
Digital Input (interrupt
register)
External Clock (patternsensitive)
External Clock (edgesensitive)
External Trigger
(pattern-sensitive)
sensitive)
KPCI-3100 Series External
Connector
Digital I/O Bank D 0 … 7
Digital I/O Bank D 0 … 7
Digital I/O Bank D 0 … 7
Digital I/O Bank D 0 … 7
Digital I/O Bank D 0 … 7
14 • Configuring the KPCI-3140 SeriesUsing DriverLINX with Your Keithley KPCI-3140 Series
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 KPCI-3140 board.
DriverLINX disables this property.
DMA
The KPCI-3140 Series does not use DMA channels for direct memory transfers.
DriverLINX disables this property.
Configuration Setup
The Confi gur at i on Setup property specifies the hardware configuration of the digital
I/O ports. Logical Channels 0 through 1 are configurable as input or output. Enter 1
to initially configure the selected channel as input or 0 to configure it as output a nd
check the Initialize box.
Initialize
Checking the I n itia lize check box instructs DriverLINX to use the Configuration
Setup property to configure the selected digital I/O channel.
Using DriverLINX with Your Keithley KPCI-3140 SeriesConfiguring the KPCI-3140 Series • 15
Digital Output Subsystem Page
Use the Digital Output subsystem page to change the default digital ou tp ut port
initialization values.
Channels
The Channels property allows you to select a Logical Channel for initialization or
viewing the channel’s range.
Model KPCI-3140
Logical
Channel
0Digital Input/OutputDigital I/O Bank A 0 … 7
1Digital Input/OutputDigital I/O Bank B 0 … 7
2Digital Input/OutputDigital I/O Bank C 0 … 7
3Digital Input/OutputDigital I/O Bank D 0 … 7
DriverLINX
Function
KPCI-3100 Series External
Connector
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 KPCI-3140 board.
DriverLINX disables this property.
DMA
The KPCI-3140 Series does not use DMA channels for direct memory transfers.
DriverLINX disables this property.
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 Initialize check box.
16 • Configuring the KPCI-3140 SeriesUsing DriverLINX with Your Keithley KPCI-3140 Series
Initialize
Checking the I n itia lize check box instructs DriverLINX to use the Initialization
Value 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 hexadeci mal.
Using DriverLINX with Your Keithley KPCI-3140 SeriesConfiguring the KPCI-3140 Series • 17
Counter/Timer Subsystem Page
Use the Count er/Timer subsystem page to view the clock source frequency.
Resolution
The Resolution property specifies the clock frequency of the master oscillator. All
models have a 20 MHz clock source for pacing input/output tasks and counter/timer
functions.
Interrupt
Windows automatically determines the interrupt level for the KPCI-3140 board.
DriverLINX disables this property.
18 • Configuring the KPCI-3140 SeriesUsing DriverLINX with Your Keithley KPCI-3140 Series
Using the KPCI-3140 Series with
DriverLINX
Introduction
See the Counter/Timer,
Digital I/O or Analog I/O
Programming Guides for an
overview of DriverLINX
programming.
This chapter shows you how to set up and use KPCI-3140 Series hardware features
with DriverLINX.
The descriptions here use the Edit Service Request dialog for language and API
independence. For the correct syntax with the language you’re using, please see the
DriverLINX Technical Reference Manuals. For DriverLINX examples in your
programming language, please see the source code examples in the subdirectories of
your DriverLINX installation directory or on the original distribution media.
KPCI-3140 Series Hardware Features
The KPCI-3140 Series offers your data-acquisition application a wide variety of
useful features. Digital I/O ports support pre- and post-triggering. Eight of the
counter/timers are user-accessible. DriverLINX accesses these features 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 FeatureDriverLINX Feature
Digital Input/Output Ports
Digital Port ConfigurationInitial Configuration:
• Digital Input Subsystem
• Digital Output Subsystem
• Configuration Setup
Application Configuration:
•Digital Input Digital Channel
Configuration
•Digital Output Digital Channel
Configuration
Using DriverLINX with Your Keithley KPCI-3140 SeriesUsing the KPCI-3140 Series with DriverLINX • 19
Hardware Feature DriverLINX Feature
Digital triggering Digital Input:
• Digital Start Event (Post-
Triggering)
• Digital Stop Event (Pre-
Triggering)
Digital Output:
• Digital Start Event (Post-
Triggering)
• Digital Stop Event (Pre-
Triggering)
User-accessible counter/timers
• Counter/Timer Subsystem
DriverLINX Hardware Model for KPCI-3140 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 hardwareindependent, or abstract, data-acquisition model onto KPCI-3140 Series hardware
capabilities.
The following sections describe how DriverLINX implements KPCI-3140 Series
hardware features as Subsyste ms, Modes, Operations, Events, Logical Channels,
Buffers, and Messages.
DriverLINX Subsystems
The KPCI-3140 Series supports the following DriverLINX subsystems:
1. Device—refers to a KPCI-3140 Series board as a whole.
2. Digital Input—refers to the digital input ports as well as 1-bit digital
control signals and external clock inputs.
3. Digital Output—refers to the digital output ports.
4. Counter/Timer—refers to the onboard counter/timer channels for
pacing digital input/output or performing measuring and waveform
generation functions.
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 does not
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.
20 • Using the KPCI-3140 Series with DriverLINX Using DriverLINX with Your Keithley KPCI-3140 Series
• Background or asynchronous mo des. 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-3140 Series for its commands
(Service Requests).
•Polled Mode—This is a foreground or synchronous operation.
DriverLINX supports this mode for simple, single-value I/O operations
that the data-acquisition board can complete without significant delay.
•Interrupt Mode—This is a background or asynchronous operation.
DriverLINX transfers data between the computer’s memory and the
data-acquisition board using hardware interrupts and programmed I/O
transfers.
•Other Mode—This is 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-3140 Series.
SubsystemPolledInterruptOther
Digital Input
Digital Output
Counter/Timer
Device
√√√
√√√
√√√
√
KPCI-3140 Series Supported DriverLINX Modes.
Using DriverLINX with Your Keithley KPCI-3140 SeriesUsing the KPCI-3140 Series with DriverLINX • 21
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-3140 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.