Keithley 708B Reference Manual page 231

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Section 6: Instrument programming
Unnamed scripts are also created if you create a new script with the name attribute of a script that is
already in the script.user.scripts table. In this case, 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 global variable beepTwoSec remains in the runtime environment unchanged (it points to the
now unnamed script).
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).
A new script named beepTwoSec is added to the runtime environment.
In this example, you can access the new script by sending either of the following commands:
beepTwoSec1200()
script.user.scripts.beepTwoSec()
To access the unnamed script, you can send the command:
beepTwoSec()
Global variables
name
beepTwoSec
beepTwoSec1200
script.user.scripts table
beepTwoSec
Note that the script.user.scripts table
entry referencing beepTwoSec was
removed and a new entry for
beepTwoSec has been added
6-40
Figure 83: Change a named script with an unnamed script
value
pointer to an unnamed
script
pointer to script named
beepTwoSec
pointer to script named
beepTwoSec
Models 707B and 708B Switching Matrix Reference Manual
Scripts in the runtime environment
script name
beeper.enable = 1
source
beeper.beep(2, 2400)
Autorun
No
script name
beepTwoSec
beeper.enable = 1
source
beeper.beep(2, 1200)
Autorun
No
707B-901-01 Rev. A / August 2010

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents