74
4
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 REAL Fdata(1:1601),Freq(1:1601)
120 DIM Img$[30],File$[300]
130 INTEGER Nop,I
140 File$="a:pn_asc"
150 ASSIGN @Agte5052 TO 717
160 OUTPUT @Agte5052;":SENS:PN:SWE:POIN?"
170 ENTER @Agte5052;Nop
180 PRINT "Number of Frequency points = ";Nop
190 REDIM Fdata(1:Nop),Freq(1:Nop)
200 ASSIGN @File TO File$
210 Img$="MD.4DE,2X,MD.6DE"
220 FOR I=1 TO Nop
230 ENTER @File USING Img$;Freq(I),Fdata(I)
240 NEXT I
250 ASSIGN @File TO *
260 OUTPUT @Agte5052;":FORM:DATA ASC"
270 OUTPUT @Agte5052;":CALC:PN1:TRAC1:DATA:FDAT ";Fdata(*)
390 END
Example 4-4
Sample: Using Binary Transfer Format to Write Formatted Data Arrays
(write_a.htb)
110 REAL Fdata(1:1601),Freq(1:1601)
120 DIM Img$[30],File$[300],Head$[10]
130 INTEGER Nop,I
140 File$="a:pn_asc"
150 ASSIGN @Agte5052 TO 717
160 ASSIGN @Binary TO 717;FORMAT OFF
170 OUTPUT @Agte5052;":SENS:PN:SWE:POIN?"
180 ENTER @Agte5052;Nop
190 PRINT "Number of Frequency points = ";Nop
200 REDIM Fdata(1:Nop),Freq(1:Nop)
210 ASSIGN @File TO File$
220 Img$="MD.4DE,2X,MD.6DE"
230 FOR I=1 TO Nop
240 ENTER @File USING Img$;Freq(I),Fdata(I)
250 NEXT I
Содержание E5052A
Страница 4: ...4 ...
Страница 28: ...28 1 Making Effective Use of This Manual How to Use This Manual ...
Страница 51: ...3 51 Making a Measurement Trigger System 3 Making a Measurement Figure 3 1 Trigger system ...
Страница 58: ...58 3 Making a Measurement Waiting for End of measurement ...
Страница 76: ...76 4 Reading Writing Measurement Data Entering Data in a Trace ...
Страница 82: ...82 Chapter5 Saving and Recalling File Management Managing Files ...
Страница 476: ...476 AppendixB Status Reporting System Status Register Structure Figure B 3 Status register structure 1 of 6 ...
Страница 478: ...478 AppendixB Status Reporting System Status Register Structure Figure B 5 Status register structure 3 of 6 ...
Страница 480: ...480 AppendixB Status Reporting System Status Register Structure Figure B 7 Status register structure 5 of 6 ...