01-31-2009 02:33 PM
Hi All,
I am trying to communicate with a switch that uses a CHECK BYTE as the last byte. According to the Manual the CHECK BYTE, or “longitudinal Parity”, is the exclusive OR on all messages bytes.
I am new in programming and I have no idea how to calculate longitudinal parity so I can not create the VI.
Can someone please help?
Like if my message in Hexadecimal is: 02 30 31 31 03 What would be the CHECK BYTE? And how can I calculate it?
Thanks a lot
Solved! Go to Solution.
01-31-2009 08:21 PM
'fraid we're going to need a bit more information because I just did a quick Google of 'longitudinal parity check' and got descriptions of at least three different algorithms all using the same name. The manual should tell you how to calculate this value, if not -- call the manufacturer...
Mike...
02-01-2009 01:09 AM - edited 02-01-2009 01:10 AM
This should correspond to your description of LPC
02-01-2009 07:02 PM
Hi Chilly Charly,
Thanks a lot for your answer. I tried this and it's not working though. I am not quite sure it is the Check Byte but the switch is not answering my commands and that is because is not receiving the proper message. The message is pretty straight forward except for the Check Byte. I spent my whole day today trying to make it work and it's not happening.
I may have to call the manufacturer to be sure.
THanks again.
Farracillo
02-01-2009 07:04 PM
Hi Mike,
I will contact the manufacturer cuz the manual doesn't say anything about it. That's the first place i looked and it's silent to the calculation.
Thanks a lot for trying to help me.
Farracillo
02-05-2009 06:49 AM
HI Chilly Charly,
I am sorry it took me some time to accept your answer. Sure enough your VI makes sense, and is the answer for this question.
My real problem is a communication issue. I am getting "framing errors" eventhough my settings match the equipment specifications.
I will have to keep working on this.
thanks a lot for your help
Eddy