Tektronix Using Keithley DriverLINX with KPCMCIA-PIO24-C (1.5MB) User manual

Keithley KPCMCIA-PIO24
Using DriverLINX with Your
Hardware
SCIENTIFIC SOFTWARE TOOLS, INC. SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RELATED TO THE USE OF THIS PRODUCT. THIS PRODUCT IS NOT DESIGNED WITH COMPONENTS OF A LEVEL OF RELIABILITY SUITABLE FOR USE IN LIFE SUPPORT OR CRITICAL APPLICATIONS.
This document may not, in whole or in part, be copied, photocopied, reproduced, translated or reduced to any electronic medium or machine readable form without prior written consent from Scientific Software Tools, Inc.
Keithley KPCMCIA-PIO24: Using DriverLINX with Your Hardware Copyright 1998, 2000-1, Scientific Software Tools, Inc. All rights reserved.
SST 15-0801-1
DriverLINX, SSTNET, and LabOBJX are registered trademarks and DriverLINX/VB is a trademark of Scientific Software Tools, Inc. MetraByte and KPCMCIA are trademarks 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 5
Software License and Software Disclaimer of Warranty............................................................5
About DriverLINX.....................................................................................................................7
About This User’s Guide...........................................................................................................7
Conventions Used in This Manual.............................................................................................8
Configuring the KPCMCIA-PIO24 9
Introduction................................................................................................................................9
Configure DriverLINX Device Dialog.......................................................................................9
Using the KPCMCIA-PIO24 with DriverLINX 21
Introduction..............................................................................................................................21
DriverLINX Hardware Model for KPCMCIA-PIO24 .............................................................21
Connecting Signals to the KPCMCIA-PIO24..........................................................................26
Device Subsystem....................................................................................................................28
Digital Input Subsystem...........................................................................................................29
Digital Output Subsystem ........................................................................................................42
Device Subsystem Page.............................................................................................11
Digital Input Subsystem Page....................................................................................13
Digital Output Subsystem Page .................................................................................17
Counter/Timer Subsystem Page.................................................................................19
DriverLINX Subsystems............................................................................................21
DriverLINX Modes ...................................................................................................22
DriverLINX Operations and Events..........................................................................23
Logical Channels.......................................................................................................25
Buffers.......................................................................................................................25
Digital Input Subsystem Signals................................................................................26
Digital Output Subsystem Signals..............................................................................26
Counter/Timer Subsystem Signals.............................................................................27
Device Modes............................................................................................................28
Device Operations .....................................................................................................28
Digital Input Modes...................................................................................................29
Digital Input Operations............................................................................................29
Digital Input Timing Events ......................................................................................29
Digital Input Start Events...........................................................................................33
Digital Input Stop Events...........................................................................................35
Digital Input Channels...............................................................................................36
Digital Input Buffers..................................................................................................40
Digital Input Messages..............................................................................................40
Digital Output Modes................................................................................................42
Digital Output Operations..........................................................................................42
Digital Output Timing Events ....................................................................................42
Keithley KPCMCIA-PIO24 Series Contents 3
Digital Output Start Events........................................................................................46
Digital Output Stop Events........................................................................................48
Digital Output Channels.............................................................................................49
Digital Output Buffers...............................................................................................53
Digital Output Messages............................................................................................53
Counter/Timer Subsystem........................................................................................................55
Uninstalling DriverLINX 57
How do I uninstall DriverLINX? .............................................................................................57
Troubleshooting 62
Solving Problems.....................................................................................................................62
Solving Problems Installing Drivers..........................................................................62
Solving Problems Configuring the Drivers................................................................62
Solving Problems Loading Drivers............................................................................63
Generating a DriverLINX Configuration Report......................................................................66
What is in the Report?................................................................................................66
How do I Generate the Report?..................................................................................66
Glossary of Terms 67
4 Contents Keithley KPCMCIA-PIO24 Series
Preface
Software License and Software Disclaimer of Warranty
This is a legal document whic h is an agreement between you, the Licensee, and Scientific Software Tools, Inc. By opening this sealed diskette package, Licensee agrees to bec ome bound by the terms of this Agreement, which include the S oftware License and Software Disclaimer of Warranty.
This Agreement constit utes the complete Agreement between Licensee and Scient ific Software Tools, Inc. If Licensee does not agree to the terms of this Agreement, do not open the dis kette package. Promptly return the unopened diskette package and the other items (including written materials , binders or other containers, and hardware, if any) that are part of this product to S cientific Software Tools, Inc. for a full refund. No ref unds will be given for products that have opened disk packages or missing components.
Licensing Agreement
Copyright. The software and doc umentation is owned by Scient ific Software Tools, Inc. and is prot ected by both United States
copyright laws and int ernational treaty provisions. Scient ific Software Tools, Inc. authoriz es the original purchaser only (Licensee) to either (a) make one copy of t he software solely for backup or archival purposes, or (b) transf er the software to a si ngle hard disk only. The written materials acc om panying the software may not be duplicated or copied for any reason.
Trade Secret. Licensee understands and agrees that the sof tware is the propriet ary and confident ial property of Scientifi c Software Tools, Inc. and a valuable t rade secret. Li censee agrees to us e the software only for the intended us e under this License, and shall not disclose the soft ware or i t s contents to any third part y.
Copy Restrictions. The Licensee may not modify or trans late the program or related documentation without the prior written consent of Scientific Software Tools, Inc. All modifications, adapt ations, and me rged portions of the s oftware const itute the s oftware
licensed to t he Licensee, and the terms and conditions of this agreement apply to same. Licens ee may not distribut e copies, inc luding electronic transfer of c opies, of the modif ied, adapted or m erged software or ac company ing written m aterials to others. Licensee agrees not to reverse engineer, decompil e or di sassemble any part of the s of tware.
Unauthorized copying of the soft ware, including sof tware that has been m odified, merged, or i ncluded with other s oftware, or of t he written materials is ex pressly forbidden. Licens ee may not rent, transfer or leas e the software to any third parties. Licens ee agrees to
take all reasonable steps to protect Scientific Software Tools’ software from theft, disclosure or use contrary to the terms of the Licens e.
License. Scientific S oftware Tools, I nc. grants t he Licensee only a non-exclusiv e right to use the serialized copy of the software on a single terminal connected t o a single computer. The Licens ee may not network the s oftware or use it on more t han one computer or computer terminal at the s ame time.
Term. This Lic ense is effective until terminated. This License will terminate automatic ally without notice from Scientific Software Tools, Inc. if Lic ensee fail s to com ply wit h any term or c ondition of this Licens e. The Licensee agrees upon such termination to ret urn or destroy the written materi als and all copies of t he software. The Licensee may terminate the agreement by ret urning or destroying the program and documentation and all copies thereof.
Keithley KPCMCIA-PIO24 Series Preface 5
Limited Warranty
Scientific Software Tools, I nc. warrants that the software will perform subs tantially in acc ordance with the written mat erials and that the program disk, instructi onal manuals and reference mat erials are free from defec ts in materials and workmanship under normal us e for 90 days from the date of receipt. All express or im pl i ed warranties of the software and related materials are limited to 90 days.
Except as specif icall y set f orth herein, t he soft ware and accompany ing writt en materials (includi ng instruc tions f or use) are provided
“as is” without warranty of any kind. Further, Sc ientific Soft ware Tools, Inc. does not warrant , guarantee, or make any represe ntations regarding the use, or the results of t he use, of the s of tware or writ ten mat erial s in terms of correct ness , acc uracy , reliabil ity, currentness, or otherwise. The entire risk as to the results and perform ance of the software is as sumed by Licensee and not by Scienti fic Software Tools, Inc. or its distributors, agents or employees.
EXCEPT AS SET F ORTH HE REI N, THE RE ARE NO OTHER WARRANT IE S, EI THER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE, THE ACCOMPANYING WRITTEN MATERIALS, AND ANY ACCOMP ANYING HARDWARE.
Remedy. Scientific S oftware Tools’ ent ire liabilit y and the Licens ee’s ex clus ive remedy shall be, at Sc ientific Sof tware Tools’ opt ion,
either (a) return of the price paid or (b) repair or replac ement of the software or accompanying m aterials. In the event of a defect in material or workmans hip, the item may be returned wit hin the warranty period to Scientific S oftware Tools for a replacement without charge, provided the licensee previously s ent in the limited warranty regis tration card to Scientif ic Software Tools, Inc ., or can furnish proof of the purchase of the program. This remedy is void if failure has resulted from accident, abuse, or misapplication. Any replacement will be warranted for the remainder of the original warranty period.
NEITHER SCIENTIFIC SOFTWARE TOOLS, INC. NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, SALE OR DELI VERY OF THIS PRODUCT S HALL BE LIABLE FOR ANY DIRE CT, INDIRECT, CONSEQUENTI AL, OR INCIDENTAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION AND THE LIKE) ARISING OUT OF T HE USE OF OR THE INABI LITY TO USE SUCH PRODUCT EVEN IF SCIENTIFIC SOFTWARE TOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR LIMITATI ONS ON DURATION OF AN IMPLIED WARRANTY, THE ABOVE LIM ITATIONS MAY NOT APPLY TO LICENSEE.
This agreement is governed by the laws of the Commonwealth of Pennsylvania.
6 Preface Keithley KPCMCIA-PIO24 Series
About DriverLINX
Welcome to DriverLINX for Microsoft Windows, the high-performance real­time data-acquisition device drivers for Windows application development.
DriverLINX is a language- and hardware-indepe ndent applic ation programming interface designed to support hardware manufacturers’ high-speed analog, digital,
and counter/timer data-acquisition boards in Windows. DriverLINX is a multi-user and multitasking data-acquisition resource manager providing more than 100 services for foreground and background data acquisition tasks.
Included with your DriverLINX package are the following items:
The DriverLINX API DLLs and drivers supporting your data-
acquisition hardware
Learn DriverLINX, an interactive learning and demonstration program
for DriverLINX that includes a Digital Storage Oscilloscope
Source code for the sample programs
The DriverLINX Application Programming Interface files for your
compiler
DriverLINX On-line Help System
DriverLINX Analog I/O Programming Guide
DriverLINX 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 KPCMCIA-PIO24 card with DriverLINX.
For more information on the DriverLINX API, please see the
DriverLINX Technical Reference Manual.
For additional help programming your board, please examine the source
code examples on the Distribution Disks.
This manual contains the following chapters: Configuring the KPCMCIA-PIO24 Shows how to configure the KPCMCIA-PIO24 using the Configure DriverLINX
Device dialog box. Using the KPCMCIA-PIO24 with DriverLINX Shows how to set up DriverLINX with the Edit Service Request dialog box to use
KPCMCIA-PIO24 hardware features.
Keithley KPCMCIA-PIO24 Series Preface 7
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.
8 Preface Keithley KPCMCIA-PIO24 Series
Configuring the KPCMCIA-PIO24
Introduction
This manual explains the steps and special features that apply to Keithley’s KPCMCIA-PIO24 card.
Installing and configuring DriverLINX for the Keithley KPCMCIA-PIO24 card requires three steps:
1. To install your KPCMCIA-PIO24 hardware, read and follow the
instructions in the hardware manual.
2. To install DriverLINX, follow the general procedure outlined in the
"Read Me First" material on the installation CD.
3. To configure DriverLINX, use the DriverLINX Configuration Panel.
Also see “Configure DriverLINX Device Dialog” on page 9 for configuration options specific to a Keithley KPCMCIA-PIO24 model.
Configure DriverLINX Device Dialog
DriverLINX uses a standardized configuration protocol for all data-acquisition hardware. Even though Windows 95/98/Me automatically selects the hardware base address and interrupt channel for the KPCMCIA-PIO24, you must still follow the configuration process to assign a DriverLINX Logical Device number to a specific KPCMCIA-PIO24 model in your computer.
When you activate the S
DriverLINX displays the Configure DriverLINX Device dialog. The following sections describe your choices for configuring DriverLINX to work with a Keithley KPCMCIA-PIO24 model.
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 9
etup… button in the DriverLINX Configuration Panel,
10 Configuring the KPCMCIA-PIO24 Keithley KPCMCIA-PIO24 Series
Device Subsystem Page
Note: The Configure DriverLINX Device dialog appears differently under different versions of Windows.
Use the Device subsystem page to tell DriverLINX the model name and address of your KPCMCIA-PIO24 card.
Vendor
The Vendor property displays “Keithley Instruments, Inc.” It is a read-only property.
Device
Windows 95/98/Me/2000
Windows NT
The Device property designates the Logical Device you are configuring. It is a read­only property. To change it, first save (OK) or quit (Cancel) the current configuration. Then select or create a new Logical Device using the DriverLINX Configuration Panel.
Model
The Model property selects the hardware model of the card you’re configuring. This driver supports only model KPCMCIA-PIO24.
Address
Windows 95/98/Me/2000 automatically selects an appropriate address and ignores this property.
The A
ddress property selects the I/O port address for the card. The default address used by DriverLINX is 768 decimal or 0x300 hex. If you have another peripheral card at the same address, you will have to select a free range of 8 addresses.
Detect
The Detect property enables and disables DriverLINX’s hardware detection and testing algorithms. For maximum system reliability, always leave this check box marked.
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 11
Calibrate
The Calibrate property enables and disables hardware auto-calibration. For best accuracy, always leave this check box marked.
Special…
The Special… button displays a dialog for configuring any special, hardware-specific settings. For the KPCMCIA-PIO24 , Logical Device c onfiguration doe s not require any special settings so DriverLINX disables the S
pecial… button.
12 Configuring the KPCMCIA-PIO24 Keithley KPCMCIA-PIO24 Series
Digital Input Subsystem Page
Channels
The Channels property allows you to select a Logical Channel for configuration or viewing the channel’s range. Only the KPCMCIA-PIO24 digital input/output
channels support programmable configuration. DriverLINX defines the following Logical Channels for the KPCMCIA-PIO24
digital inputs:
Windows 95/98/Me/2000
Windows NT
Logical Channel DriverLINX Function KPCMCIA-PIO24 External
Connector
0 Digital Input/Output Port Digital input/output lines
PA0 - PA7
1 Digital Input/Output Port Digital input/output lines
PB0 - PB7
2 Digital Input/Output Port Digital input/output lines
PC0 - PC7
3 External Clock INTERRUPT INPUT
Range
The Range property specifies the supported digital input range for the selected Logical Channel. This is a read-only property.
Interrupt
For Windows 95/98/Me/2000, the operating system automatically determines the interrupt channel for the KPCMCIA-PIO24 card. DriverLINX disables this property.
For Windows NT, select a free interrupt request level to support interrupt mode transfers. Valid IRQ levels are: 1 - 15.
DMA level
The KPCMCIA-PIO24 does not use system DMA channels. DriverLINX disables this property and displays it as blank.
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 13
!
!
Use caution when configuring and connecting lines to the digital I/O ports. Connecting an input line to an output port, or vice versa, could damage the hardware.
Configuration Setup
The Configuration S I/O ports. The KPCMCIA-PIO24 allows configuring each line of the 8-bit I/O ports for either input or output.
DriverLINX supports two methods for configuring a digital I/O port. The simplified method configures the whole port, while the advanced method allows you to configure groups of digital I/O lines. Select the channel to configure in the drop­down channel list and enter a S
etup property specifies the hardware configuration of the digital
etup value using one of the methods below.
Simplified Digital I/O Port Configuration
For simplified configuration:
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:
1—configures all lines in the port as input, or
0—configures all lines in the port as output.
Advanced Digital I/O Port Configuration
With advanced configuration, you can divide the port into groups of 1, 2, 4 or 8 lines and configure each group separately.
For advanced configuration:
1. Select the channel number of the port to configure in the drop-down channel list.
2. Check the Initialize box.
3. Enter a value for the S
etup property as described below.
etup property to configure
The following table describes each grouping. Choose whichever grouping is most convenient.
Grouping Number of Lines in
Each Group
Byte 8 1 Nibble 4 2 Half-Nibble 2 4 Bit 1 8
For advanced configuration, t he S components:
14 Configuring the KPCMCIA-PIO24 Keithley KPCMCIA-PIO24 Series
etup property value has two variable-sized
Number of Groups in the Port
Direction Field—consists of a bit for each group in the port. Each bit
indicates the input/output direction of the lines in the group. The least­significant bit configures the first group. High-order bits to the left configure subsequent groups.
For each bit, enter one of the following values to configure the group:
1—configures all lines in the group as input, or
0—configures all lines in the group as output.
Group Size Field—consists of a binary 1 immediately to the left of
the Direction field. This allows the position of the S
etup property’s
leftmost 1 to indicate the start of the Direction field.
The following diagrams show the format of the S
etup property for each grouping. All formats have the Group Size field in the high-order bits and the Direction field in the low-order bits.
Byte-Sized Groups
06%
Direction Field—has one bit to configure the single byte-sized group
Group Size Field—has a value of 0x2 (hexadecimal) or 2 (decimal)
Nibble-Sized Groups
/6%
06%
Direction Field—has two bits to configure the two nibble-sized
groups
Group Size Field—has a value of 0x4 (hexadecimal) or 4 (decimal)
Half Nibble-Sized Groups
/6%
06%
Direction Field—has four bits to configure the fo ur half nibble-sized
groups
Group Size Field—has a value of 0x10 (hexadecimal) or 16
(decimal)
Bit-Sized Groups
/6%
06%
Direction Field—has eight bits to configure the eight bit-sized groups
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 15
/6%
Group Size Field—has a value of 0x100 (hexadecimal) or
512 (decimal)
Advanced Configuration Example: This example shows how to configure the port in nibbles. It configures the first
nibble as output and the second as input.
1. Choose the Nibble-Sized format and fill in the Direction field, right-to­left, as follows:
0—to configure the first nibble as output 1—to configure the second nibble as input
06%
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 Setup property.
/6%
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.
16 Configuring the KPCMCIA-PIO24 Keithley KPCMCIA-PIO24 Series
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. KPCMCIA-PIO24 card has three digital input/output ports. The Digital Output subsystem shares these ports with the Digital Input subsystem. The KPCMCIA-PIO24 requires configuration of each line in the digital input/output ports as input or output. See “Digital Input Subsystem Page” on page 13.
Range
The Range property specifies the supported digital output range for the selected Logical Channel. This is a read-only property.
Interrupt
The KPCMCIA-PIO24 uses the same interrupt for digital output as for digital input. Go to the Digital Input page to set it. DriverLINX disables this property and displays it as blank.
DMA level
The KPCMCIA-PIO24 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 KPCMCIA-PIO24, 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.
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 17
Dec
This check box converts the Initialization Value property to decimal.
Hex
This check box converts the Initialization Value property to hexadecimal.
18 Configuring the KPCMCIA-PIO24 Keithley KPCMCIA-PIO24 Series
For the KPCMCIA-PIO24, there are no configurable options on the Counter/Timer subsystem page.
Counter/Timer Subsystem Page
Resolution
The Resolution property specifies the clock frequency of the master oscillator. DriverLINX provides a System Pacer Clock which simulates a 1 MHz hardware clock for pacing input/output tasks.
Interrupt
The KPCMCIA-PIO24 does not support interrupts from counter/timers. DriverLINX disables this property and displays it as blank.
Keithley KPCMCIA-PIO24 Series Configuring the KPCMCIA-PIO24 19
Using the KPCMCIA-PIO24 with DriverLINX
Introduction
This chapter shows you how to set up and use KPCMCIA-PIO24 hardware features with DriverLINX. The descriptions here use the Edit Service Request dialogs for
language and API i ndependence. For the corre ct syntax with the language you’re using, please see the DriverLINX Technical Reference Manuals. For DriverLINX examples in your programming language, please see the source code examples in the subdirectories of your DriverLINX installation directory or on the original Distribution Media.
DriverLINX Hardware Model for KPCMCIA-PIO24
By design, DriverLINX provides a portable, hardware-independent API for data­acquisition boards while still allowing applications to access unique or proprietary hardware features of specific products. To achieve this goal, DriverLINX maps a hardware-independent, or abstract, data-acquisition model onto KPCMCIA-PIO24 hardware capabilities.
The following sections describe how DriverLINX implements KPCMCIA-PIO24 hardware features as Subsystems, Modes, Operations, Events, Logical Channels, Buffers, and Messages.
DriverLINX Subsystems
The KPCMCIA-PIO24 supports four of DriverLINX’s six Logical Subsystems:
1. Device—refers to the KPCMCIA-PIO24 card as a whole.
2. Analog Input—refers to the analog input channels, clocks, and control
signals. The KPCMCIA-PIO24 does not support analog input.
3. Analog Output—refers to the analog output channels, clocks, and
control signals. The KPCMCIA-PIO24 does not support analog output.
4. Digital Input—refers to the 8-bit digital input/output ports as well as
the 1-bit digital input (TTL) control signals, INTERRUPT INPUT.
Keithley KPCMCIA-PIO24 Series Using the KPCMCIA-PIO24 with DriverLINX 21
Loading...
+ 48 hidden pages