5560A/5550A/5540A
Remote Programmers Manual
36
Program the ISR, ISCR, and ISCE
To read the contents of the ISR, send the remote command, ISR?. To read the contents of the ISCR0
or 1, send the remote command, ISCR0?, or ISCR1?. To read the contents of the ISCE0 or 1, send the
remote command, ISCE0?, or ISCE1?. The Calibrator sends a decimal number that represents bits 0
through 15. Every time you read the ISCR0 or 1, its contents are zeroed. The sample program below
reads all five registers:
10 ! THIS PROGRAM READS THE ISR, ISCR, AND ISCE REGISTERS
20 ! NOTE THAT THE ICSR? COMMANDS CLEAR THE ISCR CONTENTS
30 PRINT @4, “ISR?” ! ASK ISR CONTENTS
40 INPUT @4,A% ! RETRIEVE REGISTER CONTENTS FROM 5560A
50 PRINT @4, “ISCR0?” ! ASK FOR AND CLEAR ISCR0 CONTENTS
60 INPUT @4, B% ! RETRIEVE REGISTER CONTENTS FROM 5560A
70 PRINT @4, “ISCE0?” ! ASK FOR ISCE0 CONTENTS
80 INPUT @4, C% ! RETRIEVE REGISTER CONTENTS FROM 5560A
50 PRINT @4, “ISCR1?” ! ASK FOR AND CLEAR ISCR1 CONTENTS
60 INPUT @4, D% ! RETRIEVE REGISTER CONTENTS FROM 5560A
70 PRINT @4, “ISCE1?” ! ASK FOR ISCE1 CONTENTS
80 INPUT @4, E% ! RETRIEVE REGISTER CONTENTS FROM 5560A
90 PRINT “ISR = “;A% ! DISPLAY ISR
100 PRINT “ISCR0 = “;B% ! DISPLAY ISCR0
110 PRINT “ISCE0 = “;C% ! DISPLAY ISCE0
100 PRINT “ISCR1 = “;D% ! DISPLAY ISCR1
110 PRINT “ISCE1 = “;E% ! DISPLAY ISCE1
120 END
Convert the returned variables into binary, and you can read the status of the instrument. For example
if a register contains 128, its binary equivalent is: 00000000 10000000. Therefore, bit 7 (HIVOLT) is set
(1) and the rest of the bits are reset (0).
If you set the bits in an ISCE register, you can mask (disable) the associated bits in the ISCR. For
example, to cause an SRQ interrupt when the output has settled, bit 12 (SETTLED) in the ISCE1
register must be 1. (The ISCB bit must also be enabled in the SRE.) The sample program below loads
a decimal 1024 into the ISCE, which sets bit 12 and resets the other bits:
10 ! THIS PROGRAM LOADS 00010000 00000000 BINARY INTO THE ISCE
20 PRINT @4, “ISCE 4096” ! LOAD DECIMAL 4096 INTO ISCE
30 PRINT @4, “ISCE?” ! READ BACK ISCE VALUE
40 INPUT @4, A% ! “
50 PRINT “ISCE = “;A% ! PRINT IT, IT SHOULD BE 4096
60 END
Output Queue
The output queue is loaded whenever a query is processed, and holds up to 800 characters. The
controller reads it with a statement such as a BASIC INPUT statement, and removes what it reads from
the queue. If the queue is empty, the Calibrator does not respond to the INPUT statement from the
controller. The Message Available (MAV) bit in the Status Byte Register is 1 if there is something in the
output queue and 0 if the output queue is empty.