Script.new() - Keithley 2601B Reference Manual

2600b series system sourcemeter instrument
Hide thumbs Also See for 2601B:
Table of Contents

Advertisement

Series 2600B System SourceMeter® Instrument Reference Manual

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 given, an
empty string will be used, and the script will be unnamed. If the name already exists in script.user.scripts,
the existing script's name attribute 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 will not be available from the instrument 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".
Also see
Create a script using the script.new() command
Global variables and the script.user.scripts table
Named scripts
scriptVar.save()
script.newautorun()
2600BS-901-01 Rev. B / May 2013
Affected by
The name of the variable that will reference the script
A string containing the body of the script
The name of the script
(on page 6-4)
(on page 7-172)
(on page 7-166)
Where saved
Default value
(on page 6-40)
(on page 6-38)
Section 7: TSP command reference
7-165

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents