Checksum calculation – AW Gear Meters EMO-1005 User Manual
Page 33

AW-Lake Company 8809 Industrial Drive, Franksville, WI 53126 web: www.awgearmeters.com
Tel: 262-884-9800 Fax: 262-884-9810 Email: [email protected]
REV. 1a 05/98 EMO-1005 Manual.DOC
32
Writing with the host computer:
>01J03340F6587XXcr
^....................... start of text always > sign
^^.................... channel number that should be written to
^................... J = writing into channel (K = read)
^^^^........... address to write to
^^......... byte written to 0334
^^...... byte written to 0335
^^... byte written to 0336
^^.. checksum for string 01J03340F6558
^^. carriage return
If write operation was successful the channel answers with an: Acr
The following error messages have been implemented in the EMO-1005 protocol:
N01cr - Undefined command (something else than K/J)
N02cr - Checksum error
N03cr - Non printable ASCII character
There is a booklet published by OPTO 22 on the protocol format.
CHECKSUM CALCULATION
Calculating the previous string variable for the read command:
>03K0F3403XXcr
^^^^^^^^^...... these characters have to be put into the calculation.
Add the values for the ASCII Decimal variables as follows:
HEX
0 + 3 +K + 0 + F + 3 + 4 + 0 + 3
ASCII
48 + 51 + 75 + 48 + 70 + 51 + 52 + 48 + 51 = 494
To calculate the final checksum, convert the decimal number 494 into HEX (494=1EEh) and take the
last two characters (EE) for the checksum.
The final string would look like this:
>03K0F3403EEcr