Creating A User Script - Keithley 2601 Reference Manual

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

Advertisement

Section 2: TSP Programming
Table 2-3
Example interactive chunk fragment for a script
Script Chunk Fragment (Test Script Builder or User's Program)
--Prompt operator to select channel:
chan = display.menu ("Select Channel", "smua smub")
if (chan == "smua") then
chan = smua
end
if (chan == "smub") then
chan = smub
end
--Prompt operator to select (input) the source function:
func = display.menu("Select Function", "amps volts")
if (func == "amps") then
chan.source.func = chan.OUTPUT_DCAMPS
else chan.source.func = chan.OUTPUT_DCVOLTS
end
--Prompt operator to set (input) source level:
if (func == "amps") then
level = display.prompt("0.0E+00"," mA", "Enter I level",
else
level = display.prompt("00.0", " V", "Enter V level",
end
--Wait for operator to set source level:
if (func == "amps") then
chan.source.leveli = level
else chan.source.levelv = level
end

Creating a user script

To create a script and load it, the test program (chunk) must be framed by the following shell
commands:
Load only – The following scripts will load only into the run-time environment of the Series 2600.
The script on the left is anonymous, while the one on the right is named (where
defined name):
loadscript
(chunk)
endscript
Load and run – The following scripts will load into the run-time environment and then run. Keep in
mind that when a script is run, only the chunk is executed. The script on the left is anonymous,
while the script on the right is named (where
loadandrunscript
(chunk)
endscript
2-36
1E-
3, 0.5E-3, 5E-3)
1,
0.1, 10)
or
loadscript
loadandrunscript
loadscript name
(chunk)
endscript
loadandrunscript name
(chunk)
endscript
Return to
Series 2600 System SourceMeter® Instruments Reference Manual
, and
endscript
is the user-defined name):
name
Section Topics
.
is the user-
name
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