EasyManuals Logo
Home>Agilent Technologies>Measuring Instruments>8720E Series

Agilent Technologies 8720E Series Programmer's Guide

Agilent Technologies 8720E Series
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #483 background imageLoading...
Page #483 background image
7-120 Chapter7
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=Record_cnt+1 ! Increment record counter
550 GOTO Readfile ! Read next record
560 !

Table of Contents

Other manuals for Agilent Technologies 8720E Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8720E Series and is the answer not in the manual?

Agilent Technologies 8720E Series Specifications

General IconGeneral
BrandAgilent Technologies
Model8720E Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals