Run scripts
This section describes how to run the anonymous and named scripts.
On the front panel, items are available through the USER menu if you explicitly add them to the menu.
The items the menu selections represent can be scripts, function calls, or instrument commands.
Items in the menus are referred to as scripts in this section.
The SCRIPTS menu lists the names of scripts in nonvolatile memory or scripts that have been added
to the runtime environment. The anonymous script also appears in this menu.
If the instrument is in local control when the script is started, it switches to remote control (REM is
displayed) while the script is running. The instrument is returned to local control when the script
completes. If you press the front-panel EXIT (LOCAL) key while the script is running, the script
is stopped.
Run the anonymous script
The anonymous script can be run many times without reloading it. It remains in the runtime
environment until a new anonymous script is created or until the instrument is turned off.
To run the anonymous script, use any one of these commands:
• run()
• script.run()
• script.anonymous()
• script.anonymous.run()
Run a named script
You can run any named script that is in the runtime environment using one of the following
commands:
• scriptVar()
• scriptVar.run()
Where scriptVar is the user-defined name of the script.
When a script is named, it can be accessed using the global variable scriptVar.
To run a named script from TSB Embedded, select the script from the User Scripts list and click Run.
Example: Run a named script