Model 2461 Interactive SourceMeter® Instrument Reference Manual
Section 7: Introduction to TSP operation
2461-901-01 A/November 2015
7-11
Common commands that cannot be used in scripts are shown in the following table with equivalent
commands that can be used.
Unavailable commands with TSP equivalents
Common commands
TSP equivalent commands
*CLS
eventlog.clear() status.clear()
*ESE
status.standard.enable
*ESE?
print(status.standard.enable)
*ESR?
print(status.standard.event)
*IDN?
print(localnode.model)
print(localnode.serialno)
print(localnode.version)
*LANG
No equivalent
*LANG?
No equivalent
*OPC
opc()
*OPC?
waitcomplete() print([[1]])
*RST
reset()
*SRE
status.request_enable
*SRE?
print(status.request_enable)
*STB?
print(status.condition)
*TRG
No equivalent
*TST?
print([[0]])
*WAI
waitcomplete()
Fundamentals of programming for TSP
To conduct a test, a computer (controller) is programmed to send sequences of commands to an
instrument. The controller orchestrates the actions of the instrumentation. The controller is typically
programmed to request measurement results from the instrumentation and make test sequence
decisions based on those measurements.
To take advantage of the advanced features of the instrument, you can add programming commands
to your scripts. Programming commands control script execution and provide tools such as variables,
functions, branching, and loop control.
The Test Script Processor (TSP
®
) scripting engine is a Lua interpreter. In TSP-enabled instruments,
the Lua programming language has been extended with Keithley-specific instrument control
commands.
What is Lua?
Lua is a programming language that can be used with TSP-enabled instruments. Lua is an efficient
language with simple syntax that is easy to learn.
Lua is also a scripting language, which means that scripts are compiled and run when they are sent
to the instrument. You do not compile them before sending them to the instrument.