Spreadsheets, 8j. spreadsheets, Use of direct dos i/o devices – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 106: Initialization of the system, Topics

II. SOFTWARE GUIDES - 8. Driver488/DRV
8I. Turbo Pascal
Personal488 User’s Manual, Rev. 3.0
II-91
IF (st195 and 1) 0 THEN Writeln(‘Overflow’);
IF (st195 and 2) 0 THEN Writeln(‘Buffer Full’);
IF (st195 and 4) 0 THEN Writeln(‘Buffer 1/2 Full’);
IF (st195 and 8) 0 THEN Writeln(‘Reading Done’);
IF (st195 and 16) 0 THEN Writeln(‘Busy’)
END ELSE BEGIN {ERROR is set}IF (st195 and 1) 0 THEN
Writeln(‘Illegal Command Option’);
IF (st195 and 2) 0 THEN Writeln(‘Illegal Command’);
IF (st195 and 4) 0 THEN Writeln(‘No Remote’);
IF (st195 and 8) 0 THEN Writeln(‘Trigger Overrun’);
IF (st195 and 16) 0 THEN Writeln(‘Failed Selftest’)
END;
END; {of procedure CheckInt}
Use of Direct DOS I/O Devices
Once Driver488/DRV has been installed in your system, it is ready to begin controlling IEEE 488 bus
devices. To show how this is done, we develop a short program, in the Lotus 1-2-3 macro language, to
control a Keithley Instruments Model 195 digital multimeter. This program should also be compatible
with Symphony, and a very similar Quattro program is also included on the Driver488/DRV program
disk. The techniques used in this program are quite general, and apply to the control of most
instruments.
Initialization of the System
Any program using Driver488/DRV must first establish communications with the Driver488/DRV
software driver. In Lotus 1-2-3 and most other languages this is accomplished using an
OPEN
command:
{OPEN IEEE,W}
Once the file is opened, we can send commands and receive responses from Driver488/DRV. First,
completely reset the Driver488/DRV with the
RESET
command:
{WRITELN RESET}
which resets the operating parameters of the Driver488/DRV back to their normal values (those that
were set during system boot by the
DRVR488
DOS command).
When Lotus 1-2-3 reads from Driver488/DRV it expects that the responses are terminated by a single
carriage return character. As Driver488/DRV normally appends both carriage return and line feed to
its responses, it must be configured to use the correct terminator:
{WRITELN EOL IN CR}
Next, we can enable
SEQUENCE - NO DATA AVAILABLE
error detection by setting the
FILL
mode to
ERROR
:
{WRITELN FILL ERROR}
8J. Spreadsheets
Topics
•
Use of Direct DOS I/O Devices..................................................... II-90
•
Initialization of the System.......................................................... II-90
•
Configuration of the 195 DMM .................................................... II-91
•
Taking Readings............................................................................. II-92
•
Interrupt Handling ........................................................................ II-92