
MCO 305 Design Guide
__ Software Reference __
120
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
INKEY
Summary
Reads in a key signal.
Syntax
INKEY
(p)
Parameter
p is the maximum waiting time, defined . . .
p = 0 wait for key code
p > 0 wait of max. p milliseconds
p < 0 no wait for key code (a negative parameter must be given in brackets)
Return Value
key code for the received character or –1 in case no character available
Following key codes are sent back, as long as the key is pressed. If more than one key
were pressed simultaneously the corresponding sum of the values will be sent back:
key: value:
[Main Menu]
1
[Quick Menu]
2
[Alarmlog] 4
[Status] 8
[OK] 16
[Cancel] 32
[Info] 64
[Back] 128
[
Æ
]-key / right
256
[
Ç
]-key / up
512
[
È
]-key / down
1024
[
Å
]-key / left
2048
[Auto on]
4096
[Reset] 8192
[Hand on]
16384
[Off] 32768
Combinations send the corresponding values:
[OK] and [Cancel]
48
[Auto on] and [
Ç
]-key 4608
NB!:
The keys keep their FC 300-functions, unless they are disabled in parameter 0-4*.
NB!:
NLCP is not covered at the moment.
Description
With the INKEY command it is possible to read a key signal from the keypad of the
FC 300 LCP. The parameter entered with INKEY determines whether the program
waits unconditionally for a key signal, for a certain period of time or not at all.
One key signal is read in per successful INKEY command respectively. To input a
string of characters it is necessary to repeat the INKEY command (p<>0) in a loop
until no further key signals exist.
Command Group
I/O
Cross Index
Syntax Example
input = INKEY 0
/* wait until key signal is read */
character = INKEY 5000
/* wait max. 5 seconds to input */
character = INKEY (-1)
/* do not wait for input */
Program Sample
INKEY_01.M, EXIT_01.M, WHILE_01.M
Содержание MCO 305
Страница 4: ......