Rockwell Automation GMLC Reference Manual User Manual
Page 459

Publication GMLC-5.2 - November 1999
422
Display and Operator Interface Blocks
Wait for Key
The Wait for Key type pauses the program until serial port B receives a
character. It can wait for any key, a specific key, or a specific ASCII code.
With Wait for Key type selected, the On Key Press block has a single exit
node.
If other tasks are executing (multitasking), the task containing this block
pauses, while the other tasks continue to execute. In this way, a Wait for
Key type block in one task does not pause execution of any other task, or
hang the task dispatcher.
If Key
The If Key type checks serial port B for the presence of a received
character. It can check for any key, a specific key, or a specific ASCII
code. With If Key type selected, the On Key Press block has two exit
nodes. Program flow branches to the true node (at the top of the block) if
a key has been received, and to the false node (at the bottom of the block)
if not. Select the key type to check for from the pop-up menu.
Waiting or Checking for the Next Key
Use the On Key Press block to wait for or to check the next key in the
input buffer. To do this, be sure to select the Next Key field.
If you are using the On Key Press block to step through the input buffer,
be sure not to select Next Key. Not selecting Next Key guarantees that the
input buffer location, selected by the last Key Input Control block—not
the next key in the buffer, is checked (If Key type) or used (Wait for Key
type).
Waiting or Checking for Any Key
The effect of selecting Any Key from the Key Type menu depends upon
your Type selection (Wait for Key or If Key), as follows.