
Chapter 6
85
Reading/Writing Measurement Data
Reading/Writing Data
6. Reading/W
riting
2
. Cha
p
te
r T
itle
3
. Chap
te
r T
itle
4
. Chap
te
r T
itle
5. Chap
te
r T
itle
Me
asur
eme
n
t Da
ta
240 OUTPUT @Hp4294a;"TRAC A"
250 OUTPUT @Hp4294a;"FMT "&Fmt$
260 OUTPUT @Hp4294a;"INPUDTRC ";Trc(*)
270 OUTPUT @Hp4294a;"AUTO"
280 !
290 END
Reading/writing data array in a binary format
Example 6-2 shows the process of reading and writing array in binary format. This
program is available under the filename of “mem2dat.bas” on the sample program disk.
This program reads the memory trace array for trace A in the IEEE 64-bit floating point
format and writes it to the data trace array.
Lines 30 to 90
Identifies the external controller and Instrument BASIC and sets the
GPIB address.
Lines 110 to 120 Substitutes the trace selected as the active trace and the number of
measurement points into the corresponding variables Act_trc$ and
Nop, respectively.
Lines 140 to 150 Specifies the IEEE 64-bit floating point format as data transfer format
and sets the number of measurement points to Nop.
Lines 170 to 180 Holds the trigger and sets the active trace to Act_trc$.
Lines 190 to 200 Clears error queue and specifies memory trace as the trace to be
displayed.
Lines 210 to 220 Checks for errors.
Line 240
An error message appears if error No. 34 occurs (error indicating that
an attempt was made to use memory trace when no data has been
stored as memory trace). In the event of this error, program execution
stops without performing any operation.
Lines 260 to 270 Executes a memory trace array read command, reads the header, and
substitutes it into the “Header$” variable.
Line 280
Reads the memory trace array and stores it in “Trc(*)” (array variable).
Binary data must be read without being formatted; therefore, an I/O
path (@Binary) that has been set to read without being formatted is
used.
Line 290
Reads the terminator (LF^EOI) provided at the end of the data.
Line 310
Specifies data trace as the trace to be displayed.
Lines 320 to 330 Writes “Trc(*)” to the data trace array by first sending a data trace
array write command with “Header$” (header part). Next, “Trc(*)”
(data part) is sent. When the data part is sent, an I/O path (@Binary)
that has been set to send without being formatted is used.
Содержание 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 ...