PDA

View Full Version : xoiring for fbus



sumitkaul
22-05-2004, 03:59 PM
Hi ..

I'm developing a software program for fbus in Visual Basic.
Can anyone help me with the XOR'ing stuff...

There are two checksum bytes at the end of the fbus
frame corresponding to even and odd bytes of the i/p frame.

Is there any function available with the help of which i can calculate
the Checksum values.

naren
23-05-2004, 09:27 AM
Hi, I have developed a similar kind of project in java and have full explanation of the code and the algorithm to convert the msg into hex data at my site.

Check it out at
www.omsoftindia.com

maestro3
24-05-2004, 09:34 PM
Hi,

This is what I use(d) :-P


Function calcCheckSum(SendBuffer)
CheckSum = Asc(Left(SendBuffer, 1))
For i = 2 To Len(SendBuffer)
CheckSum = CheckSum Xor Asc(Mid(SendBuffer, i, 1))
Next
calcCheckSum = Chr(CheckSum)

sumitkaul
26-05-2004, 04:07 PM
Hey .. thanks guys .. the code worked fine ..