Keithley 2461 Reference Manual page 627

1kw pulse mode interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2461 Interactive SourceMeter® Instrument Reference Manual
Load a script by sending commands over a remote interface
To load a script over the remote interface, you can use the loadscript and endscript
commands.
Normally, when the instrument receives a command, it runs the command immediately. When the
instrument receives the loadscript command, the instrument starts collecting subsequent
messages instead of running them immediately.
The endscript command tells the instrument to stop collecting messages. It then compiles the
collection of messages into a script. The script is stored as a function. This script is loaded into the
run-time environment — you need to save it to store it in the instrument.
To load a script:
Send the loadscript command with a script name. This tells the instrument to start collecting
messages for the function named testInfo:
loadscript testInfo
Send the commands for the script; this example displays text on the USER swipe screen when the
script is run:
display.settext(display.TEXT1, "Batch 233")
display.settext(display.TEXT2, "Test Information")
display.changescreen(display.SCREEN_USER_SWIPE)
Send the command that tells the instrument that the script is complete:
endscript
Run the script by sending the script name followed by ():
testInfo()
The USER swipe screen on the front panel is displayed and shows the text "Batch 233 Test
Information" when you run this script.
To save the script to nonvolatile memory, send the command:
testInfo.save()
To load a 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. Send the script name followed by (). For more information, see
Running scripts using a remote interface
Running scripts using the front-panel interface
To run a script from the front-panel interface:
1. Press the MENU key.
2. Under Scripts, select Run. The RUN SCRIPTS window is displayed.
3. From the Available Scripts list, select the script you want to run.
4. Select Run Selected.
2461-901-01 A/November 2015
Section 7: Introduction to TSP operation
(on page 7-8).
7-7

Advertisement

Table of Contents
loading

Table of Contents