Changes between Version 11 and Version 12 of S6350serialcom


Ignore:
Timestamp:
10/27/08 11:44:05 (16 years ago)
Author:
pinwc4
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S6350serialcom

    v11 v12  
    5858 
    5959 
     60 
    6061= Silence Tag = 
    6162 
     
    9091  dim xornumber1 as integer 
    9192  dim xornumber2 as integer 
     93 
    9294  'Do a XOR of all the bytes of the string for byte 1 of the checksum 
    9395  'Do not worry about xornumber having a zero initially, this does not impact the XOR operation 
     96 
    9497  for i as Integer=1 to len(data) 
    9598    xornumber1 = xornumber1 xor ascB(mid(data,i,1)) 
     
    98101  'calculates byte 2 of the checksum 
    99102  xornumber2 = &hFF xor xornumber1 
     103 
    100104  'put the two together for the complete checksum 
    101105  checksum = chrB(xornumber1) + chrB(xornumber2)