Section 6. Data Error Detection
6-7
5
CSI Signature (CR10X user manual section C-4).
6
Check sum using modulo 256.
7
Check sum using modulo 8192 (CR10X user manual section 5-2).
8-255
reserved for future use.
Gn
This formatter type can be put into the formatter string to mark the end of the
string and the point at which the signature should be transmitted. It also sets the
data type to use. ‘n’ can be in the range of 0-255 which indicates the data type to
use. The data types that the SDM-SIO4 can deal with are as follows:
0
No data type or check.
1
8 bit binary. Expects 1 byte.
2
16 bit binary least significant byte first. Expects 2 bytes.
3
16 bit binary most significant byte first. Expects 2 bytes.
4
32 bit binary least significant byte first. Expects 4 bytes.
5
32 bit binary most significant byte first. Expects 4 bytes.
6
ASCII decimal. Waits until non ASCII 0-9 received.
7
8 bit ASCII hex. Expects 2 ASCII bytes, if not 0-9,a-f,A-F then fail.
8
16 bit ASCII hex. Expects 4 ASCII bytes, if not 0-9,a-f,A-F then fail.
9
32 bit ASCII hex. Expects 8 ASCII bytes, if not 0-9,a-f,A-F then fail.
10-255 reserved for future use.
6.3.1 Example of Using Transmitted Data Filters
A sensor requires the string ‘123456789’ but also requires a CRC16 appended to
the end in 16 bit ASCII Hex which, in this case, would be ‘123456789BB3D’.
The BB3D is the CRC16 calculated for the ‘123456789’ string.
You would need to define a formatter string to do this. One way would be by
using the command line. You would need to make a formatter string transmit the
required string and CRC as follows:
FMTST 100 “g1i[123456789]G8”
FMTST
is the command to store a user defined formatter from the command line.
100
is the string number you want to store it under; this can be 0-255.
“
is the start of the format string.
g1
is the formatter that instructs the SDM-SIO4 to use the CRC16 algorithm. It
initialises the CRC16 to start calculation from here on any characters.
i[123456789]
is the formatter that will transmit the string ‘123456789’ to
whichever port Instruction P113 requires. While this string is being processed by
the SDM-SIO4 the CRC16 will be calculated on it.
G8
is the filter which tells the SDM-SIO4 that this is the position where it should
append the CRC16 to the string. Also the number 8 defines the CRC16 output
format which in this case is 16 bit ASCII hex.
”
is the end of the string.