
84
Chapter 6
Reading/Writing Measurement Data
Reading/Writing Data
Reading/Writing Data
Reading/writing measurement data
Reading/writing array in ASCII format
Example 6-1 shows the process of reading and writing array data in the ASCII format. This
program is available under the filename of “data_b2a.bas” on the sample program disk.
This program reads the data trace array for trace B in ASCII format and writes it to the data
trace array for trace A.
Lines 30 to 70
Identifies the external controller and Instrument BASIC and sets the
GPIB address.
Line 90
Substitutes the number of measurement points into the “Nop” variable.
Lines 110 to 120 Specifies ASCII format as data transfer format and sets the number of
measurement points to Nop.
Lines 140 to 150 Holds the trigger and displays traces A and B on separate screens.
Lines 160 to 190 Specifies trace B as active trace, performs auto scaling, and reads the
display format to assign it the “Fmt$” variable.
Lines 210 to 220 Reads the data trace array for trace B and stores it in Trc(*).
Lines 240 to 250 Specifies trace A as active trace and sets the display format to “Fmt$.”
Line 260
Writes “Trc(*)” to the data trace array for trace A.
Line 270
Performs auto-scaling.
Example 6-1
Reading/Writing Data Trace Array in the ASCII Format
10 DIM Trc(1:201,1:2),Fmt$[9]
20 INTEGER Nop
30 IF SYSTEM$("SYSTEM ID")="HP4294A" THEN
40 ASSIGN @Hp4294a TO 800
50 ELSE
60 ASSIGN @Hp4294a TO 717
70 END IF
80 !
90 Nop=201
100 !
110 OUTPUT @Hp4294a;"FORM4"
120 OUTPUT @Hp4294a;"POIN ";Nop
130 !
140 OUTPUT @Hp4294a;"HOLD"
150 OUTPUT @Hp4294a;"SPLD ON"
160 OUTPUT @Hp4294a;"TRAC B"
170 OUTPUT @Hp4294a;"AUTO"
180 OUTPUT @Hp4294a;"FMT?"
190 ENTER @Hp4294a;Fmt$
200 !
210 OUTPUT @Hp4294a;"OUTPDTRC?"
220 ENTER @Hp4294a;Trc(*)
230 !
Summary of Contents for 4294A
Page 4: ...4 ...
Page 18: ...18 Contents ...
Page 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Page 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Page 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Page 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Page 246: ...246 13 Application Sample Programs File Transfer Function ...
Page 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Page 507: ...Index Index 507 Index ...
Page 508: ...508 Index Index ...
Page 509: ...Index Index 509 Index ...
Page 510: ...510 Index Index ...
Page 511: ...Index Index 511 Index ...
Page 512: ...512 Index Index ...
Page 513: ...Index Index 513 Index ...
Page 514: ...514 Index Index ...
Page 515: ...Index Index 515 Index ...
Page 516: ...516 Index Index ...
Page 517: ...Index Index 517 Index ...
Page 518: ...518 Index Index ...