beautypg.com

B.2.5 block checksum field, Using the bdlc protocol – Siemens SIMATIC TIWAY 1 User Manual

Page 190

background image

USING THE BDLC PROTOCOL

UNILINK HOST ADAPTER

B–5

USER MANUAL

B.2.5

Block Checksum Field

This two-byte field is the Block Checksum (BCS) calculated by the transmitter
and checked by the receiver to detect transmission errors. The calculation is a
16-bit one’s complement Fletcher Checksum.

The BCS is calculated using all bytes in the transmitted frame except the
starting and ending flags (DLE-STX and DLE-ETX), the BCS bytes, and any
inserted DLEs. The method for calculating and checking the BCS is discussed in
Paragraph B.7.

Figure B–3 illustrates how a TIWAY I Primitive is enclosed in the adapter
command string which is enclosed in the BDLC I-Frame.

Length

Primitive

Code

Descriptor

Field(s)

Data Unit

Field(s)

Command Code

Secondary

Address

Network Data

TIWAY I Primitives

DLE–STX

Control

FSC

UNILINK Host Adapter Commands

Adapter

Address

DLE–ETX

BDLC Protocol I–Frame

Adapter

Data

Figure B–3 Illustrative BDLC I-Frame