Tsp Programming; Introduction; Test Script Processor (Tsp); Run-Time Environment - Keithley 2601 Reference Manual

System sourcemeter 2600 series (smu)
Hide thumbs Also See for 2601:
Table of Contents

Advertisement

Series 2600 System SourceMeter® Instruments Reference Manual

Introduction

Conventional instrumentation responds to command messages sent to the instrument. Each
command message contains one or more commands. The instrument executes these commands
in order.
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.
Keithley Instruments' Test Script Processor-based instruments can operate as conventional
instruments by responding to a sequence of command messages sent by a controller. They are
also capable of much more.

Test Script Processor (TSP)

Scripting
Scripting Language
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). We will refer to Lua as
the Test Script Language (TSL). The TSP runs portions of TSL code formally known as chunks.
Most messages sent to the instrument are directly executed by the TSP as TSL chunks. The
simplest messages sent to the instrument would be individual instrument control commands. Even
though these messages are executed as TSL chunks, using them is no different than using a
conventional instrument. The user sends a command message and the instrument executes that
command. When sending individual command messages, it is irrelevant that the TSP is executing
the message as a chunk.
Instrument control commands are implemented as a library within the TSL. The command set for a
TSP-enabled instrument is referred to as the Instrument Control Library (ICL) for that instrument.
Each TSP-enabled instrument will have its own ICL. Although each TSP-enabled instrument runs
the same TSL, different instruments respond to different commands and the ICL for each
instrument may be different.
ICL commands are very similar to the commands sent to a conventional instrument but ICL
commands look like function calls or assignment statements. For example the command to set the
output voltage level to one volt on channel A is
to turn the Channel A output on is
when sent individually as separate messages, are each a TSL chunk.
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 run-time
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
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.
2600S-901-01 Rev. C / January 2008
To orchestrate a sequence of actions.
A programming language used for scripting.
smua.source.output = smua.OUTPUT_ON
x = smua.measure.v()
Return to
Section Topics
smua.source.levelv = 1
instructs the instrument to measure voltage and store the
Section 2: TSP Programming
. Similarly, the command
. These commands,
2-3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

26362602261126122635

Table of Contents