Agilent Technologies E5052A Programmer's Manual page 87

Signal source analyzer
Hide thumbs Also See for E5052A:
Table of Contents

Advertisement

The error queue can be used in the following ways:
1. It is used as a branch for error handling. When an error queue is retrieved, it returns 0 as
the error number and &dlq;No error&drq; as the error message if no error is detected.
This can be used for detecting an error and for branching the flow of a program. This is
also useful for handling a specific error(s). Note that using this method prevents the
user from performing any processing during the occurrence of an error.
2. When an error is detected using SRQ, the error queue is used to examine the error.
Example 6-1 is a sample program that demonstrates how to use an SRQ to detect the
occurrence of an error.
This program sets the SRQs and then intentionally sets a wrong trigger to generate an error,
which is handled by the program. In the error handling part, this program examines the
error and then displays the error number and error message.
Example 6-1
Example of error detection using an SRQ
110
120
130 !
140
150 !
160
170
180
190
200
210 !
220
230
240
250
260
280
290
300
310 Err_proc: OFF INTR 7
320
330
340
350
360
370
380 Skip_err: PRINT "Program Done"
390 Prog_end:
6
DIM Buff$[9],Err_msg$[100]
INTEGER Err_no
ASSIGN @Agte5052 TO 717
OUTPUT @Agte5052;"*ESE 60"
OUTPUT @Agte5052;"*SRE 32"
OUTPUT @Agte5052;"*CLS"
OUTPUT @Agte5052;"*OPC?"
ENTER @Agte5052;Buff$
ON INTR 7 GOTO Err_proc
ENABLE INTR 7;2
OUTPUT @Agte5052;":TRIG:MODE PN1"
OUTPUT @Agte5052;":TRIG:SP:SOUR BUS"
OUTPUT @Agte5052;":INIT:SP:CONT ON"
OUTPUT @Agte5052;"*TRG"
PRINT "Waiting..."
GOTO Skip_err
OUTPUT @Agte5052;":SYST:ERR?"
ENTER @Agte5052;Err_no,Err_msg$
PRINT "Error occured."
PRINT "No:";Err_no,"Description: "&Err_msg$
PRINT "Program Interrupt."
GOTO Prog_end
END
Working with Automatic Test Systems
Detecting Occurrence of an Error
87

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents