Series 3700A System Switch/Multimeter Reference Manual Section 10: Instrument programming
3700AS-901-01 Rev. D/June 2018 10-7
The scriptVar.save() command saves the script to nonvolatile memory, which makes the
change persistent through a power cycle. See Save a user script to nonvolatile memory (on page 10-
10) for more detail.
Example: Set a script to run automatically
test5.autorun = "yes"
test5.save()
Assume a script named test5 is in the
run-time environment.
The next time the instrument is turned on,
test5 script automatically loads and
runs.
Autoexec script
The autoexec script runs automatically when the instrument is turned on. It runs after all the scripts
have loaded and any scripts defined as autorun have run.
To create a script that executes automatically, create and load a new script and name it autoexec.
See Create and load a script (on page 10-3).
You must save the autoexec script to nonvolatile memory if you want to use it after instrument
power has been turned off and then turned on again. See Save a user script to nonvolatile memory
(on page 10-10) for more detail.
Example: Creating an autoexec script with loadscript command
loadscript autoexec
display.clear()
display.settext("Hello from autoexec")
endscript
autoexec.save()
Creates the script autoexec.
Saves the autoexec script to nonvolatile
memory. The next time the instrument is
turned on, "Hello from autoexec" is
displayed.
Example: Creating an autoexec script using TSB Embedded
display.clear()
display.settext("Hello from autoexec")
In the TSP Script box, enter autoexec.
Enter the code in the entry box.
Click Save Script.
Creates a new script that clears the
display when the instrument is turned on
and displays "Hello from autoexec."
Save the anonymous script as a named script
To save the anonymous script to nonvolatile memory, you must name it first.
To save the anonymous script as a named script:
1. To name the script, send the command script.anonymous.name = "myTest" (where
myTest is the name of the script).
2. Send the script.anonymous.save() command to save myTest to nonvolatile memory.