
Chapter 8
115
Saving/Recalling a Measurement Result/Measurement Setup
Sample Program for Save/Recall
1. Ch
apter
T
itle
2.
Ch
ap
te
r
T
itl
e
4
. Chap
te
r T
itle
5. Chpter
T
itle
8.
Sa
vin
g
/R
ec
allin
g
a
Me
asur
eme
n
t Re
su
lt/
Me
asur
eme
n
t Se
t
u
p
Sample Program for Save/Recall
Example 8-1 shows a sample program to save a file. This program is stored on the sample
program disk as the file_sav.bas file.
This program sets the save destination mass storage to the flash disk and saves data the user
specified using a user specified filename.
Lines 40 to 80
Identifies the external controller and Instrument BASIC and sets the
GPIB address.
Line 100
Sets the mass storage to the flash disk.
Line 110
Uses the Inp_file_name subprogram to obtain a user-entered save
filename and stores it in the File$ variable.
Line 130
Allows the user to return to the entry start line and enter the data again,
if an error occurs when selecting the contents of a file due to, for
example, a typing error.
Lines 150 to 200 Displays the list of save items (and file formats) and prompts the user
to enter the desired number (1 to 4).
Line 210
Converts the entered value to an integer and substitutes it into the
Content variable.
Line 220
If the value of Content is not an integer between 1 and 4, returns to the
entry start line.
Lines 250 to 500 Depending on the value of Content, substitutes the extension and the
save command name into the Extension$ variable and the Command$
variable, respectively. If the value of Content is 2 or 3, uses the
Select_array subprogram to select the saved internal data array.
Line 530
Clears the error queue.
Line 540
Creates a program message to execute the save from the Command$
and File$ variables and sends it to the 4294A.
Lines 550 to 560 Checks for the occurrence of an error.
Lines 580 to 600 If an error of the -257 error number has occurred (error when a
filename has a problem, for example, when a file having the same
name exists), prompts the user to select from “Change File Name”,
“Purge File”, or “End.”
Lines 610 to 630 If “Change File Name” is selected, uses the Inp_file_name
subprogram again to obtain the user-entered save filename, and returns
to the save start line.
Lines 650 to 670 If “Purge File” is selected, deletes the existing file having the same
filename, and returns to the save start line.
Line 690
Displays the “Save Not Complete” message.
Lines 710 to 720 If an error of the -257 error number has not occurred, displays the
“Save Complete” message and the save filename.
The Inp_file_name subprogram in lines 790 to 910, used to enter a save filename, is
described below.
Содержание 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 ...