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 #425 background imageLoading...
Page #425 background image
7-62 Chapter7
Programming Examples
Measurement Data Transfer Examples
Example 3C: Data Transfer Using Floating-Point Numbers
This example program illustrates data transfer using FORM 3 in which data is
transmitted in the floating-point formats. FORM 2 is nearly identical except for the IEEE
32-bit format of 4 bytes-per-value. FORM 5 reverses the order of the bytes to conform with
the PC conventions for defining a real number.
The block-data formats have a four-byte header. The first two bytes are the ASCII
characters “#A” that indicate that a fixed-length block transfer follows, and the next two
bytes form an integer containing the number of bytes in the block to follow. The header
must be read in so that data order is maintained.
This transfer is more than twice as fast than a FORM 4 transfer. With the FORM 4
transfer, 10,050 bytes are sent (201 points × 2 values-per-point × 24 bytes-per-value).
Using FORM 2 to transfer the data, only 1612 bytes are sent (201 points × 2
values-per-point × 4 bytes-per-value). See Array-Data Formats” on page 4-6.
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 are defined to contain the header information.
The number of points in the trace is set to 11.
The selected frequency span is swept once.
Data-transfer format 3 is set.
The headers are read from the trace.
The array size is calculated and allocated.
The trace data is read in and printed.
The marker is activated and placed at the lowest frequency of the analyzer (50 MHz).
The instrument is returned to local control and the program ends.
Running the Program
Run the program. The computer displays the number of elements and bytes associated
with the transfer of the trace, as well as the first 10 data points. Position the marker and
examine the data values. Compare the displayed values with the analyzer's marker values.
BASIC Program Listing
10 ! This program shows how to read in a data trace in IEEE 64 bit
20 ! format. The array header is used to determine the length of the
30 ! array and to allocate the array size.
40 !
50 ! Program Example 3C
60 !
70 CLEAR SCREEN
80 ! Initialize the analyzer
90 ASSIGN @Nwa TO 716 ! Assign an I/O path for the analyzer
100 ASSIGN @Nwadat TO 716;FORMAT OFF ! Binary data path definition
110 !

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