7-106
Chapter 7
Programming Examples
Report Generation Examples
150 ABORT 7 ! Generate an IFC ( Interface Clear)
160 CLEAR @Nwa ! SDC (Selected Device Clear)
170 !
180 OUTPUT @Nwa;”OPC?;SING;” ! Single sweep and stop for print
190 ENTER @Nwa;Reply ! Read in “1” when complete
200 !
210 OUTPUT @Nwa;”CLES;” ! Clear status registers
220 OUTPUT @Nwa;”ESE2;” ! Enable bit 1 of ESR request control
230 OUTPUT @Nwa;”SRE32;” ! Enable ESR interrupt for SRQ
240 !
250 OUTPUT @Nwa;”USEPASC;” ! Enable pass control mode
260 OUTPUT @Nwa;”PRINALL;” ! Begin printer dump
270 !
280 REPEAT ! Loop until SRQ bit is set
290 Stat=SPOLL(@Nwa) ! Read status byte with serial poll
300 UNTIL BIT(Stat,6) ! Test for bit 6, SRQ
310 !
320 Pass_control: ! SRQ detected. Test for pass control
330 IF BIT(Stat,5) THEN ! Requested pass control
340 PASS CONTROL @Nwa ! Send take control message
350 ELSE ! Not bit 5, some other event
360 DISP “SRQ but not request pass control”
370 STOP ! Halt program
380 END IF
390 !
400 DISP “Printing from analyzer and waiting for control”
410 !
420 REPEAT ! Loop and wait for completion
430 STATUS 7,6;Hpib ! Read HP-IB interface register
440 UNTIL BIT(Hpib,6) ! Bit 6 is active controller
450 !
460 DISP “Control returned from analyzer”
470 OUTPUT @Nwa;”TALKLIST;” ! Set talker/listener mode again
480 OUTPUT @Nwa;”CLES;” ! Clear status byte assignments
490 !
500 OUTPUT @Nwa;”CONT;” ! Start analyzer sweeping again
510 OUTPUT @Nwa;”OPC?;WAIT;” ! Wait for analyzer to finish
520 ENTER @Nwa;Reply ! Read the 1 when complete
530 !
540 LOCAL @Nwa ! Release HP-IB control
550 END
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...