Script.new() - Keithley 3700A Series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700A Series:
Table of Contents

Advertisement

Section 11: TSP command reference
Script naming:
If the name parameter is an empty string, or name is absent (or nil) and the script name cannot
be extracted from the file, scriptVar is the only handle to the created script.
If name is given (and not nil), any script name embedded in the file is ignored.
If name conflicts with the name of an existing script in the script.user.scripts table, the
existing script's name attribute is set to an empty string before it is replaced in the
script.user.scripts table by the new script.
If name is absent or nil, the command attempts to extract the name of the script from the file.
Any conflict between the extracted name and that of an existing script in the scripts table
generates an error. If the script name cannot be extracted, the created script's name attribute is
initialized to the empty string, and must be set to a valid nonempty string before saving the script
to nonvolatile memory.
Example
myTest8 =
script.load("/usb1/filename.tsp",
"myTest8")
Also see

script.new()

(on page 11-344)
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 is used, and the script is 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 is not available from the front panel.
You must save the new script into nonvolatile memory to keep it when the instrument is turned off.
11-344
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
Series 3700A System Switch/Multimeter Reference Manual
Loads the script myTest8 from the USB
flash drive.
Where saved
Default value
3700AS-901-01 Rev. D/June 2018

Advertisement

Table of Contents
loading

Table of Contents