EasyManua.ls Logo

Tektronix KEITHLEY 2600B Series

Tektronix KEITHLEY 2600B Series
834 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
Loading...
Series 2600B System SourceMeter® instrument Reference Manual Section 8: Instrument programming
2600BS-901-01 Rev. F/August 2021 8-77
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, send the following 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()
Figure 104: Create an unnamed script
A script becomes unnamed if you create a new script with the same name. In this circumstance, the
name of the script in the script.user.scripts table is set to an empty string before it is replaced
by the new script.
For example, if beepTwoSec already exists in the script.user.scripts table and you sent:
beepTwoSec1200 = script.new("beeper.enable = 1 beeper.beep(2, 1200)", "beepTwoSec")
The following actions occur:
beepTwoSec1200 is added as a global variable.
The script that was in the runtime environment as beepTwoSec is changed to an unnamed script
(the name attribute is set to an empty string).
The global variable beepTwoSec remains in the runtime environment unchanged (it points to the
now unnamed script).
A new script named beepTwoSec is added to the runtime environment.

Table of Contents

Related product manuals