Keithley DAS-40 Series User manual

0
0
0

User Guide
for the
DAS-40Gl & DAS-40G2
A/D & D/A Data Acquisition Boards
Copyright December 1992
KEITHLEY DATA ACQUISITION - Kelthley MetraBytelAsyst
440 MYLES STANDISH BLVD.. Taunton. MA 02780
TEL. 508/880-3000. FAX 509/890-0179
11,

Warranty lnformatlon
AH products mnnufacturrd by Kcithlcy Data Acquisition ac warranted ngse~t
dcfcctivc malcrlals and workmanship lor a period of one year from the date of
delivcly to the orlglnnl purchnwr. Any pmduct that Is found to be defoctlvc within
the wiu-mnty pcrlod till. at the option al Keithley Data Acquisition, bc
rcpalrcd or rcplaccd. ‘IhIs warranty dots not apply to products damagud by
improper use.
Warning
Keithley Data Acquisition ~ssumcs no liability for damages coneequcnt
to the “SC of this product. Tb‘s product I.
not desI@,ned4th components
of Plevel
of
reliability suitable for use in life support or critlca,
epplicetions.
iv

Contents
CHAPTER 1 INTRODUCTION
1.1 General
1.2 Distribution Software
1.3 The STA-40 Accessory
.
CHAPTER 2 INSTALLATION
2.1
2.2
2.3
2.4
2.5
2.6
General . . . .
Backing Up Distribution Software
Single-Floppy-Drive Machines
Dual-Floppy-Drive Machines
Hard-Drive Machines . . . . .
Unpacking & Inspecting .
Configuration Options. . . .
Base Address . .
DMA Channel
Interrupt Level .
A/D Functions
D/A Functions
Hardware installation . . . .
Single-Ended vs. Differential Connections
Installing The DAS-40 In A PC
DAS-40 & STA-40 I/O Connections
CHAPTER 3 PROGRAMMING NOTES
3.1 General
3.2 The Language Interlace Modules .
Interface For BASIC(A) - DAS4OBIN
Interlace For QuickBASIC - DAS40.LIB. DAS40.OLB.
3.3 Loading/Unloading The DAS-40 Softv!are Driver
3.4 Changing The Factory Configuration
3.5 The Call Modes
3.6 Default Configuration . . . .
3.7 Accommodating Multiple DAS-40s In A Single System
CHAPTER 4 CALL MODES
4.1 MODE 0: Query Configuration For An Installed DAS-40
4.2 MODE 1: Specify Buffer(s) & Conversion Count(s) For ADC & DAC
4.3 MODE 2: Setup For A/D or D/A Conversions For Transfer Via DMA
4.4 MODE 3: Setup A/D Start/Stop Channels & Global Gain Value
4.5 MODE 4: Start A/D Conversions & Transfer Via DMA
4.6 MODE 5: Stan D/A Conversions & Transfer Via DMA
4.7 MODE 6: Setup A/D & D/A Conversion Pacing Clock
4.6 MODE 7: Do One A/D Conversion,
4.9 MODE 8: Do One D/A Conversion,
4.10 MODE 9: Monitor DMA Transfers For ADCs & DACs.
4.11 MODE 10: Setup For Digital I10
4.12 MODE 11: Input Byte/Word . .
4.13 MODE 12: Set/Query Current DAS-40 Card Number,
4.14 MODE 13: Terminate Current DMA Operation
1-l
l-l
1-2
2-1
2-1
2-1
2-l
2-2
2-2
2-3
.2-3
2-4
2-5
2-5
2-6
2-7
2-7
.2-e
2-9
.3-l
3-l
.3-3
3-3
3-4
3-5
3-5
3-6
.3-7
.4-2
4-2
.4-4
.4-6
,4-6
,4-7
.4-7
.4-6
.4-e
,4-9
4-9
,4-9
4-10
4-10

4.15
4.16
4.17
4.18
4.19
4.20
MODE 14: Output Byte/Word . . . . . .
MODE 15: Tag Channel Numbers To A/D Data Sample. .
MODE 16: A/D Triggered Block Scan MODE (DMA)
MODE 17: Transfer Data To BASIC Array . . . .
MODE 18: Allocate Memory Buffer for DMA Operations.
MODE 19: Free Memory Buffer. . .
CHAPTER 5 REGISTER STRUCTURE & FORMAT
5.1 General.
5.2 A/D Control-Status Register (ADCSR) .
5.3 Channel-Gain List Control-Status Register (CHANCSR)
5.4 A/D Data Register (ADDAT). . . . . . . . .
5.5 D/A Control-Status Register (DACSR)
5.6 D/A Data Register (DADAT). . . .
5.7 DIO Data Register (DIODAT) . .
5.8 Supervisory Control-Status Register (SUPCSR)
5.9 Pacer Clock Register (TMRCTR)
CHAPTER 6 CALIBRATION
CHAPTER 7 SPECIFICATIONS
7.1 A/D Subsystem
7.2 D/ASubsystem . .
7.3 Digital l/O Subsystem
7.4 External Trigger
7.5 Clock
7.6 Interface Characteristics
7.7 Power Requirements
7.8 Physical/Environmental
.
CHAPTER 8 FACTORY RETURNS
APPENDICES
Appendix A Coding Tables
Appendix B Direct Memory Access (DMA)
Appendix C Summary Of Error Codes
4-10
4-11
4-12
4-12
4-13
4-14
5-l
5-l
5-4
5-6
5-6
5-9
5-S
5-10
5-14

CHAPTER 1
INTRODUCTION
1.l GENERAL
The DAS40Gl and DAS4OG2 arc high-speed, 12-bit, A/D and D/A data-acquisition boards that plug
into an accessory slot of an IBM PC-AT or compatibles. The two boards differ only in A/D gains and
throughputs. The Gl version offers gains of 1, 10,103,and 500at up to 100,CCUsamples per scrond;
the G2 version offers gains of 1,2,4, and 8 with a throughput of 250,Mx)samples per second, see
specifications on Page7-2. Analog input configuration is switch-selectable, and the board is
configurable for either eight differential input channels or 16singlecndcd channels.
D/A subsections include two 12-bit, deglitched D/A converters able to provide cithcr single outputs
(the analog outputs change at different times) or simultaneous outputs (the D/A convcrtcr outputs
change at the same time). In a DMA (Direct Memory Access)transfer, digital data converts to analog
at 130KHz. The boards also feature two &?-linedigital I/O ports, which can bc set for input or output.
DAS40 models contain a programmable l’accr Clock for controlling A/D and D/A conversion rates.
Operating under program control, the PacerClock provides a usable range of 4.0~ (250KH.z) to 2s
(0.5Hz). External clocking may also be sclectcd for starting conversions, while an cxtcrnal trigger may
be selected for gating the conversions (A/D and D/A). The A/D and D/A converters can opcratc
simultaneously at the sameclock speed, or the D/A subsystem can opcratc in single-conversion mode
while the A/D subsystem operates from the pacer clock or from an extcrnnl clock.
The DMA interface accommodates 16.bit data transfers and is switch-sclcctablc for DMA Chnnncl5,6,
or 7. DMA buffers can rcsidc anywhere in the DOS640KB memory spaceof an PC/AT and may h
up to 65,536words (128KB) each.
The boards are also configurable for using two DMA channels to support Continuous Performance
DMA. Continuous Performance DMA is a sampling method for providing gap-free transfers of large
volumes of data from memory or disk (D/A conversions) or to memory or disk (A/D conversions)
with no sample losses.
Interrupt Level support is jumper-selectable for Level 3,5,7,10, or 15. Analog-input voltage
protection extends to f25V with power On or Off.
Board calibration is pcrformcd at the factory. While calibration of the A/D subsystem changes very
little with a switch to a new range, the D/A subsystem may need recalibration for any range
switching.
1.2 DISTRIBUTION SOFTWARE
The software package furnished with your board includes an installable software driver, BASIC and
QuickBASIC Language Intcrfacc modules, example programs, and various utilities. Refer to the text
file
FILES.DOC
on your Distribution Software diskette for a complctc listing of the files contnincd
thereon.
1-1

