![Agilent Technologies 8719ES Programmer'S Manual Download Page 478](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960478.webp)
Chapter 7
7-115
Programming Examples
Report Generation Examples
1150 ! Define device selection flags to determine plotter or printer
1160 ! Select device with 1 and set Outputdvc to define it
1170 Plttr=1 ! Select plotter for output
1180 Prntr=0 ! Select printer for output
1190 Outputdvc=Plttr ! define output device as plotter
1200 !
1210 False=0 ! Define flags for logic tests
1220 True=1
1230 !
1240 Prfx$=”PLOT” ! define plot file name prefix string
1250 !
1260 ! *** Initialize HP-IB device addresses ***
1270 !
1280 Prntr_addr=701 ! Printer HP-IB address
1290 Plttr_addr=705 ! Plotter HP-IB address
1300 !
1310 ! Set address of flexible disk drive containing plot files
1320 Msi$=”:,1400”
1330 !
1340 ! Define I/O paths for plot output with no formatting on data
1350 IF Outputdvc=Plttr THEN ! select output device for plotting
1360 ASSIGN @Prntpltdvc TO Plttr_addr;FORMAT OFF ! Select plotter
1370 ELSE
1380 ASSIGN @Prntpltdvc TO Prntr_slctr;FORMAT OFF ! Select printer
1390 END IF
1400 !
1410 ! *** Search disk for plot files ***
1420 !
1430 ! Define the plot file name specifier: Prefix (Prfx$), two
1440 ! sequence digits([0-9][0-9]), two output format specifier
1450 ! characters ([FLR][LPU]) and an optional character (s)
1460 Srch$=Prfx$&”[0-9][0-9][FLR][LPU]*”
1470 !
1480 ! Catalog the files that match the plot file name specifier by
1490 ! putting the names in the string array Flnm$ and the number of files
1500 ! in the integer Nbr_files. Suppress the catalog header text.
1510 CAT Srch$&Msi$ TO Flnm$(*);COUNT Nbr_files,NO HEADER,NAMES
1520 !
1530 ! If no files are found then print message and stop
1540 IF Nbr_files=0 THEN
1550 PRINT “No files found; program terminated”
1560 STOP
1570 END IF
1580 !
1590 ! *** Sort the plot file names found ***
1600 !
1610 ! Re-dimension the file name array to the actual number of files that
1620 ! were found.
1630 REDIM Flnm$(1:Nbr_files)
1640 !
1650 ! Sort the file names into alphabetical order
1660 MAT SORT Flnm$(*)
1670 !
1680 GOSUB Frm_fd ! Send a form feed to hardcopy device
1690 PRINT
1700 !
1710 ! *** Cycle through the filenames and plot the data ***
1720 !
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 ...