5522A
Operators Manual
5-42
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).
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 output has settled, bit 12
(SETTLED) 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 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 whenever a query is processed, and holds up to
800 characters. The controller reads it with a statement such as a BASIC INPUT
statement, removing what it reads form 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 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 placed in the error queue where it can be read by the
ERR?
command. (See
Appendix E for a list of error messages.) A way to decode an 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 Byte
indicates whether 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.
The error queue contains up to 16 entries. If many errors occur, only the first 15 errors
are kept in the queue. A 16th entry in the queue is always an "error queue overflow"
error, and all later errors are discarded until the queue is at least partially read. The first
errors are kept, because if many errors occur before the user can acknowledge and read
them, the earliest errors are the most likely to point to the problem. The later errors are
usually repetitions or consequences of the original problem.
Remote Program Examples
The following programming examples illustrate ways to handle errors, to take
measurements, take a number of successive readings, lock the range, and calibrate the
Calibrator. These excerpts from programs are written in DOS BASIC.
Guidelines for Programming the Calibrator
Commands are processed one at a time as they are received. Some commands require a
previous condition be set before the command will be accepted by the Calibrator. For
example, the waveform must be SQUARE before the DUTY command will be accepted.
Using the following programming guidelines will insure that the output is programmed to
the desired state.
•
All external connections commands should be programmed first. The calibrator will
Содержание 522A/6
Страница 4: ......
Страница 14: ...5522A Operators Manual x...
Страница 18: ...5522A Operators Manual xiv...
Страница 22: ...5522A Operators Manual 1 2...
Страница 46: ...5522A Operators Manual 1 26...
Страница 48: ...5522A Operators Manual 2 2...
Страница 54: ...5522A Operators Manual 2 8...
Страница 56: ...5522A Operators Manual 3 2...
Страница 189: ...6 1 Chapter 6 Remote Commands Title Page Introduction 6 3 Command Summary by Function 6 3 Commands 6 10...
Страница 190: ...5522A Operators Manual 6 2...
Страница 240: ...5522A Operators Manual 7 2...
Страница 260: ...5522A Operators Manual 8 2...
Страница 314: ...5522A Operators Manual 9 52...
Страница 370: ...5522A Operators Manual 10 56...
Страница 413: ...B 1 Appendix B ASCII and IEEE 488 Bus Codes...
Страница 414: ...5522A Operators Manual B 2...
Страница 416: ...5522A Operators Manual B 4...