Series 2600 System SourceMeters Reference Manual TSP Programming Fundamentals 2-3
Return to
2600S-901-01 Rev. A / May 2006
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
x = smua.measure.v()
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
command and other related
commands
are used to generate output. The
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
message will instruct the TSP-enabled instrument to begin
collecting all subsequent messages rather than executing them immediately. After
sending the sequence of command messages, the
endscript
message is used
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.”
Summary of Contents for SourceMeter 2600 Series
Page 575: ...AppendixF DisplayCharacterCodes Appendix F topics Introduction page F 2...
Page 592: ......
Page 593: ......