Section 7: Command reference
Model 2651A High Power System SourceMeter® Instrument Reference Manual
7-156
2651A-901-01 Rev. A / March 2011
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: Create new script
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: Create new autoexec script
autoexec = script.new(
"display.clear() display.settext('Hello from autoexec')", 'autoexec')
Creates a new 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
(on page 6-39)
(on page 6-4)
(on page 7-162)
(on page 7-157)