Tektronix KEITHLEY SourceMeter 2606B Reference Manual page 553

Table of Contents

Advertisement

Section 15: TSP command reference
Example
myTest8 =
script.load("/usb1/filename.tsp",
"myTest8")
Also see
script.new()
(on page 15-180)
script.new()
This function creates a script.
Type
TSP-Link accessible
Function
No
Usage
scriptVar = script.new("code")
scriptVar = script.new("code", "name")
scriptVar
code
name
Details
The name parameter is the name that is added to the script.user.scripts table. If name is not
provided, an empty string is used, and the script is unnamed. If the name already exists in
script.user.scripts, the name attribute of the existing script is set to an empty string before it is
replaced by the new script.
Note that name is the value that is used for the instrument front panel display. If this value is not
defined, the script is not available from the virtual front panel.
You must save the new script into nonvolatile memory to keep it when the instrument is turned off.
Example 1
myTest8 = script.new(
"display.clear() display.settext('Hello from myTest8')", "myTest8")
myTest8()
Creates a new script referenced by the variable myTest8 with the name myTest8.
Runs the script. The instrument displays Hello from myTest8.
Example 2
autoexec = script.new(
"display.clear() display.settext('Hello from autoexec')", 'autoexec')
Creates a new autoexec script that clears the display when the instrument is turned on and displays Hello
from autoexec.
15-180
Model 2606B System SourceMeter® Instrument Reference Manual
Affected by
Where saved
The name of the variable that references the script
A string containing the body of the script
The name of the script
Loads the script myTest8 from the USB
flash drive.
Default value
2606B-901-01 Rev. C November 2021

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?

Table of Contents