User`s guide
Writing to the Pendant Display
Pendant Display
The pendant display window is a 2-line, 80-character display. You can use the WRITE
instruction to write data to the display.
Using WRITE with the Pendant
The following instructions display 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) < 0 GOTO 100
; Write to the MCP display.
WRITE (mcp_lun) $intro
IF IOSTAT(mcp_lun) < 0 GOTO 100
WRITE (mcp_lun) "Instructions to follow...", /S
; Report any error.
100 IF IOSTAT(mcp_lun) < 0 THEN
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 () 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. Refer to the section
Controlling the Pendant on page 295 for a discussion on the pendant control codes. These
codes control the cursor position, the lights on the pendant, and the interpretation of
pendant button presses. These codes are sent to the pendant using the WRITE instruction.
The /S qualifier generally must be used with WRITE instructions to avoid overwriting the
pendant display.
Writing to the Pendant Display
V+Language User's Guide, v17.0
Page 286










