Series 3700 System Switch/Multimeter Reference Manual
Section 2
:
TSP Programming Fundamentals
Document Number: 3700S-901-01 Rev. A / August 2007
2-5
format.asciiprecision = 10
format.data = format.ASCII
Scripted chunk
In a script environment, the chunk is the entire listing of test programming code. If the two
statements in the above example were created as a script, then those two lines of code would
be assembled as one chunk. The instrument internally constructs a chunk out of a series of
messages sent between
loadscript
and
endscript
. Also see the topic
Script defined
(on
page 2-5).
Script defined
The Series 3700 utilizes a Test Script Processor (TSP) to process and run individual chunks or
scripts. A script is a collection of instrument control commands and programming statements.
The
TSP script example
shows an example of how to create and load a script named ―test".
When this script is run, the message ―This is a test‖ will be displayed on the Series 3700 and
sent to the computer.
As shown, a script consists of a chunk of programming code framed by shell commands. The
first shell command in the
TSP script example
loads the script named "test". The last shell
command marks the end of the script. The chunk in the
TSP script example
consists of three
lines of code. When the chunk is executed, the test messages are sent and displayed. The
following command executes the chunk
test()
.
NOTE
It is common practice to say that a script is run. In actuality, it is the chunk in the script
that is being run (executed).
Figure 2-1: TSP test script example
A script is loaded into the Series 3700, where it can be run. Running a script using this method
is faster than running a test program from the control computer because it eliminates the
piecemeal transmission process from the control computer.
A user script is created using your own program or the Test Script Builder Integrated
Development Environment (IDE), which is a supplied software tool (see
Using Test Script
Builder
(on page 2-10)). The user script is loaded into the Series 3700 and can be saved in
nonvolatile memory. These are the scripts referenced as a user script throughout the manual.