Display.loadmenu.add() - Keithley 2651A Reference Manual

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
Also see
display.prompt()
display.setcursor()
display.settext()

display.loadmenu.add()

This function adds an entry to the User menu, which can be accessed by pressing the LOAD key on the
instrument front panel.
Type
TSP-Link accessible
Function
Yes
Usage
display.loadmenu.add(displayName, code)
display.loadmenu.add(displayName, code, memory)
displayName
code
memory
Details
After adding code to the load menu, you can run it from the front panel by pressing the LOAD key, then selecting
USER to select from the available code to load. Pressing the RUN key will then run the script.
You can add items in any order. They are always displayed in alphabetical order when the menu is selected.
Any Lua code can be can be included in the code parameter. If memory is set to display.SAVE, the entry
(name and code) is saved in nonvolatile memory. Scripts, functions, and variables used in the code are not
saved by display.SAVE. Functions and variables need to be saved with the code. If the code is not saved in
nonvolatile memory, it will be lost when the Model 2651A is turned off. See Example 2 below.
If you do not make a selection for memory, the code is automatically saved to nonvolatile memory.
You can create a script that defines several functions, and then use the display.loadmenu.add()
command to add items that call those individual functions. This allows the operator to run tests from
the front panel.
Example 1
display.loadmenu.add("Test9", "Test9()")
2651A-901-01 Rev. A / March 2011
(on page 7-66)
(on page 7-69)
(on page 7-70)
Affected by
The name that is added to the User menu
The code that is run from the User menu
Determines if code is saved to nonvolatile memory:
0 or display.DONT_SAVE: Does not save the code to nonvolatile memory
1 or display.SAVE: Saves the code to nonvolatile memory (default)
Where saved
Default value
Quick Tip
Assume a user script named "Test9" has
been loaded into the runtime environment.
Adds the menu entry to the User menu to run
the script after loading.
Section 7: Command reference
7-61

Advertisement

Table of Contents
loading

Table of Contents