EasyManuals Logo

Vaisala CL31 User Manual

Vaisala CL31
142 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #89 background imageLoading...
Page #89 background image
Chapter 5 ________________________________________________________________ Operation
VAISALA_______________________________________________________________________ 87
Checksum Calculation
The checksum of a data or a command telegram is calculated by
computing the sum of all signs (alphanumerical signs and control codes
such as STX, EOT CR, LF, except the checksum bytes itself), building
the two's complement and taking the lower byte of this result.
The higher half-byte and the lower half-byte - converted to a visible
ASCII character - is the checksum.
See the following example with the
polling command:
Telegram:
STX H0C!X1P----------83 EOT
1. Compute the sum:
Sum = STX + 'H' + '0' + 'C' + !'' + 'X' + '1' + 'P'
+ 10 x '-' + EOT
Sum = 0x02 + 0x48 + 0x30 + 0x43 + 0x21 + 0x58
+ 0x31 + 0x50 + 10 x 0x2D + 0x04
Sum = 0x037D HEX = 893 DEZ
2. Build the two's complement:
The two's complement is built by inverting the binary
representation of the sum and adding 1:
2Com =
Sum + 1= 0x037D + 0x01 = 0x0C83 HEX
= 3203 DEZ .
3. Take lower byte and build ASCII-character:
The lower byte of 2Com is 0x83 HEX, so the high byte of the
checksum is 8 and the low byte is 3:
Checksum = 83

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Vaisala CL31 and is the answer not in the manual?

Vaisala CL31 Specifications

General IconGeneral
BrandVaisala
ModelCL31
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals