Checksum (Crc16) - JUMO LOGOSCREEN nt Interface Description

Paperless recorder with tft display and compactflash card
Hide thumbs Also See for LOGOSCREEN nt:
Table of Contents

Advertisement

4 Modbus protocol description
Character
strings (texts)
Example

4.8 Checksum (CRC16)

Calculation
method
24
Character strings are transmitted in ASCII format.
An "0" (ASCII code 0x00) must always be transmitted as the last
character, to mark the end of the string. Any following characters are
meaningless.
Since text transmission is made as words (16-bit), if there is an odd
number of characters (incl."0"), an additional 0x00 will be added on.
The maximum lengths given in the address tables (See "Address
tables" on page 43. ff) for character strings include the terminating
"0". I.e. the text for "char 11" can have a maximum length of 10
readable characters.
Request the text from address 0x1000, if this address contains the
character string "LS NT"
(ASCII code: 0x4C, 0x53, 0x20, 0x4E, 0x54, 0x00).
Request: 01031000000440C9
Response: 0103084C53204E540000AA0D96
Instead of "AA" in front of the CRC sum, there could be any value –
since it comes after the "0", it will be ignored.
The checksum (CRC16) is used to recognize transmission errors. If an error is
detected during evaluation, the corresponding device will not respond.
CRC = 0xFFFF
CRC = CRC XOR ByteOfMessage
For (1 to 8)
CRC = SHR(CRC)
if (flag shifted right = 1)
then
CRC = CRC XOR 0xA001
while (not all ByteOfMessage processed);
The low byte of the checksum is transmitted first.
else

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents