Model 2461 Interactive SourceMeter® Instrument Reference Manual Section 7: Introduction to TSP operation2461-901-01 A/November 2015 7-5Run-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 at the following times:• When they are run.• When they are loaded over a remote command interface.• When the instrument is turned on (if they are stored in nonvolatile memory).For detail on the amount of available memory, see Memory considerations for the run-timeenvironment.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. SeeSaving a script to nonvolatile memory (on page 7-8).What can be included in scripts?Scripts can include combinations of TSP commands and Lua code. TSP commands instruct theinstrument to do one thing and are described in the command reference (see TSP commands (onpage 8-7)). Lua is a scripting language that is described in Fundamentals of programming for TSP (onpage 7-11).Working with scriptsThis section describes the basics of working with scripts.You can create and manage scripts from the front panel or over a remote interface. Scripts can besaved in the instrument, on a computer, or on a USB flash drive.