beautypg.com

Configuration of the 195 dmm – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 107

background image

8J. Spreadsheets

II. SOFTWARE GUIDES - 8. Driver488/DRV

II-92

Personal488 User’s Manual, Rev. 3.0

All of the commands discussed so far:

OPEN

,

RESET

,

EOL IN CR

, and

FILL ERROR

are placed in a

separate subroutine called

IeeeInit

. Thus, to accomplish all of the above steps, use

IeeeInit

:

{IeeeInit}

Once everything is reset, we can test the communications and read the Driver488/DRV revision number
with the

HELLO

command:

{WRITELN “HELLO”}
{READLN Hello}

We first

WRITELN

the

HELLO

command, then

READLN

the response into the cell named

Hello

(lower

case). Notice the quotation marks (

“ ”

) around the word

HELLO

(upper case) in the

WRITELN

command. These force Lotus to write the word

HELLO

(upper case) rather than the contents of the cell

named

Hello

(lower case). Otherwise, since upper-case and lower-case letters are considered

identical, both

HELLO

and

Hello

would refer to the same cell.

It is not necessary to perform the

HELLO

command, but it is included here as a simple example of

normal communication with Driver488/DRV. Its response is the revision identification of the
Driver488/DRV software:

Driver488 Revision X.X ©199X IOtech, Inc.

We can also interrogate Driver488/DRV for its status:

{WRITELN “STATUS”}
{READLN Status}

Subsequently, the printed response is similar to the following:

CS21 1 I000 000 T0 C0 P0 OK

Configuration of the 195 DMM

Once the system is initialized we are ready to start issuing bus commands. The IEEE 488 bus has
already been cleared by the Interface Clear (

IFC

) sent by the

RESET

command, so we know that all bus

devices are waiting for the controller to take some action. To control an IEEE 488 bus device, we
output an appropriate device-dependent command to that device. For example, the

F0R0X

command

line below sets the 195 to read DC volts with automatic range selection:

{WRITELN “OUTPUT 16;F0R0X”}

The

OUTPUT

command takes a bus device address (

16

in this case) and data (

F0R0X

) and sends the data

to the specified device. The address can be just a primary address, such as

12

, or

05

, or it can include

a secondary address:

1201

. Note that both the primary address and, if present, the secondary address

are two-digit decimal numbers. A leading zero must be used, if necessary to make a two-digit address.

Notice that the entire

OUTPUT

command is enclosed in quotation marks (

“ ”

). This is necessary

because the command includes a semicolon character (

;

) which would interfere with the

WRITELN

command if it were not enclosed in quotes.

The following indicators describe each component of the Driver488/DRV status:

Indicator

Driver488/DRV Status

C

It is in the Controller state.

S

It is the System Controller.

21

The value of its IEEE 488 bus address.

1

An Address Change has occurred.

I

It is idle (neither a talker nor a listener).

0

There is no

ByteIn

available.

0

It is not ready to send a

ByteOut

.

0

Service Request (

SRQ

) is not asserted.

000

There is no outstanding error.

T0

It has not received a bus device

TRIGGER

command (only applies in Peripheral mode).

C0

It has not received a

CLEAR

command (only applicable in the Peripheral mode).

P0

No

CONTINUE

transfer is in progress.

OK

The error message is “OK”.