Agilent Technologies E1442-90003 Switch User Manual


 
Getting Started 41Chapter 1
(1':+,/(
28738767$723(5" !Query the status operation event register
(17(5$ !Bit 8 reported high (status byte bit 7 was high)
35,1767$723(5(9(17%,7 $ !Print response to the
STAT:OPER query
(1'
RUN the program. You should hear channel relays opening and closing,
especially when a large channel list is scanned.
Exercise 4: Check for
System Errors
You can add the following lines to the program in Exercise 3 to verify that
no system errors were generated. It is always a good idea to check if your
program causes the instrument to report any errors during program
development (such as command strings that are invalid and cause an error
to be sent to the instrument’s error queue). You can read the instrument’s
error queue by inserting the following four program lines (all errors are read
until the error queue is "+0, No errors").
5(3($7
2873876<67(55"
(17(5$$
A gets the error number, A$ gets
the error message
35,17$$
817,/$ 
See "Using Interrupts With Error Checking" in Chapter 2 for detecting errors
with interrupts. For example, inserting the following (incorrect) program line:
28738775,*6285&%86
will cause an error to be sent to the error queue because TRIG:SOURC BUS
is an incorrect command header (must be TRIG:SOUR BUS). The
instrument still functions using the default value TRIG:IMMediate. To
know that an error was reported and your instrument is doing what you
intended it to do, you must read the error register with a SYSTem:ERRor?
command.
You can insert this program segment at different places in your program to
see where the error is generated when debugging your program if it cannot
be determined from the error message or by examining the program lines.
In this case, the error is returned as -113, "Undefined header"
which means the command header was incorrectly specified. This error is
generated by the instrument driver while trying to parse the command (the
error -113 is documented in the command module manual).