System SourceMeter® Instrument Reference Manual Section 3:
2600BS-901-01 Rev. C / August 2016 3-75
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:
Returns text as a simple character string (false) or includes character codes (true)
The row to read text from (
or
); if not included, text from both rows is read
Starting column for reading text
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:
The name of the menu; use a string of up to 20 characters (including spaces)
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.