![Keithley 707B Скачать руководство пользователя страница 201](http://html.mh-extra.com/html/keithley/707b/707b_reference-manual_661685201.webp)
Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-10
707B-901-01 Rev. A / August 2010
Example: Save a user script
Code Notes
test1.save()
Assume a script named "test1" has been
created and loaded.
test1
is saved into
nonvolatile memory.
Retrieve a user script
You can retrieve the source code of a user script that is stored in nonvolatile memory.
There are several ways to retrieve the source code for the user script:
•
Line by line: Use
scriptVar.list()
to retrieve the source code line by line.
•
Entire script: Use the
print(scriptVar.source)
command to retrieve the script source code
as a single string.
•
Use TSB Embedded.
After retrieving a script, see
(on page 6-4) for information on re-creating the
script and loading it back into the instrument.
NOTE
To get a list of scripts that are in nonvolatile memory, see
(on page 7-163).
Retrieve source code line by line
To retrieve the source code line by line, use the
scriptVar.list()
command. The source code for
this method includes the
loadscript
or
loadandrunscript
and
endscript
keywords.
After retrieving the source code, you can modify and save the command lines as a user script under
the same name or a new name.
To retrieve the source code of a script line by line, send the command:
scriptVar.list()
where
scriptVar
is the name of the script.
NOTE
To retrieve the commands in the anonymous script, use
script.anonymous.list()
.
Example
Code Notes
test7.list()
Retrieve the source of a script named "test7".