Siemens SINUMERIK 808D ADVANCED Series Commissioning Manual page 313

Hide thumbs Also See for SINUMERIK 808D ADVANCED Series:
Table of Contents

Advertisement

Tag identifier
KEY_EVENT
Commissioning Manual
6FC5397-4EP10-0BA8, 07/2018
Meaning
Dialog message
The tag KEY_EVENT can be integrated in the form to evaluate keyboard events. The sys-
tem sends the MF2 keyboard code to the active form if the tag is available in a form. If the
variable $actionresult is not set to zero, the system then subsequently processes the key-
board event.
The keyboard code is provided in the variable $keycode as an integer value.
Example:
The character entered into the variable exclude_key should be filtered-out of the input
stream.
<LET name="stream" type="string"/>
<LET name="exclude_key" type="string"/>
<FORM name = "keytest_form">
<INIT>
<CONTROL name = "p1" xpos = "120" ypos = "84" width ="200"
refvar="stream" hotlink="true" />
<CONTROL name = "p2" xpos = "160" ypos = "104" width ="8"
refvar="exclude_key" hotlink="true" />
</INIT>
<PAINT>
<text xpos = "8" ypos = "84">data stream</text>
<text xpos = "8" ypos = "104">exclude key</text>
</PAINT>
<KEY_EVENT>
<LET name="excl_keycode" type="string"/>
<OP>excl_keycode = exclude_key</OP>
<type_cast name="excl_keycode" convert="int" />
<PRINT text="%d %d">$keycode, excl_keycode</PRINT>
<IF>
<CONDITION>$keycode == excl_keycode</CONDITION>
<THEN>
<op> $actionresult = 0</op>
</THEN>
</IF>
</KEY_IVENT>
</FORM>
313

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 808d advanced t

Table of Contents