
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 !
Содержание 4294A
Страница 4: ...4 ...
Страница 18: ...18 Contents ...
Страница 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Страница 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Страница 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Страница 130: ...130 Chapter9 Communication with External Equipment Using the I O Ports Sample Program to Use the I O Port ...
Страница 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Страница 246: ...246 13 Application Sample Programs File Transfer Function ...
Страница 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Страница 507: ...Index Index 507 Index ...
Страница 508: ...508 Index Index ...
Страница 509: ...Index Index 509 Index ...
Страница 510: ...510 Index Index ...
Страница 511: ...Index Index 511 Index ...
Страница 512: ...512 Index Index ...
Страница 513: ...Index Index 513 Index ...
Страница 514: ...514 Index Index ...
Страница 515: ...Index Index 515 Index ...
Страница 516: ...516 Index Index ...
Страница 517: ...Index Index 517 Index ...
Страница 518: ...518 Index Index ...