Information in this document is subject to change without notice. The 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 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-3160 Series: Using DriverLINX with your Hardware
Copyright 1999, 2001, Scientific Software Tools, Inc.
All rights reserved.
SST 30-0200-1
DriverLINX, SSTNET, and LabOBJX are registered trademarks and
DriverLINX/VB is a trademark of Scientific Software Tools, Inc.
All Keithley product names are trademarks or registered 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.
2
Contents
Preface 7
About DriverLINX.....................................................................................................................7
About This User’s Guide...........................................................................................................7
Conventions Used in This Manual.............................................................................................9
Generating a DriverLINX Configuration Report .....................................................................93
What is in the Report? ...............................................................................................94
How do I Generate the Report?.................................................................................94
Glossary of Terms 95
Using DriverLINX With Your Hardware Contents • 5
Preface
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-independent appli cation-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
•AIO Panel, multifunction instrument for testing analog and digital I/O
features of your Keithley hardware
• Source code for the sample programs
• The DriverLINX Application Programming Interface files for your
compiler
• DriverLINX On-line Help System
• DriverLINX Digital 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-3160 board with DriverLINX.
• For help installing and configuring your hardware and Dr iverLINX,
please see the manual that accompanied your hardware.
Using DriverLINX With Your Hardware Preface • 7
• For more information on the DriverLINX API, please see the
DriverLINX Technical Reference Manual and the DriverLINX Digital
I/O Programming Guide.
• For additional help programming your board, please examine the source
code examples on the Distribution Media.
This manual contains the following chapters:
Configuring the KPCI-3160
Describes configuring the KPCI-3160 using the Configure DriverLINX Device dialog
box.
Programming KPCI-3160 Hardware
Describes the available programming options for the KPCI-3160 Series.
Accessing KPCI-3160 Features Using DriverLINX
Describes how DriverLINX supports hardware features of the KPCI-3160 Series.
Using DriverLINX with the KPCI-3160 Series
Describes the subsystems, modes, and operations that DriverLINX supports for the
KPCI-3160 Series.
Using the Device Subsystem
Describes using DriverLINX to initialize KPCI-3160 hardware.
Using the Digital Input Subsystem
Describes using DriverLINX to perform KPCI-3160 digital input.
Using the Digital Output Subsystem
Shows using DriverLINX to perform KPCI-3160 digital output.
Using the Counter/Timer Subsystem
Describes DriverLINX’s support for timing operations with the KPCI-3160 Series.
Uninstalling DriverLINX
Describes ho w to remove DriverLIN X from your computer.
Troubleshooting
Describes potential installation and configuration problems and their solutions.
8 • Preface Using DriverLINX With Your Hardware
Conventions Used in This Manual
The following notational conventions are used in this manual:
• Itemized lists are identified by a round bullet (•).
• 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
• Tables of information are bounded by a box with a double line.
Tables
Concept
• Important concepts and notes are printed in the left margin.
Using DriverLINX With Your Hardware Preface • 9
Configuring the KPCI-3160 Series
Introduction
The DriverLINX Installation and Configuration Guide provides detailed instructions
for installing and configuring DriverLINX for any Keithley data-acquisition product.
This manual explains the steps and special features that apply only to Keithley’s
KPCI-3160 Series boards.
Installing and configuring DriverLINX for the Keithley KPCI-3160 board requires
three steps:
1. To install DriverLINX, insert the DriverLINX CD-ROM into your
drive and follow the on-screen instructions.
2. To install your KPCI-3160 hardware, read and follow the
instructions in the Keithley KPCI-3160 PCI Bus Digital I/O Board
User’s Manual.
3. To configure DriverLINX, use the DriverLINX Configuration Panel
and consult the on-line help. Also see “Configure DriverLINX Device
Dialog” on page 11 for configuration options specific to a Keithley
KPCI-3160 board.
Configure DriverLINX Device Dialog
DriverLINX uses a standardized configuration protocol for all data-acquisition
hardware. Even though Windows automatically assigns r esources for the K PCI-3160,
you must still follow the configuration process to assign a DriverLINX Logical
Device number to the board and configure board-specific features.
When you click the C
DriverLINX displays the Configure DriverLINX Device dialog. The following
sections describe your choices for configuring DriverLINX to work with the Keithley
KPCI-3160 model.
onfigure button in the DriverLINX Configuration Panel,
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 11
12 • Configuring the KPCI-3160 Series Using DriverLINX With Your Hardware
Device Subsystem Page
Use the Device Subsystem page to tell DriverLINX the Model and Board Id of your
KPCI-3160 board. This page also shows the Vendor and Device number and
provides the Special… button to access the Walking-Bit Test dialog.
Vendor
The Vendor property displays “Keithley Instruments, Inc.” It is a read-only property.
Device
The Device property designates the number, or “name,” of the Logical Device you
are configuri ng. It is a read-only property. To change it, fi rst save (OK) or quit
(Cancel) the current configuration. Then rename the Logical Device using the
DriverLINX Configuration Panel.
Model
The Model property selects the hardware model of the board you’re configuring. This
driver supports only model KPCI-3160.
Windows 95
Windows 95 automatically determines the model of your board so DriverLINX
disables Model selection.
Windows NT
Select your board’s model from the list.
Board Id
The Board Id property associates this Logical Device with a specific board.
DriverLINX automatically enters the KPCI-3160’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 95
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 13
Windows 95 automatically determines which board to associate with this Logical
Device. DriverLINX enters the serial number of the board when it starts the
configuration.
Windows NT
Under Windows NT, Board Id is initially blank. DriverLINX will use the Model to
match this Logical Device to the first available board and then enter that board’s
serial number.
Detect
The Detect property enables and disables DriverLINX’s hardware detection and
testing algorithms. For maximum system reliability, always leave this check box
marked.
Special…
The Special… button displays a hardware test dialog. DriverLINX can perform a
Walking-Bit Test when it next loads this Logical Device. The Walking-Bit Test
checks your KPCI-3160 board for internal input/output line damage.
To perform the Walking-Bit Test:
1. Enable the test using the check box.
2. Make sure that Detect is checked on the Device Subsystem Page (see
page 13).
3. Remove the cable from your board.
4. Restart your computer.
½ If the driver finds a damaged line, it makes an entry in the Event Log
and does not load the Logical Device.
½ If the test passes, the driver loads the Logical Device and clears the
check box so the test does not run again.
Important: You must remove the cable from your board for a successful test.
14 • Configuring the KPCI-3160 Series Using DriverLINX With Your Hardware
Digital Input Subsystem Page
Use the Digital Input Subsystem page to tell DriverLINX the Configuration Setup of
the KPCI-3160’s digital input/output channels. You can also use this page to view the
Channel number and Range of each digital input channel.
By default, the hardware configures all digital input/output channels as input ports in
unlatched mode. You can use this page to change the initial configuration of selected
channels to output, and, on the KPCI-3160, change input channels to latched mode.
Note:
Applications can change a channel’s configuration dynamically; See “Digital Port
Configuration” on page 51.
Channels
The Channels propert y allows you to select a Logi cal Channel for configuring or
viewing the channel’s range. Only the digital input/output channels support
programmable configuration. The KPCI-3160 has External Clock and External
Trigger channels that have fixed, input configurations. See “Digital Input Subsystem
Signals” on page 43 for a list of channels for your board.
Range
The Range property specifies the digital range for the selected Logical Channel. This
is a read-only property.
Interrupt
Windows automatically determines the interrupt channel, if any, for the KPCI-3160
board. DriverLINX disables this property.
DMA level
The KPCI-3160 does not use system DMA channels. DriverLINX disables this
property and displays it as blank.
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 15
Configuration Setup
Use caution when configuring
and connecting lines to the
digital I/O ports. Connecting
an incorrect voltage or
sourcing/sinking too much
current could damage the
hardware.
The Configuration S
digital I/O port as input or output. The KPCI-3160 also allows configuration of input
ports as latched (strobed mode) or unlatched (basic mode).
• Unlatched (Basic mode)—Supports simple input/output without control
• Latched (Strobed mode)—Supports input/output with an external
DriverLINX supports two methods for statically configuring a digital I/O port.
• The simplified method configures all the digital I/O lines of a port for
• The advanced method allows you to configure groups of digital I/O
etup property allows you to statically configure each KPCI-3160
or status signals. Outputs are latched and inputs are unlatched.
Unlatched inputs return the state of the input lines at the time the
software reads the digital input port.
control signal. Inputs and outputs are latched. The latched inputs return
the state of the input lines at the time of a strobe signal on the
INT_REQ line. The default active edge, or polarity, of the strobe signal
is the rising edge. Dynamic reconfiguratio n using a Dio Setup event c an
change the active edge to either rising or falling. (See “Dynamically
Configuring KPCI-3160 Digital Ports” on page 51.)
input or output in basic mode.
lines for input or output in either basic or strobed mode.
Simplified Digital I/O Port Configuration
For simplified configuration of all lines in a port as either input or output:
1. Select the channel number of the port to configure in the drop-down
channel list.
2. Check the Initialize box.
3. Enter one of the following values for the S
the entire port as input or output in basic mode:
• 1—configures all lines in the port as input (unlatched), or
• 0—configures all lines in the port as output.
etup property to configure
Advanced Digital I/O Port Configuration
With advanced configuration, you can set a port’s mode as basic or strobed or
configure nibbles of selected ports as input or output.
Mode Configuration
The KPCI-3160 port architecture emulates four Intel 8254-style digital I/O chips.
The 96 I/O lines of the KPCI-3160 consist of four groups of 24 lines. Each group
consists of three addressable 8-bit ports, referred to as Ports A, B, and C. Ports A and
B of each group are configurable as all input or output. The upper and lower halves
(4 bits) of each Port C are individually configurable as inputs or outputs.
Model KPCI-3160 supports two mode settings: basic and strobed (see, “Simplified
Digital I/O Port Configuration” above). Unlike the Intel 8254, the KPCI-3160 mode
setting applies to all ports in a group. In strobed mode, the KPCI-3160 supports
selectable latching on either the rising or falling edge at INT_REQ.
16 • Configuring the KPCI-3160 Series Using DriverLINX With Your Hardware
Notes:
• Only Port A accepts a mode setup. For Port C nibble direction setup,
see “Input/Output Configuration” below.
• On the KPCI-3160, all ports in a group operate in the same mode.
To configure the KPCI-3160 ports using mode settings:
1. Select the Port A channel (0, 3, 6, or 9) to configure in the drop-down
channel list.
2. Check the Initialize box.
3. Enter a Setup value in the following format:
KPCI-3160 Mode Configuration
0 M M 0 0
MSB
Mode
Direction
• Mode Field—
• 00 = Mode 0 (Basic)
D
LSB
Basic mode supports simple input/output without control or
status signals. Outputs are latched and inputs are
unlatched. Unlatched inputs return the state of the input
lines at the time the software reads them.
• 01 = Mode 1 (Strobed, rising-edge strobe)
Strobed mode supports input/output with an external
rising-edge input-latching signal. Inputs a nd outputs are
latched. The latched inputs return the state of the input
lines at the time of a strobe signal on the INT_REQ line.
• 10 = Mode 2 (Basic)
This is the same mode as Mode 0. Basic mode supports
simple input/output without control or status signals.
Outputs are latched and inputs are unlatched. Unlatched
inputs return the state of the input lines at the time the
software reads them.
• 11 = Mode 3 (Strobed, falling-edge strobe)
Strobed mode supports input/output with an external
falling-edge input-latching signal. Inputs and outputs are
latched. The latched inputs return the state of the input
lines at the time of a strobe signal on the INT_REQ line.
• Direction Field—
• 0—configures the port for output
• 1—configures the port for input
Input/Output Configuration
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 17
To configure the KPCI-3160 Port C channel nibbles individually:
1. Select the Port C channel (2, 5, 8, 11) to configure in the drop-down
channel list.
2. Check the Initialize box.
3. Enter a Setup value in the following format:
Nibble Configuration Format
1 D
MSB
Upper Nibble Direction
Lower Nibble Direction
• Direction Fields—
• 0—configures the nibble for output
• 1—configures the nibble for input
Advanced Configuration Example:
This example shows how to configure channel 2 in nibbles. It configures the lower
nibble as output and the upper nibble as input.
1. Select the channel 2 in the drop-down channel list.
2. Check the Initialize box.
3. Choose the Nibble Configuration format and fill in the Direction fields,
right-to-left, as follows:
0—to configure the lower nibble as output
D
LSB
1—to configure the upper nibble as input
1
1 0
2. Calculate the hexadecimal or decimal value:
0x4 + 0x2 + 0x0 = 0x6
4 + 2 + 0 = 6
3. Then, enter 0x6 (hexadecimal) or 6 (decimal) for the S
18 • Configuring the KPCI-3160 Series Using DriverLINX With Your Hardware
etup property.
Initialize
Checking the Initialize check box instructs DriverLINX to use the Configuration
S
etup property to configure the digital I/O ports. Check Initialize to put the
configuration setup into effect.
Dec
This check box converts the Configuration Setup property to decimal.
Hex
This check box converts the Configuration Setup property to hexadecimal.
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 19
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. KPCI-3160 models have twelve digital input/output
ports. The Digital Output subsystem shares these ports with the Digital Input
subsystem. The KPCI-3160 requires configuration of each port in the digital
input/output ports as input or output. See “Digital Input Subsystem Page” on page 15.
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 channel for the KPCI-3160 Series
board. DriverLINX disables this property.
DMA level
The KPCI-3160 does not use system DMA channels. DriverLINX disables this
property and displays it as blank.
Initialization Value
The Initialization Value property specifies the digital output value DriverLINX will
write to the selected Logical Channel on hardware initialization. DriverLINX only
writes this value if you enable the In
the hardware-defined initialization values if the In
For the KPCI-3160, the default digital output value is zero.
itialize check box. By default, DriverLINX uses
itialize check box is not checked.
Initialize
Checking the Initialize check box instructs DriverLINX to use the Initialization
V
alue property, rather than the default value, for digital output port initialization.
20 • Configuring the KPCI-3160 Series Using DriverLINX With Your Hardware
Dec
This check box converts the Initialization Value property to decimal.
Hex
This check box converts the Initialization Value property to hexadecimal.
Using DriverLINX With Your Hardware Configuring the KPCI-3160 Series • 21
Programming the KPCI-3160
Series
Selecting an API
The KPCI-3160 Series supports three different device driver interfaces to best match
your programming needs. The supported driver interfaces are
• DriverLINX—An interface that is hardware and operating system
independent and supports multitasking, multithreading applications.
• Hardware Direct I/O—An interface for Win 95/98, or Win NT/2K
with a special direct I/O driver that supports single-tasking, singlethreaded access directly to the KPCI-3160 I/O hardware registers.
• ActiveX Direct I/O—An interface that is operating system independent
and supports single-tasking, single-threaded access to an Intel 8255-like
function call interface.
Keithley recommends the using the DriverLINX interface for maximum portability
and versatility, but the other interfaces are useful in special circumstances. Please
review the following sections on the advantages and disadvantages of each interface.
Choosing DriverLINX
Keithley highly recommends selecting the DriverLINX interface for your
applications. The DriverLINX interface has the following advantages:
• Hardware independence—DriverLINX supports ISA, PCMCIA, and
PCI digital I/O boards with a common interface as well as digital ports
on analog I/O and counter/timer boards.
• Operating system independence—DriverLINX supports Windows
95/98 and Windows NT/2K with a common interface.
• Shared hardware access—DriverLINX allows multiple processes or
threads to cooperatively share hardware resources.
• Multitasking, multithreading support—DriverLINX provides the
synchronization and coordination for multitasking, multithreading
applications to safely access shared hardware resources.
Using DriverLINX With Your Hardware Programming the KPCI-3160 Series • 23
• Portability—DriverLINX supports older and newer hardware with a
common interface for 32-bit applications on Windows 95/98 and
Windows NT.
• Versatility—DriverLINX supports a wide variety of programming
styles and languages including C/C++, Visual Basi c, Delphi, and
LabVIEW.
• Background I/O—DriverLINX supports background I/O using
interrupts or other techniques so your application can overlap
processing and data acquisition.
• Full hardware support—DriverLINX supports all the hardware’s
features.
The DriverLINX interface has a few disadvantages compared to the alternative
interfaces:
• Software modifications—Existing applications will require rewriting
to use DriverLINX.
• No direct hardware access—Before Windows NT, Microsoft
discouraged, but nevertheless allowed, direct application program
access to hardware.
• Nibble configuration—Configurations of Port C with one input nibble
and one output nibble require the use of the Configure DriverLINX
Device dialog and cannot be performed by applications.
• Speed of single-value I/O—Applications, especially those ported from
DOS, that depend on rapid software polling of I/O ports will notice that
the operating system time cost for multitasking, multithreading
synchronization is higher than direct hardware access.
While writing your application to use a multi-product, portable API is the best longterm solution, you should consider the alternative APIs only for special purpose or
short-term needs.
Choosing Hardwar e Direct I/O
The Direct Hardware I/O Interface simulates the hardware behavior of Intel 8255based products, such as the PIO24 and PIO96, on the KPCI-3160 Series. This
interface has the following advantages:
• Direct I/O support—This interface supports existing applications that
write directly to the digital I/O’s hardware registers using the x86
CPU’s inp and outp instructions.
• Intel 8255 emulation—This interface simulates the I/O address map
and a subset of the programming protocols of Intel’s 8255 chip.
• Fast hardware access—This interface provides the fastest possible
access to the hardware registers.
• MS-DOS window support—This interface will host 16- and 32-bit
console applications running in a n MS-DOS window.
The Hardware Direct I/O Interface has a few, significant disadvantages:
• Win 9x only—The Hardware Direct I/O Interface only runs on
Windows 95/98. Windows NT does not support direct I/O without
24 • Programming the KPCI-3160 Series Using DriverLINX With Your Hardware
using a special port I/O driver available from Keithley’s Web site at
www.keithley.com.
• Non-exclusive hardware access—This interface does not synchronize
or coordinate hardware access among threads or processes.
• Incompatible with DriverLINX—Applications cannot use this
interface with DriverLINX either in the same or another application.
• Supports subset of hardware features—This interface does not
support using interrupts or newer KPCI-3160 hardware features not
available with Intel 8255-based products.
Keithley does not recommend using this interface for developing new applications.
Choosing ActiveX Direct I/O
The ActiveX Direct I/O interface uses the methods of an ActiveX Automation object
to access the KPCI-3160 hardware. This interface has the following advantages:
• Operating system independence—Both Windows 95/98 and
Windows NT support this interface.
• Intel 8255 emulation—This interface simulates the I/O address map
and programming protocols of Intel’s 8255 chip.
• Fast hardware access—This interface provides faster access to the
hardware registers than is available with the DriverLINX interface.
• Versatility—Most W indows compilers and scr i pting languages support
ActiveX Automation objects.
• Speed of single-value I/O—The I/O performance of this interface is
almost as fast as the Hardware Direct I/O interface when using early
binding to the interface.
the actual hardware I/O address unlike the Hardware Direct I/O
interface.
• ISA digital I/O support—This interface also supports Keithley’s ISA
digital I/O products.
The ActiveX Direct I/O interface also has disadvantages:
• Non-exclusive hardware access—This interface does not synchronize
or coordinate hardware access among threads or processes.
• Incompatible with DriverLINX—Applications cannot use this
interface with DriverLINX either in the same or another application.
• Supports subset of hardware features—This interface does not
support using interrupts.
• ActiveX interface—Using Automation objects in some C++ compilers
is more difficult than in Visual Basic.
Installing an API
To install a KPCI-3160 programming interface, select one of the following topics for
more information.
Using DriverLINX With Your Hardware Programming the KPCI-3160 Series • 25
Installing DriverLINX
The normal installation process automatically installs both the DriverLINX and
Hardware Direct I/O APIs. Follow the instructions in the DriverLINX CD installer.
Installing the Hardware Direct I/O Interface
To use the Hardware Direct I/O interface, you do not need to install a productspecific driver, but you must determine the I/O address that the operating system
assigned to the KPCI-3160.
Determining the KPCI-3160 I/O Address
Windows automatically selects an available I/O address for the KPCI-3160. If you
wish to check this address,
1. From Windows Control Panel, click the System icon and then select the
Device Manage r tab.
2. Click on the “+” next to DriverLINX drivers to expand the list of
installed drivers.
3. Click on the driver you want to inspect and then click Pr
operties.
26 • Programming the KPCI-3160 Series Using DriverLINX With Your Hardware
4. Select the Resources tab to see the current I/O address assignment.
5. Note the 32-byte (20 hexadecimal) Input/Output Range. The base
address for the 16 bytes of 8255-compatible registers is the beginning
of this range. In the example above, the base address is FF80.
6. Close the Device Manager windows.
Installing the ActiveX Direct I/O Interface
The normal installation process automatically installs both the DriverLINX and
Direct I/O APIs. Follow the instructions in the DriverLINX CD installer.
Installing the ActiveX Direct I/O Driver
The normal DriverLINX installation automatically installs the ActiveX
Direct I/O Driver. This driver is a registered ActiveX object that resides
in KDigIO.DLL.
This driver requires that you install the DriverLINX kernel drivers as it
uses their services. On Win NT, the kernel driver is KPCI3160.SYS.
On Win 95/98, it is KPCI3160.VXD. Follow the normal DriverLINX
installation and configuration procedures to install these kernel drivers.
Configuring the ActiveX Direct I/O Driver
The ActiveX Direct I/O Driver requires that you configure a
DriverLINX Logical Device usi ng the DriverLINX Configuration Panel
Using DriverLINX With Your Hardware Programming the KPCI-3160 Series • 27
Programming an API
To use a KPCI-3160 programming interface, select one of the following topics for
more information.
Programming DriverLINX
The DriverLINX API is extensively documented in this manual and in the Digital I/O
Programming Guide and the DriverLINX or DriverLINX/VB Technical Reference
Manuals.
Programming the Hardware Direct I/O Interface
This interface uses only the x86 CPU instructions, inp and outp, for 8-bit I/O. See
“Determining the KPCI-3160 I/O Address” on page 26 to determine the I/O address
range for the KPCI-3160.
Each Intel 8255 chip consists of three 8-bit I/O ports and an 8-bit control port. The
three data ports are called Port A, B, and C and they reside at base address + 0, 1, 2,
respectively. The KPCI-3160 has four 8255-type ports.
utility. The ActiveX Direct I/O driver does not require any separate
configuration.
For more information on register-level programming for the KPCI-3160, see the
KPCI-3160 PCI Digital I/O Board User’s Manual.
Keithley does not recommend this interface for new applications.
Programming the ActiveX Direct I/O Interface
The ActiveX Direct I/O Interface is an ActiveX Automation object hosting one
interface. This control is compatible with Microsoft Visual C++ and Visual Basic as
well as other ActiveX-hosting languages.
The methods of the control’s interface, IKDigitalIo, emulate the 8-bit port I/O
behavior of an Intel 8255 chip. Consult an Intel hardware manual or the
programming section of the KPCI-3160 PCI Digital I/O Board User’s Manual.
IKDigitalIo Intel 8255 Interface
The following syntax descriptions are shown in C/C++. For Visual Basic, use the
Object Browser to see the VB syntax. Also see “Using the ActiveX Direct I/O Driver
in Visual Basic” on page 29.
• HRESULT OpenDevice(BSTR Driver, long Device);
Opens a digital I/O device.
Driver is “KPCI3160” to open a KPCI-3160 board.
Device is the DriverLINX Logical Device number of the KPCI-3160
board to open.
• HRESULT CloseDevice();
Closes a previously opened KPCI-3160 device.
The number of CloseDevice calls must match the number of
OpenDevice calls.
28 • Programming the KPCI-3160 Series Using DriverLINX With Your Hardware
Reads an 8-bit value from the KPCI-3160 board.
Offset is the value of the register to read relative the base I/O address.
Result is the value read from the register.
• HRESULT Write(short Offse t, unsigned char Va l ue);
Writes an 8-bit value to the KPCI-3160 board.
Offset is the value of the register to write relative the base I/O address.
Value is the output to write to the register.
• HRESULT Op enCount(long *Count);
Returns the number of times a client has called OpenDevice for this
Logical Device.
Count is the address of the value for the result.
• HRESULT Device(long *LogicalDevice);
Returns the Logical Device number if the device is open. Otherwise it
returns –1.
LogicalDevice is the address of the value for the result.
• HRESULT Driver(BSTR *Name);
Returns the DriverLINX class driver name if any device is open.
Otherwise it returns an empty string.
Name is the address of a string value for the result.
Using the ActiveX Direct I/O Driver in Visual Basic
The following instructions are for Version 5 of Microsoft Visual Basic. If you have a
different version, please consult the Visual Basic documentation.
1. From VB’s “P
2. Scroll t hrough the “A
Digital I/O Library”.
roject” menu, select “References…”
vailable References”, looking for “Keithley
Using DriverLINX With Your Hardware Programming the KPCI-3160 Series • 29
3. Check “Keithley Digital I/O Library” and then click OK.
4. From VB’s “V
libraries.
5. Search for “KDIGIOLib”.
iew” menu, select “Object Browser” to display a list of
6. The Object Browser shows the VB syntax for the IKDigitalIo (see
“IKDigitalIo Intel 8255 Interface” on page 28) class.
Creating a Simple Visual Basic Application
1. Create a Visual Basic form with the controls show above.
2. Add the following source code to declare, open, close, read, and write a
device.
KPIO New KDigitalIo
cmdClose_Click()
KPIO.CloseDevice
30 • Programming the KPCI-3160 Series Using DriverLINX With Your Hardware
Using DriverLINX With Your Hardware Programming the KPCI-3160 Series • 31
Accessing KPCI-3160 Features
using DriverLINX
Introduction
DriverLINX accesses the hardware features of many different types of dataacquisition boards using a board-independent hardware model. The KPCI-3160
Subsystem chapters, which follow, explain the implementation of DriverLINX’s
hardware model for the KPCI-3160 Series. This chapter is for engineers who are
more familiar with the board’s features than DriverLINX’s model. It surveys the
Keithley KPCI-3160 hardware features to show how they fit into DriverLINX’s
hardware model.
This chapter also discusses the differences between the KPCI-3160 boards and the
ISA PIO96 boards they may replace. Although, the two series have very similar
capabilities, they differ in the level of emulation of the Intel 8255 Programmable
Peripheral Interface chip. In addition, direct access techniques—important to nonDriverLINX applications—differ between the PCI bus series and the ISA bus series.
Consideration of these issues may be important when attempting to port applications
between boards.
Using DriverLINX With Your Hardware Accessing KPCI-3160 Features using DriverLINX • 33
KPCI-3160 Hardware Features
This section discusses the following hardware features of the KPCI-3160 Series,
referencing related topics in this manual and other DriverLINX documentation:
• Data Lines
• Control Lines on the KPCI-3160
• Input Latching on the KPCI-3160
Data Lines
Feature Description Reference/Notes
PA0-7
PB0-7
PC0-7
DriverLINX also allows access to groups of 1, 2,
Control Lines on the KPCI-3160
Feature Description Reference/Notes
INT_REQ Interrupt Request—the INT_REQ signal
INT_ENN Interrupt Enable—the INT_ENN signal is an
The KPCI-3160 has four groups of data lines.
Each group consists of three 8-bit ports: A, B and
C. DriverLINX numbers the ports consecutively,
starting with 0.
4, 8, 16 or 32 lines in single or consecutive ports.
generates an interrupt on either the rising edge or
falling edge. DriverLINX can use this interrupt
for timing or as a start or stop trigger.
active-low input that enables the INT_REQ line.
“Connecting Signals to the KPCI-3160” on page 43.
“Extended Logical Channel Addressing” on page 63.
DriverLINX can use this interrupt for timing or as a
start or stop trigger:
• Timing signal —“Digital Input Timing Events”
on page 52.
• Start trigger —“Digital Input Start Events” on
page 55.
• Stop trigger—“Digital Input Stop Events” on
page 56.
Because software cannot sense or control the
INT_ENN signal, it has no representation in
DriverLINX’s hardware model.
34 • Accessing KPCI-3160 Features using DriverLINX Using DriverLINX With Your Hardware
Input Latching on the KPCI-3160
Feature Description Reference/Notes
INT LATCH The KPCI-3160 can optionally latch the input
buffers when it receives an INT_REQ signal.
DriverLINX enables input buffer latching
depending on the Service Request mode and
clock source, and the configuration of the board’s
input ports:
Port configuration:
Clock source:
• Polled Mode
• Basic mode (Mode 0)—unlatched
input
• Strobed or Strobed_NE mode
(Mode 1)—latched input
• Interrupt Mode
• INTERNAL (system timer)—
unlatched mode
• EXTERNAL, EXTERNAL+,
EXTERNAL- —latched mode
Set the task’s Mode property in the Service Request:
• ActiveX Control—“Service Request Control -
Request Group” in the DriverLINX/VB Technical Reference Manual.
• C/C++—“Service Requests - Request Group” in
the DriverLINX Technical Reference Manual.
Configure the board using one of the following
methods:
• Static configuration using the DriverLINX
Configuration Panel— “Configuring the KPCI3160” on page 11.
• Dynamic configuration using a Configure
Service Request—“Configuring a Digital Port at
Run Time” in the DriverLINX Digital I/O Programming Guide.
Set the Rate Event’s clock source property in the
Service Request:
• ActiveX Control—“Service Request Control -
Events Group - Rate Events” in the
DriverLINX/VB Technical Reference Manual.
• C/C++—“Service Requests - Events Group -
Rate Events” in the DriverLINX Technical Reference Manual.
Differences Between the PCI and ISA Models
This section lists the differences between the KPCI-3160 Series and the ISA PIO
Series models:
• INT_REQ on the KPCI-3160 and ISA PIO96
• Bus Interface
• Intel 8255 Mode Emulation
INT_REQ on the KPCI-3160 and ISA PIO96
Feature Description Reference/Notes
INT
POLARITY
Using DriverLINX With Your Hardware Accessing KPCI-3160 Features using DriverLINX • 35
The KPCI-3160 support rising or falling edge
interrupts on its INT_REQ line. The ISA PIO96
On the KPCI-3160, the rising edge is the default
active edge. Applications can change the interrupt
does not support interrupts. polarity using a Dio Setup event or by choosing
INT LATCH The KPCI-3160 can optionally latch the input
buffers when it receives an INT_REQ signal.
The ISA PIO96 cannot latch the input buffers.
between External+ and External - cl ock source in a
timing event.
This added feature on the KPCI-3160 allows it to
perform strobed input. See Intel 8255 Mode
Emulation—Mode 1, below.
36 • Accessing KPCI-3160 Features using DriverLINX Using DriverLINX With Your Hardware
Bus Interface
Feature Description Reference/Notes
PCI
ISA
Keithley’s KPCI-3160 models have a PCI bus
interface, while the PIO models h ave an ISA bus
interface.
On the PCI bus, b oards can share interrupts. On
the ISA bus, boards and applications usually
cannot share interrupts.
DriverLINX applications access boards through a
hardware-independent int erface so t hey are portable
between boards on different buses.
Applications that access boards directly are not
portable.
Intel 8255 Mode Emulation
Feature Description Reference/Notes
Mode 0 Basic I/O—All models in both series support
Mode 0.
Mode 1 Strobed I/O—The KPCI-3160 emulates strobed
mode through input buffer latching with its
INT_REQ line. The ISA PIO96 does not support
this mode.
Mode 2 Bidirectional I/O—Only the ISA PIO96 allows
this mode.
DriverLINX sets the mode through static or dynamic
configuration.
Static configuration using the DriverLINX
Configuration Panel— “Configuring the KPCI3160” on page 11.
Dynamic configuration using a Configure Service
Request—“Configuring a Digital Port at Run Time”
in the DriverLINX Digital I/O Programming Guide.
Using DriverLINX With Your Hardware Accessing KPCI-3160 Features using DriverLINX • 37
Using DriverLINX with the KPCI3160 Series
Introduction
This chapter describes how to set up and use KPCI-3160 hardware features with
DriverLINX. The descriptions here use the Edit Service Request dialogs for language
and API independence.
Other DriverLINX documentati on can help you with language specifies and general
DriverLINX programming:
• For the correct syntax with the language you’re using, please see the DriverLINX
Technical Reference Manual or the DriverLINX/VB Technical Reference
Manual.
• 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.
• For a detailed reference on digital input/output programming, please see the
Digital I/O Programming Guide.
DriverLINX Hardware Model for the KPCI-3160
By design, DriverLINX provides a portable, hardware-independent API for dataacquisition 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-3160 hardware
capabilities.
The following sections describe how DriverLINX implements KPCI-3160 hardware
features as Subsystems, Modes, Operations, Events, Logical Channels, Buffers, and
Messages.
DriverLINX Subsystems
The KPCI-3160 supports four of DriverLINX’s Logical Subsystems:
1. Device—refers to the KPCI-3160 board as a whole.
Using DriverLINX With Your Hardware Using DriverLINX with the KPCI-3160 Series • 39
2. DigitalInput—refers to the 8-bit digital input/output ports as well as
the 1-bit digital input (TTL) control signal, INT_REQ.
3. DigitalOutput—refers to the 8-bit digital input/output ports.
4. Counter/Timer—refers to the clock channel for pacing input/output
tasks.
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 or single scan
I/O operations or software housekeeping functions that DriverLINX can
complete without a significant delay.
• 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 the following three modes with the KPCI-3160 for its
commands (Service Requests).
• Polled Mode—This is a foreground or synchronous op eration.
DriverLINX supports this mode for simple, single-value or single scan
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.
• 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-3160.
Subsystem Polled Interrupt DMA Other
Digital Input
Digital Output
Counter/Timer
Device
¥ ¥ ¥
¥ ¥ ¥
¥ ¥
KPCI-3160 Supported DriverLINX Modes
40 • Using DriverLINX with the KPCI-3160 Series Using DriverLINX With Your Hardware
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-3160. Later sections for each DriverLINX subsystem will describe
the operations and events in more detail.
Note: All subsystems allow the MESSAGE operation, which is not shown in the
table. DriverLINX allows any Mode setting for the MESSAGE operation.
* In polled mode a digital start event sets up bit-masked input/output.
** Only the KPCI-3160 supports digital timing.
Allowed Operations and Events for KPCI-3160 Subsystems and Modes
The following list explains the Event abbreviations in the preceding table:
• null—Null or None Event. Use when a Service Request does not
require an event
• cmd—Command Event. Use when DriverLINX starts or stops a task on
software command
• TC—Terminal Count Event. Use when DriverLINX processes all data
buffers once
Using DriverLINX With Your Hardware Using DriverLINX with the KPCI-3160 Series • 41
• rate—Rate Event. Use to specify how DriverLINX paces or clocks data
transfer
• diosetup—DIO Setup Event. Use to specify to direction or mode of a
digital input/output port.
Logical Channels
DriverLINX designates the individually addressable hardware channels for each
subsystem as “Logical Channels”. Generally, the zero-based Logical Channel
numbering sequence c losely follows the hardware channel numbering scheme.
In some cases, however, DriverLINX assigns Logical Channel numbers to hardware
features that users do not commonly think of as “channels.” For instance,
DriverLINX commonly models external hardware clock input lines, external
hardware trigger input lines, and external interrupts as 1-bit digital Logical Channels.
In other cases, DriverLINX models subsystem-specific features, such as internal
pacer clocks, as members of a more general purpose set of counter/timer channels.
For more informati on about how DriverLINX assigns Logical Cha nnel numbers, see
the notes for each supported subsystem.
Buffers
Applications usually use data buffers to exchange data between the application and
the data-acquisition hardware. When using data buffers, observe the following about
DriverLINX’s data buffers:
• DriverLINX supports data-acquisition tasks with 1 to 255 data buffers
per task.
• DriverLINX imposes no size limits on a single buffer, although the
operating system or some hardware products may have size restrictions.
• User applications must allow DriverLINX to allocate all data buffers to
guarantee application portability to different hardware and operating
systems and to ensure that the hardware can physically access the buffer
memory.
• User applications usually do not have concurrent or immediate access
to the in-use data buffer while DriverLINX is executing a dataacquisition task.
42 • Using DriverLINX with the KPCI-3160 Series Using DriverLINX With Your Hardware
Connecting Signals to the KPCI-3160
The KPCI-3160 PCI Bus Digital I/O Board User’s Manual describes the data and
control signals for the KPCI-3160 and the connector pinouts for these signals (from
the Windows Start menu, open Programs/DriverLINX/Keithley/KPCI-3160 Hardware Manual to access). This section summarizes how DriverLINX logically
numbers the I/O data signals and how DriverLINX uses several of these control
signals for external clock and trigger inputs.
Digital Input Subsystem Signals
The KPCI-3160 Digital Input subsystem has twelve 8-bit digital input/output ports
and one control input which DriverLINX models as a 1-bit logical digital input port.
DriverLINX maps these signals to Logical Channels as shown in the following tables.
KPCI-3160
Logical Channel DriverLINX Function KPCI-3160 External
0 Digital Input/Output Port Digital input/output lines
1 Digital Input/Output Port Digital input/output lines
2 Digital Input/Output Port Digital input/output lines
3 Digital Input/Output Port Digital input/output lines
4 Digital Input/Output Port Digital input/output lines
5 Digital Input/Output Port Digital input/output lines
6 Digital Input/Output Port Digital input/output lines
7 Digital Input/Output Port Digital input/output lines
8 Digital Input/Output Port Digital input/output lines
9 Digital Input/Output Port Digital input/output lines
10 Digital Input/Output Port Digital input/output lines
11 Digital Input/Output Port Digital input/output lines
12 External interrupt as logical
trigger
13 External interrupt as logical
external clock
Connector
Group 0 PA0 - PA7
Group 0 PB0 - PB7
Group 0 PC0 - PC7
Group 1 PA0 - PA7
Group 1 PB0 - PB7
Group 1 PC0 - PC7
Group 2 PA0 - PA7
Group 2 PB0 - PB7
Group 2 PC0 - PC7
Group 3 PA0 - PA7
Group 3 PB0 - PB7
Group 3 PC0 - PC7
INT_REQ
INT_REQ
Note: To use a line in an 8-bit digital input/output port for input, first configure it for
input on the Digital Input Subsystem Page of the DriverLINX Configuration Panel.
See “Configuring the KPCI-3160” on page 11.
Using DriverLINX With Your Hardware Using DriverLINX with the KPCI-3160 Series • 43
The Digital Input subsystem shares the System Pacer Clock with the Digital Output
subsystem. DriverLINX designates the System Pacer Clock as Logical Channel 0 of
the Counter/Timer subsystem.
Digital Output Subsystem Signals
The Digital Output subsystem has three or twelve 8-bit digital input/output ports.
DriverLINX maps these signals to Logical Channels as shown in the following tables:
KPCI-3160
Logical Channel DriverLINX Function KPCI-3160 External
Connector
0 Digital Input/Output Port Digital input/output lines
Group 0 PA0 - PA7
1 Digital Input/Output Port Digital input/output lines
Group 0 PB0 - PB7
2 Digital Input/Output Port Digital input/output lines
Group 0 PC0 - PC7
3 Digital Input/Output Port Digital input/output lines
Group 1 PA0 - PA7
4 Digital Input/Output Port Digital input/output lines
Group 1 PB0 - PB7
5 Digital Input/Output Port Digital input/output lines
Group 1 PC0 - PC7
6 Digital Input/Output Port Digital input/output lines
Group 2 PA0 - PA7
7 Digital Input/Output Port Digital input/output lines
Group 2 PB0 - PB7
8 Digital Input/Output Port Digital input/output lines
Group 2 PC0 - PC7
9 Digital Input/Output Port Digital input/output lines
Group 3 PA0 - PA7
10 Digital Input/Output Port Digital input/output lines
Group 3 PB0 - PB7
11 Digital Input/Output Port Digital input/output lines
Group 3 PC0 - PC7
Note: To use a line in an 8-bit digital input/output port for output, first configure it
for output on the Digital Input Subsystem Page of the DriverLINX Configuration
Panel. See “Configuring the KPCI-3160” on page 11.
The Digital Output subsystem shares the System Pacer Clock with the Digital Input
subsystem. DriverLINX designates the System Pacer Clock as Logical Channel 0 of
the Counter/Timer subsystem.
Counter/Timer Subsystem Signals
For the KPCI-3160, DriverLINX supports a virtual timer channel to model using the
interrupt request line, INT_REQ, as an external clock. DriverLINX maps the timer to
Logical Channel 0. The virtual timer channel provides program interchangeability
with other DriverLINX drivers that support hardware with externally clocked
physical timer channels.
44 • Using DriverLINX with the KPCI-3160 Series Using DriverLINX With Your Hardware
Applications can select either rising-edge or falling-edge external clocking with the
KPCI-3160.
Timer Connector Name Logical Channels
Virtual timer none 0
How DriverLINX maps counter/timer hardware channels to Logical Channels
Applications cannot use this timer independently from tasks on an input/output
subsystem.
Using DriverLINX With Your Hardware Using DriverLINX with the KPCI-3160 Series • 45
Using the Device Subsystem
Introduction
This chapter describes how DriverLINX implements Device Subsystem features for
the KPCI-3160 Series. Each section covers a group of Service Request properties,
using the Edit Service Request dialog as a reference. This chapter shows which
DriverLINX features the KPCI-3160 driver implements and gives notes on their
usage. For detailed explanations or examples of DriverLINX features, in general, see
one of the following references:
A Service Request for the Device Subsystem uses the following properties:
Request Group:
• Modes—Specify how DriverLINX sets up data transfers and
synchronizes execution with the application.
• Operations—Specify what service DriverLINX performs.
Using DriverLINX With Your Hardware Using the Device Subsystem • 47
Device Modes
The Service Request Mode specifies how DriverLINX sets up data transfers and
synchronizes execution with the application.
The KPCI-3160 Device Subsystem supports the following mode:
Device Operations
The Service Request Operation specifies what service DriverLINX performs.
The KPCI-3160 Device Subsystem supports the following DriverLINX operations:
• Other—For subsystem initialization and configuration.
If another process is using the
same data-acquisition board,
DriverLINX will prevent
Device Initialization from
interfering with dataacquisition tasks of another
process.
• Initialize—DriverLINX aborts all data-acquisition tasks for every
subsystem controlled by the current process. DriverLINX then performs
an initialization for each supported subsystem.
• Configure—DriverLINX displays the Configure DriverLINX Device
dialog for the current Logical Device. Use the DriverLINX Configuration Panel rather than this operation to configure
DriverLINX.
• Capabilities—DriverLINX provides hardware-specific and
configuration information as a Logical Device Descriptor database.
48 • Using the Device Subsystem Using DriverLINX With Your Hardware
Using the Digital Input
Subsystem
Introduction
This chapter describes how DriverLINX implements Digital Input Subsystem
features for the KPCI-3160 Series. Each section covers a group of Service Request
properties or messages, using the Edit Service Request dialog as a reference. This
chapter shows which DriverLINX features the KPCI-3160 driver implements and
gives notes on their usage. For detailed explanations or examples of DriverLINX
features, in general, see one of the following references:
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 49
A Service Request uses the following properties and messages:
Request Group:
• Modes—Specify how DriverLINX sets up data transfers and
synchronizes execution with the application.
• Operations—Specify what service DriverLINX performs.
Events Group:
• Timing Events—Specify how DriverLINX and the board pace
sampling.
• Start Events—Specify when sampling begins.
• Stop Events—Specify when sampling ends.
Select Group:
• Channels—Specify which channels, or ports, to sample.
• Buffers—Specify the size and number of sample storage buffers.
Service Request Messages:
• Messages—ActiveX control events or Windows messages that
DriverLINX sends to synchronize execution with the application.
Digital Input Modes
The Service Request Mode specifies how DriverLINX sets up data transfers and
synchronizes execution with the application.
The KPCI-3160 Digital Input Subsystem supports the following modes:
• Polled—For single value or single scan digital input samples.
• Interrupt—For buffered transfers using programmed I/O.
• Other—For subsystem initialization and data conversion.
Digital Input Operations
The Service Request Operation specifies what service DriverLINX performs.
The KPCI-3160 Digital Input Subsystem supports the following DriverLINX
operations:
• Initialize—Aborts any active digital input tasks started by the
application. The Initialize operation does not ab ort tasks started by
other applications.
• Configure—Sets the mode and direction of digital input/output ports.
• Start—Initiates a data-acquisition the task specified in the Service
Request.
• Status—Reports the buffer position of the next sample that
DriverLINX will process.
50 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
• Stop—Terminates a digital input data-acquisition task.
• Message—Displays a dialog box containing the last Service Request
error message, if any.
Most of these operations function similarly in all drivers. Only the Configure
operation has parameters specific to the KPCI-3160 Series.
Digital Port Configuration
A KPCI-3160 board has twelve digital ports that DriverLINX shares between Digital
Input and Digital Output Subsystems. DriverLINX provides two methods to
configure them as input or output:
• Users can statically configure ports, including the upper and lower
nibbles of the C ports, using the DriverLINX Configuration Panel. (See
“Configuring the KPCI-3160” on page 11.)
• The KPCI-3160 Series also supports dynamic configuration, enabling
applications to configure ports with DIO Setup Events. (To configure
the C ports as nibbles, see “Advanced Digital I/O Port Configuration”
on page 16)
Dynamically Configuring KPCI-3160 Digital Ports
When the KPCI-3160 loads a Logical Device, it configures the digital input/output
ports with the settings in the DriverLINX Configuration Dialog. Applications can
dynamically configure ports to any desired settings. The new settings persist until any
application reconfigures a port. If only a single application is using the KPCI-3160,
Device Initialization resets the hardware configuration back to the static settings
defined during driver configuration.
Configuration specifies two settings for a digital input/output port:
• Direction—input or output.
• Mode—basic or strobed. Basic mode supports simple input/output without control or status
signals. Outputs are latched and inputs are unlatched. Unlatched inputs
return the state of the input lines at the time the software reads them.
Strobed mode supports input/output with an external control signal.
Inputs and outputs are latched. Latched inputs return the state of the
input lines at the time of a strobe signal on the INT_REQ line.
Notes:
• Strobed mode is available only on the KPCI-3160.
• All inputs of a 24-bit group on the KPCI-3160 operate in the same
mode. Configuring any input in strobed configures all inputs in strobed
mode.
To change a port’s configuration, setup the Service Request as follows:
Device Subsystem Mode Operation
<Logical Device> Digital Input or OTHER CONFIGURE
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 51
Digital Output
• To configure as an input channel, set the subsystem to digital input. To
configure as an output channel, set the subsystem to digital output.
Specify a Digital Setup Event for the timing event as follows:
Channel Mode
<Logical Channel> DIO_BASIC or
DIO_STROBED or
DIO_STROBED_NE
• Specify the channel you want to reconfigure as the Logical Channel in
the Digital Setup Event. (To configure the C ports as nibbles, see
“Advanced Digital I/O Port Configuration” on page 16.)
• Specify one of the following Mode values in the Digital Setup Event:
• DIO_BASIC—Inputs unlatched, outputs latched.
• DIO_STROBED—Inputs latched by a positive (rising)
edge on the INT_REQ signal, output latched.
• DIO_STROBED_NE—Input s l atched by a negative
(falling) edge on the INT_REQ signal, outputs latched.
See “Configuring a Digital Port at Run Time” in the DriverLINX Digital I/O Programming Guide for examples using a DIO Setup Event.
Digital Input Timing Events
Timing Events specify how DriverLINX and the board pace, or clock, Digital Input
sampling. DriverLINX uses the Timing Event to program when the KPCI-3160 reads
the next digital input sample from the port.
The KPCI-3160 supports the following Timing Events:
• None—Input does not require pacing as DriverLINX is reading only a
single value or simultaneous scan.
• Rate—The KPCI-3160 supports only fixed rate digital input using an
external input signal (INT_REQ).
• Digital—DriverLINX uses an external digital input signal (INT_REQ)
to pace the acquisition of each sample. Digital timing is available only
on the KPCI-3160.
None or Null Event
The Null Event specifies that the task does not need a clock to determine when to
read the next sample.
52 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
Rate Event
specifies sampling on the falling, or
The KPCI-3160 supports one type of Rate Event for digital input:
• Rate Generator—Generates a rate clock with equal (internal clocking)
or unknown (external clocking) time interval s between tics.
Rate Generator: External Clocking
An externally clocke d Rate Generator produces a rate clock with unknown time
intervals between tics.
Only the KPCI-3160 supports
external clocking.
Period (ext clk)
Use an externally clocked rate generator when you want to synchronize digital input
samples with a recurrent external signal.
How to set up the KPCI-3160 for fixed rate sampling using an external clock.
A task cannot use the
INT_REQ line (Digital Input
Logical Channel 12) for a
digital start or stop event
while using it as an external
clock source.
BE SURE that the external
clock source is TTL
compatible, 0 V minimum to
+5 V maximum!
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 53
• Specify external clocking using a RateGenerator on LogicalChannel
0 with an External, External+ or External– Clock source. External
and External+ both specify sampling on the rising, or positive, edge of
the external clock signal. External–
negative, edge of the external clock signal.
• Users should connect the external clock signal to the INT_REQ line.
• The Period value does not affect the external clock frequency, but
DriverLINX requires a valid hardware value in case the application
requests a timebase operation and to optimize data transfer between the
driver and the application.
Digital Event
f
Only the KPCI-3160 supports
external clocking.
DriverLINX supports Digital Events as aliases for externally clocked Rate
Generators. Use this technique for compatibility with data-acquisition products that
only support external clock sources.
How to set up the KPCI-3160 for external rate sampling using a digital event.
A task cannot use a channel
or a digital start or stop
event while using it for a
digital timing event.
BE SURE that the external
clock source is TTL
compatible, 0 V minimum to
+5 V maximum!
Digital Timing Events contain mask, pattern, and match fields. The mask is logically
ANDed with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify external clocking using LogicalChannel13. For hardware-
independence, you can specify the hardware external clock channel by
the symbolic constant, DI_EXTCLK.
• Users should connect the external clock signal to the INT_REQ line.
Do not forget to ground the INT_ENN line to enable the INT_REQ
line.
• Specify the Mask property with a single bit set to indicate that
DriverLINX should only compare a 1-bit digital input value against the
Pattern property.
• Specify the Match property as N
• Specify the Pattern property as 0 for a rising, or positive, edge clock
(≠0), or 1 for a fal l ing, or negative, edge clock (≠1).
ot equals.
54 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
Digital Input Start Events
Start Events specify when the KPCI-3160 hardware starts reading digital input data.
The KPCI-3160 supports the following Start Events for digital input:
• None—Use this event when the DriverLINX operation does not require
a Start Event.
• Command—DriverLINX starts the task on software command, i.e., as
soon as DriverLINX finishes programming the KPCI-3160 hardware
for the task.
• Digital—The KPCI-3160 starts acquiring digital input samples when a
digital Logical Channel input satisfies the digital condition specified in
the Start Event.
None or Null Event
The Null Event specifies that the task does not need a Start Event to begin the task.
Command Event
The Command Event starts data acquisition as soon as DriverLINX has completed
programming the KPCI-3160 hardware with the task parameters.
Post-Trigger Sampling with a Digital Event
The KPCI-3160 can acquire digital input samples after a digital trigger condition.
Use post-triggering when you want to synchronize the start of data acquisition with
an external signal.
DriverLINX supports digital triggering on all digital input lines. However, the KPCI3160 has only one digital input, INT_REQ, that can detect a trigger precisely when it
occurs. For all other digital inputs, DriverLINX uses a software comparison to detect
the trigger at the digital input port during the interrupt service routine. DriverLINX
can reliably detect triggers only if either the triggers either have pulse durations
longer than the interrupt latency (unlatched mode) or the application has previously
configured the digital input trigger port as latched.
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 55
How to set up the KPCI-3160 for post-triggered digital input.
f
A Digital Start Event requires
an external timing source
because the KPCI-3160 does
not have a hardware clock.
A task cannot use a channel
or a digital start or stop
event while using it for a
digital timing event.
Digital Start Events contain mask, pattern, and match fields. The mask is logically
AND with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify the LogicalChannel.
• Specify the Mask property to indicate that DriverLINX should only
compare selected bits in the digital input value against the Pattern
property.
• Specify the Match property as Equals to trigger on an exact match of
the digital pattern to the masked digital input. Match on Not Equals
triggers on any difference between the masked digital input and the
Pattern.
• Specify the Pattern property to compare with the masked digital input
value.
• Specify the Delay property as the number of timing pulses (0 to
32
21
Delay property must be an integral multiple of the number of channels
in the channel list.
Digital Input Stop Events
− ) to ignore after the trigger before starting data acquisition. The
Stop Events specify when the KPCI-3160 hardware stops reading digital input data.
The KPCI-3160 supports the following Stop Events for digital input:
• None—Use this event when the DriverLINX operation does not require
a Stop Event.
56 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
• Command—DriverLINX stops the task on software command, i.e.,
when the application issues a Service Request with a Stop operation.
• Terminal count—DriverLINX stops the task after the KPCI-3160
hardware has filled all the data buffers once.
• Digital—The KPCI-3160 stops the task when the hardware detects that
the digital Logical Channel input satisfies the digital condition specified
in the Stop Event.
None or Null Event
The Null Event specifies that the task does not need a Stop Event to end the task.
This event may be used with single-value polled input tasks.
Command Event
The Command Event stops data acquisition when the user application changes the
Operation property in the Service Request to Stop and resubmits the Service Request
to DriverLINX.
Sample timing depends on the task mode. In interrupt mode, DriverLINX samples at
each timing event until the Stop operation. In polled mode, an application can
repeatedly initiate a single scan with a Status operation before terminating the task
with a Stop operation.
Terminal Count Event
The Terminal Count Event stops data acquisition after DriverLINX has read the
digital input data into all the data buffers once. Use terminal count when you want to
read a fixed amount of data.
Pre-Trigger Sampling with a Digital Event
The KPCI-3160 can acquire digital input samples until the hardware detects a digital
trigger condition. Use pre-triggering when you want to synchronize the end of data
acquisition with an external signal.
DriverLINX supports digital triggering on all digital input lines. However, the KPCI3160 has only one digital input, INT_REQ, that can detect a trigger precisely when it
occurs. For all other digital inputs, DriverLINX uses a software comparison to detect
the trigger at the digital input port during the interrupt service routine. DriverLINX
can reliably detect triggers only if either the triggers either have pulse durations
longer than the interrupt latency (unlatched mode) or the application has previously
configured the digital input trigger port as latched.
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 57
How to set up the KPCI-3160 for pre-triggered digital input.
f
A Digital Stop Event requires
an external timing source
because the KPCI-3160 does
not have a hardware clock.
A task cannot use a channel
or a digital start or stop
event while using it for a
digital timing event.
Digital Stop Events contain mask, pattern, and match fields. The mask is logically
AND with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify the LogicalChannel.
• Specify the Mask property to indicate that DriverLINX should only
• Specify the Match property as Equals to trigger on an exact match of
• Specify the Pattern property to compare with the masked digital input
• Specify the Delay property as the number of timing pulses (0 to
Digital Input Channels
compare selected bits in the digital input value against the Pattern
property.
the digital pattern to the masked digital input. Match on Not Equals
triggers on any difference between the masked digital input and the
Pattern.
value.
32
21
− ) to ignore after the trigger before stopping data acquisition. The
Delay property must be an integral multiple of the number of channels
in the channel list.
DriverLINX allows applications to specify the digital channels using three
techniques:
• Start Channel—Acquire data using a single cha nnel.
• Start/Stop Channel Range—Acq uire data using a consecutive range
of channels.
58 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
• Channel List—Acquire digital data using a list of channels.
In addition, DriverLINX provides two methods to address one or more digital I/O
lines:
• Extended Logical Channel Addressing—Acquire data from 1, 2, 4, 8,
16 or 32 bits using a single Logical Channel.
• Bit-Masked Addressing—Read from or write data to specific bits of a
digital port.
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 59
Digital Input Logical Channel s
The KPCI-3160 has twelve digital input/output ports that DriverLINX designates as
Logical Channels 0 to 11. DriverLINX defines two additional Logical Channels for
the external interrupt signal but applications cannot directly read their values.
KPCI-3160
Logical Channel DriverLINX Function KPCI-3160 External
Connector
0 Digital Input/Output Port Digital input/output lines
Group 0 PA0 - PA7
1 Digital Input/Output Port Digital input/output lines
Group 0 PB0 - PB7
2 Digital Input/Output Port Digital input/output lines
Group 0 PC0 - PC7
3 Digital Input/Output Port Digital input/output lines
Group 1 PA0 - PA7
4 Digital Input/Output Port Digital input/output lines
Group 1 PB0 - PB7
5 Digital Input/Output Port Digital input/output lines
Group 1 PC0 - PC7
6 Digital Input/Output Port Digital input/output lines
Group 2 PA0 - PA7
7 Digital Input/Output Port Digital input/output lines
Group 2 PB0 - PB7
8 Digital Input/Output Port Digital input/output lines
Group 2 PC0 - PC7
9 Digital Input/Output Port Digital input/output lines
Group 3 PA0 - PA7
10 Digital Input/Output Port Digital input/output lines
Group 3 PB0 - PB7
11 Digital Input/Output Port Digital input/output lines
Group 3 PC0 - PC7
12 External interrupt as logical
trigger
13 External interrupt as logical
external clock
INT_REQ
INT_REQ
60 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
Single Channel Digital Input
In Single Channel mode, the KPCI-3160 acquires data from one channel.
How to set up the KPCI-3160 to read from a single channel
Multi-channel Di gi tal Input Range
In Multi-channel Range mode, the KPCI-3160 acquires data from a consecutive
range of digital channels.
• Specifying a Stop Channel less than the Start Channel instructs
DriverLINX to use the following sequence:
Start Channel
…
Logical Channel n-1
Logical Channel 0
…
Stop Channel
where n is the number of Logical Channels in the subsystem.
• Specifying a Stop Channel equal to the Start Channel is the same as
single channel mode.
• Specifying Simultaneous, instructs DriverLINX to sample all the
selected channels at each timing event. Otherwise, DriverLINX
acquires one sample from the next channel in sequence at each timing
event.
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 61
How to set up the KPCI-3160 to read from a range of channels
Multi-channel Digital Input List
In Multi-channel List mode, the KPCI-3160 acquires data from a random list of
digital channels.
• Specifying Simultaneous, instructs DriverLINX to sample all the
selected channels at each timing event. Otherwise, DriverLINX
acquires one sample from the next channel in the list at each timing
event.
How to set up the KPCI-3160 to read from a list of channels
62 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
Extended Logical Channel Addressing
DriverLINX supports an extension to Logical Channel addressing allowing
applications to combine adjacent Logical Channels into a single, wider channel or
split a Logical Channel into smaller addressable parts. For instance, applications can
address individual bits of a digital port or read and write multiple ports as a single
value.
To use the Logical Channel addressing extensions, fo rm a 16-bit Logica l Channel
address by combining the channel number of an addressable unit with a size field as
follows:
0 Size Code
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSB LSB
Channel Number
The following table lists the 3-bit size codes available for the KPCI-3160 Series:
Size Code Unit Bits
0 native varies with hardware
1 bit 1
2 half nibble 2
3 nibble 4
4 byte 8
5 word 16
"Native" units refer to the hardware-defined digital channel size. For the KPCI-3160 Series,
the native size is an 8-bit byte.
When using extende d Logical Channel addressing, DriverLINX groups digital bits in
units defined by the size code and then assigns consecutive channel numbers starting
from zero.
For KPCI-3160 models, the 8-bit digital input/output ports have the following
channel addresses for each size code:
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 63
Bit-Masked Addressing
In addition to Extended Logical Channel Addressing, DriverLINX also allows
applications to access specific bits in a single channel. This technique is more
convenient when an application needs to access bits that are not grouped together.
Bit masking allows an application or thread to access specific bits in a port without
affecting bits controlled by other applications.
For more information, see “Reading or Writing Specific Digital Bits” in the Digital
I/O Programming Guide.
Digital Input Buffers
DriverLINX supports both single-value digital input and buffered digital input.
• DriverLINX supports single-value transfers of any model-supported
width.
• DriverLINX supports multi-value transfers only using data widths
smaller than or equal to the hardware native size.
• For single-value input, specify the Number of buffers as 0 and the
buffer size as 0.
• For buffered input, specify the Number of buffers from 1 to 255 and
the buffer size as needed.
How to set up the KPCI-3160 to read digital samples using data buffers
An individual DriverLINX buffer may have any size as long as the buffer length
holds an integral number of channel scans, i.e., the number of digital input channels
you’re acquiring. This restriction enforces the requirement that a buffer has the same
number of samples for each channel.
64 • Using the Digital Input Subsystem Using DriverLINX With Your Hardware
Digital Input Messages
For digital input operations, DriverLINX can report the following messages to the
application:
DriverLINX Message Explanation
Service Start DriverLINX has started the data acquisition task.
Service Done DriverLINX has completed the data acquisition task.
Buffer Filled DriverLINX has filled a data buffer with digital input
Start Event DriverLINX has processed the interrupt for a hardware start
Stop Event DriverLINX has processed the interrupt for a hardware stop
Data Lost DriverLINX has detected a digital input data overrun
Critical Error DriverLINX has encountered an unexpected hardware or
DriverLINX Event message for digital input
samples.
event. Applicable only to the ExtTrg channel on the KPCI-
3160.
event. Applicable only to the ExtTrg channel on the KPCI-
3160.
condition.
software condition.
For details on using DriverLINX messages in your application see the appropriate
reference manua l:
• ActiveX Control—“Overview of DriverLINX/VB Control Events” in
the DriverLINX/VB Technical Reference Manual.
• C/C++—“DriverLINX Messages - Overview” in the DriverLINX
Technical Reference Manual.
Using DriverLINX With Your Hardware Using the Digital Input Subsystem • 65
Using the Digital Output
Subsystem
Introduction
This chapter describes how DriverLINX implements Digital Output Subsystem
features for the KPCI-3160 Series. Each section covers a group of Service Request
properties or messages, using the Edit Service Request dialog as a reference. This
chapter shows which DriverLINX features the KPCI-3160 driver implements and
gives notes on their usage. For detailed explanations or examples of DriverLINX
features, in general, see one of the following references:
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 67
A Service Request uses the following properties and messages:
Request Group:
• Modes—Specify how DriverLINX sets up data transfers and
synchronizes execution with the application.
• Operations—Specify what service DriverLINX performs.
Events Group:
• Timing Events—Specify how DriverLINX and the board pace
sampling.
• Start Events—Specify when sampling begins.
• Stop Events—Specify when sampling ends.
Select Group:
• Channels—Specify which channels, or ports, to sample.
• Buffers—Specify the size and number of sample storage buffers.
Service Request Messages:
• Messages—ActiveX control events or Windows messages that
DriverLINX sends to synchronize execution with the application.
Digital Output Modes
The Service Request Mode specifies how DriverLINX sets up data transfers and
synchronizes execution with the application.
The KPCI-3160 Digital Output Subsystem supports the following modes:
• Polled—For single value or single scan digital output samples.
• Interrupt—For buffered transfers using programmed I/O.
• Other—For subsystem initialization and data conversion.
Digital Output Operations
The Service Request Operation specifies what service DriverLINX performs.
The KPCI-3160 Digital Output Subsystem supports the following DriverLINX
operations:
• Initialize—Aborts any active digital output tasks started by the
application. The Initialize operation does not ab ort tasks started by
other applications.
• Configure—Sets the mode and direction of digital input/output ports.
• Start—Initiates a data-acquisition the task specified in the Service
Request.
• Status—Reports the buffer position of the next sample that
DriverLINX will process.
68 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
• Stop—Terminates a digital output data-acquisition task.
• Message—Displays a dialog box containing the last Service Request
error message, if any.
Most of these operations function similarly in all drivers. Only the Configure
operation has parameters specific to the KPCI-3160 Series.
Digital Port Configuration
A KPCI-3160 board has twelve digital ports that DriverLINX shares between Digital
Input and Digital Output Subsystems. DriverLINX provides two methods to
configure them as input or output:
• Users can statically configure ports, including the upper and lower
nibbles of the C ports, using the DriverLINX Configuration Panel. (See
“Configuring the KPCI-3160” on page 11.)
• The KPCI-3160 Series also supports dynamic configuration, enabling
applications to configure ports with DIO Setup Events. (To configure
the C ports as nibbles, see “Advanced Digital I/O Port Configuration”
on page 16.)
Dynamically Configuring KPCI-3160 Digital Ports
When the KPCI-3160 loads a Logical Device, it configures the digital input/output
ports with the settings in the DriverLINX Configuration Dialog. Applications can
dynamically configure ports to any desired settings. The new settings persist until any
application reconfigures a port. If only a single application is using the KPCI-3160,
Device Initialization resets the hardware configuration back to the static settings
defined during driver configuration.
Configuration specifies two settings for a digital input/output port:
• Direction—input or output.
• Mode—basic or strobed. Basic mode supports simple input/output without control or status
signals. Outputs are latched and inputs are unlatched. Unlatched inputs
return the state of the input lines at the time the software reads them.
Strobed mode supports input/output with an external control signal.
Inputs and outputs are latched. Latched inputs return the state of the
input lines at the time of a strobe signal on the INT_REQ line.
Notes:
• Strobed mode is available only on the KPCI-3160.
• All inputs of a 24-bit group on the KPCI-3160 operate in the same
mode. Configuring any input in strobed configures all inputs in strobed
mode.
To change a port’s configuration, setup the Service Request as follows:
Device Subsystem Mode Operation
<Logical Device> Digital Input or OTHER CONFIGURE
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 69
Digital Output
• To configure as an input channel, set the subsystem to digital input. To
configure as an output channel, set the subsystem to digital output.
Specify a Digital Setup Event for the timing event as follows:
Channel Mode
<Logical Channel> DIO_BASIC or
DIO_STROBED or
DIO_STROBED_NE
• Specify the channel you want to reconfigure as the Logical Channel in
the Digital Setup Event. (To configure the C ports as nibbles, see
“Advanced Digital I/O Port Configuration” on page 16.)
• Specify one of the following Mode values in the Digital Setup Event:
• DIO_BASIC—Inputs unlatched, outputs latched.
• DIO_STROBED—Inputs latched by a positive (rising)
edge on the INT_REQ signal, output latched.
• DIO_STROBED_NE—Input s l atched by a negative
(falling) edge on the INT_REQ signal, outputs latched.
See “Configuring a Digital Port at Run Time” in the DriverLINX Digital I/O Programming Guide for examples using a DIO Setup Event.
Digital Output Timing Events
Timing Events specify how DriverLINX and the board pace, or clock, Digital Output
sampling. DriverLINX uses the Timing Event to program when the KPCI-3160
writes the next digital output sample to the port.
The KPCI-3160 supports the following Timing Events:
• None—The task requires no pacing as DriverLINX is writing only a
single value or simultaneous scan.
• Rate—The KPCI-3160 only supports fixed rate digital output using
either a software system clock or an external input signal (INT_REQ).
• Digital—DriverLINX uses an external digital input signal (INT_REQ)
to pace the transfer of each sample. Digital timing is available only on
the KPCI-3160.
None or Null Event
The Null Event specifies that the task does not need a clock to determine when to
write the next sample.
70 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
Rate Event
Use an externally clocked rate generator when you want to synchronize digital output
specifies sampling on the falling, or
The KPCI-3160 supports one type of Rate Event for digital output:
• Rate Generator—Generates a rate clock with equal (internal clocking)
or unknown (external clocking) time interval s between tics.
Rate Generator: External Clocking
An externally clocke d Rate Generator produces a rate clock with unknown time
intervals between tics.
Only the KPCI-3160 supports
external clocking.
Period (ext clk)
samples with a recurrent external signal.
How to set up the KPCI-3160 for rate sampling using an external clock.
A task cannot use the
INT_REQ line (Digital Input
Logical Channel 12) for a
digital start or stop event
while using it as an external
clock source.
BE SURE that the external
clock source is TTL
compatible, 0 V minimum to
+5 V maximum!
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 71
• Specify external clocking using a RateGenerator on LogicalChannel
0 with an External, External+, or External– Clock source. External
and External+ both specify sampling on the rising, or positive, edge of
the external clock signal. External–
negative, edge of the external clock signal.
• Users should connect the external clock signal to the INT_REQ line.
• The Period value does not affect the external clock frequency, but
DriverLINX requires a valid hardware value in case the application
requests a timebase operation and to optimize data transfer between the
driver and the application.
Digital Event
f
Only the KPCI-3160 supports
external clocking.
DriverLINX supports Digital Events as aliases for externally clocked Rate
Generators. Use this technique for compatibility with data-acquisition products that
only support external clock sources.
How to set up the KPCI-3160 for external rate sampling using a digital event.
A task cannot use a channel
or a digital start or stop
event while using it for a
digital timing event.
BE SURE that the external
clock source is TTL
compatible, 0 V minimum to
+5 V maximum!
Digital Timing Events contain mask, pattern, and match fields. The mask is logically
AND with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify external clocking using LogicalChannel13. For hardware-
independence, you can specify the hardware external trigger channel by
the symbolic constant, DI_EXTCLK.
• Users should connect the external clock signal to the INT_REQ line.
• Specify the Mask property with a single bit set to indicate that
DriverLINX should only compare a 1-bit digital input value against the
Pattern property.
• Specify the Match property as N
• Specify the Pattern property as 0 for a rising, or positive, edge clock
(≠0), or 1 for a fal l ing, or negative, edge clock (≠1).
ot equals.
72 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
Digital Output Start Events
Start Events specify when the KPCI-3160 hardware starts writing digital output data.
The KPCI-3160 supports the following Start Events for digital output:
• None—Use this event when the DriverLINX operation does not require
a Start Event.
• Command—DriverLINX starts the task on software command, i.e., as
soon as DriverLINX finishes programming the KPCI-3160 hardware
for the task.
• Digital—The KPCI-3160 starts writing digital output samples when a
digital Logical Channel input satisfies the digital condition specified in
the Start Event.
None or Null Event
The Null Event specifies that the task does not need a Start Event to begin the task.
Command Event
The Command Event starts data acquisition as soon as DriverLINX has completed
programming the KPCI-3160 hardware with the task parameters.
Post-Trigger Sampling with a Digital Event
The KPCI-3160 can write digital output samples after a digital trigger condition. Use
post-triggering when you want to synchronize the start of data acquisition with an
external signal.
DriverLINX supports digital triggering on all digital input lines. However, the KPCI3160 has only one digital input, INT_REQ, that can detect a trigger precisely when it
occurs. For all other digital inputs, DriverLINX uses a software comparison to detect
the trigger at the digital input port during the interrupt service routine. DriverLINX
can reliably detect triggers only if either the triggers either have pulse durations
longer than the interrupt latency (unlatched mode) or the application has previously
configured the digital input trigger port as latched.
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 73
How to set up the KPCI-3160 for post-triggered digital output.
f
A Digital Start Event requires
an external timing source
because the KPCI-3160 does
not have a hardware clock.
A task cannot use a channel
or a digital start or stop
event while using it for a
digital timing event.
Digital Start Events contain mask, pattern, and match fields. The mask is logically
AND with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify the LogicalChannel.
• Specify the Mask property to indicate that DriverLINX should only
compare selected bits in the digital input value against the Pattern
property.
• Specify the Match property as Equals to trigger on an exact match of
the digital pattern to the masked digital input. Match on Not Equals
triggers on any difference between the masked digital input and the
Pattern.
• Specify the Pattern property to compare with the masked digital input
value.
• Specify the Delay property as any number of timing pulses from 0 to
32
(
21
− ).
Digital Output Stop Events
Stop Events specify when the KPCI-3160 hardware stops writing digital output data.
The KPCI-3160 supports the following Stop Events for digital output:
• None—Use this event when the DriverLINX operation does not require
a Stop Event.
• Command—DriverLINX stops the task on software command, i.e.,
when the application issues a Service Request with a Stop operation.
74 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
• Terminal count—DriverLINX stops the task after the KPCI-3160
hardware has filled all the data buffers once.
• Digital—The KPCI-3160 stops the task when the hardware detects the
digital Logical Channel input satisfies the digital condition specified in
the Stop Event.
None or Null Event
The Null Event specifies that the task does not need a Stop Event to end the task.
Command Event
The Command Event stops data acquisition when the user application changes the
Operation property in the Service Request to Stop and resubmits the Service Request
to DriverLINX.
Sample timing depends on the task mode. In interrupt mode, DriverLINX samples at
each timing event until the Stop operation. In polled mode, an application can
repeatedly initiate a single scan with a Status operation before terminating the task
with a Stop operation.
Terminal Count Event
The Terminal Count Event stops data acquisition after DriverLINX has written the
digital output data from all the data buffers once. Use terminal count when you want
to write a fixed amount of data.
Pre-Trigger Sampling with a Digital Event
The KPCI-3160 can write digital output samples until the hardware detects a digital
trigger condition. Use pre-triggering when you want to synchronize the end of data
transfer with an external signal.
DriverLINX supports digital triggering on all digital input lines. However, only the
KPCI-3160 has a digital input, INT_REQ, that can detect a trigger precisely when it
occurs. For all other digital inputs, DriverLINX polls at the specified sample rate to
detect the trigger. Polling can reliably detect triggers only if they have pulses at least
as long as the sample period.
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 75
How to set up the KPCI-3160 for pre-triggered digital output.
Digital Start Events contain mask, pattern, and match fields. The mask is logically
AND with the digital input data on the Logical Channel and then compared against
the pattern for a match/mismatch.
• Specify the LogicalChannel.
• Specify the Mask property to indicate that DriverLINX should only
compare selected bits in the digital input value against the Pattern
property.
• Specify the Match property as Equals to trigger on an exact match of
the digital pattern to the masked digital input. Match on Not Equals
triggers on any difference between the masked digital input and the
Pattern.
• Specify the Pattern property to compare with the masked digital input
value.
• Specify the Delay property as the number of timing pulses (0 to
32
21
− ) to ignore after the trigger before starting data acquisition. The
Delay property must be an integral multiple of the number of channels
in the channel list.
Digital Output Channels
DriverLINX allows applications to specify the digital channels using three
techniques:
• Start Channel—Write data using a single channel.
• Start/Stop Channel Range—W rite data using a consecutive range of
channels.
• Channel List—Write digital data using a list of channels.
76 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
In addition, DriverLINX provides two methods to address one or more digital I/O
lines:
• Extended Logical Channels Addressing—Write data to 1, 2, 4, 8, 16,
or 32 bit s using a single Logical Channel.
• Bit-Masked Addressing—W rite data to specific bits of an output port.
Digital Output Logical Channels
The KPCI-3160 has twelve digital input/output ports that DriverLINX designates as
Logical Channels 0 to 11.
KPCI-3160
Logical Channel DriverLINX Function KPCI-3160 External
Connector
0 Digital Input/Output Port Digital input/output lines
Group 0 PA0 - PA7
1 Digital Input/Output Port Digital input/output lines
Group 0 PB0 - PB7
2 Digital Input/Output Port Digital input/output lines
Group 0 PC0 - PC7
3 Digital Input/Output Port Digital input/output lines
Group 1 PA0 - PA7
4 Digital Input/Output Port Digital input/output lines
Group 1 PB0 - PB7
5 Digital Input/Output Port Digital input/output lines
Group 1 PC0 - PC7
6 Digital Input/Output Port Digital input/output lines
Group 2 PA0 - PA7
7 Digital Input/Output Port Digital input/output lines
Group 2 PB0 - PB7
8 Digital Input/Output Port Digital input/output lines
Group 2 PC0 - PC7
9 Digital Input/Output Port Digital input/output lines
Group 3 PA0 - PA7
10 Digital Input/Output Port Digital input/output lines
Group 3 PB0 - PB7
11 Digital Input/Output Port Digital input/output lines
Group 3 PC0 - PC7
Single Channel Digital Output
In Single Channel mode, the KPCI-3160 writes all data from one channel.
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 77
How to set up the KPCI-3160 to write from a single channel
Multi-channel Digital Output Range
In Multi-channel Range mode, the KPCI-3160 writes data from a consecutive range
of digital channels.
• Specifying a Stop Channel is less than the Start Channel instructs
DriverLINX to use the following sequence:
Start Channel
…
Logical Channel n-1
Logical Channel 0
…
Stop Channel
where n is the number of Logical Channels in the subsystem.
• Specifying a Stop Channel equal to the Start Channel is the same as
single channel mode.
• Specifying Simultaneous, instructs DriverLINX to write to all the
selected channels at each timing event. Otherwise, DriverLINX writes
one sample from the next channel in sequence at each timing event.
78 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
How to set up the KPCI-3160 to write from a range of channels
Multi-channel Digi tal Output List
In Multi-channel List mode, the KPCI-3160 writes data from a random list of digital
channels.
• Specifying Simultaneous, instructs DriverLINX to sample all the
selected channels at each timing event. Otherwise, DriverLINX writes
one sample from the next channel in sequence at each timing event.
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 79
How to set up the KPCI-3160 to write from a range of channels
Extended Logical Channel Addressing
DriverLINX supports an extension to Logical Channel addressing allowing
applications to combine adjacent Logical Channels into a single, wider channel or
split a Logical Channel into smaller addressable parts. For instance, applications can
address individual bits of a digital port or read and write multiple ports as a single
value.
To use the Logical Channel addressing extensions, fo rm a 16-bit Logica l Channel
address by combining the channel number of an addressable unit with a size field as
follows:
0 Size Code
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSB LSB
Channel Number
The following table lists the 3-bit size codes available for the KPCI-3160 Series:
Size Code Unit Bits
0 native varies with hardware
1 bit 1
2 half nibble 2
3 nibble 4
4 byte 8
5 word 16
"Native" units refer to the hardware-defined digital channel size. For the KPCI-3160 Series,
the native size is an 8-bit byte.
When using extende d Logical Channel addressing, DriverLINX groups digital bits in
units defined by the size code and then assigns consecutive channel numbers starting
from zero.
For the KPCI-3160 models, the 8-bit digital input/output ports have the following
channel addresses for each size code:
80 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
Notes:
• DriverLINX supports single-value transfers of any model-supported
• DriverLINX supports multi-value transfers only using data widths
Bit-Masked Addressing
In addition to Extended Logical Channel Addressing, DriverLINX also allows
applications to access specific bits in a single channel. This technique is more
convenient when an application needs to access bits that are not grouped together.
Bit masking allows an application or thread to access specific bits in a port without
affecting bits controlled by other applications.
For more information, see “Reading or Writing Specific Digital Bits” in the Digital
I/O Programming Guide.
Digital Output Buffers
DriverLINX supports both single-value digital output and buffered digital output.
• For single-value input, specify the Number of buffers as 0 and the
width.
smaller than or equal to the hardware native size.
buffer size as 0.
• For buffered input, specify the Number of buffers from 1 to 255 and
the buffer size as desired.
How to set up the KPCI-3160 to write digital samples using data buffers
An individual DriverLINX buffer may have any size as long as the buffer length
holds an integral number of channel scans, i.e., the number of digital output channels
Using DriverLINX With Your Hardware Using the Digital Output Subsystem • 81
you’re outputting. This restriction enforces the requirement that a buffer has the same
number of samples for each channel.
Digital Output Messages
For digital output operations, DriverLINX can report the following messages to the
application:
DriverLINX Message Explanation
Service Start DriverLINX has started the data acquisition task.
Service Done DriverLINX has completed the data acquisition task.
Buffer Filled DriverLINX has emptied a data buffer of digital output
Start Event DriverLINX has processed the interrupt for a hardware start
Stop Event DriverLINX has processed the interrupt for a hardware stop
Data Lost DriverLINX has detected a digital output data overrun
Critical Error DriverLINX has encountered an unexpected hardware or
samples.
event. Applicable only to the ExtTrg channel on the KPCI-
3160.
event. Applicable only to the ExtTrg channel on the KPCI-
3160.
condition.
software condition.
DriverLINX Event message for digital output
For details on using DriverLINX messages in your application see the appropriate
reference manua l:
• ActiveX Control—“Overview of DriverLINX/VB Control Events” in
the DriverLINX/VB Technical Reference Manual.
• C/C++—“DriverLINX Messages - Overview” in the DriverLINX
Technical Reference Manual.
82 • Using the Digital Output Subsystem Using DriverLINX With Your Hardware
Using the Counter/Timer
Subsystem
Introduction
The Counter/Timer Subsystem for the KPCI-3160 has a single “virtual”
counter/timer. DriverLINX pro vides this counter/timer through software, as the
KPCI-3160 does not have a hardware clock. You can use the counter/timer to
externally pace input/output subsystems, but it does not support independent counting
or timing applications.
Counter/Timer Channels
The following table lists the Counter/Timer Subsystem’s Logical Channels and shows
their allowable clock sources, modes and gates.
Logical Clocks Modes Gates
Channel Source Tic Period
0 External V0+z) Rate Gen Disabled
External+ No Connect
External-
Counter/Timer Subsystem Logical Channels and Allowed Clocks, Modes and Gates
Pacer Clock
The Pacer Clock (Logical Channel 0) is a virtual software clock. DriverLINX uses
this external clock to pace digital I/O as the KPCI-3160 does not have an internal
hardware timer. The Pacer Clock does not support independent counter/timer tasks.
External Clocking
The KPCI-3160 allows an external clock source to pace input/output tasks.
DriverLINX defines the following external clock sources for the System Pacer Clock:
Using DriverLINX With Your Hardware Using the Counter/Timer Subsystem • 83
• External, External+—specify sampling on the rising, or positive,
edge of the external clock signal.
• External– —specifies sampling on the falling, or negative, edge of the
external clock signal.
Clocking Modes
The System Pacer Clock can only operate in the following mode:
• Rate Generator—specifies sampling of one channel or one scan at
intervals based on an external clock source.
Gating
The system timer does not have a gate control. Select Disabled or No Connect for
the Gate Status of Rate Events.
Counter/Timer Messages
The KPCI-3160 supports counter/timer interrupts indirectly. You can set up an
INTERRUPT mode digital input or output task with a single sample buffer. “Buffer
Filled” messages notify your application of the counter/ timer interrupt.
84 • Using the Counter/Timer Subsystem Using DriverLINX With Your Hardware
Uninstalling DriverLINX
How do I uninstall DriverLINX?
DriverLINX consists of three separate component installations:
• DriverLINX for Keithley KPCI-3160 Series
• DriverLINX Programming Interfaces
• DriverLINX Documentation
You can uninstall the last two installations at any time without interfering with
compiled applications that require DriverLINX drivers. To uninstall the latter
components, run the “Add/Remove Programs” tool in the Windows Control Panel.
To uninstall DriverLINX drivers for the Keithley KPCI-3160 Series, you must
• Disable the DriverLINX driver.
• Shut down your computer to remove the hard ware.
• Reboot your computer to unload the driver.
• Run the DriverLINX uninstall program.
How to Disable a DriverLINX Driver in Windows NT
1. From the Windows Start menu, select “Settings”, then “Control Panel”.
Left click on the DriverLINX Configuration icon in the Control Panel.
2. Select the KPCI-3160 devices you want to disable.
3. Right click on each device and select “Disabled” on the popup menu.
4. Repeat steps 2-3 for each KPCI-3160 card that you are uninstalling.
5. Close the DriverLINX Configuration Panel.
6. When finished, shut down your computer and physically remove any
installed KPCI-3160 hardware.
7. Reboot Windows.
8. To finish uninstalling, see “How to Remove DriverLINX for Keithley
KPCI-3160 Series” on page 86.
Using DriverLINX With Your Hardware Uninstalling DriverLINX • 85
How to Disable a DriverLINX Driver in Windows 95/98
1. From the Windows Start menu, select “Settings”, then “Control Panel”.
Left click on the System icon in the Control Panel. Select the “Device
Manager” tab in the System Properties dialog.
2. Left click the “+” icon next to “DriverLINX drivers” to display the
installed Keithley KPCI-3160 devices.
3. Select the KPCI-3160 device you want to disable.
4. Click the “Re
5. In the “Confirm Device Removal” dialog, select “OK”.
6. Repeat steps 3-5 for each KPCI-3160 card or driver that you
uninstalling.
7. When finished, click “Close”, shut down your computer, and physically
remove any installed KPCI-3160 hardware.
8. Reboot Windows.
9. To finish uninstalling, see “How to Remove DriverLINX for Keithley
KPCI-3160 Series” on page 86.
move” button.
How to Remove DriverLINX for Keithley KPCI-3160 Series
1. From the Windows Start menu, select “Settings”, then “Control Panel”.
Left click on the Add/Remove Programs icon in the Control Panel.
86 • Uninstalling DriverLINX Using DriverLINX With Your Hardware
2. Select “DriverLINX for Keithley KPCI-3160 Series” in the
Add/Remove Programs Properties dialog.
3. Click the “Add/Remove…” button.
4. Answer “Y
es” to “Are you sure you want to remove ‘DriverLINX for
Keithley KPCI-3160 Series’ and all of its components?” in the Confirm
File Deletion dialog.
5. The DriverLINX uninstall program will proceed.
The uninstall program will not remove the folder, “\DrvLINX4\System”. This folder
contains copies of any \Windows\System files that the original DriverLINX
installation updated.
Using DriverLINX With Your Hardware Uninstalling DriverLINX • 87
Troubleshooting
Solving Problems
Correct operation of your KPCI-3160 hardware requires successful completion of
three steps.
1. Windows recognizes KPCI-3160 hardware and installs drivers.
2. You configure the KPCI-3160 drivers using the DriverLINX
Configuration Panel.
3. Windows loads the KPCI-3160 drivers into memory.
If you are having a problem installing or configuring your KPCI-3160 product,
review the following notes. If these notes do not solve your problem, or your problem
is not described, then contact technical support and fully describe your problem.
Solving Problems Recognizing and Installing
Drivers
Windows must recognize the KPCI-3160 hardware and then install KPCI-3160
drivers for the hardware.
• For Windows to automatically recognize the KPCI-3160 hardware, you
must install a KPCI-3160 product into your machine and restart the
computer.
• For Windows to install KPCI-3160 drivers, you must install the KPCI3160 driver software on the DriverLINX CD.
If you installed the KPCI-3160 hardware before you installed the DriverLINX
software, Windows 95/98 may install the KPCI-3160 hardware without drivers. To
fix this, you must instruct Windows to reinstall the Plug and Play driver. Follow the
notes below for instructions.
Fixing Problems Installing Hardware Before Software on
Windows 95/98
If you installed the KPCI-3160 hardware before installing the DriverLINX software,
Windows 95/98 may install the hardware incorrectly.
1. Start Windows Device Manager.
Using DriverLINX With Your Hardware Troubleshooting • 89
2. Search for “DriverLINX drivers”. If you do not see it, go to step 4.
3. Click on the “+” icon next to “DriverLINX drivers” and search for “PCI
Card”. If you find “PCI Card”, go to step 6, otherwise go to the next
step.
4. Search for “Other devices”. If you do not see it, go to “Editing the
Windows 95/98 Registry” on page 90.
5. Click on the “+” icon next to “Other devices” and search for “PCI
Card”. If you do not find it, go to “Editing the Windows 95/98
Registry” on page 90.
6. Select “PCI Card”.
7. Click “Remove” in the Device Manager.
8. Highlight “Comput er” in the Device Manager and cli ck “Refresh”.
9. Windows should re-install your hardware under “Dri verLINX drivers”.
If this fails, see “Editing the Windows 95/98 Registry” on page 90.
10. Answer “Yes” to “Do you want to restart your computer now?”.
11. After rebooting your computer, you must co nfigure DriverLIN X. See
“Configuring the KPCI-3160 Series” on page 11.
Editing the Windows 95/98 Registry
Before trying to edit the Windows Registry, follow the instructions for "Fixing
Problems Installing Hardware Before Software on Windows 95/98" on page 89.
Caution: Incorrect or unintended changes to Registry can prevent Windows from
booting. A complete reinstall of Windows may be the only recovery option. For
safety, first make a backup copy of the Registry using the “Registry\Export
Registry File…” menu option in the Registry Editor. Then follow these
instructions carefully.
1. From the Windows “Start” menu, select “Run”, type “regedit” into the
Run dialog and click OK
2. Under “My Computer”, first click the “+” next to
“HKEY_LOCAL_MACHINE”.
3. Next click the “+” next to “Enum” and then “PCI”.
4. If you have a KPCI-3160, search for “VEN_11F3&DEV_3160” on
Win 95 or “VEN_11F3&DEV_3160&SUBSYS_00000000&REV_00”
on Win 98.
5. If you find neither entry, no Registry edits are needed. Exit the Registry
Editor and quit these instructions.
6. If you find either entry, select it and then delete the key by selecting
“E
dit\Delete” from the Registry Editor menu. Answer “Yes” to “Are
you sure you want to delete this key?”
7. Install the DriverLINX software, if you have not previously done so,
and then reboot your machine.
90 • Troubleshooting Using DriverLINX With Your Hardware
Solving Problems Configuring the Drivers
Windows automatically assigns hardware resources for the KPCI-3160 Series, but
you must still configure the KPCI-3160 drivers before using them. The DriverLINX
configuration only requires that you assign each KPCI-3160 product a unique
Logical Device number. And, on Windows NT, you must manually select the
hardware model of your KPCI-3160 board. See “Configuring the KPCI-3160 Series”
on page 11 for more information.
Solving Problems Loading Drivers
Before the KPCI-3160 drivers can load, you must
1. Install the DriverLINX software.
2. Install the KPCI-3160 hardware into your computer.
3. Configure DriverLINX.
4. Reboot your computer.
If you have not completed the above steps, please do so before proceeding.
On both Windows NT and Windows 95/98, the operating system will automatically
assign hardware resources to the KPCI-3160 cards. Automatic resource assignment
can fail sometimes on
• Older PCI computers
• Computers with ISA cards installed
• Computers with no free ha rdware resources .
Sorting through all possibilities can be a challenge due to the she e r number of
combinations of PCI hardware designs, PC plug-in boards, and versions of Windows.
The following sections will help you gather information about why a driver may have
failed to load. This information is essential for you or technical support to solve your
problem.
Did the DriverLINX Driver Load?
1. Run “DriverLINX Configuration” from Windows Contro l Panel.
2. Select the “DriverLINX” tab.
3. Click the “+” icon next to DriverLINX to expand the list of drivers, if
necessary.
4. Select “Keithley KPCI-3160 Series”. Click “+”, if necessary, to expand
the list.
5. Select the line with the number of the Logical Device you configured. If
the number does not exist on Windows NT or, on Windows 95/98, you
see only a hardware description, you did not configure the driver. See
“Configuring the KPCI-3160 Series” on page 11.
6. Click the “P
7. Do you see “Status: Device Loaded”? If not, did you reboot the
computer after configuring? If not, reboot now and repeat the above
steps.
roperties…” button and then select the “General” tab.
Using DriverLINX With Your Hardware Troubleshooting • 91
8. If you rebooted the computer after configuring and Windows did not
load your device, see “Checking for Device Errors” on page 92.
Checking for Device Errors
When a DriverLINX kernel driver cannot load, it usually writes an explanation into
the system event log. You can view this log under Windows 95/98 or Windows NT
using the DriverLINX Event Viewer.
Windows 95/98 maintains additional driver information in the Device Manager. Also
see “Getting More Driver Information on Windows 95/98” on page 92.
1. Run “DriverLINX Event Viewer” from the DriverLINX folder.
2. Click on the “+” icon next to “DriverLINX” in the left panel.
3. Select the abbreviation for your driver.
4. Does the first line in the right panel show a current error?
5. Double click on the error line to see more detail and an explanatory
message.
6. If you cannot resolve the problem yourself, please provide this error
information when contacting technical support.
Getting More Driver Information on Windows 95/98
Windows 95/98 reports additional information about device status using the Device
Manager. To access this utility,
1. Right click on “My Computer” and then select “Pr
2. Select “Device Manager” and “View devices by t
3. Does “DriverLINX drivers” appear in the list? If not, see "Solving
Problems Recognizing and Installing Drivers" on page 89.
4. Click the “+” next to “DriverLINX drivers”.
5. Does your KPCI-3160 product appear in the list? If not, see "Solving
Problems Recognizing and Installing Drivers" on page 89.
operties”.
ype
6. Does the icon next to your KPCI-3160 product display an exclamation
point (!)? If no, Windows has loaded your KPCI-3160 driver.
7. Select the line with the “!” and then click “Pr
92 • Troubleshooting Using DriverLINX With Your Hardware
operties”.
8. The General tab will show the reason why the driver did not load.
9. The Resources tab will show if Windows detected an unresolvable
hardware conflict.
Getting More Driver Information on Windows NT
On Windows NT, the only reasons that a driver does not load are
• You did not install the driver software.
• You did not correctly configure the driver.
• You changed the driver startup parameters.
An incorrectly configured driver will report the reasons that it failed to load into the
Windows Event Log. See “Checking for Device Errors” on page 92 for more
information.
On Windows NT, DriverLINX drivers load automatically during system boot. An
administrator can change the startup command for any NT driver to either “manual”
or “disabled”.
1. Run “DriverLINX Configuration” from Windows Contro l Panel.
2. Select the “DriverLINX” tab.
3. Click the “+” icon next to DriverLINX to expand the list of drivers, if
necessary.
4. Select “Keithley KPCI-3160 Series”. Click “+”, if necessary, to expand
the list.
5. Select the line with the number of the Logical Device that did not load.
6. Right click the mouse to see a popup menu.
7. Select “Automatic” to instruct Window to load the driver the next time
you reboot.
Generating a DriverLINX Configuration Report
Your DriverLINX installation includes a troubleshooting tool that generates a report
of your DriverLINX configuration. If you call Technical Support, after reading
“Solving Problems” on page 89, they may ask you to generate and e-mail this report
to help you solve installation and configuration problems.
Using DriverLINX With Your Hardware Troubleshooting • 93
What is in the Report?
The troubleshooting tool analyzes your computer to obtain information about
DriverLINX and operating system software that would assist Technical Support in
troubleshooting a problem you are having. It i ncludes information on DriverLIN X
files, environment variables, registry entries, hardware and the operating system.
How do I Generate the Repor t?
You can easily generate the report by clicking this shortcut . Once the
troubleshooting tool generates the report, you will have the opportunity to review it
and make deletions, if desired, before e-mailing it to Technical Support. If you do not
have direct access to e-mail, you can save the report to a disk file and send a copy
later. A Technical Support engineer will guide you through these steps when you are
asked to send a report.
94 • Troubleshooting Using DriverLINX With Your Hardware
Glossary of Terms
A/D
Abbreviation for analog-to-digital, a process that converts a continuous analog signal
into a discrete digital approximation of the analog signal.
ADC
Abbreviation for analog-to-digital converter, the hardware that performs the A/D
conversion process.
API
Abbreviation for Application Programming Interface. An API defines the syntax of
the data structures and functions of software services.
Basic I/O
Intel 8255 Programmable Peripheral Interface chip Mode 0. Basic I/O supports
simple input or output without control and status signals. Outputs are latched and
inputs are not latched.
Bidirectional I/O
Intel 8255 Programmable Peripheral Interface chip Mode 2. Bidirectional I/O
supports bidirectional input and output with control and status signals. The 8-bit
inputs and outputs are latched.
Buffer
A block of memory used to receive data from a data-acquisition device or to write
data to a data-acquisition device.
Bus mastering
A hardware technique that allows a device on the PCI bus to initiate a direct data
transfer with memory or another device. The logic for controlling the transfer resides
on the PCI device, not the system board. See also “DMA”.
Using DriverLINX With Your Hardware Glossary of Terms • 95
Clocking
A periodic pulse or signal that data-acquisition hardware uses to read or write the
next sample or block of samples. Also referred to as “pacing”.
D/A
Abbreviation for digital-to-analog, a process that converts a discrete digital value into
a continuous analog voltage representing that value.
DAC
Abbreviation for digital-to-analog converter, the hardware that performs the D/A
conversion process.
DMA
Abbreviation for Direct Memory Access, a technique where the system board can
transfer data between a device and memory without using the CPU. In the PC, a
standard chip on the system board controls the transfer. See also “bus mastering”.
Event
For DriverLINX, an event is the occurrence of a signal that clocks, starts, or stops a
data-acquisition task.
Event Log
An event log is a file where applications and device drivers record troubleshooting
messages. If your Logical Device fails to load, check the event log to find out why.
You can view event log entries using the DriverLINX Event Viewer or Windows NT
Event Viewer.
Gating
A signal that enables and disables another signal or data-acquisition task depending
on the value of the gate signal.
IRQ
Abbreviation for interrupt request. Peripheral hardware signals the CPU that it is
ready to transfer data.
ISA
Abbreviation for Industry Standard Architecture. A standard for the original IBM AT
bus specification that defines the bus structure, CPU and support chip architecture,
and the clock frequency of the ISA bus.
96 • Glossary of Terms Using DriverLINX With Your Hardware
ISR
Abbreviation for interrupt service routine, the software function inside a device
driver that handles interrupt requests.
Logical Device
DriverLINX’s designation for a specific data-acquisition board inside your computer.
Messages
In Windows and DriverLINX, a message notifies the application about the state of a
process.
Modes
DriverLINX data-acquisition techniques.
Nibble
Four bits, or half of a Byte.
Operations
Allowed DriverLINX data-acquisition commands.
Pacing
A periodic pulse or signal that data-acquisition hardware uses to read or write the
next sample or block of samples. Also referred to as “clocking”.
PCI
Abbreviation for Peripheral Component Interconnect. PCI refers to a specification
for a high-speed common local bus on a system board.
PCMCIA
Abbreviation for Personal Computer Memory Board International Association.
PCMCIA established a specification for miniaturized boards and sockets for
installing peripheral device in portable personal computers called PC Board. PCMCIA sometimes refers to PC Board.
Process
Refers to the collection of data and code segments and hardware resources that the
operating system assigns to one application.
Using DriverLINX With Your Hardware Glossary of Terms • 97
Service Request
A DriverLINX object or data structure that completely defines a data-acquisition
task.
Single Scan
One pass through a task’s list or range of channels. Some boards can process all the
channels simultaneously. On other boards, DriverLINX emulates a simultaneous scan
as rapidly as the CPU will allow.
Strobed I/O
Intel 8255 Programmable Peripheral Interface chip Mode 1. Strobed I/O supports
input or output with control and status signals. The 8-bit inputs and outputs are
latched.
Subsystem
DriverLINX subdivides a general purpose data-acquisition device into six
subsystems—Device, Analog Input, Analog Output, Digital Input, Digital Output,
and Counter/Timer.
Triggering
The technique of using a pulse or signal to start or stop a data-acquisition task.
TTL
Abbreviation for transistor-transistor logic, a family of digital logic elements.
98 • Glossary of Terms Using DriverLINX With Your Hardware
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.