Reading Instrument
When debugging a program, you may want to know if an instrument
Errors
error has occurred. Some instruments can display error messages on
their front panels. If your instrument cannot do this, you can put the
following code segment in your program to read and display error
messages.
10 !
20 ! The rest of your
30 !
variable declarations
40 !
50 DIM
Err_msg$[751
60 INTEGER Err,num
70 !
80 ! Part of your program
90 ! that generates errors
100 !
110
!
200 REPEAT
210
OUTPUT
OBox;":SYST:ERR?"
220 ! Query instrument error
230
ENTER
OBox;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