strGetValues (Functionblock) |
Top Previous Next |
strGetValues will try to extract up to 4 values from a string. It uses the same syntax for the format string as strFormat. strGetValues is not case-sensitive.
Input: str : STRING String that strGetValues will extract values from.
format : STRING The format string can contain up to 4 parameter references written as \1, \2, \3 and \4. Each of these will extract the value at that position and place it in v1, v2, v3, or v4. Please note that a specific number can only be referenced one time in the format string.
Please note that the 4th value is a DINT type, this allows you to convert large numbers.
Output: match: BOOL This will be TRUE if a match was found, and the number of values was extracted successfully
v1: INT The extracted value at {1} from str
v2: INT The extracted value at {2} from str
v3: INT The extracted value at {3} from str
v4 : DINT The extracted value at {4} from str
Declaration: FUNCTION_BLOCK strGetValues;
Example: INCLUDE rtcu.inc |