beautypg.com

3 bcc block check character, 4 examples for the determination of the bcc – EUCHNER HBAS User Manual

Page 7

background image

EUCHNER

Hand-Held Pendant Station

3.3 BCC Block Check Character


The

BCC

(Block Check Character) is defined by calculation.

During this process an EXCLUSIVE-OR operator is applied to all characters after STX.
The result is added at the end as the BCC character.

XOR operator


STX

Data block

DLE ETX BCC


Calculation:

1st character in the data block

XOR

2nd character in the data block

XOR

nth character in the data block

XOR

last character in the data block

XOR

DLE

XOR

ETX

=

BCC


Simplification:

As the 2 special characters

ETX

and

DLE

are always present, these can be combined and

calculated separately to the actual data block.

03H

XOR

10H = 13H

The result for the data block is the subjected to an
EXCLUSIVE-OR operation with the constant 13H.

BCC

= (XOR data block)

XOR

13H.


3.4 Examples for the determination of the BCC

Example 1: The HBAS sends the key 7 (37H):

Byte 1

STX

Byte 2

37H

(37H)

Byte 3

DLE

(10H)

Byte 4

ETX

(03H)

XOR

operator

Byte 5

BCC

37H

XOR

10H

= 27H

27H

XOR

03H

= 24H

Simplification by combining

DLE

and

ETX

:

37H

XOR

13H

= 24H

092491-07-01/09

Subject to technical modifications

Page 7 / 34