beautypg.com

HEIDENHAIN TNC 335 Technical Manual User Manual

Page 525

background image


8-18

TNC 360

2 TNC data interfaces

8/95

When a file is transferred, the first block, called the "header", is sent. It consists of the following
characters:

"H" "Name" "M" BCC

(Start of Header): This character indicates the start of the header.

The header contains 'H' - the code for the program (see Section "Saving/reading files"), 'Name' - the
program name and 'M' - the transmission mode(E=input/A=output).

This header ends with character , ending a data transfer block.

The subsequent BCC (Block Check Character) provides additional confidence.

In addition to the parity check of the individual characters (see Section "Checking data"), a parity
check is carried out on a complete transmitted block. The BCC always supplements the individual
bits of the transmitted characters of a data transfer block to give even parity.

Example for formation of BCC:

Character

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

SOH

0

0

0

0

0

0

1

H

1

0

0

1

0

0

0

1

0

1

1

0

0

0

1

5

0

1

1

0

1

0

1

E

1

0

0

0

1

0

1

ETB

0

0

1

0

1

1

1

BCC

0

0

1

1

1

1

1

In this example, the HEIDENHAIN dialog (code 'H') has been used to write program '15' which is
read in via the data interface ('E'). A parity bit is also formed for the BCC (with even parity, the parity
bit of the BCC in this example is given a value '1').

The character is sent after the BCC. This character (XON) is needed for a few devices,
explicitly to demand a reply from them in order to start transfer again.

At the end of each block, a check is conducted to see whether the block has been correctly
transferred. To do this, the receiver forms a BCC from the received block and compares it with the
received BCC. If the received and calculated BCCs are identical, the receiver sends character
(= positive ACKnowledgment), i.e. the data block has been transferred without error.