
12-14
Return to
2600AS-901-01 Rev. B / September 2008
Section 12: TSP Fundamentals and Script Management
Series 2600A System SourceMeter® Instruments Reference Manual
Running a user script
Running the anonymous script
There can only be one anonymous script in the run-time environment. If another anonymous script
is created and loaded, the previous anonymous script will be removed from the run-time
environment. Use one of the following commands to execute the chunk of the last loaded
anonymous script. Both commands perform the same operation.
run()
script.run()
Running a named script
Any variable that references a script in the run-time environment can be used to run the script
using one of the following commands. Both commands perform the same operation.
myscript()
myscript.run()
Where:
myscript
is the variable that references the script. NOTE: The global variable will
normally be the same as the name of the script unless the script has been renamed.
Running scripts automatically
Scripts can be set to run automatically when the Series 2600A is turned on. One or more scripts
can be set to autorun.
Autorun scripts
When a saved script is set to autorun, it will automatically load and run when the Series 2600A is
turned on. Any number of scripts can be set for autorun. The run order for these scripts is arbitrary,
so make sure the run order is not important.
To set a script for autorun, set the
autorun
attribute to
“yes”
. Setting it to
“no”
disables
autorun.
myscript.autorun = “yes”
where:
myscript
is the user-defined name of the script.
Make sure to save the script in nonvolatile memory after setting the
autorun
attribute.
Example:
Assume a script named
“test5”
is in the run-time environment. The script can be set to autorun
as follows:
test5.autorun = “yes”
test5.save()
The next time the Series 2600A is turned on, the
“test5”
script will automatically load and run.
NOTE The
loadandrunscript
name
command sets the
autorun
attribute for that script to “
yes
”. To cancel autorun, set the
autorun
attribute to “
no
” and save the script.
Autoexec script
One script can be designated as the autoexec script. When the Series 2600A is turned on, the
autoexec script will start after all the autorun scripts have run.