System SourceMeter® Instrument Reference Manual Section 7:
2600BS-901-01 Rev. C / August 2016 7-71
Details
Using the command without any parameters returns both lines of the display.
The $N character code is included in the returned value to show where the top line ends and the
bottom line begins. This is not affected by the value of embellished.
When embellished is set to true, all other character codes are returned along with the message.
When embellished is set to false, only the message and the $N character code is returned. For
information on the embedded character codes, see display.settext() (on page 7-83
).
The display is not switched to the user screen (the screen set using display.settext()). Text will
be read from the active screen.
Example 1
display.setcursor(1, 1)
display.settext("ABCDEFGHIJ$DKLMNOPQRST")
display.setcursor(2, 1)
display.settext("abcdefghijklm$Bnopqrstuvwxyz$F123456")
print(display.gettext())
print(display.gettext(true))
print(display.gettext(false, 2))
print(display.gettext(true, 2, 9))
print(display.gettext(false, 2, 9, 10))
This example shows how to retrieve the display text in multiple ways. The output is:
ABCDEFGHIJKLMNOPQRST$Nabcdefghijklmnopqrstuvwxyz123456
$RABCDEFGHIJ$DKLMNOPQRST$N$Rabcdefghijklm$Bnopqrstuvwxyz$F123456
abcdefghijklmnopqrstuvwxyz123456
$Rijklm$Bnopqrstuvwxyz$F123456
Example 2
display.settext("User Screen")
text = display.gettext()
This outputs all text in both lines of the display:
User Screen $N
This indicates that the message “User Screen” is on the top line. The bottom line is blank.
Also see
display.clear() (on page 7-66)
display.getcursor() (on page 7-68)
display.setcursor() (on page 7-82)
display.settext() (on page 7-83)