beautypg.com

8 a d ditional f unctions – HEIDENHAIN TNC 640 (34059x-01) User Manual

Page 281

background image

HEIDENHAIN TNC 640

281

8.8 A

d

ditional F

unctions

The TNC 640 uses an extended interface for communication between
the PLC and NC. This is a new, symbolic Application Programmer
Interface (API). The familiar previous PLC-NC interface is also available
and can be used if desired. The machine tool builder decides whether
the new or old TNC API is used. Enter the name of the symbolic
operand as string to wait for the defined condition of the symbolic
operand.

The following conditions are permitted in the FN 20 block:

In addition, the FN20: WAIT FOR SYNC function is available. WAIT FOR
SYNC

is used whenever you read, for example, system data via FN18

that require synchronization with real time. The TNC stops the look-
ahead calculation and executes the subsequent NC block only when
the NC program has actually reached that block.

Example: Stop program run until the PLC sets marker 4095 to 1

Example: Stop program run until the PLC sets the symbolic
operand to 1

Example: Pause internal look-ahead calculation, read current
position in the X axis

Byte

B

0 to 4095

Word

W

0 to 2047

Double word

D

2048 to 4095

Condition

Abbreviation

Equal

==

Less than

<

Greater than

>

Less than or equal

<=

Greater than or equal

>=

32 FN 20: WAIT FOR M4095==1

32 FN 20: APISPIN[0].NN_SPICONTROLINPOS==1

32 FN 20: WAIT FOR SYNC

33 FN 18: SYSREAD Q1 = ID270 NR1 IDX1

PLC operand

Abbreviation

Address range