PicoSearch

[ Home ] [ Products ] [ Data Sheets ] [ Support ] [ FAQ ] [ Sales Offices ] [ Request Catalog ] [ Contact duTec ]

dutec logo and link to home page

Checksum Instructions


Hardware Method: Setup eC instruction tags correct checksum to end of the N02 response message. Transmit instructions >00eC08CR. Now any instruction can be assembled in the usual manner, but enter 00 for checksum. The unit returns a N02 response message, plus the correct checksum.


Wildcard: If ?? is added to the instruction instead of a checksum, the instruction is executed. It sends a "don't care" value for thechecksum. This method is not recommended for programming, because it does not ensure proper communication error checking.


Circulation Method: Checksum can also be obtained by adding all decimal values of ASCII characters that make up an instruction or response (exclude > for instructions and A for responses). Repeatedly subtract 256 from this sum until the remainder is less than 256. The checksum is 2 digit hex equivalent of the remainder.


Example:
Instruction
>80L0800[ ]CR
Response
A1CAC[ ]CR

Instruction
Character

ASCII
Value

8
0
L
0
8
0
0

56
48
76
48
56
48
48
380

380D - 256D = 124D = 7CH

The checksum is 7CH and the complete instruction is: >80L08007CCR

The response is:

Character

ASCII

1
C
A
C

49
67
65
67

248D = F8H

The checksum is F8H and the complete response is: A1CACF8CR

Note: The ASCII values can be obtained from Appendix H; Decimal/Hexadecimal/ASCII Printable Table


Top of Page

copyright 1996-2001, duTec