beautypg.com

Dos devices, Configuration of named devices – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 62

background image

II. SOFTWARE GUIDES - 8. Driver488/DRV

8C. External Device Interfacing

Personal488 User’s Manual, Rev. 3.0

II-47

The Character Command Language is a device driver that writes commands to, and reads responses
from, Driver488/DRV. To use the Character Command Language, the application program opens a file
with a special name, such as:

“\DEV\IEEE”

, and uses standard DOS file I/O commands to

communicate with the Character Command Language device driver. Since the CCL is a device driver,
standard DOS commands such as:

TYPE

and

COPY

may be used to communicate with Driver488/DRV

via the CCL.

DOS Devices

Driver488/DRV may also be controlled by using DOS Devices. A DOS Device is a special type of
DOS device driver that uses Driver488/DRV to communicate with a single External Device.
Remember that, as a DOS device driver, a DOS Device may be written to and read from, like any disk
file. When writing data to a DOS Device, the device driver commands Driver488/DRV to send the
data to the corresponding External Device. Similarly, when reading from the DOS Device, the device
driver commands Driver488/DRV to read data from the External Device.

Driver488/DRV allows DOS Devices to be created that refer to specific External Devices, just as LPT1
refers to the printer. For example, if an IEEE 488 plotter were configured as a DOS Device named

PLOTDD

(

DD

for DOS Device), then we could use

COPY

to send a plot file to it:

COPY PLOTFILE.PLT PLOTDD

Configuration of Named Devices

External Devices and DOS Devices are most easily configured by using

CONFIG

. The device names,

terminators, time out period, and bus addresses may be entered into

CONFIG

which then writes a

configuration file containing the device configuration information. This configuration file is
automatically read when Driver488/DRV loads to install the configured devices.

Every device to be accessed by Driver488/DRV must have a valid device name. Driver488/DRV
comes with several device and interface names preconfigured for use. Among those already configured
for the GP488B board, for example, are:

IEEE

and

COM1

. You can configure up to 50 external devices

for the IEEE 488 bus.

It is also possible to configure new named devices by using the Driver488/DRV command

MAKE DEVICE

. The

MAKE DEVICE

command creates a temporary device that is an identical copy of

an already existing Driver488/DRV device. The new device has default configuration settings identical
to those of the existing device. The new device can then be reconfigured by calling the proper
functions, such as

BUS ADDRESS

,

INT LEVEL

, and

TIME OUT

. When Driver488/DRV is closed, the

new device is forgotten unless the

KEEP DEVICE

command is used to make it permanent.

The following code illustrates how the Character Command Language API version of the

MAKE

DEVICE

command could be used to configure several new named devices:

100 PRINT#1,"MAKE DEVICE DMM =ADC"
110 PRINT#1,"BUSADDRESS 16"
120 PRINT#1,"TERM CR LF EOI"
200 PRINT#1,"MAKE DEVICE SCOPECMD =ADC"
210 PRINT#1,"BUSADDRESS 1200"
220 PRINT#1,"TERM LF"
300 PRINT#1,"MAKE DEVICE SCOPE =ADC"
310 PRINT#1,"BUSADDRESS 1201"
320 PRINT#1,"TERM EOI"

Lines 100-120 of the above example define an external device named

DMM

(digital multi-meter) as

device

16

with bus terminators of carriage-return line-feed (

CR LF

) and

EOI

. Lines 200-220 configure

an oscilloscope command channel to use line-feed as its IEEE 488 bus terminator at a primary address
of

12

and secondary address

00

. Lines 300-320 configure the oscilloscope data channel to use

EOI

only as the bus terminator so that it can transfer binary data to its address of

1201

: primary address

12

,

secondary address

01

.

External Devices and DOS Devices defined at installation time are permanent. Their definitions last
until they are explicitly removed or until the computer is restarted. Devices defined after installation