EasyManua.ls Logo

Tektronix KEITHLEY 2600B Series

Tektronix KEITHLEY 2600B Series
834 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Series 2600B System SourceMeteinstrument Reference Manual Section 8: Instrument programming
2600BS-901-01 Rev. F/August 2021 8-5
Figure 85: Loadscript and endscript example
To load a named script by sending commands:
1. Send the command loadscript scriptName, where scriptName is the name of the script.
The name must be a legal Lua variable name.
2. Send the commands that need to be included in the script.
3. Send the command endscript.
4. You can now run the script. See Run scripts (on page 8-7).
To run the script immediately, use loadandrunscript scriptName instead of loadscript.
Load a script from the instrument front panel
You can also load scripts from a USB flash drive to the runtime environment of the instrument.
Depending on the content of the TSP file on the drive, the script can be loaded either as an
anonymous script without a designated name, or as a named script with a user-defined name. Only
named scripts can be saved to internal nonvolatile memory. Only one anonymous script can exist in
the runtime environment.
To load a script into the instrument with a specific name, the TSP file must include the shell keywords
loadscript and endscript, along with the specified script name, as shown in the example file
MyScript1.tsp, which contains the script:
loadscript Beeper
reset()
beeper.enable = beeper.ON
beeper.beep(2, 2400)
endscript
When you load the file MyScript1.tsp from the flash drive, a script named Beeper is created in
the runtime environment. Note that the script is named using the name that follows the loadscript
keyword, not the name of the TSP file on the flash drive. After the script is loaded, you can choose to
save it to nonvolatile memory.

Table of Contents

Related product manuals