XMLFindElementByStringAsync (FB)¶
FUNCTION_BLOCK XMLFindElementByStringAsync EXTENDS CBM.ETrig
{attribute ‚hide_all_locals‘}
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecuteBOOLRising edge: Action startsFalling edge: Resets outputsIf a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone,xError) are present at the outputs for exactly one cycle.ETrig
Output
xDoneBOOLTRUE: Action successfully completedETrig
xBusyBOOLTRUE: Function block activeETrig
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorETrig
Input
sFileNameSTRING(gc_udiMaxValueSize)Path to a file
wsElementSTRING(gc_udiMaxValueSize)The element to find. if blank, the root element will be returend.
attributeNameSTRING(gc_udiMaxValueSize)Name of the attribute, BLANK if not required
attributeValueSTRING(gc_udiMaxValueSize)Value of the attribute
readModeRead mode
paElementsPOINTER TO XMLElement
Pointer to the result set
udiMaxElementsUDINTMaximum size of paElements
udiStartPositionUDINT0
Start position in bytes
xTruncateValuesBOOLFALSE
true: All values that exceed the maximum value size will be truncated
paDataArrayPOINTER TO BYTE
0
Pointer to XML data array, if 0 read from file (sFileName)
udiDataArraySizeUDINT0
Size of paDataArray
Output
eErrorError code if xError is true
eLastErrorThe last error
udiCountElementsUDINTNumber of elemnents in paElements
udiNextReadPosUDINTPosition in file (in bytes) of the next xml element, 0 if last element
eEncodingEncoding of the xml file