![Agilent Technologies 8719ES Programmer'S Manual Download Page 483](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960483.webp)
7-120
Chapter 7
Programming Examples
Report Generation Examples
BASIC Program Listing
10 ! This program shows how to store an ASCII data file in CITIFILE format
20 ! and retrieve the data with the controller. The disk is written in the
30 ! analyzer system and then moved to the controller disk and the data
40 ! accessed.
50 !
60 ! EXAMP7F
70 !
80 ASSIGN @Nwa TO 716 ! Assign an I/O path for the analyzer
90 !
100 CLEAR SCREEN
110 ABORT 7 ! Generate an IFC (Interface Clear)
120 CLEAR @Nwa ! SDC (Selected Device Clear)
130 OUTPUT @Nwa;”OPC?;PRES;” ! Preset the analyzer and wait
140 ENTER @Nwa;Reply ! Read the 1 when complete
150 !
160 DIM Record$[80] ! String to read the disk records
170 !
180 ! Set up analyzer
190 OUTPUT @Nwa;”STAR100MHZ;” ! Start frequency 100 MHz
200 OUTPUT @Nwa;”STOP 200MHZ” ! Stop frequency 200 MHz
210 OUTPUT @Nwa;”POIN11;” ! Trace length 11 points
220 OUTPUT @Nwa;”OPC?;SING;” ! Single sweep and wait
230 ENTER @Nwa;Reply ! Read in the 1 when complete
240 !
250 ! Program disk storage operation
260 !
270 OUTPUT @Nwa;”INTD;” ! Select internal disk file
280 OUTPUT @Nwa;”EXTMFORMON;” ! Store formated data
290 OUTPUT @Nwa;”EXTMDATOON;” ! Store data file only
300 INPUT “Enter data file name (5 chars)”,File_name$ ! Get file name
310 File_name$=UPC$(File_name$) ! File names are uppercase
320 OUTPUT @Nwa;”TITF1”””;File_name$;”””;” ! Title for save reg 1
330 OUTPUT @Nwa;”SAVUASCI;” ! Save as ASCII file
340 !
350 OUTPUT @Nwa;”STOR1;” ! Store data to disk file
360 OUTPUT @Nwa;”OPC?;WAIT;” ! Wait until store is complete
370 ENTER @Nwa;Reply
380 !
390 ! File storage is complete
400 !
410 INPUT “Place disk in controller disk drive, then press Return”,A$
420 !
430 ! Read data file information
440 !
450 ASSIGN @File TO File_name$&”D1:,1400” ! Open an I/O path for file
460 Record_cnt=1 ! Counter to count records
470 !
480 PRINT CHR$(12); ! Formfeed to clear display
490 PRINT “Contents of data file” ! Show contents of the data file
500 Readfile: !
510 ON END @File GOTO End_file ! Test for end of file and exit
520 ENTER @File;Record$ ! Read ASCII record
530 PRINT Record_cnt,Record$ ! print record on display
540 Record_cnt=Rec1 ! Increment record counter
550 GOTO Readfile ! Read next record
560 !
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 ...