DAS-40 USER GUIDE
1.3 THE STA-40 ACCESSORY
The STA-40 is a Screw Terminal Accessory Box useful for connecting to the DAS-40. All I/O
connections use screw terminals that are accessible through the side of the STA-40. Analog inputs
connect to Terminals TBl and TB2. Analog outputs, along with the external trigger and external clock,
connect to TB5. Digital port lines connect to TB3 and TB4. Five “user” lines and a +5V input line are
also available.
Two 50.pin connectors and a 26pin connector provide additional I/O interface Either 50.pin
connector acceptsa cable from the DAS-40 while the other acceptsone or several daisy-chained STA-
40s. The 2kpin connector is available for use with the “5802 Rack” of signal-conditioning modules.
When connecting an analog input to the STA-40 for adifferential mcasurcmcnt, connect the input
signal line to a HI (High) terminal of Connector TBl or TB2
(HI0
through
HI7 )
and the input
ground to corresponding L (Low) terminal f
LO8
through L15 ). For cxamplc, a diffcrcntial
connection for Channel 0 would use
HI0
and MB, while a differential connection for Channel 1
would USC
HI1
and Log. Rcfcrcncc the ground of the DAS-40 to the system ground of the
mcasuremcnt source by connecting the
AGND
terminal either directly or via resistor to the system
ground.
When connecting an analog input to the STA40 for a singlccndcd mcasuremcnt, connect the input
signal lint to a HI (High) or
L
(Low) terminal
(HI0
through
H17
or
LO8
through LJ5 ). For single-
ondcd mcasurcmcnts, the
HI
and
L
prefixes on TBl and TB2 have no significance. Connect the
analog input return to the terminal labelled
ALO,
which should be tied to the ground rcfcrcncc of
your system. If you want the ground rcfercncc to be at the STA40, connect the 2-way jumper of the
STA-40
( WI )
to the
LOCAL
pin. If you want to rcferencc the analog inputs to a point in your
system, connect the W1 jumper to the
REMOTE
pin. For single-cndcd mcasurcmcnts, connect the
AGND
terminal to your system ground, either directly or through a resistor to limit any common-
mode voltage bctwcen
AL0
and
AGND
As aguard against a situation whew one might forget to
reference the system ground to DAS-40 ground, the DAS40 lOK-Ohm Resistor R30(Figure 2-l)
connects
AL0
to
AGND
You may remove this resistor if you use the REMOTE mcasurcmcnt
scheme.
Note that when you selecting Single-Ended or Diffcrcntial mcasurcments, rcmcmbcr to wt the DASJI)
sclcction switch.
The STA-40 also contains an area for brcadboarding an application circuit. The following patches are
available in that area:
PATCH DESCRII’TION
AGND
+15v
-15v
PGND
DGND
+5v
USERA
USERB
USERC
USERD
USERE
Analog input groundreturn
+15V fmtn theDAS-40 DC/DC Convcrtcr
-15V from theDAS-40 DC/DC Converter
Groundreturn for Al5V lines
Digital ground return
User-suppliedinput
User-suppliedinput
User-suppliedinput
User-suppliedinput
User-suppliedinput
User-suppliedinput
NOTE: Limit the ?r15Voutput current to under 20mA.
1-2

CHAPTER 2
SETUP & INSTALLATION
2.1 GENERAL
This chapter provides instructions for the installing the DAS-40 in an IBM PC-AT or compatible. The
chapter begins with procedures for making working topics of your DA’S40 Distribution Softwarc.
Next arc instructions for unpacking and inspection, followed by descriptions of the options and
methods for setting all configurable parameters.
2.2 BACKING UP DISTRIBUTION SOFTWARE
Distribution software is furnished on 5.25”,360K floppy diskette(s). To accommodate users with 3.5”
floppy drive, the Software is also available on 720K diskette(s).
As soon as possible, make a working copy of your DAS-40 software using the procedures that follow.
Store your original software copy in a safeplace asa backup.
The following back-up procedures cover the more common computer configurations: a single-floppy
drive (with hard disk), dual-floppy drives, and a hard drive.
Single-Floppy-Drive Machines
To copy your Distribution Software to your computer’s hard disk, rcfcr to the subsection below
entitled
Hard-DriveMachines
To copy to another diskette in a single-floppy-drive machine (with
hard disk),
1. Turn on power to your computer and display.
2. After system boot-up, the DOS prompt should bc C >
3. Besure the DOS file
DISKCOPY.EXE
is in the C:\ directory. Then, type
DISKCOPY A: A:
4. Insert the source diskette (your DAS-40 Distribution Software diskette) into Drive A. The system
will prompt you through the disk copying process. When the source diskette has been copied into
memory, the System will ask you to insert the tar@ diskette into Drive A. The tarpet diskette is
a formatted, blank disk that is to be your back-up disk.
5. When a copy is complete, the computer will ask COPY ANOTHER (Y/N)?. Respond by typing
Y for another diskette or
N
if you are finished copying. If you typed
Y,
repeat Steps3 and 4.
6. Put the original DAS-40 diskcttc(s) in a safeplace. Label the back-up diskcttccs)
DA.540
Wurkiq
Disk
and USCfor running your DAS-40 programs.
Dual-Floppy-Drive Machines
To copy your Distribution Software to thecomputer’s hard disk, refer to the next subsection,
Ilard-
Drive Machines
To copy to another diskcttc(s) in a dual-floppy-drive machine,
2-1

