![Tektronix Keithley SourceMeter 2470 Reference Manual Download Page 594](http://html1.mh-extra.com/html/tektronix/keithley-sourcemeter-2470/keithley-sourcemeter-2470_reference-manual_1078034594.webp)
Section 13: Introduction to TSP commands
2470 High Voltage SourceMeter Instrument Reference Manual
13-8
2470-901-01 Rev. A /
May
2019
To save the script to nonvolatile memory, send the command:
testInfo.save()
To load a script by sending commands:
1.
Send the command
loadscript
scriptName
, where
scriptName
is the name of the script.
The name must be a legal Lua variable name.
2.
Send the commands that need to be included in the script.
3.
Send the command
endscript
.
4.
You can now run the script. Send the script name followed by
()
. For more information, see
Running scripts using a remote interface
(on page 13-8).
Running scripts using the front-panel interface
To run a script from the front-panel interface:
1.
Press the
MENU
key.
2.
Under Scripts, select
Run
. The RUN SCRIPTS window is displayed.
3.
From the Available Scripts list, select the script you want to run.
4.
Select
Run Selected
.
Running scripts using a remote interface
You can run any script using
scriptVar
.run()
. Replace
scriptVar
with the name of a script that
is in nonvolatile or run-time memory.
Saving a script to nonvolatile memory
You can save scripts to nonvolatile memory. To keep a script through a power cycle, you must save
the script to nonvolatile memory.
To save a script to nonvolatile memory:
1.
Create and load a script (see
(on page 13-5)).
2.
Send the command
scriptVar
.save()
, where
scriptVar
is the name of the script.
Example: Save a user script to nonvolatile memory
test1.save()
Assume a script named
test1
has been loaded.
test1
is saved into
nonvolatile memory.