Keithley SourceMeter 2600 Series Reference Manual page 55

Table of Contents

Advertisement

Series 2600 System SourceMeters Reference Manual
Commands do not need to be sent as separate messages. The two commands
from above can be combined into one message, and thereby one chunk, by
concatenating the two commands together with a space separating them. The
resulting chunk would be as follows:
smua.source.levelv = 1 smua.source.output = smua.OUTPUT_ON
Run-time environment
A feature of all scripting environments is the run-time environment. In the TSP, the
runtime environment is simply a collection of global variables. A global variable
can be used to remember a value as long as the unit is powered on and the
variable is not assigned a new value. The command
instructs the instrument to measure voltage and store the result in a global
variable named "x."
A global variable can be removed from the environment by assigning it the nil
value. For example, the command x = nil will remove the global variable x from
the run-time environment. When the unit is turned off, the entire run-time
environment will be lost. Note that SMU non-volatile reading buffers are not lost.
Queries
TSP-enabled instruments do not have inherent query commands. Like any other
scripting environment the print command and other related print commands
are used to generate output. The print command will create one response
message.
An example of generating an output message is the following chunk (two
commands) that takes a measurement and returns its value:
x = smua.measure.v() print(x)
Note that the measurement value is stored in the global variable x between the
two commands.
Scripts
When taking advantage of the TSP to perform more complicated sequences of
commands, especially sequences utilizing advance scripting features such as
looping and branching, sending the entire sequence in one message is very
cumbersome. Two special messages can be used to collect a sequence of
command message together into one chunk.
The
loadscript
collecting all subsequent messages rather than executing them immediately. After
sending the sequence of command messages, the
to instruct the TSP-enabled instrument to compile the test sequence and make it
available to run in a subsequent message. This chunk is called the "active script."
message will instruct the TSP-enabled instrument to begin
Return to
Section 2 topics
TSP Programming Fundamentals 2-3
x = smua.measure.v()
endscript
2600S-901-01 Rev. A / May 2006
message is used

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents