Keithley 2651A Reference Manual page 285

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
For example, to set up a two-second beep, you could send the command:
beepTwoSec = script.new("beeper.enable = 1 beeper.beep(2, 2400)", "beepTwoSec")
To run the new script, send the command:
beepTwoSec()
When you add beepTwoSec, the global variable and script.user.script table entries are made
to the runtime environment as shown in the following figure.
Global variables
name
beepTwoSec
script.user.scripts table
beepTwoSec
Create an unnamed script using script.new()
Unnamed scripts are not available from the front panel display of the instrument. Only the anonymous
script and named scripts are available from the front panel display.
When you create a script using script.new(), if you do not include name, the script is added to the
runtime environment as an unnamed script. The script.new() function returns the script. You can
assign it to a global variable, a local variable, or ignore the return value. A global variable is not
automatically created.
For example, if you sent the command:
hello = script.new('display.clear() display.settext("hello")')
A script is created in the runtime environment and a global variable is created that references the
script.
To run the script, send the command:
hello()
2651A-901-01 Rev. A / March 2011
Figure 85: Runtime environment after creating a script
value
reference to script
named beepTwoSec
reference to script named
beepTwoSec
Scripts in the runtime environment
script name
beepTwoSec
beeper.enable = 1
source
beeper.beep(2, 2400)
Autorun
No
NOTE
Section 6: Instrument programming
6-41

Advertisement

Table of Contents
loading

Table of Contents