Section 7: Command reference
Models 707B and 708B Switching Matrix Reference Manual
7-78
707B-901-01 Rev. A / August 2010
Usage
selection = display.menu(name, items)
selection
Name of the variable that holds the menu item selected
name
Menu name to display on the top line
items
Menu items to display on the bottom line
Details
The menu consists of the menu name string on the top line, and a selectable list of items on the bottom line. The
menu items must be a single string with each item separated by whitespace. The name for the top line is limited
to 20 characters.
After sending this command, script execution pauses for the operator to select a menu item. An item is selected
by rotating the navigation wheel to place the blinking cursor on the item, and then pressing the navigation wheel
(or
ENTER
key). When an item is selected, the text of that selection is returned.
Pressing the
EXIT (LOCAL)
key
will not abort the script while the menu is displayed, but it will return nil. The
script can be aborted by calling the exit function when
nil
is returned.
Example
selection = display.menu("Menu", "Test1 Test2 Test3")
print(selection)
Displays a menu with three
menu items. If the second menu
item is selected, selection is
given the value
Test2
.
Output:
Test2
Also see
None
display.prompt()
This function prompts the user to enter a parameter from the front panel of the instrument.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
display.prompt(format, units, help)
display.prompt(format, units, help, default)
display.prompt(format, units, help, default, minimum)
display.prompt(format, units, help, default, minimum, maximum)
format
A string that defines how the input field is formatted. See
Details
for more information
units
Set the units text string for the top line (eight characters maximum). This is intended to indicate
the units (for example, "V" or "A") for the value.
help
Text string to display on the bottom line (32 characters maximum).
default
The value that is shown when the value is first displayed.
minimum
The minimum input value that can be entered.
maximum
The maximum input value that can be entered (must be more than minimum)