Series 2600B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2600BS-901-01 Rev. C / August 2016
7-73
Example
display.clear()
display.settext("Enter value between$N -0.10 and 2.00: ")
value = display.inputvalue("+0.00", 0.5, -0.1, 2.0)
print("Value entered = ", value)
Displays an editable field (+0.50) for operator input. The valid input range is -0.10 to +2.00, with a default of
0.50.
Output:
Value entered = 1.00
Also see
(on page 7-78)
(on page 7-83)
display.loadmenu.add()
This function adds an entry to the USER TESTS menu, which can be accessed by pressing the
LOAD
key on the
instrument front panel.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
display.loadmenu.add(
displayName
,
code
)
display.loadmenu.add(
displayName
,
code
,
memory
)
displayName
The name that is added to the USER TESTS menu
code
The code that is run from the USER TESTS menu
memory
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)
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 alphabetic 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 Series 2600B is turned off. See
Example 2
below.
If you do not make a selection for
memory
, the code is automatically saved to nonvolatile memory.