Section 3: Functions and features
Series 2600B System SourceMeter® Instrument Reference Manual
3-76
2600BS-901-01 Rev. B / May 2013
Returning a text message
The
display.gettext()
function returns the displayed message (
text
) and can be used in five
ways:
text
= display.gettext()
text
= display.gettext(
embellished
)
text
= display.gettext(
embellished
,
row
)
text
= display.gettext(
embellished
,
row
,
columnStart
)
text
= display.gettext(
embellished
,
row
,
columnStart
,
columnEnd
)
Where:
embellished
Returns text as a simple character string (
false
) or includes character codes (
true
)
row
The row to read text from (
1
or
2
); if not included, text from both rows is read
columnStart
Starting column for reading text
columnEnd
Ending column for reading text
Sending the command without the
row
parameter returns both lines of the display. The
$N
character
code will be included to show where the top line ends and the bottom line begins. The
$N
character
code will be returned even if
embellished
is set to
false
.
With
embellished
set to
true
, all other character codes that were used in the creation of each
message line will be returned along with the message. With
embellished
set to
false
, only the
message will be returned.
Sending the command without the
columnStart
parameter defaults to column 1. Sending the
command without the
columnEnd
argument defaults to the last column (column 20 for row 1, column
32 for row 2).
Input prompting
Display messaging can be used along with front panel controls to make a user script interactive. In an
interactive script, input prompts are displayed so that the operator can perform a prescribed action
using the front panel controls. While displaying an input prompt, the test will pause and wait for the
operator to perform the prescribed action from the front panel.
Menu
A user-defined menu can be presented on the display. The menu consists of the menu name on the
top line, and a selectable list of menu items on the bottom line. To define a menu, use the
display.menu(
menu
,
items
)
function.
Where:
menu
The name of the menu; use a string of up to 20 characters (including spaces)
items
A string is made up of one or more menu items; each item must be separated by white space
When the
display.menu()
function is sent, script execution waits for the operator to select one of
the menu items. Rotate the navigation wheel
to place the blinking cursor on a menu item. Items
that do not fit in the display area are displayed by rotating the navigation wheel
to the right. With
the cursor on the menu item, press the navigation wheel
(or the
ENTER
key) to select it.
Pressing the EXIT (LOCAL) key does 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.
Summary of Contents for System SourceMeter 2601B
Page 841: ......