Section 10: Instrument programming Series 3700A System Switch/Multimeter Reference Manual10-2 3700AS-901-01 Rev. D/June 2018What is a script?A script is a collection of instrument control commands and programming statements. Scripts that youcreate are referred to as user scripts.Your scripts can be interactive. Interactive scripts display messages on the front panel of theinstrument that prompt the operator to enter parameters.Run-time and nonvolatile memory storage of scriptsScripts are loaded into the run-time environment of the instrument. From there, they can be stored innonvolatile memory in the instrument.The run-time environment is a collection of global variables, which include scripts, that the user hasdefined. A global variable can be used to store a value while the instrument is turned on. When youcreate a script, the instrument creates a global variable with the same name so that you canreference the script more conveniently. After scripts are loaded into the run-time environment, youcan run and manage them from the front panel of the instrument or from a computer. Information inthe run-time environment is lost when the instrument is turned off.Nonvolatile memory is where information is stored even when the instrument is turned off. Savescripts to nonvolatile memory to save them even if the power is cycled. The scripts that are innonvolatile memory are loaded into the run-time environment when the instrument is turned on.Scripts are placed in the run-time environment when:• The instrument is turned on. All scripts that are saved to nonvolatile memory are copied to therun-time environment when the instrument is turned on.• Loaded over a remote command interface.For detail on the amount of memory available in the run-time environment, see Memoryconsiderations for the run-time environment (on page 10-50).If you make changes to a script in the run-time environment, the changes are lost when theinstrument is turned off. To save the changes, you must save them to nonvolatile memory. SeeWorking with scripts in nonvolatile memory (on page 10-9).What can be included in scripts?Scripts can include combinations of Test Script Processor (TSP®) commands and Lua code. TSPcommands instruct the instrument to do one thing and are described in the command reference (seeTSP commands (on page 11-8)). Lua is a scripting language that is described in Fundamentals ofprogramming for TSP (on page 10-15).