2 character definition, 3 bcc block check character / leant to 3964r – EUCHNER HBLS 072725 Benutzerhandbuch

Seite 33

Advertising
background image

EUCHNER Pendant station HBLS 072725

067018-08-01/06

Subject to technical modifications

page 11 / 22

8.2 Character Definition


data format: 8 BIT, value range 0x00 ... 0xFF (00H ... FFH)

The value range has following chapters:

0x00 0x1F : common control characters
0x30 0x3C : push buttons change
0x41 0x4C : selector switch W1 status change
0x51 0x5C : selector switch W2 status change
0x30 0x3C : LED on
0x40 0x4C : LED off
0x50 0x5C : LED flashing
0x20 0x7F : control characters and instructions for the LCD (identified with 0x6C)
0x80....0xFF.: LCD character set (see chapter Character Set )

Control characters:


STX

0x02

Start of Text
Beginning of the character sequence

ETX

0x03

End of Text

End of the character sequence

DLE

0x10

Data Link Escape

Data transfer direction change

NAK 0x15

Negative

Acknowledge

BCC 0x00 ... 0xFF Block Check Character


8.3 BCC Block Check Character / equal to 3964R


The BCC (Block Check Character) is generated by calculation.
All the characters in a string have to be exclusive OR’d with each.
The resulted BCC character is added as the final character.

STX

Data

Block

DLE ETX BCC


calculation:

1. character of the data block

XOR 2. character of the data block
XOR - - -

XOR last character of the data block

XOR

DLE

XOR

ETX


= BCC

simplification:

The 2 control characters, ETX and DLE are always present. You can collect them
(03 XOR 10 = 13) and calculate the data block separately. The result of the data block is
afterwards exclusive OR’d with the constant value 13H.

BCC = ( XOR Data Block ) XOR ( 13H ).

Advertising