Section 6: Instrument programming
Model 2651A High Power System SourceMeter® Instrument Reference Manual
6-40
2651A-901-01 Rev. A / March 2011
Figure 84: Global variables and scripts in the runtime environment
X
5
name
value
beepDisable
reference to script
named beepDisable
script.user.scripts table
beepTwoSec
reference to script named
beepT
woSec
1
Y
hello
Global variables
Scripts in the runtime environment
display.clear()
display.settext("This is
anonymous")
print("This is anonymous")
script name
source
Autorun
No
anonymous script
beepDisable
reference to script
named beepDisabled
beepTwoSec
reference to script
named beepTwoSec
No
Autorun
beeper.enable = 1
beeper.beep(2, 2400)
script name
source
beepTwoSec
Yes
Autorun
beeper.enable = 0
script name
source
beepDisable
No
Autorun
script name
source
display.clear()
display.settext("hello")
reference to unnamed
script. There is no
script.user.scripts table
entry for the unnamed
script
Create a script using the script.new() command
Use the
script.new()
function to copy an existing script from the local node to a remote node. This
enables parallel script execution.
You can create a script with the
script.new()
function using the command:
scriptVar
= script.new(
code, name
)
Where:
scriptVar
= Name of the variable created when the script is loaded into the runtime environment
code
= Content of the script
name
= Name that is added to the
script.user.scripts
table