Agilent Technologies E5071C User's Guide Page 116

  • Download
  • Add to my manuals
  • Print
  • Page
    / 551
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 115
116 Chapter 7
Reading/Writing Measurement Data
Entering Data into a Trace
Example 7-3 Using the ASCII Transfer Format to Write Formatted Data Arrays (write_a.htb)
10 REAL Freq,Fdata(1:1601,1:2)
20 DIM File$[300]
30 INTEGER Nop
40 !
50 ASSIGN @Agte507x TO 717
60 !
70 CALL Inp_file_name(File$)
80 !
90 OUTPUT @Agte507x;":CALC1:PAR1:SEL"
100 OUTPUT @Agte507x;":INIT1:CONT OFF"
110 OUTPUT @Agte507x;":ABOR"
120 !
130 OUTPUT @Agte507x;":SENS1:SWE:POIN?"
140 ENTER @Agte507x;Nop
150 REDIM Fdata(1:Nop,1:2)
160 !
170 ON ERROR GOTO File_error
180 ASSIGN @File TO File$
190 ENTER @File USING "K";Buff$
200 ENTER @File USING "K";Buff$
210 ENTER @File USING "K";Buff$
220 FOR I=1 TO Nop
230 ENTER @File USING "19D,2X,19D,2X,19D";Freq,Fdata(I,1),Fdata
(I,2)
240 NEXT I
250 ASSIGN @File TO *
260 OFF ERROR
270 !
280 OUTPUT @Agte507x;":FORM:DATA ASC"
290 !
300 OUTPUT @Agte507x;":CALC1:DATA:FDAT ";Fdata(*)
310 !
320 GOTO Prog_end
330 !
340 File_error: OFF ERROR
350 PRINT "############ ERROR ############"
360 PRINT File$&" is NOT exist."
370 PRINT " or"
380 PRINT File$&" has UNSUITABLE data."
390 !
400 Prog_end: END
410 !=============================================
420 ! File Name Input Function
430 !=============================================
440 SUB Inp_file_name(Inp_name$)
450 DIM Inp_char$[9]
460 ON ERROR GOTO Inp_start
470 Inp_start: !
480 PRINT "Input File Name!"
490 INPUT "Name?",Inp_name$
500 PRINT "Input Name: "&Inp_name$
510 INPUT "OK? [Y/N]",Inp_char$
520 IF UPC$(Inp_char$)<>"Y" THEN Inp_start
530 OFF ERROR
540 SUBEND
Page view 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 550 551

Comments to this Manuals

Vikiehs 04 Jan 2024 | 14:20:06

urenrjrjkvnm