Agilent Technologies E1446A Car Amplifier User Manual


 
Errmsg Subprogram
Used with ’SUMSUBS’
Program ’RGBSUM’ loads/gets its subprograms from the file
’SUMSUBS’, rather than from the file ’E46SUBS’. The only difference
between these subprogram files is the subprogram ’Errmsg’. ’Errmsg’ in
the file ’SUMSUBS’ reports errors from two E1445As rather than from
one. Its listing is shown below.
2230 SUB Errmsg
2240 Errmsg: !Subprogram which displays E1445 programming errors
2250 DIM Message$[256]
2260 !Read AFG (at logical addr 72) status byte register, clear service
2270 !request bit
2280 B= SPOLL(1672)
2290 !End of statement if error occurs among coupled commands
2300 OUTPUT 1672;""
2310 OUTPUT 1672;"ABORT" !abort output waveform
2320 PRINT "E1445A (logical address 72)"
2330 PRINT
2340 REPEAT
2350 OUTPUT 1672;"SYST:ERR?" !read AFG error queue
2360 ENTER 1672;Code,Message$
2370 PRInt Code,Message$
2380 UNTIL Code= 0
2390 PRInt
2400 !
2410 !Read AFG (at logical addr 80) status byte register, clear service
2420 !request bit
2430 B= SPOLL(1680)
2440 !End of statement if error occurs among coupled commands
2450 OUTPUT 1680;""
2460 OUTPUT 1680;"ABORT" !abort output waveform
2470 PRINT "E1445A (logical address 80)"
2480 PRINT
2490 REPEAT
2500 OUTPUT 1680;"SYST:ERR?" !read AFG error queue
2510 ENTER 1680;Code,Message$
2520 PRInt Code,Message$
2530 UNTIL Code= 0
2540 STOP
2550 SUBEND
C-32 Register-Based Programming Example Programs