6
Example 2 - Status Registers and Queues
1220 !
1230 ! Read and display any messages in the error queue
1240 !
1250 REPEAT
1260 OUTPUT Tls;"SYSTEM:ERROR?"
1270 ENTER Tls;Value,A$
The SYSTEM:ERROR? query gets the number of the last error in the error queue.
1280 IF Value<>0 THEN PRINT TABXY(21,17);Value,A$
1290 UNTIL Value=0
1300 !
1310 ! Clear the Status structure and reenable the interrupt before returning
1320 !
1330 OUTPUT Tls;"*CLS"
1340 ENABLE INTR 7
1350 !
1360 RETURN
1370 !
1380 END
6-6 Programming Examples