Tektronix Keithley CTM-05 External DAS Driver Users Guide

CTM-05 External DAS Driver
USER’S GUIDE
CTM-05 External DAS Driver
User’s Guide
Revision B - November 1994
Part Number: 59176
New Contact Information
Keithley Instruments, Inc.
28775 Aurora Road
Cleveland, OH 44139
Technical Support: 1-888-KEITHLEY
Monday – Friday 8:00 a.m. to 5:00 p.m (EST)
Fax: (440) 248-6168
Visit our website at http://www.keithley.com
The information contained in this manual is believed to be accurate and reliable. However, Keithley Instruments, Inc., assumes no responsibility for its use or for any infringements of patents or other rights of third parties that may result from its use. No license is granted by implication or otherwise under any patent rights of Keithley Instruments, Inc.
KEITHLEY INSTRUMENTS, INC., SHALL NO T 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.
Refer to your Keithley Instruments license agreement for specific warranty and liability information.
VIEWDAC and ASYST are registered trademarks of Keithley Instruments, Inc. MetraByte is a trademark of Keithley Instruments, Inc. All other brand and product names are trademarks or registered trademarks of their respective companies.
© Copyright Keithley Instruments, Inc., 1994.
All rights reserved. Reproduction or adaptation of any part of this documentation beyond that permitted by Section 117 of the 1976 United States Copyright Act without permission of the Copyright owner is unlawful.
Keithley Instruments, Data Acquisition Division
440 Myles Standish Blvd. Taunton, MA 02780
FAX: (508) 880-0179
Telephone: (508) 880-3000
Preface
The CTM-05 External DAS Driver allows you to use Keithley’s CTM-05 and
µ
CCTM-05 counter/timer boards with the following Keithley data
acquisition and analysis software:
VIEWDAC ASYST
This manual provides the information needed to use the CTM-05 External DAS Driver with data acquisition and analysis software. Use this manual in conjunction with your board user’s guide and with the documentation for the data acquisition software you are using.
Note:
The CTM-05 External DAS Driver may support options your software does not; likewise, your software may support options this external driver does not.
If you need help, contact your local sales office or Keithle y’ s Applications Engineering Department between 8 am and 6pm (Eastern Time), Monday through Friday:
Keithley MetraByte
Applications Engineering 440 Myles Standish Boulevard Taunton, Massachusetts 02780
Telephone 508/880-3000
Telex 503989
FAX 508/880-0179
v
Table of Contents
Preface
Using the CTM-05 External DAS Driver
Supported Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Options Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Files on Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Setting up the Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Running the Configuration Program. . . . . . . . . . . . . . . . . . . . . 2
Loading the CTM-05 External DAS Driver . . . . . . . . . . . . . . . 4
Accessing the CTM-05 External DAS Driver. . . . . . . . . . . . . . 4
Using the Configuration Program . . . . . . . . . . . . . . . . . . . . . . . . . 5
Menu Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Special Purpose Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Exiting the CTM-05 Configuration Program . . . . . . . . . . . . . . 7
Configuring the CTM-05 External DAS Driver from DOS. . . . . . 8
CTM-05 External DAS Driver Characteristics . . . . . . . . . . . . . . . 9
Digital I/O Clocking and Triggering. . . . . . . . . . . . . . . . . . . . . 9
Timer Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Software Interrupt Vectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
CTM-05 External DAS Driver Error Messages. . . . . . . . . . . . . . 12
List of Tables
Table 1. Configuration Program Menu Items . . . . . . . . . . . . 5
Table 2. Time Interval Ranges and Resolution . . . . . . . . . . . 6
Table 3. Configuration Menu Special Keys. . . . . . . . . . . . . . 7
Table 4. Command Line Options. . . . . . . . . . . . . . . . . . . . . . 8
Table 5. Interrupts and Environment Strings. . . . . . . . . . . . 11
Table 6. Error Messages from CTM-05 External
DAS Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
iii
Table 1. Configuration Program Menu Items . . . . . . . . . . . . 5
Table 2. Time Interval Ranges and Resolution . . . . . . . . . . . 6
Table 3. Configuration Menu Special Keys. . . . . . . . . . . . . . 7
Table 4. Command Line Options. . . . . . . . . . . . . . . . . . . . . . 8
Table 5. Interrupts and Environment Strings. . . . . . . . . . . . 11
Table 6. Error Messages from CTM-05 External DAS Driver 12
Using the CTM-05
External DAS Driver
The CTM-05 External DAS Driver allows your VIEWDAC or ASYST application program to exchange data with CTM-05 and counter/timer boards. This document describes how to use the CTM-05 External DAS Driver.
Supported Hardware
µ
CCTM-05
The CTM-05 External DAS Driver supports the following Keithley data acquisition (DAS) boards.
CTM-05 (standard architecture)
µ
CCTM-05 (Micro Channel
Options Supported
The CTM-05 External DAS Driver supports the following options:
Counter/timers – Up to 5 counter/timer channels – Event counting (16-bit or 32-bit) – Frequency measurement – Pulse output (including one-shot variant) – Time interval measurement
architecture)
1
Files on Disk
Synchronous digital I/O
Up to eight bits of digital input – Up to eight bits of digital output – Internal and external clocking – Internal and external triggering
The driver disk contains the file CTM05.EXE. CTM05.EXE controls the boards and allows communication between an application program and the boards. CTM05.EXE executes as a terminate-and-stay-resident (TSR) program that occupies a small amount of memory in your computer.
Quick Start
This section briefly describes how to configure, load, and access the CTM-05 External DAS Driver.
Setting up the Board
Refer to your board user’s guide for information on setting the jumpers for the base address. Remember this setting when you use the CTM-05 External DAS Driver configuration program.
Running the Configuration Program
The CTM-05 External DAS Driver is set up for the following default configuration:
Board number = 1
Board type = CTM-05
Base address = 300h Interrupt level = 0 (disabled)
2 Using the CTM-05 External DAS Driver
Time interval resolution = 1
Event count resolution = 16 bits
s
µ
You must run the configuration program or configure the driver from DOS if your board’s settings differ from these default settings. In addition, whenever you change the hardware or software settings, you must run the configuration program or reconfigure the driver from DOS in order for the external DAS driver to function properly.
Note:
can support two CTM-05 or than one CTM-05 or
Each memory resident image of the CTM-05 External DAS Dri ver
CCTM-05 boards. If you are using more
µ
CCTM-05 board, you must configure the
µ
parameters for each board, ensuring that the base address does not conflict between the two boards.
Perform the following steps to run the configuration program:
1. Create a CTM05 subdirectory on your hard disk. For example, at the DOS prompt, enter the following:
MKDIR CTM05
2. Copy CTM05.EXE from the driver disk into the CTM05 directory.
3. Enter the following at the DOS prompt:
CD \CTM05 CTM05 –MENU
Configure the board parameters using the configuration program, as described in See “Using the Configuration Program” on page 5.
Note:
If you wish, you can also configure the CTM-05 External DAS Driver from DOS instead of using the configuration program; refer to page 8 for more information.
3
Loading the CTM-05 External DAS Driver
You must load the CTM-05 External DAS Driver each time you start up your computer in order for an application program to recognize it. The external DAS driver remains in memory until the computer is turned off or rebooted.
To load the CTM-05 External DAS Driver, access the directory containing CTM05.EXE and enter the following at the DOS prompt:
\CTM05\CTM05
You can also load the CTM-05 External DAS Driver automatically
Note:
whenever you start the computer by adding the preceding line to your AUTOEXEC.BAT file.
If you want to access more than two boards, load the driver multiple times.
Accessing the CTM-05 External DAS Driver
Some application programs access the CTM-05 External DAS Driver automatically . For information on accessing e xternal D AS dri v ers, see the documentation for your application program.
If you are using the ASYST program, perform the following steps to access the CTM-05 External DAS Driver:
1. After loading the CTM-05 External DAS Driver, boot ASYST 2.10 or
greater and permanently load the Ext DAS Driver Support system overlay from the Data Acquisition menu. ASYST automatically searches for and creates a DAS device called CTM05.
2. Enter the following at the OK prompt to make CTM-05 the current
device:
CTM05
4 Using the CTM-05 External DAS Driver
µ
Using the Configuration Program
This section describes the configuration program’s menu items and special purpose keys, and how to exit from the configuration program.
Menu Items
When you run the configuration program, the configuration menu is displayed. The menu options, choices, and default values are listed in Table 1.
Table 1. Configuration Program Menu Items
Menu Item Choices Default Value
Number of Boards 1, 2 1 Board T ype 0 = CTM-05; 1 = µ CCTM-05 0 (CTM-05) Base I/O Address For CTM-05:
100h to 3BCh (in multiples of four)
For µ CCTM-05
1
:
300h
300h, 3E0h, 500h, 600h, 800h, F00h, 1000h, 1500h, 1800h, 2000h, 3000h, 4000h, 8000h, A000h, F000h, and FF00h
Interrupt Level Timed Interval
Measurement Resolution Event Count Resolution
Notes
1
You can set and check the address for the µ CCTM-05 using the reference disk supplied with your
Micro Channel machine.
2
Timed interrupt mode is not supported at this time.
3
If you select 16-bit resolution, five 16-bit counters are available; if you select 32-bit resolution, a
maximum of two 32-bit counters are available.
0 to disable interrupts 1 µ s, 16 µ s, 256 µ s, 4096 µ s, 65536 µ s1
3
16-bit, 32-bit 16-bit
2
0 (disabled)
s
5
When you specify the time interval measurement resolution, you are also specifying the range. Table 2 lists the ranges that correspond to the available time interval measurement resolutions.
Table 2. Time Interval Ranges and Resolution
Resolution ( µ s) Range (s) Time Interval Code
1
1 0.000001 to
1
0.065535
16 0.000016 to
2
1.048560
256 0.000256 to
3
16.776960
4,096 0.004096 to
4
268.43136
65,536 0.065536 to
5
4294.901760
Notes
1
Time interval codes are necessary if you are configuring the external
DAS driver using DOS; see page 8 for more information.
6 Using the CTM-05 External DAS Driver
Special Purpose Keys
Table 3 describes the keys used for special purposes in the configuration program.
Table 3. Configuration Menu Special Keys
Keys Description
[w] Write a response file. A response file is an
[q] Quit the configuration program without
ASCII file containing the command line options for the current configuration of the driver.
loading the driver.
[d] Reset the driver settings to their default
values.
[Esc] Exit the configuration menu with the option
of saving the current settings and loading the driver into memory.
[Tab] Toggle between boards 1 and 2 when two
boards are being configured.
[?] Invoke help on the current menu item.
Exiting the CTM-05 Configuration Program
To exit the program without saving any changes press [q]. Otherwise, to exit the configuration program press [Esc]. The following prompt is displayed:
Do you want to permanently save this configuration? [Y/N]
T ype [Y] to sa v e the configuration; type [N] if you do not want to sa ve the configuration settings. If the configuration is saved, the program displays the message:
Remembering...
7
-a
Then, you are prompted with the following message:
Exit Configuration Program? [Y/N]
T ype [Y] to exit from the configuration program; type [N] to remain in the configuration program.
Configuring the CTM-05 External DAS Driver from DOS
If you wish, you can also change the configuration of the CTM-05 External DAS Driver using DOS command line options instead of using the configuration program. The command line syntax is as follows:
CTM05 [
bd #1 options
],[
bd #2 options
The command line options are described in Table 4.
Table 4. Command Line Options
Option Function
###
-bt #
-irq #
-ti #
-er #
-def Recall original default settings
-h Help
-menu Invoke menu-driven setup @ xxxx
Board I/O address = ### (in hexadecimal); see Table 1 on page 5
Board type = # (0 - CTM-05 , 1 - µ CCTM-05) Interrupt level = 0 (disabled) Time interval code = # (1 to 5); see Table 2 on page 6 Event count resolution = # (16 or 32)
Indicates use of response file xxxx . A response file is an ASCII file containing the command line options for the driver.
] [-menu ]
To display command line options, enter the following at the DOS prompt:
CTM05 ?
8 Using the CTM-05 External DAS Driver
CTM-05 External DAS Driver Characteristics
The following sections describe the various attributes of the CTM-05 External DAS Driver and the restrictions imposed by the external DAS driver on various modes of operations and resources.
Digital I/O Clocking and Triggering
Keep the following in mind when performing digital I/O clocking and triggering:
Internal Clocking and Triggering - For this mode of operation, the
data transfer begins without waiting for any external event and proceeds at the specified rate until finished. No external connections to the timer are required.
External Clocking - For this mode, the driver waits for a TTL,
rising-edge signal at the clock input before each data point is transferred. The operation proceeds paced by the external clock signal until the requested amount of data is transferred.
The clocking signal is rising-edge sensitive. Each data transfer occurs on successive rising edges of the external clock signal. Connect the external clocking signal to the CTR 1 SOURCE pin.
External T riggering
- For this mode, the driver w aits for a logic high signal at the trigger input before starting the data transfer. Data transfer then proceeds at the specified rate until finished. The triggering signal is TTL, level-sensitive. If the trigger level is brought low during the operation, data transfer is halted until the trigger signal is brought high again. Connect the external triggering signal to the CTR 1 GATE pin.
Timer Resources - The CTM-05 uses the Am9513A counter/timer
circuitry from Advanced Micro Devices. The Am9513A has five timer channels (counters), any of which can be used for counter/timer functions. When referencing timer resources, the driver uses the term channel. Timer channels are zero-based (0 to 4). The CTM-05 hardware uses the term counter to refer to timer resources. Counter numbering is one-based (1 to 5). For example, driver channel 0 is the same as CTM-05 counter 1.
9
Certain counters have special uses. Counter 1 is used for digital I/O clocking and triggering. The driver holds a counter/timer allocation table that is checked to see if any given timer channel is currently in use. If the channel is in use, the driver returns a “Timer Channel in Use” error.
Timer Connections
Keep the following in mind when connecting to counter/timer channels:
Frequency Measurement - Available channels: 0, 1, 2, 3;
Maximum gate: 2,147 s; maximum frequency: 7.5 MHz. Frequency measurement requires two adjacent counters. The timer
chosen is referred to as the pulse counter. The next channel is referred to as the gate counter. The input must be connected to the source of the pulse counter. The output of the gate counter must be connected to the gate of the pulse counter.
Event Counting (16-bit) - Available channels: 0, 1, 2, 3, 4;
maximum count: 65,535. The input must be connected to the source of the counter being used.
Event Counting (32-bit) - Available channels: 0 1, 2, 3;
maximum count: 4,294,901,760. The input signal must be connected to the source of the counter
specified. The output of that counter must be connected to the source of the next consecutive channel.
Pulse Output - Available channels: 0, 1, 2, 3, 4;
minimum pulse width: 2 µs; minimum pulse period: 4 µs; maximum pulse period: 2,147 s.
The pulse output signal is generated on the output of the counter being used.
10 Using the CTM-05 External DAS Driver
Asynchronous Time Interval - Available channel: 0, 1, 2, 3, 4.
Asynchronous time interval measurement requires either one or two of the available counters, depending on your application. One counter is needed if the events being timed occur on the same input. Two counters are needed if the events being timed occur on different inputs. The input signals must be connected to the gates of the appropriate counters. The timer interval measurement range and resolution are configuration dependent. See Table 2 on page 6 for a list of ranges and resolutions.
Software Interrupt Vectors
The CTM-05 External DAS Driver uses two software interrupt vectors to communicate with the application program. The interrupt vectors used are two of the MS-DOS “user interrupts” (interrupts 60h to 67h). To ensure that conflicts with other devices, hardware, or programs do not exist, each of the interrupt vectors can be set to use a different interrupt number than the default.
The interrupt vector numbers can be changed from the default by using the SET command from DOS. This command saves a string in the DOS environment that the driver searches for upon loading. These strings are specified in Table 5.
Table 5. Interrupts and Environment Strings
Interrupt Default Interrupt
Number
Device linking vector 66h DAS DS=xx Critical error vector 65h DAS CE=xx
Notes
1
xx is between 60h and 67h.
Environment
1
String
11
CTM-05 External DAS Driver Error Messages
Table 6 lists the error messages that may occur during operation of the CTM-05 External DAS Driver.
Table 6. Error Messages from CTM-05 External DAS Driver
Error Number
0 No error No error message. 1 Function not
2 Function out of
3 Non-valid board
4 Non-valid error
6 Timer channel in use
7 Digital output not
Error Message Description
A function was requested that is not supported by the
supported
bounds
number
number
initialized
CTM-05 External DAS Driver. A function number not defined by the CTM-05
External DAS Driver was requested. A board that is out of range of configured boards was
requested. A non-valid error number was detected by the external
DAS driver function 0 “REPORT ERROR MESSAGE.” For this external DAS driver, 15 error messages have been defined. A request for an error message string not defined returns this error code.
The timers on the CTM-05/µCCTM-05 are shared by many of the CTM-05 external DAS driver functions. This error code is returned if a function request is issued to the external DAS driver that needs to use a timer channel already in use by another external DAS driver function.
This error is returned by the digital output start function when the digital output subsection of the CTM-05/µCCTM-05 board has not been initialized.
8 Digital input not
initialized
9 Timer not initialized This error is returned by the timer/counter functions
12 Using the CTM-05 External DAS Driver
This error is returned by the digital output start function when the digital input subsection of the CTM-05/µCCTM-05 board has not been initialized.
when the timer subsection of the CTM-05/µCCTM-05 board has not been initialized.
Table 6. Error Messages from CTM-05 External DAS Driver (cont.)
Error Number
10 Frequency
11 Frequency
12 Event count not
13 Event count overrun This error occurs when an event counting channel has
14 Time interval
Error Message Description
This error is returned by the external DAS driver measurement not active
measurement overrun
active
measurement not active
function “FREQUENCY MEASUREMENT
STATUS/READ” when a frequency measurement
task is not active.
This error is generated by the external DAS driver
when the signal whose frequency is being measured
has overflowed the frequency measurement counter.
The solution is to reduce the gate period of the
frequency measurement task.
This error is returned by the external DAS driver
function “EVENT COUNT READ” when an event
counting task is not active.
overflowed.
This error is returned by the external DAS driver
functions “ASYNCHRONOUS TIME INTERVAL
STATUS/READ” and “ASYNCHRONOUS TIME
INTERVAL STOP” when an asynchronous time
interval task is not active.
15 Time interval
measurement timer overflow
This error occurs when an asynchronous time interval
measurement has overflowed one or both timers. The
solution is to increase the value of the timer prescale
for the asynchronous time interval measurement
function; see See “Using the Configuration Program”
on page 5.
13
Loading...