DAS-40 USER GUIDE
1. Turn on power to your computer and display, and place your DOSdiskette in Drive A.
2. The DOS prompt should be A > If not, type
A:
followed by < Enter > Bc sure the diskcttc in
Drive A contains the DISKCOPY.EXE file.
3. Thcn,type
DISKCOPY A: B:
4. Insert the sauce diskette (your DA’S40 diskette) into Drive A. The system will prompt you
through the disk copying process. It will ask you to insert the target diskcttc into Drive B. The
target diskette is a blank disk that is to be your back-up disk.
5. When a copy is complete, the computer will ask COPY ANOTHER (Y/N)?. Respond by typing
Y for another diskette or
N
if you are finished copying. If you typed
Y,
rcpcat Steps3 and 4.
6. When copying is complete, put the original DA!+40 diskette(s) in a safeplace. Label the back-up
diskette(s)
DAS-40
Working
Disk.
Use this disk to run the software.
Hard-Drive Machines
To copy your DAS-40 files to a hard disk:
1. Start your computer. You should seea prompt, which indicates you arc at the DOS lcvcl (for
example, if your hard drive is dcsignatcd as C, you should seethe prompt C > ).
2. The following instructions create a special directory for the DAS-40 Distribution Software files.
At the DOS prompt, type:
mkdir D40
followed by < Enter > . Change to the DAS-40 directory
by typing:
CD D40
followed by < Enter >
3. Place the Distribution diskette into Floppy Drive A and type
A:
When the prompt chnngcs from
C> to A>,type copy *.* c: followed by < Enter >.
4. When a copy is complctc, the computer will ask COPY ANOTHER (Y/N)?. Respond by typing
Y for another diskette or
N
if you are finished copying. If you typed
Y
, rcpcat Steps3 and 4.
5. You have now copied the contents of the Distribution Software diskcttc to your hard disk. Store
the original diskcttc in a safeplace.
2.3 UNPACKING AND INSPECTING
After you remove the wrapped board from its outer shipping carton, proceed as follows:
1. Placeone hand firmly on a metal portion of the computer chassis (the computer must bc turned
Off and grounded). You place your hand on the chassis to drain off static electricity from thr
package and your body, thereby preventing damage to board components.
2. Allow a moment for static electricity discharge; carefully unwrap the board from its anti-static
wrapping material.
3. Inspect the board for signs of damage. If any damage is apparent, return the board to the factory.
4. Check the contents of your package against its packing list to bc sure the order is complctc.
Report any missing items to the manufactorcr immediately.
You may find it advisable to retain the packing material in cast the board must bc rcturncd to the
factory.
2-2

CHAPTER 2: SETUP & INSTALLATION
2.4 CONFIGURATION OPTIONS
The subsections that follow describe DAS-40 configuration options you may set prior to board
installation. These options are either switch- or jumper-selcctablc and include the following:
l
Setting the BaseAddress.
l
Setting the DMA Channel(s).
l
Setting the Interrupt Level.
l
Setting A/D functions:
- Input Range
- Coding
- Input Configuration
l
Setting D/A functions:
DAC 0Output Range
- DAC 1Output Range
Figure 2-l shows switch and jumper locations for thcsc settings
Figure 2-1. Switch and jumper locations. Note that R21 Is not present on the
Board’s G2 verslon.
lncludcd in the Distribution Software is the utility CONFIG40.EXE. This utility is provided asan aid
to changing the jumpers and Dip Switches on the DA%40 board. Refer to the section in Chapter 3
called
CHANGING THE FACTORY CONFIGURATION
for more detail.
Base Address
Check BaseAddress setting on the board’s Base
Address switch, which is a 6-position DIP switch
labelled SW6
BASE ADDRESS
This switch is preset
at the factory for an address of 240Hex.
Figure 2-2. Dlagram of the Base Address
switch (SW6).
2-3

DAS-40 USER GUIDE
The factory-preset BaseAddress of 240 Hex is within the address range shown in the following table
as
Reserved
This default value will function in most computers without conflict, thereby eliminating
any need for address selection and configuration. However, if you have a need to change the Base
Address from its preset value, you must sclcct an address within a range of 200to 3E0 Hex (512 to 992
Decimal). In addition, the address must be on a 16-byte boundary and must not conflict with
addresses already in use for other devices. As an aid to selecting a usable 3-d@ Hex number, the
following table is an industry-standard I/O address map for the full 000 to 3FF range.
Table of Industty-standard l/O addresses for perlpheral devices.
HRX RANGE USAGE HEX RANGE USAGE
000 to IFF
200 to ZOF
210 to 217
220 to 24F
278 LO27F
2FOto 2F7
2F8 to 2FF
300LO31F
320to 32F
Internal System
Game
Expansionunit
RCSMVCd
RCSCrVed
LPl-2:
COM2:
Pro1otypccard
Harddisk
387to 37F
380IO38C
380to 389
3A0 to 3AY
3B0 to 3BF
3C0103CF
3D0 LO3DF
3E0to 3E7
3F0to 3F7
3F8to 3FF
LPTI:
SDLC comm.
Binary comm.2
Binary comm. I
Mono dsp/LPTI:
RCSWVCd
Color bmphics
RCSClVCd
Floppy disk
COMI:
DMA Channel
The DAS-40 allows you to sclcct DMA transfer channels. While you may select two channels for
DMA (if two arc available), the second channel is used only when Dual-DMA mode or continuous
cycle is selected. Using SW5(refer to Figure 2-l), you may sclcct DMA Channel 5 (highest priority),
Channel 6,or Channel 7 (lowest priority). The Board is factory-preset to select Channel 5 as the first
channel and Channel 6 as the second. SW5is a 4-position DIP switch whose setting options are as
follows:
FIRST DMA SECOND DMA
CHANNEL CHANNEL
CHANNEL # Sl s2 s3 s4
5 Off On* err On
6 Oil Off On Oft-+
7 Oil On On On
None Off Off Off Off
* Factory Configuration.
Note that a DMA channel used by one board may not be used by any other board (including another
DAWO) in the samePC system. In a multiple DAS-40 system, you must seteach board to a different
channel, limiting Dual-DMA and/or continuous cycle usage to a single board and rtting remaining
boards to USCsingle-channel DMA.
Interrupt Level
The DAS-40 can interrupt the processor on any one of five different Icvcls. Priority for these five
2-4

CHAPTER 2: SETUP & INSTALLATION
Interrupt Levels is Level 10(highest), Level 15,Level 3, Level 5, and Level 7 (lowest).
The board is factory preset for Interrupt Level 15. You may change the Interrupt Lcvcl setting by
repositioning the J2jumper (refer to Figure 2-l) according to the following table.
INTERRUPT JUMPER
LEVEL POSITION
IO 1
*15 2
3 3
5 4
7 5
None 6
* FactoryConfiguration.
A DAS40 gcncratcs only one interrupt, regardless of cause. The Interrupt Service Routine must
determine the cause of the interrupt by polling the ADCSR, DACSR, and SUPCSR(seeSection 5.1).
Upon finding the causeof the interrupt, the Interrupt Service Routine can act accordingly.
Note that an Interrupt used by one board in a PC must not be used by any other board in the PC. In a
PC using Multiple DAS-40 boards, eachboard must be set to a different Interrupt Level. A board that
needs no Interrupt should be set to disable its Interrupts.
AID Functions
The Analog-to-Digital section of the DAS-40 is switch-selectable for the following:
l
Input Range.
l
Binary, Offset Binary, or 2’sComplement coding.
l
Single-ended or Differential input.
The following subsections dexribc settings for these parameters.
Input Range
If a board is configured for Unipolar inputs, it should receive only positive voltages. If configured for
Bipolar inputs, it can accept both positive and negative voltages. The DAS-40 is factory preset for
Bipolar inputs of ilOV. To change this range, reset positions Sl and S2of DIP Switch SW3 according
to the following table.
SW3
POSITIONS
RANGE Sl SO?
Bipolar +lOV * Off Off
Bipolar C5V 0” Off
Unipolar +lOV 0” 0”
* FactoryConfiguration.
2-5

DAS-40 USER GUIDE
NOTE: A change of input range may require arecalibration of the A/D converter to attain full-
rated accuracy. Set Chapter 6 for the calibration information.
Bipolar inputs may be either Offset Binary or 2’sComplement Output Coding. Unipolar inputs
should be straight Binary Output Coding.
Output Coding
A/D conversion changes an analog input signal to acorresponding digital format so that it can bc
processed by the PC. The output from a DAS40 is abinary data word whose coding is selected with
Switch SW3-3.
As mentioned in the prcccding subsection, Bipolar inputs use either Off& Binary or 2’sComplement
Output Coding, while Unipolar inputs USCstraight Binary Output Coding. The DAS40 is preset for
Offset Binary coding but offers switch selectable Straight Binary and 2’sComplement codings, as well.
You may select output coding by setting Position 53of DIP Switch SW3according to the following
table.
SW3
POSITION
CODING s3
StraightBinary (Unipolar) On
Offset Binary (Sip&u)* On
2’sComplement(Bipolar) Off
* FactoryConfiguration
Single-Ended/Differential Inputs
The DAS-40 is switch-sclcctable for either Single-Ended or Differential Input modes. In Single-Ended
mode, the board offers 16channels for 16different signals, each with a common return path. In
Differential mode, the board usesa separate return path for each input signal and is thus limited to
eight different signals. To configure the board for either input, setSwitch SW4according to the
following table.
CONFIGURATION
POSITION
16Single-Ended* Left
8Diffcrcntial Right
* Fac~olyConfiguration
D/A Functions
A DAS-40 board contains two Digital-to-Analog Converters (DACs) which are individually selcctablc
for Unipolar or Bipolar output ranges. In a Unipolar configuration, a DAC carries positivevoltage
outputs only. In a Bipolar configuration, a DAC carries either positive or ncgativc voltage, so long as
the Icvel is within the sclcctcd range (+lOV, f5V, i2.5V, 0 to lOV, or 0 to 5V).
Setthe DAC 0 output range selection using positions Sl through 55of DIP Switch SW2,as follows:
2-6

CHAPTER 2: SETUP & INSTALLATION
SW2 POSITIONS
DAC 0 OUTPUT RANGE Sl s2 s3 s4 s5
*1ov* Off On Off Off on
+5V Off On 0” ofr on
zk2.5V 0” Off 0” Off 0”
0 to 1ov Off on On On Off
otosv 0” Off 0” On OTf
* Faclory Configuration.
Setthe DAC 1 output range selection using positions Sl through S5of DIP Switch SWl, as follows:
DAC 1OUTPUT RANGR
+1ov*
i5v
i2.w
0 LOIOV
oto5v
* FactoryConfiguration
SW1 POSITIONS
Sl s2 s3 s4 S5
Off On Off 011 011
Off On On Off On
Oil Off On Off 011
Off On 0” 011 Off
0” Off On On 00
In Unipolar operation, the DAS40 uses digital data in Straight Binary coding. In Bipolar mode, the
board usesdata in Binary Offset coding.
NOTE: After selecting a new output range, you must rccalibratc the DAC (seecalibration
procedures).
2.5 HARDWARE INSTALLATION
Single-Ended vs. Differential Connections
SingleEnded configuration of the DAS-40 allows 16channels to bc made available for analog signals,
while Differential configurations allows eight channels. Thus, SingleEnded configuration offers
maximum channel density. Howcvcr, Sin&-Ended configuration is more sensitive to “ok from the
i”put cablesand is therefore bcttcr suited to applications using higher-level input voltages (over IV
Full-Scale) and shorter cable lengths (under 15’).
When configuring for Single-Ended operation, connect the return sides of all analog channels to Amp
Low, and connect the high side of each analog input to the corresponding input of the multiplcxcr in
the A/D Converter.
When configuring for Differential operation, connect the high and low sides of an analog input signal
to the corresponding inputs of the multiplcxcr stage. Sa Section 1.4for more detail.
2-7

