Agilent Technologies E5071C Manual page 994

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

Error Detection (SRQ)
Overview
Sample Program in HT Basic
Other topics about Sample Programs
Overview
This sample program demonstrates how to use an SRQ to detect the
occurrence of an error.
This program sets SRQs and then intentionally sends an invalid parameter
to generate an error to be handled by this program. In the error handling
part, this program examines the error, displays the error number and error
message, and then displays the message indicating the suspension of the
program. See Detecting Occurrence of an Error for this programming.
The sequence interception by an error can not be performed on
Excel VBA.
Sample Program in HT Basic (srq_err.bas)
10 DIM Buff$[9],Err_mes$[50]
20 INTEGER Err_no
30 !
40 ASSIGN @Agte507x TO 717
50 !
60 OUTPUT @Agte507x;"*ESE 60"
70 OUTPUT @Agte507x;"*SRE 32"
80 OUTPUT @Agte507x;"*CLS"
90 OUTPUT @Agte507x;"*OPC?"
100 ENTER @Agte507x;Buff$
110 !
120 ON INTR 7 GOTO Err_proc
130 ENABLE INTR 7;2
140 OUTPUT @Agte507x;":CALC1:PAR:COUN 2"
150 PRINT "Trace 1 Meas.Para: S21"
160 PRINT "Trace 1 Format : Log Mag"
170 OUTPUT @Agte507x;":CALC1:PAR1:DEF S21"
180 OUTPUT @Agte507x;":CALC1:PAR1:SEL"
190 OUTPUT @Agte507x;":CALC1:FORM MLOG"
200 PRINT "Trace 2 Meas.Para: S11"
210 PRINT "Trace 2 Format : Log Mag"
220 OUTPUT @Agte507x;":CALC1:PAR2:DEF S11"
Programming
1221

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents