Conventional instrumentation responds to command messages sent to the instrument. Each
command message contains one or more commands that the instrument executes in order. To
conduct a test, a computer controller is programmed to send a sequence of commands to an
instrument. The controller orchestrates the actions of the instrumentation. Typically, the
controller is programmed to request measurement results from the instrumentation and make
test sequence decisions based on those measurements.
In addition to operating as conventional instruments, Keithley Instruments‘ Test Script Processor
(TSP) based instruments are capable of much more.
In this section:
Test Script Processor (TSP) ............................................................................ 2-1
Run-time environment ..................................................................................... 2-2
Queries ........................................................................................................... 2-2
Scripts ............................................................................................................ 2-3
Named scripts ................................................................................................. 2-3
Programming overview .................................................................................... 2-4
Installing the TSP software .............................................................................. 2-7
System connections ........................................................................................ 2-8
Using Test Script Builder ................................................................................. 2-10
Sending commands and statements ................................................................ 2-12
Measure voltage ............................................................................................. 2-12
User scripts..................................................................................................... 2-13
Differences: Remote vs. local state .................................................................. 2-22
Test script language (TSL) reference ............................................................... 2-23
Test Script Processor (TSP)
The Test Script Processor (TSP) is a scripting engine that runs inside the instrument. It is
capable of running code written in a scripting language called Lua (www.lua.org). This makes
the instrument fully capable of interpreting and executing code in a way that is similar to Visual
Basic (VB) or Java, rather than only responding to single-line commands. Program statements
control script execution and provide facilities such as variables, functions, branching, and loop
control.
Because scripts are programs, they are written using a programming language. This language is
called the test script language or TSL. TSL is derived from the Lua scripting language. For
details, see Test Script Language (TSL) reference.
NOTE
Scripting:
To orchestrate a sequence of actions.
Scripting language
: A programming language used for scripting.
Section 2
TSP Programming Fundamentals