![Agilent Technologies 8719ES Programmer'S Manual Download Page 476](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960476.webp)
Chapter 7
7-113
Programming Examples
Report Generation Examples
BASIC Program Listing
10 ! This example program reads and plots files which have been stored on
20 ! a LIF formatted disk by the analyzer. The plots are sent to either a
30 ! plotter with auto-feed capability, such as the HP7550B, or an HP-GL/2
40 ! compatible printer, such as the LaserJet 4 series (monochrome) or the
50 ! DeskJet 1200C (color).
60 !
70 ! Sending plots to disk is discussed in the Printing, Plotting and Saving
80 ! Measurement Results section of the analyzer Users Guide. The file
90 ! naming conventions are discussed in this section and will provide more
100 ! details.
110 !
120 ! This program example will provide form feeds to separate the plots. If
130 ! multiple plots per page have been stored, this program will generate
140 ! those plots.
150 ! A file naming convention has been devised to allow the program
160 ! to initialize the printer for HP-GL/2 at the beginning of a
170 ! page, to plot multiple plots to the same page, if desired, and
180 ! when all plots to the same page have been completed then send a
190 ! page eject (form feed) to the hardcopy device.
200 !
210 ! The plot file name is made up of four parts, the first three of which
220 ! are generated automatically by the analyzer whenever a plot is requested:
230 ! The prefix, “PLOT”, a two digit sequence number, in the range of 00 to
240 ! 31, a two letter output format code to indicate the plot quadrant
250 ! position or full page, LU (Left Upper), LL (Left Lower), RU (Right
260 ! upper), RL (Right Lower) or FP (Full Page). For example, the first
270 ! full page plot to a disk would be named “PLOT00FP”.
280 !
290 ! a. Build hardcopy device control strings.
300 ! b. Define output hardcopy device.
310 ! c. Catalog disc storing the file names which match file name specifier
320 ! in the file name array, Flnm$, and setting the number of files that
330 ! match.
340 ! d. Dimension Flnm$ for the number of files matched.
350 ! e. Sort the file name array.
360 ! f. Form feed the hardcopy device.
370 ! g. Process each of the files in the file name array.
380 ! 1. Define the current file name root string.
390 ! 2. If hardcopy device is a printer then output HP-GL initialization
400 ! string.
410 ! 3. Output each file which matches the file name root string to the
420 ! hardcopy device.
430 ! 4. Output a form feed to the hardcopy device.
440 !
450 ! This program requires HP BASIC 6.0 or greater which provides the use of
460 ! wild cards with the catalog command.
470 !
480 ! The peripheral HP-IB addresses and the hard copy device selection are
490 ! hard coded and may need to be changed for different systems
500 ! configurations. See lines 1130 to 1240.
510 !
520 ! EXAMP7E
530 !
540 WILDCARDS UX;ESCAPE “\” ! Enable HP-UX style wild cards
550 OPTION BASE 1 ! Set numeric arrays to start at 1
560 DIM Flnm$(1:200)[14] ! Plot filename array
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 ...