14-8 Display Operations Series 2600 System SourceMeters Reference Manual
2600S-901-01 Rev. A / May 2006 Return to Section 14 topics
If the extra $ character is not included, the $8 would be interpreted as an
undefined character code and will be ignored. The message “You owe me” will
instead be displayed.
Returning a text message
The display.gettext function returns the displayed message and can be used
in five ways:
text = display.gettext()
text = display.gettext(embellished)
text = display.gettext(embellished, row)
text = display.gettext(embellished, row, column start)
text = display.gettext(embellished, row, column start, column end)
embellished Set to false to return text as a simple character string. Set to true
to include character codes.
row Set to 1 or 2 to select which row to read text from. If not included, text
from both rows are read.
column start Set to starting column for reading text.
column end Set to 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 column start parameter defaults to Column
1. Sending the command without the
column end argument defaults to the last
column (Column 20 for Row 1, Column 32 for Row 2).
NOTE Care must be taken when imbedding character
codes in the text string. It is easy to forget that the
character following the
$ is part of the code. For
example, assume you want to display “Hello” on the
top line and “Nate” on the bottom line, and so you
send the following command:
display.settext("Hello$Nate")
The above command displays “Hello” on the top line
and “ate” on the bottom line. The correct syntax for the
command is as follows:
display.settext("Hello$NNate")