XOR Comparison binary Checksum
jcerecke
Posts: 40
Hey,
Controlling a Beyerdynamic MIX 10 NG2 and it wants a checksum on the end... yay.
From the manual:
"The check sum results from a vertical XOR comparison of the individual command bytes in the binary system."
There's an example and I understand how I manually calculate it... but how would I do this in NetLinx? Theres no hex to binary command? The other option is to calculate all the checksums manually for all the different codes I am going to need... which I would prefer to avoid.
User Manual: http://asia-pacific-india.beyerdynamic.com/shop/media//usermanual/MIX10NG2_BA_E_A5.pdf
Controlling a Beyerdynamic MIX 10 NG2 and it wants a checksum on the end... yay.
From the manual:
"The check sum results from a vertical XOR comparison of the individual command bytes in the binary system."
There's an example and I understand how I manually calculate it... but how would I do this in NetLinx? Theres no hex to binary command? The other option is to calculate all the checksums manually for all the different codes I am going to need... which I would prefer to avoid.
User Manual: http://asia-pacific-india.beyerdynamic.com/shop/media//usermanual/MIX10NG2_BA_E_A5.pdf
0
Comments
CHAR cChk
cChk = cBYTE1 BXOR cBYTE2 BXOR....BXOR BYTEn
...
SEND_STRING dvSerial,"cBYYTE1, cBYTE2, ..., cBYTEn, cChk"
a function to calculate the checksum may be