
2600AS-901-01 Rev. B / September 2008
Return to
12-15
Series 2600A System SourceMeter® Instruments Reference Manual
Section 12: TSP Fundamentals and Script Management
loadscript autoexec
loadandrunscript autoexec
An autoexec script can be formed by creating a new script and naming it
autoexec
(as shown
above using
loadscript
or
loadandrunscript
). After loading the new script, send the
autoexec.save()
command to save it in nonvolatile memory. See
(described earlier in this section) for details on creating a script.
An autoexec script can also be created by changing the name of an existing script that is saved in
nonvolatile memory by using the following commands:
myscript.name = “autoexec”
myscript.save()
Where:
myscript
is the user-defined name of the script.
Example:
Assume a script named “test6” is loaded on the instrument. That script can be made into an
autoexec script as follows:
test6.name = “autoexec”
test6.save()
The next time the Series 2600A is turned on, the “test6” script (which is now the
autoexec
script)
will automatically load and start after all of the autorun scripts have run.
NOTE When the script is loaded at power-up, it will be called “
autoexec
”
instead of “
test 6
.”
Running a user script from the Series 2600A front panel controls
In order to run a user script from the front panel, an entry for the script needs to be added to the
User menu for the LOAD key. The following commands are used to enter or delete a name into the
User menu:
display.loadmenu.add(displayname, script)
display.loadmenu.delete(displayname)
Where:
displayname
is the name to be added to (or deleted from) the User menu and
script
is
a string with the code that will be associated with the
displayname
.
It does not matter what order the items are added to the User menu. Menu items will be displayed
in alphabetical order when the menu is selected.
Example:
Assume a user script named “Test9” has been loaded into the run-time environment. Add the
name (“Test9”) to the User menu for the script as follows:
display.loadmenu.add(“Test9”, “Test9()”)
After adding a name to the User menu, the script can then be run from the front panel as follows:
1.
Press
the
LOAD
key.
2.
Select
USER
.
3. Select the user script to run and press the
RUN
key.
Modifying a user script
A user script stored in nonvolatile memory can be modified by retrieving the script listing for the
script. The retrieved script can then be modified, loaded, and saved in nonvolatile memory.