2470 High Voltage SourceMeter Instrument Reference Manual
Section 13: Introduction to TSP commands
2470-901-01 Rev. A /
May
2019
13-5
Run-time and nonvolatile memory storage of scripts
Scripts are loaded into the run-time environment of the instrument. From there, they can be stored in
nonvolatile memory in the instrument.
The run-time environment is a collection of global variables, which include scripts, that the user has
defined. A global variable can be used to store a value while the instrument is turned on. When you
create a script, the instrument creates a global variable with the same name so that you can
reference the script more conveniently. After scripts are loaded into the run-time environment, you
can run and manage them from the front panel of the instrument or from a computer. Information in
the run-time environment is lost when the instrument is turned off.
Nonvolatile memory is where information is stored even when the instrument is turned off. Save
scripts to nonvolatile memory to save them even if the power is cycled. The scripts that are in
nonvolatile memory are loaded into the run-time environment when the instrument is turned on.
Scripts are placed in the run-time environment at the following times:
•
When they are run.
•
When they are loaded over a remote command interface.
•
When the instrument is turned on (if they are stored in nonvolatile memory).
For detail on the amount of available memory, see Memory considerations for the run-time
environment.
If you make changes to a script in the run-time environment, the changes are lost when the
instrument is turned off. To save the changes, you must save them to nonvolatile memory. See
Saving a script to nonvolatile memory
(on page 13-8).
What can be included in scripts?
Scripts can include combinations of Test Script Processor (TSP
®
) commands and Lua code. TSP
commands instruct the instrument to do one thing and are described in the command reference (see
(on page 14-8)). Lua is a scripting language that is described in
(on page 13-12).
Working with scripts
This section describes the basics of working with scripts.
You can create and manage scripts from the front panel or over a remote interface. Scripts can be
saved in the instrument, on a computer, or on a USB flash drive.