Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-42
707B-901-01 Rev. B / January 2015
Restore a script to the run-time environment
You can retrieve a script that was removed from the run-time environment but is still saved in
nonvolatile memory.
To restore a script from nonvolatile memory into the run-time environment, you can use
script.restore("
scriptName
")
, where
scriptName
is the user-defined name of the script to
be restored.
For example, to restore a user script named
"test9"
from nonvolatile memory:
script.restore("test9")
Memory considerations for the run-time environment
The run-time environment has a fixed amount of memory for storing user scripts and other run-time
information.
You can check the amount of memory in the instrument using the
memory.used()
and
memory.available()
functions. These functions return the percentage of memory that is used or
available. When you send this command, memory used or available is returned as a comma-
delimited string with percentages for used memory.
The format is
systemMemory, scriptMemory, patternMemory
, where:
•
systemMemory
: The percentage of memory used or available in the instrument
•
scriptMemory
: The percentage of memory used or available in the instrument to store user
scripts
•
patternMemory
: The percentage of memory used or available in the instrument to store
channel patterns
For example, if you send the command:
MemUsed = memory.used()
print(MemUsed)
You will get back a value such as
69.14, 0.16, 12.74
, where
69.14
is the percentage of
memory used in the instrument,
0.16
is the percentage used for script storage, and
12.74
is the
percentage used for channel pattern storage.
See
(on page 7-130) for more detail on
using these functions.
Some suggestions for increasing the available memory:
•
Turn the instrument off and on. This deletes scripts that have not been saved and reloads only scripts
that have been stored in nonvolatile memory.
•
Remove unneeded scripts from nonvolatile memory. Scripts are loaded from nonvolatile memory into
the run-time environment when the instrument is turned on. See
Delete user scripts from the instrument
(on page 6-41).
•
Reduce the number of TSP-Link
®
nodes.
•
Delete unneeded channel patterns (this affects only pattern memory, not instrument memory). See
(on page 2-92).