Siemens SINUMERIK 840DE sl Commissioning Manual page 760

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Generating user dialogs
1.7 XML identifier
Tag identifier
WHILE
XML_PARSER
42
Meaning
WHILE loop
WHILE (Test)
Instruction
Syntax:
<WHILE>
<CONDITION>...</CONDITION>
Instructions
...
</WHILE>
The While loop executes a sequence of instructions repeatedly while a condition is met.
This condition is tested before the sequence of instructions is executed.
Example:
<WHILE>
<CONDITION> "plc/ib9" == 0 </CONDITION>
<DATA name = "PLC/qb11"> 15 </DATA>
</WHILE>
The "XML_PARSER" tag can be used to parse XML files.
The parser interprets an XML file and calls defined call-back functions. Each call-back func‐
tion belongs to a predefined event. The programmer can process the XML data within this
function.
Predefined events:
● start document
The parser opens the document and starts parsing.
● end document
The parser closes the document.
● start element
The parser has found an element and creates a list with all attributes and attribute values.
These lists are forwarded to the call-back function.
● end element
The end of the element has been found.
● characters
The parser forwards all characters of an element.
● error
The parser has detected a syntax error.
When an event occurs, the parser calls the callback function and checks the return value
of the function. If the function returns the value "true", the parser continues the process.
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1
Easy XML

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents