Program The Isr, Iscr, And Isce; Output Queue; Error Queue - Fluke 5502A Operator's Manual

Multi-product calibrator
Hide thumbs Also See for 5502A:
Table of Contents

Advertisement

Program the ISR, ISCR, and ISCE

To read the contents of the ISR, send the remote command,
the ISCR0 or 1, send the remote command,
ISCE0 or 1, send the remote command,
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?"
40
INPUT @6,A%
50
PRINT @6, "ISCR0?"
60
INPUT @6, B%
70
PRINT @6, "ISCE0?"
80
INPUT @6, C%
50
PRINT @6, "ISCR1?"
60
INPUT @6, D%
70
PRINT @6, "ISCE1?"
80
INPUT @6, E%
90
PRINT "ISR =
100 PRINT "ISCR0 = ";B%
110 PRINT "ISCE0 = ";C%
100 PRINT "ISCR1 = ";D%
110 PRINT "ISCE1 = ";E%
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?"
40
INPUT @6, A%
50
PRINT "ISCE = ";A%
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.
ISCR0?
, or
ISCE0?
! ASK ISR CONTENTS
! RETRIEVE REGISTER CONTENTS FROM 5502A
! ASK FOR AND CLEAR ISCR0 CONTENTS
! RETRIEVE REGISTER CONTENTS FROM 5502A
! ASK FOR ISCE0 CONTENTS
! RETRIEVE REGISTER CONTENTS FROM 5502A
! ASK FOR AND CLEAR ISCR1 CONTENTS
! RETRIEVE REGISTER CONTENTS FROM 5502A
! ASK FOR ISCE1 CONTENTS
! RETRIEVE REGISTER CONTENTS FROM 5502A
";A%
! DISPLAY ISR
! DISPLAY ISCR0
! DISPLAY ISCE0
! DISPLAY ISCR1
! DISPLAY ISCE1
! READ BACK ISCE VALUE
! "
! PRINT IT, IT SHOULD BE 4096
. To read the contents of
ISR?
, or
. To read the contents of the
ISCR1?
. The Calibrator sends a decimal
ISCE1?
5
Remote Operation
Check 5502A Status
5-45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents