2-38
Return to
2600S-901-01 Rev. C / January 2008
Section 2: TSP Programming
Series 2600 System SourceMeter® Instruments Reference Manual
test1.save(test2)
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 named script that is in the run-time environment can be run using one of the following
commands. Both commands perform the same operation.
myscript()
myscript.run()
where:
myscript
is the user-defined name of the script.
Example:
Assume a script named “test3” has been loaded into the run-time environment. The following
command executes the chunk of the script.
test3()
Running scripts automatically
Scripts can be set to run automatically when the Series 2600 is turned on. One or more scripts can
be set to autorun, and one script can be set to autoexec.
Autorun scripts
When a saved script is set to autorun, it will automatically load and run when the Series 2600 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 following autorun attribute to “yes.” Setting it to “no” disables
autorun.
myscript.autorun
where:
myscript
is the user-defined name of the script.
Make sure to save the script in non-volatile 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 2600 is turned on, the “test5” script will automatically load and run.