The display.clear(), display.setcursor(), and display.settext() functions (which
are explained in the following paragraphs) are overlapped, nonblocking commands. The script will
NOT wait for one of these commands to complete.
These nonblocking functions do not immediately update the display. For performance
considerations, they write to a shadow and will update the display as soon as processing time
becomes available.
Clearing the display
When sending a command to display a message, a previously defined user message is not cleared.
The new message starts at the end of the old message on that line. It is good practice to routinely
clear the display before defining a new message.
After displaying an input prompt, the message will remain displayed even after the operator performs
the prescribed action. The clear() function must be sent to clear the display. To clear both lines of
the display, but not affect any of the indicators, send the following function:
display.clear()
Cursor position
When displaying a message, the cursor position determines where the message will start. On power-
up, the cursor is positioned at row 1, column 1 (see the following figure). At this cursor position, a
user-defined message will be displayed on the top row (row 1).
Top line text will not wrap to the bottom line of the display automatically. Any text that does not fit on
the current line will be truncated. If the text is truncated, the cursor will be left at the end of the line.
Figure 118: Row and column format for display messaging
The function to set cursor position can be used two ways:
display.setcursor(row, column)
display.setcursor(row, column, style)
Where: