Entering Data In A Trace - Agilent Technologies E5052A Programmer's Manual

Signal source analyzer
Hide thumbs Also See for E5052A:
Table of Contents

Advertisement

Reading/Writing Measurement Data

Entering Data in a Trace

Entering Data in a Trace
By using "Formatted data array" on page 70, you can change the data/memory trace on the
LCD by writing the new data into the "Formatted memory arrays" on page 70.
When you write data into the formatted data/memory array, you can choose either the
ASCII or binary transfer format (see "Data Types for Data Transfer" on page 60).
Example 4-3, Example 4-4, Example 4-3, and Example 4-4 show sample programs that
demonstrate how to write data into formatted data arrays. The sample program in Example
4-3 uses the ASCII transfer format, while the sample in Example 4-4 uses the binary
transfer format.
These sample programs write the trace data of phase noise measurements stored in a file on
the formatted data arrays.
Example 4-3
Sample: Using ASCII Transfer Format to Write Formatted Data Arrays
(write_a.htb)
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
390
Example 4-4
Sample: Using Binary Transfer Format to Write Formatted Data Arrays
(write_a.htb)
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
74
REAL Fdata(1:1601),Freq(1:1601)
DIM Img$[30],File$[300]
INTEGER Nop,I
File$="a:pn_asc"
ASSIGN @Agte5052 TO 717
OUTPUT @Agte5052;":SENS:PN:SWE:POIN?"
ENTER @Agte5052;Nop
PRINT "Number of Frequency points = ";Nop
REDIM Fdata(1:Nop),Freq(1:Nop)
ASSIGN @File TO File$
Img$="MD.4DE,2X,MD.6DE"
FOR I=1 TO Nop
ENTER @File USING Img$;Freq(I),Fdata(I)
NEXT I
ASSIGN @File TO *
OUTPUT @Agte5052;":FORM:DATA ASC"
OUTPUT @Agte5052;":CALC:PN1:TRAC1:DATA:FDAT ";Fdata(*)
END
REAL Fdata(1:1601),Freq(1:1601)
DIM Img$[30],File$[300],Head$[10]
INTEGER Nop,I
File$="a:pn_asc"
ASSIGN @Agte5052 TO 717
ASSIGN @Binary TO 717;FORMAT OFF
OUTPUT @Agte5052;":SENS:PN:SWE:POIN?"
ENTER @Agte5052;Nop
PRINT "Number of Frequency points = ";Nop
REDIM Fdata(1:Nop),Freq(1:Nop)
ASSIGN @File TO File$
Img$="MD.4DE,2X,MD.6DE"
FOR I=1 TO Nop
ENTER @File USING Img$;Freq(I),Fdata(I)
NEXT I
4

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents