Model 8573 Programming Example-Load the modified
DECL.BAS file into the IBM computer (see the Model 8573
Instruction Manual) and add the lines below:
PROGRAM COMMENTS
10 NA$=“GPIBO” :CALL IBFIND Find the board
(NA$,BRDO%) descriptor.
20 NA$= “DEVO” :CALL IBFIND Find the instrument
(NAS,M617% ) descriutor.
30 V% =27:CALi IBPAD
(M617%,V%)
40 V% = l:CALL IBSRE
(BRDO%,V%):CALL
Set phmary address
to 27.
Send remote enable,
clear instrument.
IBCLR(M617%)
50 CMDS = “M32X” :CALL
IBWRT(M617%,CMD$l
60 CMD$=“KSX”:CALL IBWRT
(M617%,CMD$l
70 PRINT”B7 B6 B5 B4 83 B2 Bl
80”
80 MASK % = 128
90 CALL IBRSP(M617%,SB%)
100 FORI =1TO8
110 IF (SB% AND MASK%)=0
THEN PRINT “0”; ELSE
PRINT “1 “;
120 MASK%=MASK%/2
130 NEXT I
Program for SRQ on
aTor.
Attempt to program
illegal option.
Identify the bits.
Define bit mask.
Serial poll the instm-
merit.
Loop eight times.
Mask off the bits
and display them.
140 PRINT
150 V% =O:CALL
IBONL(BRDO%,V%)
Close the board file.
160 CALL IBONL(M617%,V%) Close the instrument
file.
To run the program press the F2 function key. After placing
the instrument in remote (line 40). the program then sets the
SRQ mode (line 50). An attempt is made to program an illegal
command option (line 60). at which point the instrument
generates an SRQ and sets the error and RQS bits in its
status byte. Other bits may also be set depending on instru-
ment status. Lines 70-90 display the bit positions, set the
mask value to the most significant bit, and serial poll the in-
strument. Since the status byte is in decimal form, lines
100-130 are used to generate the binary equivalent of the
status byte value.
KO=Send EOI with last byte; hold off bus until commands
processed on X
Kl=Do not send EOI with last byte; hold off bus until com-
mands processed on X
K2=Send EOI with last byte; do not hold off bus on X
IW=Send no EOI with last byte; do not hold off bus on X
Upon power up, or after the instrument receives a DCL or
SDC command, the KQ mode is enabled.
The EOI line on the IEEE-486 bus provides a method to
positively identify the last byte in a multi-byte transfer se-
quence. Keep in mind that some controllers rely on EOI to
terminate their input sequences. In this case, suppressing EOI
with the K command may cause the controller input sequence
to hang unless other terminator sequences are used.
The bus hold off mode allows the instrument to temporarily
hold up bus operation when it receives the X character until it
processes all commands sent in the command string. The pur-
pose of the hold off is to ensure that the front end FETs and
relays are properly configured before taking a reading. Keep
in mind that all bus operation will cease-not just activity
associated with the Model 617. The advantage of this mode is
that no bus commands will be missed while the instrument is
processing commands previously received.
The hold off period depends on the commands being process-
ed. Table 3-14 lists hold off times for a number of different
commands. Since a NRFD hold off is employed, the hand-
shake sequence for the X character is completed.
HP-85 Programming Example-To program the instm-
ment for the K2 mode, enter the following statements into the
HP-85:
REMOTE 727 (END LINE)
OUTPUT 727;“K2x” (END LINE)
When the second statement is executed, the instrument will be
placed in the K2 mode. In this mode, EOI will still be
transmitted at the end of the data string, but the bus hold-off
mode will be disabled.
3.10.16 EOI and Bus Hold-off Modes (K)
Model 8573 Programming Example-To place the instm-
ment in the K2 mode, enter the following statements into the
IBM computer:
The K command allows control over whether or not the in-
strument sends the EOI command at the end of its data string,
V%=l:CALL IBSRE(BRDO%,V%) (return)
and whether or not bus activity is held off (through the NRFD
CMD$=“KZX”:CALL IBWRT(M617%,CMD$) (retom)
line) until all commands sent to the instrument are internally
processed once the instrument receives the X character. K
command options include:
The Model 617 will be placed in the K2 mode when the se-
cond statement is executed. The EOI mode will be enabled,
but the bus hold off will be disabled.
3-30