Model DMM7510 7½ Digit Graphical Sampling Multimeter Reference Manual
Section 7: Introduction to TSP commands
DMM7510-901-01 Rev. B / May 2015
7-7
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
(on page 7-8).
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
.