Series 3700A System Switch/Multimeter Reference Manual Section 10: Instrument programming
3700AS-901-01 Rev. D/June 2018 10-9
Example: Retrieve the source code as a single string
Retrieve the source of a script named
"test".
Output might look similar to:
display.clear()
display.settext("This is a
test") print("This is a
test")
Script example: Retrieve the content of scripts
This set of examples:
• Retrieves the source of a script using scriptVar.list()
• Retrieves the source of a script using scriptVar.source
Example: Retrieve the content of a script with scriptVar.list()
Request a listing of the source of test.
An example of the possible instrument output is
shown here (note that the loadscript and
endscript commands are included).
Output:
loadscript scriptVarTest
listTones = {100, 400, 800}
for index in listTones do
beeper.beep(.5, listTones[index])
end
endscript
Example: Retrieve the content of a script with scriptVar.source
Request a listing of the source of the script named
test. The loadscript and endscript
commands are not included.
An example of the possible instrument output is:
listTones = {100, 400, 800}
for index in listTones do
beeper.beep(.5, listTones[index])
end
Working with scripts in nonvolatile memory
The Fundamentals of scripting for TSP (on page 10-1) section in this manual describes working with
scripts, primarily in the run-time environment. You can also work with scripts in nonvolatile memory.
The run-time environment and nonvolatile memory are separate storage areas in the instrument. The
information in the run-time environment is lost when the instrument is turned off. The nonvolatile
memory remains intact when the instrument is turned off. When the instrument is turned on,
information in nonvolatile memory is loaded into the run-time environment.