Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-8
707B-901-01 Rev. A / August 2010
NOTE
The
.save()
command saves the script to nonvolatile memory. This saves the change when the
instrument is turned off. See
Save a user script to nonvolatile memory
(on page 6-9) for more detail.
Example
Code Output
test5.autorun = "yes"
test5.save()
Assume a script named "test5" is in the runtime
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 marked as autorun have run.
To create a script that executes automatically, create and load a new script and name it
autoexec
.
See
If you use the create configuration script feature, you can assign the configuration script to be the
autoexec script. See
Save the present configuration
(on page 2-106) for more information.
NOTE
You need to save the autoexec script to nonvolatile memory to save the script when the instrument is
turned off. See
Save a user script to nonvolatile memory
(on page 6-9) for more detail.
Example: With loadscript command
Code Notes
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: TSB Embedded
Code Notes
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".