beautypg.com

HEIDENHAIN TNC 306 Technical Manual User Manual

Page 431

background image


8-18

TNC 406/TNC 306

2 TNC data interfaces

3/97

The header contains 'H' - the identification 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 (identification 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 some devices to
request an explicit 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 calculates a BCC from the block received and compares it with
the received BCC. If the received and calculated BCCs are identical, the receiver sends character
(= positive ACKnowledgment), meaning the data block has been received without error.

If the received and calculated BCCs are not identical, the receiver sends the character
(= Not AcKnowledged), meaning the data block has been incorrectly received and the same block
must be sent again. This process is repeated up to three times. If transfer is still unsuccessful, the
error message TRANSFERRED DATA INCORRECT N is displayed and transfer is aborted.

If, however, this header is acknowledged with , the first data block can be transmitted:
0 BEGIN PGM 1 MM BCC .

The start of a data block is always indicated by control character . The other control
characters in this block are identical to the control characters of the header.

If the block is acknowledged with , the next program block is sent. In the event of a ,
the same block must be repeated, and so on...

If the last program block has been sent successfully (acknowledged with ), transmission
ends with characters (End of Text) and (End of Transmission).

This manual is related to the following products: