User`s guide

Writing to the Pendant Display
The Pendant Display
The MCP display is a 2-line, 80-character LCD display. You can use the WRITE instruction to
write data to the display.
Using WRITE With the Pendant
The following instructions displays a welcome message on the two lines of the pendant
display:
AUTO mcp_lun ;Pendant LUN
AUTO $intro
$intro = "Welcome to the MCP"
mcp_lun = 1
; Attach the MCP, check for errors and output message
ATTACH (mcp_lun)
IF IOSTAT(mcp_lun) < 1 GOTO 100
WRITE (mcp_lun) $intro
WRITE (mcp_lun) "Instructions to follow...", /S
100 IF IOSTAT(mcp_lun) < 1 THEN ;Report errors
TYPE IOSTAT(mcp_lun), " ", $ERROR(IOSTAT(MCP_LUN))
END
DETACH(mcp_lun)
Notice that the second WRITE instruction uses the /S qualifier. This qualifier suppresses the
carriage return-line feed (<CR-LF>) that is normally sent by the WRITE instruction. If this
qualifier was not specified, the first line displayed would have been scrolled off the top. The
section Controlling the Pendant on page 273 discusses the pendant control codes. These
codes control the cursor position, the lights on the MCP, and the interpretation of MCP button
presses. These codes are sent to the pendant using the WRITE instruction. The /S qualifier
must be sent with these instructions to avoid overwriting the pendant display.
Writing to the Pendant Display
V+Language User's Guide, v17.0
Page 266