
12-8
Return to
2600AS-901-01 Rev. B / September 2008
Section 12: TSP Fundamentals and Script Management
Series 2600A System SourceMeter® Instruments Reference Manual
User scripts
User scripts can be written using your own program or the Test Script Builder. User scripts are
loaded into the Series 2600A and can be saved in nonvolatile memory. Scripts not saved in
nonvolatile memory will be lost when the Series 2600A is turned off.
Creating a user script
To create a script and load it, the test program (chunk) must be framed by the following shell
commands:
loadscript
or
loadandrunscript
, and
endscript
.
Load only:
The following scripts will load only into the run-time environment of the Series 2600A.
The script on the left is anonymous, while the one on the right is named (where
name
is the user-
defined name):
loadscript
loadscript name
(chunk)
(chunk)
endscript
endscript
Load and run:
The following scripts will load into the run-time environment and then run. Keep in
mind that when a script is run, only the chunk is executed. The script on the left is anonymous,
while the script on the right is named (where
name
is the user-defined name):
loadandrunscript
loadandrunscript
name
(chunk)
(chunk)
endscript
endscript
Details on
loadscript
and
loadandrunscript
are provided as follows:
loadscript
loadscript name
where:
name
is the user-assigned name for the script.
The
loadscript
shell command loads the script into the run-time environment. The script can be
assigned a name or it can be left nameless. If assigning a name that already exists for another
loaded script, the old script will be overwritten with the new script.
If a script is not named when it is loaded into the run-time environment, it will be lost when another
unnamed script is loaded or when the Series 2600A is turned off. After loading the anonymous
script, use the
or
commands to run it.
A special name for a script is
autoexec
. After an autoexec script is saved in
nonvolatile memory, the script will automatically run after the Series 2600A is
powered on and after all other autorun scripts have been executed. For details, see
and
.
loadandrunscript
loadandrunscript name
where:
name
is the user-assigned name for the script.
These commands are similar to the
loadscript
commands except that the script will execute
(run) after it is loaded into the run-time environment. Also, the autorun attribute for the script will be
set to “yes” (see
).