Key input control – Rockwell Automation GMLC Reference Manual User Manual
Page 457

Publication GMLC-5.2 - November 1999
420
Display and Operator Interface Blocks
Key Input Control
Use the Key Input block to:
•
Control the serial port buffer pointer of serial port B to get the next or
previous character in the buffer.
•
Purge any extraneous characters in the serial port buffer before
sending a request for data to the serial port.
When you select DH-485 in the General page of the Configure Control
Options dialog box, the Key Input Control block cannot be used, because
serial port B on the motion controller is used for DH-485 communication.
The Key Input block resides on the RS-232/422 Palette.
The motion controller maintains a 120-character buffer for serial port B.
As characters are received, the motion controller stores them in the next
sequential location in the buffer. The Get Next Key and Get Previous Key
functions of the Key Input Control block are used to step through the
received characters to find a specific character, when multiple characters
have been received. This—in conjunction with the Last_Keypress system
variable, which stores the actual character value—makes it possible to
implement a complete, custom operator interface menu in a GML
Commander diagram.
If the serial port buffer fills up before the all the characters have been
processed (or the buffer cleared), serial port B transmits an
XOFF
character
(CTRL-S or ASCII 19) to stop the sending device from sending more
characters. When the serial buffer has been emptied sufficiently to allow
more characters to be received, an
XON
(CTRL-Q or ASCII 17) is
transmitted. This signals the transmitting device that it may resume
sending characters to the motion controller.