DAS-40 USER GUIDE
Installing the DAS-40 in a PC
WARNING: ANY ATTEMPT TO INSERT OR REMOVE A BOARD WITH THE COMPUTER
POWER ON COULD DAMAGE YOUR COMPUTER!
1. Turn Off power to the PC and all attached equipment.
2. Remove the cover of the PC asfollows: First remove the cover-mounting screws from the rear
panel of the computer. Then, slide the cover of the computer about 3/4 of the way forward.
Finally, tilt the cover upwards and removc.
3. Choose an available option slot. Loosen and remove the screw at the top of the blank adapter
plate. Then slide the plate up and out to remove.
4. Hold the DAS-40 board in one hand placing your other hand on any metallic part of the PC/AT
chassis (but not on any components). This will safely discharge any static electricity from your
body.
5. Make sure the board switches have becn properly set(refer to the prcccding section).
6. Align the board connector with the desired accessoryslot and with the corresponding rear-panel
slot. Gently press the board downward into the socket. Sccurc the board in place by inserting the
mar-panel adapter-plate screw.
7. Replace the computer’s cover. Tilt the cover up and slide it onto the system’s base,making sure
the front of the cover is under the rail along the front of the franc. Rcplacc the mounting screws.
8. Plug in all cords and cables. Turn the power to the computer back on.
You are now ready to make any necessary system connections, install the DAS-40 software, and
perform calibration and perform checks on calibration and adjustment, asdescribed in the chapter on
calibration.
The manufacturer recommends that you retain the static-shield packaging for possible future removal
and handling of the DA%0 board.
2-8

CHAPTER 2: SETUP & INSTALLATION
2.6 DAS-40 & STA-40 I/O CONNECTIONS
DAS-40 STA-40 m-40
I,““,0
SIGNAL NAME PIN NO. PIN NO. Connector
Channel0
Channel8 (0 Ret)
Channel 1
Channel9 (1 Ret)
Channel2
Channel 10(2 Ret)
Channel3
Channel 11(3 Ret)
Channel4
Chard 12(4 Ret)
Channel5
Channel 13(5 Ret)
Channel6
Channel 14(6 Ret)
Channel7
Channel I5 (7 Ret)
AGND
5
6
7
8
9
10
II
Amp Low
+l5V out
-15v Out
PGND
DAC 0 Out
DAC 0 GND
DAC 1Out
DAC 1GND
DGND
DGND
DIO Port0. Bit 0
DIO Port0. Bit 1
DIO Port0, Bit 2
DIO Port0. Bit 3
DGND
DIO Port0, Bit 4
DIO Port0, Bit 6
DIO Port0, Bit 5
DIO Port0, Bit 7
DGND
DIO Port I, Bit 0
DIO Port I, Bit 1
DlOPort l,Bit2
DlO Port 1,Bit 3
DGND
DIO Port I, Bit 4
DIOPort 1.Bit 5
DIO Port 1,Bit 6
DIO Port 1,Bit 7
DGND
DGND
Ext. Trigger IN
Ext. Clock IN
1
26
2
27
3
28
4
29
5
30
6
31
7
32
8
33
Y
34
IO
35
II
36
12
37
13
38
14
39
15
40
16
41
17
42
18
43
19
44
20
45
21
46
22
47
23
48
24
49
25
50
I2
I3
I4
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
35
34
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
2-9

DAS-40 USER GUIDE
2-10

CHAPTER 3
PROGRAMMING NOTES
3.1 GENERAL
At the lowest lcvcl, DA’540 is programmable with I/O (Input/Output) instructions. In BASIC, thcsc
are the IMP (X) and OUT X,Y functions. Assembly Language and most other high- lcvcl languages
have equivalent instructions (IN AL,DX and OUT DX,AL). USCof these functions usually involves
formatting data and dealing with absolute I/Oaddrcsses. Although not demanding, this can require
many lines of code and necessitates an understanding of the devices, data format, and architccturc of
the DAS40. To simplify DAS40 programming, the Distribution Software contains a software driver
(MDAS40,EXE) and Language Intcrfacc Modules for BASIC and QuickBasic (DAS4O.BIN. DAS40,LIB
and DAS40.QLB).
The MDAS40.EXE software driver installs readily from the DOS command line and is accessible from
BASIC and QuickBASIC with a single-line CALL statement. The driver supports the majority of
common operating MODES. Using the CALL routine for DAS40 MODES, you may program your
applications to sclcct and perform any DAS-40 function, format and error-check data, and pcrfomm
frequently used sequencesof instructions. An example is MODE 3 which sets up the A/D Start/Stop
channels and the Global Gain value.
The DAS-40 software driver savesprogramming time and supports data collection using DMA from
an external clock source or the DAS40 internal timer. Note that BASIC has no DMA prowssing
functions; “background” data collection is available only by using the CALL routine.
Both methods of programming using INP and OUT functions and the CALL routine achieve thr same’
result; you are free to choor either, although usually the BASIC programmer will find the CALL
routine simpler to implement. If the DAS-40 MODES described in this manual do not support your
rcquiremcnts, you may modify the DAS-40 driver asnecessary. The fully commented assembly
source is available from the manufacturer on a floppy disk (Part # l’CF-40) and is a good starting point
for Assembly Language programmers wishing to modify the standard driver routines.
3.2 THE LANGUAGE INTERFACE MODULES
DA%0 Distribution Software includes the Language Intcrfacc Modules for BASIC and QuickBasic
These are:
DAS4O.BIN
DAS40.LIB
DAS40.QLB
lntcrfacc Module for BASIC(A) that is loaded via the BLOAD Command.
Interface Module for QuickBASIC (VW 4.0and higher) and Professional
Basic(VW 7.0and higher) Stand-alone EXE programs.
Intcrfacc Module for the QuickBasic Wcr 4.0 and higher) Programming
Environment. It is spccificd at the QB invocation time using the /L
switch asfollows:
DAS40x.QLB
QB IL DAS40.QLB
lntcrfacc Module for the QuickBasic Extended Wer 7.0and higher)
Environment. It is specified at the QBX invocation time using the /L
switch asfollows:
QBX /L DAS40x.QLB
3-1

DAS-40 USER GUIDE
All CALL mode communications with the DAS-40 driver is performed through thcsc Interface
Modules. Other interface modules are available from the manufacturer for Pascal,C and FORTRAN
by ordering the PCF-40option.
A typical CALL statement from your BASIC program to the driver is as follows:
380 ND%= 0
'Initialize mode
390 FLAG% = 0 'Clear error variable
400 D%(O) = 0 'Specify Card #O
410 CALL DAS4O(MD%, D%(O), FLAG%) 'Call the driver
420 IF FLAG% <> 0 THEN PRINT "MODE 0 Error # "; FLAG% AND 255: STOP:
The CALL from QuickBASIC differs only in the CALL statcmcnt (Line 410), as follows:
410 CALL BASDAS4O(MD%, VAWTR(D%(O)), FLAG%)
The three variables within the parentheses (MD%, D%Oand FLAG%) arc the CALL paramctcrs. In
executing the CALL, the addresses of the variables (pointers) are passed in the sequcncc written to
BASIC’s stack. The CALL routine unloads these pointers from the stack and usesthem to locate the
variables in BASIC’s data spaceso data can be exchanged with them.
Note that, FLAG% is a Ibbit quantity containing the error number in the least-significant eight bits
and the mode number where the error occurred in the most-significant eight bits. Therefore to extract
the error number, FLAG% must be ANDcd with 255(OFFH).
Also note, that D%O must be previously dimcnsioncd asa ten-item integer array. For example,
160 DIM D%(lO)
The following formatting requirements that must be met:
1. The CALL parameters are position-sensitive. The subroutine (DAS40 or BASDAWI) knows
nothing of the names of the variables, just their locations from the order of their pointers on the
stack.
2. The CALL routine expects its parameters to be integer-type variables; it writes and reads to thr
variables on this assumption. If you slip up and use a non-integer (real, single, or doublc-
precision) variable in the CALL parameters, the routine will not function correctly. No error
checking is done in the CALL on the variable type; so take cart not to crash the computer!
3. You cannot perform any arithmetic functions within the parameter-list parcnthcscs of the CALL
statement. For example,
410 CALL DAS40 (MD% t 2, D%(O) * 8, FLAG%) IILLEGAL!
is ill@ and will produce a syntax error.
4. You cannot USCconstants for any of the parameters in the CALL statement. The following is
illegal:
410 CALL DAS40 (7, 2, FLAG%) 'ILLEGAL!
This must be programmed asshown above.
3-2
This manual suits for next models
2
Table of contents