Changes between Version 11 and Version 12 of S6350serialcom
- Timestamp:
- 10/27/08 11:44:05 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S6350serialcom
v11 v12 58 58 59 59 60 60 61 = Silence Tag = 61 62 … … 90 91 dim xornumber1 as integer 91 92 dim xornumber2 as integer 93 92 94 'Do a XOR of all the bytes of the string for byte 1 of the checksum 93 95 'Do not worry about xornumber having a zero initially, this does not impact the XOR operation 96 94 97 for i as Integer=1 to len(data) 95 98 xornumber1 = xornumber1 xor ascB(mid(data,i,1)) … … 98 101 'calculates byte 2 of the checksum 99 102 xornumber2 = &hFF xor xornumber1 103 100 104 'put the two together for the complete checksum 101 105 checksum = chrB(xornumber1) + chrB(xornumber2)