Download SWD-Collect - OMEGA Engineering
Transcript
CHAPTER 5 Setting up the Instrument Parser
this case the data will be whatever string of characters appears
Example:
D/{32},/YNNNYNYN/COMMENT
In this example, the delimiters are a space (ASCII 32) and a comma. If
either of these characters are encountered in the data string, the
program knows that one segment of data ends and another one starts.
Suppose your instrument transmits a string of data as follows:
23.5 units,0.7 units,27.6 units,25.6 units
The Delimiter Parser D/{32},/YNNNYNYN/COMMENT would
identify 8 segments of data but only save the first, fifth and seventh the numbers 23.5, 27.6 and 25.6. The second number (0.7)and
all units are ignored.
If several of these delimiters occur in sequence one after the other, the
program will treat each as a separate delimiter. For example, in the
string 45,,67 the second element is a blank because there is nothing
between the two commas. A blank will be transferred as the data for the
second element, along with any associated Macros.
You can list as many delimiters as you wish. If they are standard
printable (keyboard) characters, simply list them in the Parser (i.e. D/
,g+#/YYNN/comment). If they are not printable characters, you must
list them in the form of an ASCII character enclosed in {} brackets,
such as {32} for a file that is space delimited.
Please note that the carriage return (ASCII 13) and line feed (ASCII 10)
are not recognized as delimiters by the program. If your data string is
long and consists of more than one line (i.e., it has a <LF> <CR> in the
middle of the data), then you are able to remove these characters with
the Remove field described earlier.
If the data cannot be parsed with any of these Types, contact the
OMEGA Customer Service Department. Other programs are available
with much more powerful Parsers.
57