XMLFindElementByStringAsync (FB)¶
FUNCTION_BLOCK XMLFindElementByStringAsync EXTENDS CBM.ETrig
{attribute ‘hide_all_locals’}
- InOut:
- Scope - Name - Type - Initial - Comment - Inherited from - Input - xExecute- BOOLRising 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 - xDone- BOOL- TRUE: Action successfully completed- ETrig - xBusy- BOOL- TRUE: Function block active- ETrig - xError- BOOL- TRUE: Error occurred, function block aborts action- FALSE: No error- ETrig - Input - sFileName- STRING(gc_udiMaxValueSize)- Path to a file - wsElement- STRING(gc_udiMaxValueSize)- The element to find. if blank, the root element will be returend. - attributeName- STRING(gc_udiMaxValueSize)- Name of the attribute, BLANK if not required - attributeValue- STRING(gc_udiMaxValueSize)- Value of the attribute - readMode- Read mode - paElements- POINTER TO XMLElement - Pointer to the result set - udiMaxElements- UDINT- Maximum size of paElements - udiStartPosition- UDINT- 0 - Start position in bytes - xTruncateValues- BOOL- FALSE - true: All values that exceed the maximum value size will be truncated - paDataArray- POINTER TO BYTE - 0 - Pointer to XML data array, if 0 read from file (sFileName) - udiDataArraySize- UDINT- 0 - Size of paDataArray - Output - eError- Error code if xError is true - eLastError- The last error - udiCountElements- UDINT- Number of elemnents in paElements - udiNextReadPos- UDINT- Position in file (in bytes) of the next xml element, 0 if last element - eEncoding- Encoding of the xml file 
