Keithley SourceMeter 2600 Series Reference Manual page 56

Table of Contents

Advertisement

2-4
TSP Programming Fundamentals
The active script can be run at any time by sending the command
The active script can be run many times without needing to re-send it. Each time
the
script.run()
Sending a new script using the
instruct the TSP-enabled instrument to replace the active script with the new
script. While creating and using scripts this way is a very powerful feature of
TSP-enabled instruments, only being able to access one script at a time in this
way would be very limited. The
named scripts to store many scripts in the instrument at one time.
Named scripts
The
loadscript
loadscript
replaced with the named script. Instead, a global variable in the run-time
environment is created to store the script. Because the script is stored in a global
variable, the name of the script must be a legal TSL variable name.
The name of the script is specified in the
the name and separating it from the
The message
begin gathering command messages that will be used to create a script named
MyScript
used to indicate the end of the script. Upon receipt of the
the instrument will compile the script. If there are no errors, the script will be made
available as the global variable
the
loadscript MyScript
sent to the instrument, it can be run at any time by sending the
sage. If the name given to the script were different, that name would be used
instead.
If a new script is sent with the same name, it will replace the old one. Sending new
scripts with different names will not remove any previously sent scripts. By using
named scripts, any number of scripts can be made available simultaneously
within the limits of the memory available to the run-time environment.
Named scripts are stored as global variables in the run-time environment. Like all
other global variables, when the unit is powered off, they are lost. There is non-
volatile storage on the instrument that can be used to store downloaded scripts
across power cycles. See
mation.
Functions
As previously explained, named scripts behave just like TSL functions. Executing a
script is just like executing a function with the same name as the script. Scripts, like
2600S-901-01 Rev. A / May 2006
Series 2600 System SourceMeters Reference Manual
command is given, the active script will be executed.
message can also be used to create named scripts. When the
message is used to create a named script, the active script is not
loadscript MyScript
. After sending the command messages, the
message. After a named script has been successfully
"Saving a user
Return to
and
loadscript
endscript
"Named
scripts" topic describes how to use
loadscript
keyword with a space character.
loadscript
will instruct the TSP-enabled instrument to
because that is the name we used in
MyScript
script" later in this section for more infor-
Section 2 topics
script.run()
messages will
message by appending it to
message is still
endscript
message,
endscript
MyScript()
.
mes-

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents