6-1
Section 6. Data Error Detection
Error detection by checksum, CRC or signatures is a way of detecting errors in data,
either transmitted or received. This section gives details on how to use filter strings
together with datalogger program examples to implement error detection methods.
6.1 Error Detection with the SDM-SIO4
Error detection is carried out to provide confidence that critical data is
received/transmitted correctly.
For example, some data may be transmitted through a noisy environment,
which could introduce errors into the data. Thus the received data could be
corrupted in some way – for instance a number might possibly be changed from
‘1000’ to ‘2000’. This change would not be detected if the numbers were both
in the valid number range unless some error detection system was used.
Error detection usually takes the form of the transmitting device calculating a
Checksum, CRC (cyclic redundancy checksum) or Signature for the data it is
transmitting. This Checksum, CRC or Signature result is transmitted at the end
of the data in some form. The receiving device is configured to calculate
exactly the same Checksum, CRC or Signature on the data it receives (except
for the checksum bytes). The two separate Checksums, CRCs or Signatures are
then compared, and if the two match exactly then the data received should be
error free.
6.2 Received Data
No checksum will detect 100% of all errors. The more
sophisticated the algorithm the better the error detection.
The signature that the sensor returns can be in many different data types – for
example ASCII decimal, binary or hexadecimal. Additionally, each of the data
types can have differences; for example with binary you can have 8 bit, 16 bit,
and 32 bit and also the most significant byte could be transmitted first or the
least significant byte could be transmitted first. Because of the above the SDM-
SIO4 has two error detection filters ‘gn’ and ‘Gn’. The first, ‘gn’,
is used to set
the signature type you want to use and ‘Gn’ is used to set the data type of the
signature expected from the sensor/device. A full description of how these
filters operate is shown below.
gn
This filter type can be put into the filter string to mark the start of a signature
generation. When this happens the signature type determined by ‘n’ will be
initialized ready to start signature calculation for all characters until filter Gn is
encountered, which marks the end of the string (see below). The value of ‘n’ for
filter gn can be in the range of 0-255. The signature types supported are below:
NOTE
Summary of Contents for SDM-SIO4
Page 6: ...SDM SIO4 Table of Contents iv This is a blank page ...
Page 12: ...Section 1 Introduction 1 6 This is a blank page ...
Page 16: ...Section 2 Installation and Hardware Set Up 2 4 This is a blank page ...
Page 26: ...Section 3 Understanding How the SDM SIO4 Handles Data 3 10 This is a blank page ...
Page 32: ...Section 4 Programming the SDM SIO4 4 6 This is a blank page ...
Page 62: ...Section 5 Programming the Datalogger 5 30 This is a blank page ...
Page 76: ...This is a blank page ...
Page 81: ...This is a blank page ...