![Agilent Technologies 8719ES Programmer'S Manual Download Page 430](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960430.webp)
Chapter 7
7-67
Programming Examples
Measurement Data Transfer Examples
Example 3E: Data Transfer Using FORM 1 (Internal-Binary Format)
FORM 1 is used for rapid I/O transfer of analyzer data. It contains the least number of
bytes-per-trace and does not require re-formatting in the analyzer. This format is more
difficult to convert into a numeric array in the controller.
The following is an outline of the program's processing sequence:
• An I/O path is assigned for the analyzer.
• The system is initialized.
• The integer variables for the header information are defined.
• The string variable for the header is defined.
• The selected frequency span is swept once.
• The internal-binary format is selected.
• The error-corrected data is output from the analyzer.
• The two data-header characters and the two length bytes are read in.
• The string buffer is allocated for data.
• The trace data is read into the string buffer.
• The analyzer is restored to continuous-sweep mode and queried for command
completion.
• The instrument is returned to local control and the program ends.
Running the Program
The analyzer is initialized. The header and the number of bytes in the block transfer are
printed on the controller display. Once the transfer is complete, the number of bytes in the
data string is printed. Compare the two numbers to be sure that the transfer was
completed.
BASIC Program Listing
10
! This program is an example of a form 1, internal format data
20
! transfer. The data is stored in a string dimensioned to the
30
! length of the data being transferred.
40
!
50
! EXAMP3E
60
!
70
ASSIGN @Nwa TO 716
! Assign an I/O path for the analyzer
80
ASSIGN @Nwa_bin TO 716;FORMAT OFF
! Binary path for data transfer
90
!
100 CLEAR SCREEN
110 ! Initialize the analyzer
120 ABORT 7
! Send IFC Interface Clear
130 CLEAR @Nwa
! SDC (Selective Device Clear)
140 OUTPUT @Nwa;"OPC?;PRES;"
! Preset the analyzer and wait
150 ENTER @Nwa;Reply
! Read the 1 when completed
160 !
170 INTEGER Length
! Header length 2 bytes
180 DIM Header$[2]
! Header string 2 bytes
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 ...