User manual

Section 2: TSP Programming Fundamentals Series 3700 System Switch/Multimeter Reference Manual
2-20 3700S-901-01 Rev. C / July 2008
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
3700. The script on the left is unnamed (anonymous script), 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.
Remember that when a script is run, only the chunk is executed. The script on
the left is unnamed (anonymous script), while the one on the right is named
(where name is the user-defined name):
loadandrunscript
loadandrunscript name
(chunk)
(chunk)
endscript
endscript
Details about 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 you are
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 nameless script (anonymous script) is loaded or when the
Series 3700 is turned off. After loading the unnamed script (anonymous), use
the run(), script.run(), script.anonymous(), or
script.anonymous.run() commands to run it.