Find the CRC of OBDII Packet VB6

Function FindCRC(Value)
   Dim val(5) As Byte
   value1 = Left(Value, 2)
   value2 = Mid(Value, 4, 2)
   value3 = Mid(Value, 7, 2)
   value4 = Mid(Value, 10, 2)
   value5 = Right(Value, 2)
   val(1) = "&H" & value1
   val(2) = "&H" & value2
   val(3) = "&H" & value3
   val(4) = "&H" & value4
   val(5) = "&H" & value5
   FindCRC = Hex(CalcCRC(val))
End Function

Function for VB6, (place it in a module) to find the CRC of incoming data on the BR-3 OBDII module.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation