Modbus Serial CRC Checksum C#
2018-10-31 07:52:28 by sikyi
Modbus CRC stands for Cyclic Redundancy check. It is two bytes added to the end of every modbus message for error detection. Every byte in the message is used to calculate the CRC. The receiving device also calculates the CRC and compares it to the CRC from the sending device. If even one bit in the message is received incorrectly, the CRCs will be different and an error will result.
Below is an Example of CRC RTU using c# to calculate. The return is unsigned integer and needed to be converted by retrieving its byte.