Author Topic: BCC = XOR of values hatched  (Read 1339 times)

0 Members and 1 Guest are viewing this topic.

Offline SamsetTopic starter

  • Newbie
  • Posts: 2
  • Country: ca
BCC = XOR of values hatched
« on: April 19, 2018, 04:20:49 pm »
Hello,

[OK I fund the solution, it was dumb  :-[ ] now I cannot delete the post!

I was trying to communicate with a distance finder via RS485 (CD22M-35-485). The bytes must conform to the datagram. I would like to know what is meant by "BCC = XOR of values hatched" at the end. I know what XOR mean but not values hatched!?

For exemple: 02h ^ 52h ^ 40h ^ 06h ^ 03h  = gave me 15h not 0x14 from the documentation exemple, what's wrong?

http://www.optex-ramco.com/index.php?route=module/product_downloads/get&did=375

Thank you
Sam
« Last Edit: April 19, 2018, 04:33:22 pm by Samset »
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1576
  • Country: de
Re: BCC = XOR of values hatched
« Reply #1 on: April 19, 2018, 04:33:00 pm »
My guess is that they leave out the "STX" (1st) and "ETX" (last before BCC) values for the XORing and only use command and data.
0x52 ^ 0x40 ^ 0x06 = 0x14
0x57 ^ 0x00 ^ 0x04 = 0x53
Trying is the first step towards failure - Homer J. Simpson
 

Offline SamsetTopic starter

  • Newbie
  • Posts: 2
  • Country: ca
Re: BCC = XOR of values hatched
« Reply #2 on: April 19, 2018, 04:35:51 pm »
Yes thank you, I realized right after sending this post. I thought "BCC = XOR of values hatched" was a bytes maniplation ...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf