Remote Operation
Check 5502A Status
5
5-45
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 to answer. Each time you read the ISCR0 or 1,
its contents are zeroed. The subsequent sample program 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 @6, “ISR?” ! ASK ISR CONTENTS
40 INPUT @6,A% ! RETRIEVE REGISTER CONTENTS FROM 5502A
50 PRINT @6, “ISCR0?” ! ASK FOR AND CLEAR ISCR0 CONTENTS
60 INPUT @6, B% ! RETRIEVE REGISTER CONTENTS FROM 5502A
70 PRINT @6, “ISCE0?” ! ASK FOR ISCE0 CONTENTS
80 INPUT @6, C% ! RETRIEVE REGISTER CONTENTS FROM 5502A
50 PRINT @6, “ISCR1?” ! ASK FOR AND CLEAR ISCR1 CONTENTS
60 INPUT @6, D% ! RETRIEVE REGISTER CONTENTS FROM 5502A
70 PRINT @6, “ISCE1?” ! ASK FOR ISCE1 CONTENTS
80 INPUT @6, E% ! RETRIEVE REGISTER CONTENTS FROM 5502A
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
Change 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. Bit 7
(HIVOLT) is set (1) and the remaining of the bits are reset (0).
If you set the bits in an ISCE register, you can mask (disable) the related bits in the ISCR.
For example, to cause an SRQ interrupt when the output has become stable, bit 12
(SETTLED) in the ISCE1 register must be 1. (The ISCB bit must also be enabled in the
SRE.) The subsequent sample program 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 @6, “ISCE 4096” ! LOAD DECIMAL 4096 INTO ISCE
30 PRINT @6, “ISCE?” ! READ BACK ISCE VALUE
40 INPUT @6, A% ! “
50 PRINT “ISCE = “;A% ! PRINT IT, IT SHOULD BE 4096
60 END
Output Queue
The output queue is loaded when a query is done, and holds a maximum of
800 characters. The controller reads it with a statement like a BASIC INPUT statement,
removes what it reads from the queue. If the queue is empty, the Calibrator does not
answer to the INPUT statement from the controller. The Message Available (MAV) bit in
the Serial Poll Status Byte is 1 if there is something in the output queue and 0 if the
output queue is empty.
Error Queue
When a command error, execution error, or device-dependent error occurs, its error code
is put in the error queue where it can be read by the
ERR?
command. (See Appendix E
for error messages.) A procedure to decode an error code is to send the command,
EXPLAIN?
, which gives a description of an error code. If you read the first error with
the
ERR?
command, this removes that error from the queue. A response of 0 means the
error queue is empty. The Error Available (EAV) bit in the Serial Poll Status Byte shows
if the queue is empty. The error queue is cleared when you turn off the power, and when
you use the
*CLS
(Clear Status) common command.
Summary of Contents for 5502A
Page 4: ......
Page 12: ...5502A Operators Manual xii ...
Page 46: ...5502A Operators Manual 2 2 ...
Page 52: ...5502A Operators Manual 2 8 ...
Page 54: ...5502A Operators Manual 3 2 ...
Page 142: ...5502A Operators Manual 4 68 ...
Page 194: ...5502A Operators Manual 6 2 ...
Page 240: ...5502A Operators Manual 7 2 ...
Page 260: ...5502A Operators Manual 7 22 ...
Page 262: ...5502A Operators Manual 8 2 ...
Page 365: ...B 1 Appendix B ASCII and IEEE 488 Bus Codes ...
Page 366: ...5502A Operators Manual B 2 ...
Page 368: ...5502A Operators Manual B 4 ...
Page 378: ...5502A Operators Manual D 6 ...