Reading Instrument
Errors
When debugging a program, you maywant to know if an instrument
error has o ccurred. Some instruments can display error messages on
their front panels. If your instrument cannot do this, you can put the
following code segmentinyour program to read and display error
messages.
10 !
20 ! The rest of your
30 ! variable declarations
40 !
50 DIM Err_msg$[75]
60 INTEGER Err_num
70 !
80 ! Part of your program
90 ! that generates errors
100 !
110 !
200 REPEAT
210 OUTPUT @Box;":SYST:ERR?"
220 ! Query instrument error
230 ENTER @Box;Err_num,Err_msg$
240 ! Read error #, message
250 PRINT Err_num,Err_msg$
260 ! Print error message
270 UNTIL Err_num = 0
280 ! Repeat until no errors
290 !
300 ! The rest of your program
310 !
1-76 Getting Started Programming