Agilent Technologies E5071C User's Guide Page 136

  • Download
  • Add to my manuals
  • Print
  • Page
    / 551
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 135
136 Chapter 9
Saving and Recalling (File Management)
Saving and Recalling File
Sample program
Example 9-1 shows a sample program that demonstrates how to save a file.You can find
the source file of this program, named file_sav.bas, on the sample program disk.
This program saves selected content on a file with a specified name.
The program is described in detail below:
Line 40 Assigns a GPIB address to the I/O pass.
Line 60 Allows the user to return to the entry start line and re-enter the data if
an error (such as an invalid entry) occurs while entering the number
that identifies the content to be saved.
Lines 80 to 180 These lines display the list of options for content to be saved, and
prompt the user to choose one of the items by typing in the appropriate
number.
Line 190 Converts the entered value into an integer and stores it into the Content
variable.
Line 200 Returns to the entry start line if an invalid value is contained in
Content.
Line 230 Passes control to a subprogram named Inp_file_name, which lets the
user input a file name for saving, and then stores the returned file name
into the File$ variable.
Lines 270 to 280 If Content is equal to 1, these lines set the content to be saved as the
instrument status to “instrument status only”, and store the state with
the file name which is combined the File$ variable with the extension
“.sta”.
Lines 300 to 310 If Content is equal to 2, these lines set the content to be saved as the
instrument status to “instrument status and calibration coefficient”,
and store the state with the file name which is combined the File$
variable with the extension “.sta”.
Lines 330 to 340 If Content is equal to 3, these lines set the content to be saved as the
instrument status to “instrument status and measurement data”, and
store the state with the file name which is combined the File$ variable
with the extension “.sta”.
Lines 360 to 370 If Content is equal to 4, these lines set the content to be saved as the
instrument status to “instrument status, calibration coefficient, and
measurement data”, and store the state with the file name which is
combined the File$ variable with the extension “.sta”.
Line 390 If Content is equal to 5, and store the state with the file name which is
combined the File$ variable with the extension “.csv”.
Line 410 If Content is equal to 6, and store the image data of the LCD screen
with the file name which is combined the File$ variable with the
extension “.bmp”.
Page view 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 550 551

Comments to this Manuals

Vikiehs 04 Jan 2024 | 14:20:06

urenrjrjkvnm