Section 6. Data Error Detection
6.2.1 Example of Using Received Data Filters
If a sensor transmitted the following string:
Frequency=12.34567HzBB3DCrLf
then a user defined filter string would have to be used. The BB3D part of the string is the CRC sent in hex. from the sensor. To produce a filter string to deal with the sensor output you could type in the following command:
FLTST 100 “T[Frequency=]xg2n10fCCG8”
FLTST is the command to store a user defined filter from the command line.
100 is the string number you want to store it under this can be
“is the start of the filter string.
T[Frequency=] is a filter which looks for an exact string match for “Frequency=”. The next filter will only start if this string matches what is sent from the sensor. “Frequency=” is not removed from the receive buffer.
x this filter marks the start of a data set; in other words the data will only be available for the datalogger to collect when the complete string is received correctly.
g2 this is the filter that tells the
n10 This filter discards the 10 ASCII characters that make the word “Frequency=”. Note: The word is discarded after filter g2. This is to ensure that the discarded word will be included in the CRC calculations.
f this filter gets the numeric value from the sensor and converts it into a format the datalogger can use. Because filter “x” was used this converted value will not be available for the datalogger to collect until the
C this filter removes the char “H”.
C this filter removes the char “z”.
G8 this filter tells the
”marks the end of the filter string.
The above example is just one way of using a filter to achieve the required result.
6.2.2 CR10X Program Example
A typical CR10X datalogger program to work with the above filter is shown below.
Assume the