Agilent Technologies 4294A Service Manual Page 135

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 134
Chapter 10 135
Handling Errors
Sample program for error handling
1. Chapter Title
2. Chapter Title 3. Chapter Title
4. Chapter Title
10. Handling Errors
Example 10-1 Detecting of an error via SRQ
10 DIM Buff$[9],Err_mes$[50]
20 INTEGER Scode,Err_no
30 IF SYSTEM$("SYSTEM ID")="HP4294A" THEN
40 ASSIGN @Hp4294a TO 800
50 Scode=8
60 ELSE
70 ASSIGN @Hp4294a TO 717
80 Scode=7
90 END IF
100 !
110 OUTPUT @Hp4294a;"*ESE 60"
120 OUTPUT @Hp4294a;"*SRE 32"
130 OUTPUT @Hp4294a;"*CLS"
140 OUTPUT @Hp4294a;"*OPC?"
150 ENTER @Hp4294a;Buff$
160 !
170 ON INTR Scode GOTO Err_proc
180 ENABLE INTR Scode;2
190 OUTPUT @Hp4294a;"MEAS CSQ"
200 PRINT "Set Meas Prm:Cs-Q"
210 OUTPUT @Hp4294a;"START 10MHZ"
220 PRINT "Set Start:10MHz"
230 OUTPUT @Hp4294a;"STOP 100MHZ"
240 PRINT "Set Stop:100MHz"
250 OUTPUT @Hp4294a;"*OPC?"
260 ENTER @Hp4294a;Buff$
270 GOTO Skip_err_proc
280 Err_proc: ! Error Process
290 OUTPUT @Hp4294a;"OUTPERRO?"
300 ENTER @Hp4294a;Err_no,Err_mes$
310 PRINT "Error occurred!!"
320 PRINT " No:";Err_no,"Description: "&Err_mes$
330 PRINT "PROGRAM INTERRUPT!!"
340 GOTO Prog_end
350 Skip_err_proc: PRINT "PROGRAM DONE."
360 Prog_end: END
Page view 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 517 518

Comments to this Manuals

No comments