Jump to content

checksum rs485 specific protocol


Recommended Posts

Hi everyone, i'm new here, i'm working with plc, but i have unitronics usp-104-b10 on my desk up to now.
unilogic version: 1.28.34

  I need to solve crc checkum rs485 specific protocol of one noname thermostat. I tried it through message composer but it failed.
Thermostat works, I tested it with com debug, connection is ok.

Checksum definition:
checksum = (header + command + id1 + id1 + data0 + data1 + data2 + data3) and FF xor 3C

example: # H30 = (# H0B + # H00 + # H01 + # H00 + # H00 + # H00 + # H00 + # H00) & #HFF xor # H3C

  it should look like this: txBuffer = 0B 00 01 00 00 00 00 00 30

do you have any idea how to solve it?
Link to comment
Share on other sites

add the values from first byte to the last byte to the sum.

(1+2) H0b + H00 = H0b

(S+3) H0b + H01 = H0c

(S+4) H0c + H00 = H0c

(S+5) H0c + H00 = H0c

(S+6) H0c + H00 = H0c

(S+7) H0c + H00 = H0c

(S+8) H0c + H00 = H0c

(S+FF) H0c + Hff = H0c          mask off values larger than one byte)

(S xor 3c) H0c xor H3c = H30

The H3c is probably to ensure that the check sum which is the last byte is not zero


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...