
5790A
Operators Manual
5-20
5-38.
Programming 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 "ISCR01?." To read the
contents of the ISCE0 or 1, send the remote command, "ISCE0?", or "ISCE1". The
5790A responds by sending a decimal number that represents bits 0 through 15. Every
time you read the ISCR0 or 1, its contents are zeroed. The following 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 THE ISR CONTENTS
40 INPUT @6,A% ! RETRIEVE THE REGISTER CONTENTS FROM THE 5790A
50 PRINT @6, "ISCR0?" ! ASK FOR AND CLEAR THE ISCR0 CONTENTS
60 INPUT @6, B% ! RETRIEVE THE REGISTER CONTENTS FROM THE 5790A
70 PRINT @6, "ISCE0?" ! ASK FOR THE ISCE0 CONTENTS
80 INPUT @6, C% ! RETRIEVE THE REGISTER CONTENTS FROM THE 5790A
50 PRINT @6, "ISCR1?" ! ASK FOR AND CLEAR THE ISCR1 CONTENTS
60 INPUT @6, D% ! RETRIEVE THE REGISTER CONTENTS FROM THE 5790A
70 PRINT @6, "ISCE1?" ! ASK FOR THE ISCE1 CONTENTS
80 INPUT @6, E% ! RETRIEVE THE REGISTER CONTENTS FROM THE 5790A
90 PRINT "ISR = ";A% ! DISPLAY THE ISR
100 PRINT "ISCR0 = ";B% ! DISPLAY THE ISCR0
110 PRINT "ISCE0 = ";C% ! DISPLAY THE ISCE0
100 PRINT "ISCR1 = ";D% ! DISPLAY THE ISCR1
110 PRINT "ISCE1 = ";E% ! DISPLAY THE ISCE1
120 END
Convert the returned variables into binary, and you can read the status of the instrument.
For example if a register contains "4", its binary equivalent is: 00000000 00000100.
Therefore, bit 3 (RNGCHG is set (1) and the rest of the bits are reset (0).
By setting 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 input frequency goes over range,
bit 10 (MDCHG) in the ISCE1 register must be 1. (The ISCB bit must also be enabled in
the SRE.) The following sample program loads a decimal 1024 into the ISCE, which sets
bit 10 and resets the other bits:
10 ! THIS PROGRAM LOADS 00000100 00000000 BINARY INTO THE ISCE
20 PRINT @6, "ISCE 1024" ! LOAD DECIMAL 1024 INTO THE ISCE
30 PRINT @6, "ISCE?" ! READ BACK THE VALUE
40 INPUT @6, A% ! "
50 PRINT "ISCE = ";A% ! PRINT IT, IT SHOULD BE 1024
60 END
5-39.
Output Queue
The output queue is loaded whenever a query is processed, and holds up to 128
characters. The controller reads it with a statement such as the Fluke 1722A BASIC
INPUT statement, removing what it reads form the queue. If the queue is empty, the
5790A does not respond 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.
5-40.
Error Queue
When a command error, execution error, or device-dependent error occurs, its error code
is placed in the error queue where it can be read by the ERR? command. All error codes
are defined in Appendix E of this manual. Another way to decode a error code is to send
the command, EXPLAIN?, which returns a description of a error code. Reading the first
error with the ERR? Command 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
Summary of Contents for 5790A
Page 4: ......
Page 12: ...5790A Operators Manual vi...
Page 14: ...5790A Operators Manual viii...
Page 16: ...5790A Operators Manual 1 2...
Page 34: ...5790A Operators Manual 2 2...
Page 40: ...5790A Operators Manual 2 8...
Page 42: ...5790A Operators Manual 3 2...
Page 48: ...5790A Operators Manual 3 8...
Page 108: ...5790A Operators Manual 6 2...
Page 146: ...5790A Operators Manual 7 2...
Page 164: ...5790A Operators Manual 7 20...
Page 166: ...5790A Operators Manual 8 2...
Page 170: ...5790A Operators Manual 8 6...
Page 172: ...5790A Operators Manual 9 2...
Page 176: ...5790A Operators Manual...
Page 185: ...B 1 Appendix B ASCII and IEEE 488 Bus Codes...
Page 186: ...5790A Operators Manual B 2...
Page 187: ...Appendices ASCII and IEEE 488 Bus Codes B B 3...
Page 188: ...5790A Operators Manual B 4...
Page 204: ...5790A Operators Manual C 16...
Page 210: ...5790A Operators Manual D 6...