EasyManuals Logo

Keithley 2600B User Manual

Keithley 2600B
897 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #517 background imageLoading...
Page #517 background image
Section
7: TSP command reference Series 2600B System SourceMeter® Instrument
Reference Manual
7-178 2600BS-901-01 Rev. C / August 2016
script.new()
This function creates a script.
Type TSP-Link accessible
Affected by Where saved Default value
Function
No
Usage
scriptVar = script.new(code)
scriptVar = script.new(code, name)
scriptVar
The name of the variable that will reference the script
code
A string containing the body of the script
name
The name of the script
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 (on page 6-39)
Global variables and the script.user.scripts table (on page 6-37)
Named scripts (on page 6-4)
scriptVar.save() (on page 7-186)
script.newautorun() (on page 7-179)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 2600B and is the answer not in the manual?

Keithley 2600B Specifications

General IconGeneral
BrandKeithley
Model2600B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals