2600S-901-01 Rev. C / January 2008 Return to Section Topics 2-7
Series 2600 System SourceMeter® Instruments Reference Manual Section 2: TSP Programming
Figure 2-1
Script example
loadscript test
display.clear()
display.settext(This is a test)
print(This is a test)
endscript
Chunk
Shell Command
Name of Script
Shell Command
A script is loaded into the Series 2600 System SourceMeter where it can be run. Running a script
at the SourceMeter is faster than running a test program from the PC. The piecemeal transmission
process from PC to SourceMeter is eliminated by the use of a script.
Program statements control script execution and provide facilities such as variables, functions,
branching, and loop control. Because scripts are programs, they are written using a programming
language. This language is called the Test Script Language or TSL. TSL is derived from the Lua
scripting language. For details, see “
Test Script Language (TSL) reference” later in this section.
There are two types of scripts: Factory scripts and user scripts. A factory script was created by
Keithley Instruments at the factory and stored in non-volatile memory of the Series System 2600
SourceMeter. Factory scripts cannot be removed from non-volatile memory. A user script is
created using your own program or the Test Script Builder Integrated Development Environment
(IDE), which is a supplied software tool (see “
Using Test Script Builder” later in this section). User
scripts are loaded into the Series 2600 System SourceMeter run-time environment where they can
be run and/or saved to non-volatile memory.
Run-time environment
The run-time environment is a collection of global variables (scripts) the user has created. After
scripts are placed into the run-time environment, they are then ready to be run and/or managed.
Scripts are placed in the run-time environment as follows:
• Scripts saved in “Non-volatile memory” of the Series 2600 are automatically recalled into
the run-time environment when the instrument is turned on
• Named scripts created and loaded by the user are also placed in the run-time environment
• An anonymous script created and loaded by the user is also placed in the run-time
environment. Keep in mind that only one anonymous script, referred to as the active-script,
can be in the run-time environment. If another anonymous script is created and loaded, it
will replace the old anonymous script in the run-time environment
Non-volatile memory
After a new or modified user script is loaded into the Series 2600, it resides in the run-time
environment and will be lost when the unit is turned off. To save a script after power-down, the
script must be saved in the non-volatile memory. When the Series 2600 is turned back on, all
saved scripts will load into the “
Run-time environment.”
Do not confuse the run-time environment with the non-volatile memory of the Series 2600. Making
changes to a script in the run-time environment does not affect the stored version of that script.
After making changes, saving the script will overwrite the old version of the script in non-volatile
memory.