Programming Overview; What Is A Chunk; What Is A Script - Keithley 2601 Reference Manual

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

Advertisement

Section 2: TSP Programming

Programming overview

What is a chunk?

A chunk is a single programming statement or a sequence of statements that are executed
sequentially. There are non-scripted chunks and scripted chunks.
Single statement chunk – The following programming statement is a chunk:
print ("This is a chunk")
When the above chunk is executed, it returns the following string:
This is a chunk
Multiple statement chunk – A chunk can also contain multiple statements. Each statement in the
line of code is to be separated by whitespace. The following chunk contains two statements:
print ("This is a chunk") print ("that has two statements")
When the above chunk is executed, the two statements are executed sequentially and the
following strings are returned:
This is a chunk
that has two statements
Multiple chunks – The following two lines of code are two chunks. The first chunk sets the source
level of SMU A to 1V and the second chunk turns the output on.
smua.source.levelv = 1
smua.source.output = smua.OUTPUT_ON
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 considered one chunk. See the topic below,

What is a script?

The Series 2600 utilizes a Test Script Processor (TSP) to process and run individual chunks or
programs called "scripts". A script is a collection of instrument control commands and
programming statements.
named "test." When this script is run, the message "This is a test" will be displayed on the Series
2600 and sent to the PC.
As shown, a script is made up of a chunk of programming code that is framed by shell commands.
The first shell command in
the end of the script.
The chunk in
messages will be sent and displayed. The following command executes the chunk:
2-6
Figure 2-1
shows an example of how to create (and load) a script
Figure 2-1
Figure 2-1
consists of three lines of code. When the chunk is executed, the test
Return to
Section Topics
Series 2600 System SourceMeter® Instruments Reference Manual
"What is a
loads the script named "test." The last shell command marks
script?"
test()
2600S-901-01 Rev. C / January 2008

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

26362602261126122635

Table of Contents