Real Time Automation, Inc.
37
1-800-249-1612
ASCII Configuration
– ASCII Parsing Examples
Example #1 - Parsing a message using the Parsing Delimiter option:
In this example, we are separating the string “12.25,SP100,temp setpoint” by a comma delimiter. The
first value is being parsed into a float data type, the second and third values are being parsed into a
string data type. Since the Min Number of Fields is 3, all 3 fields must be present for the message to be
considered valid and processed. The output is seen below:
Example #2 - Parsing a message without the Parsing Delimiter option:
In this example, we are separating the fields in the string “12.25,SP100,temp setpoint” using the start
and length parameters. The first value is being parsed from the 1
st
character for a length of 5 and stored
into a float data type. The second value is being parsed from the 7
th
character for a length of 5
characters and stored into a string data type. The third value is being parsed starting from the 13
th
character for the rest of the remaining characters and stored into a string. The fourth value contains the
entire ASCII message and is stored into a string. Only the first field needs to be present for the data to be
considered valid and will be processed. If less than field 1 is present, the message will not be parsed and
will be flagged an error. The output is seen below: