By using Formatted data array, you can change the data/memory trace on the LCD by writing the new data into the Formatted memory arrays.
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).
Using ASCII Transfer Format to Write Formatted Data Arrays and Using Binary Transfer Format to Write Formatted Data Arrays (write_b.htb) show sample programs that demonstrate how to write data into formatted data arrays. The sample program in Using ASCII Transfer Format to Write Formatted Data Arrays (write_a.htb) uses the ASCII transfer format, while the sample in Using Binary Transfer Format to Write Formatted Data Arrays (write_b.htb) 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.
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
Sample: Using Binary Transfer Format to Write Formatted Data Arrays (write_b.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
260 ASSIGN @File TO *
270 OUTPUT @Agte5052;":FORM:DATA REAL64"
280 Head$="#6"&IVAL$(8*Nop,10)
290 OUTPUT @Agte5052;":CALC:PN1:TRAC1:DATA:FDAT ";Head$;
300 OUTPUT @Binary;Fdata(*),END
310 END
Other topics about Reading-Writing Measurement Data