Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crc16 modbus seems to be wrong #6

Closed
tcurdt opened this issue Dec 14, 2017 · 1 comment
Closed

crc16 modbus seems to be wrong #6

tcurdt opened this issue Dec 14, 2017 · 1 comment

Comments

@tcurdt
Copy link

tcurdt commented Dec 14, 2017

http://crccalc.com/?crc=0x01%200x03%200x00%200x85%200x00%200x01&method=crc16&datatype=hex

It should be CRC-16/MODBUS = 0xE395 but it's not. I tried all the tables. What am I missing?

howeyc added a commit that referenced this issue Dec 23, 2017
@howeyc
Copy link
Owner

howeyc commented Dec 23, 2017

To get the CRC for the modbus protocol you need to take the "bitwise complement" of the result, see

result := ^ChecksumIBM(testcase.Message)

@howeyc howeyc closed this as completed Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants