Siemens SINUMERIK 828D Commissioning Manual page 799

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Tag identifier
INIT
KEY_EVENT
Easy XML
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
Meaning
Dialog box message
The tag is executed immediately after the dialog box is generated. All the input elements and
hotlinks for the dialog form should be created here.
Dialog message
The tag KEY_EVENT can be integrated in the form to evaluate keyboard events. The system
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 keyboard 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" type="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>
Generating user dialogs
1.6 XML identifier
47

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents