Chapter 7
7-117
Programming Examples
Report Generation Examples
2310 ! Get number of records in file from I/O path status registers
2320 STATUS @Ldisc,3;Nmbr_rcrds
2330 !
2340 ! Get record length
2350 STATUS @Ldisc,4;Rcrd_lngth
2360 !
2370 ! Compute the number of words of data in the file
2380 Nmbr_wrds=Nmbr_rcrds*Rcrd_lngth/2
2390 !
2400 ! Determine the number of arrays necessary to hold the plot file data.
2410 ! The maximum size of an RMB array is 32767. If the number of words of
2420 ! data is greater than 32767 then multiple arrays must be used to hold
2430 ! all of the data.
2440 !
2450 ! Compute the dimensions of Plt_arry1 and Plt_arry2 that are required
2460 ! to hold the plot data.
2470 Arry1_sz=Nmbr_wrds MOD 32767
2480 Arry2_sz=INT(Nmbr_wrds/32767)
2490 !
2500 ! Re-dimension Plt_arry1 to the correct size
2510 REDIM Plt_arry1(1:Arry1_sz)
2520 !
2530 ! If the number of words of data is less than 32767 then use one array
2540 IF Arry2_sz=0 THEN
2550 ENTER @Ldisc;Plt_arry1(*) ! Read the plot data from the file
2560 ELSE
2570 ! Use 2 arrays to read data
2580 ENTER @Ldisc;Plt_arry2(*),Plt_arry1(*) ! Read the plot data from file
2590 END IF
2600 !
2610 ASSIGN @Ldisc TO * ! Close plot file
2620 !
2630 ! Output the data to the hardcopy device
2640 IF Arry2_sz=0 THEN ! Only one array <32767 words
2650 OUTPUT @Prntpltdvc;Plt_arry1(*)
2660 ELSE ! Data > 32767 so send 2 arrays
2670 OUTPUT @Prntpltdvc;Plt_arry2(*),Plt_arry1(*)
2680 END IF
2690 RETURN
2700 !
2710 !************************************************************************
2720 !
2730 Frm_fd:! Send a form feed (page eject) command to the hardcopy device
2740 IF Outputdvc=Plttr THEN ! Plotter output
2750 OUTPUT @Prntpltdvc USING “#,K”;”PG;”
2760 ELSE ! For printer output. The
2770 ! printer first must exit HP-GL mode before sending form feed command
2780 OUTPUT @Prntpltdvc USING “#,K”;Hpgl_exit$&Form_feed$
2790 END IF
2800 RETURN
2810 !
2820 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 ...