KEY_READ_REM (read keys for remote LCD)

The KEY_READ_REM instruction reads the Key status on the optional remote LCD module when the user display is active.
Operation details:
  • Use the LCD_REM instruction to activate the user display on the remote LCD module. If the user display is not active, an error occurs during KEY_READ_REM execution.
  • P-BUTTON property in LCD Function File activates; otherwise all key status is FALSE.
  • Only single key presses are supported for the KEY_READ_REM instruction; two-key press combinations are not supported.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
KEY_READ_REM
KEY_READ_REM
KEY_READ_REM parameters
Parameter
Parameter Type
Data Type
Description
Enable
Input
BOOL
Instruction block enable.
  • TRUE: Enable
  • FALSE: Disable
KEY_READ_REM
Output
BOOL
TRUE: Remote LCD Key data is read successfully.
FALSE: Enable is false, there is an error reading. Remote LCD Key Data or User Display is not active.
Sts
Output
UINT
Status of the KEY_READ_REM operation.
KEY_READ_REM status codes:
  • 0: Enable Input is FALSE.
  • 1: Key data read successfully.
  • 2: Remote LCD not detected.
    Might occur when:
    • Remote LCD is not physically connected to the controller (or the wiring is not correct).
    • Serial port settings are other than what is required for the remote LCD.
  • 3: Connection Error.
    Might occur when there is an internal state machine error. An incompatibility between the controller firmware version and RLCD firmware version might be the cause.
  • 4: User Display is not active.
  • 5-65535: Reserved.
KeyData
Output
UDINT
Remote LCD KeyPad Data.
KeyData definitions are defined in KeyData bitfields table.

KeyData bitfields table

KeyData bitfields for KEY_READ_REM
Bit No. in KeyData
Name
Parameter Description
0
UKY
TRUE = Up key pressed.
1
DKY
TRUE = Down key pressed.
2
LKY
TRUE = Left key pressed.
3
RKY
TRUE = Right key pressed.
4
F1KY
TRUE = F1 key pressed.
5
F2KY
TRUE = F2 key pressed.
6
F3KY
TRUE = F3 key pressed.
7
F4KY
TRUE = F4 key pressed.
8
F5KY
TRUE = F5 key pressed.
9
F6KY
TRUE = F6 key pressed.
10
EKY
TRUE = Enter key pressed.
11
CKY
TRUE = Cancel key pressed.
12
EKYL
TRUE = Enter key pressed for more than 2 seconds.
13
CKYL
TRUE = Cancel key pressed for more than 2 seconds.
14-31
N/A
Reserved.

KEY_READ_REM examples

KEY_READ_REM function block diagram example
KEY_READ_REM function block diagram example
KEY_READ_REM ladder diagram example
KEY_READ_REM ladder diagram example
KEY_READ_REM structured text example
KEY_READ_REM structured text example
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal