User`s guide

Controlling the Pendant
The pendant responds to a number of control codes that affect the pendant display window,
whether or not the buttons are repeat buttons, and the LEDs associated with the pendant
buttons. (Repeat-button presses are recorded as long as the button is held down.)
The control codes are listed in the table Pendant Control Codes. The control codes are sent as
ASCII values using the WRITE instruction. The normal way to send control codes is to use
the $CHR() function to convert a control code to its ASCII value.
Control Codes for Pendant Display Window
To clear the display and position the cursor in the middle of the top line, issue the instruction:
WRITE (mcp_lun) $CHR(12), $CHR(18), $CHR(20), /S
$CHR(12) clears the pendant and places the cursor at position 1 (see the figure Pendant
Display Window). $CHR(18) indicates that the next value received should be interpreted as a
cursor location. $CHR(20) indicates the cursor should be placed at position 20. If /S is not
appended to the WRITE instruction, a <CR-LF> will be sent. Notice that using control code
18 allows you to position the cursor without disturbing existing text.
The following code will place the text EXIT in the middle of the bottom line and set the text to
blinking.
WRITE(mcp_lun) $CHR(18), $CHR(58), "EXIT", /S
WRITE(mcp_lun) $CHR(18), $CHR(58), $CHR(22), $CHR(4), /S
$CHR(22) tells the pendant to start a series of blinking positions starting at the current
cursor location and extending for the number of positions specified by the next control code
($CHR(4)). This code will cause any text in positions 58 - 61 to blink until an instruction is
sent to cancel the blinking. The following code line disables the blink positions:
WRITE(mcp_lun) $CHR(18), $CHR(58), $CHR(23), $CHR(4), /S
$CHR(23) tells the pendant to cancel a series of blinking positions starting at the current
cursor location and extending for the number of positions specified by the next control code
($CHR(4)).
Text can be made to blink as it is written to the display, regardless of the position the text is
in. The following code writes the text EXIT to the middle of the bottom line, starts the E
blinking, and then beeps the pendant:
WRITE(mcp_lun) $CHR(18), $CHR(58), $CHR(2), "E", /S
WRITE(mcp_lun) $CHR(3), "XIT", /S
WRITE(mcp_lun) $CHR(7), /S
Controlling the Pendant
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 295