
Example Programs
D-2
3. Make sure that the computer bus driver software
(CECHP.EXE) is properly initialized.
4. Enter the BASIC editor. For example, if you are using
QBasic, simply type the following at the DOS prompt:
qbasic <Enter>
5. Type in the desired program; check it thoroughly for er-
rors, then save it using a convenient filename.
6. Run the program by pressing <Shift> and <F5> simulta-
neously.
D.5
Basic input/output program
Program 1 below will allow you to send commands to the
Model 6512 and obtain readings. To use this program, simply
type in the desired command string at the prompt. When typ-
ing in commands, keep the following points in mind:
• Be sure to use only upper-case letters for commands.
• Be certain to terminate each command string with the X
character.
After each command is sent to the instrument, the program
will request a reading from the instrument and display the re-
sults on the computer screen.
Program 1. Basic input/output program
' Program to send commands and read data from Model 6512.
OPEN "IEEE" FOR OUTPUT AS #1
' Open IEEE-488 output path.
OPEN "IEEE" FOR INPUT AS #2
' Open IEEE-488 input path.
PRINT #1, "REMOTE 27"
' Put 6512 in remote.
PRINT #1, "CLEAR"
' Send DCL.
CLS
Start:
INPUT "Model 6512 Command"; C$
' Input command.
PRINT #1, "OUTPUT 27;"; C$
PRINT #1, "ENTER 27"
' Address 6512 to talk.
LINE INPUT #2, R$
' Input reading string.
PRINT R$
' Print reading string.
GOTO Start
END
Summary of Contents for 6512
Page 119: ...Maintenance 7 10 Figure 7 5 Exploded view...
Page 131: ......