Sei sulla pagina 1di 510

Technical Manual

TNC 416
TNC 406
TNC 306

For the NC software types

March 2000

286 18x

up to version 04 (TNC 416)

280 62x

up to version 10 (TNC 406)

260 03x
260 05x

up to version 16 (TNC 306)


up to version 16 (TNC 306)

208 829-21 2.1 3/2000 S Printed in Germany Subject to change without notice
(208 829-E8)

Preface
This Technical Manual is intended for manufacturers and distributors of machine tools. It contains all
necessary information for assembly, electrical installation, commissioning and PLC-programming for
the HEIDENHAIN TNC 406 and TNC 306 contouring controls.
Whenever HEIDENHAIN improves the hardware or software in these controls you will receive a free
delivery of updated information. Please insert this updated information into your manual without
delay. This will ensure that your manual always reflects the current revision level.
You can use excerpts from this manual for your machine documentation. Enlarging the manual
format (17 cm x 24 cm) by a factor of 1.225 will produce pages in A4 format.
No documentation can be perfect. This manual undergoes continual change and will benefit from
your impulses and suggestions for improvement. Please help us by letting us know your ideas.

DR. JOHANNES HEIDENHAIN GmbH


Department PE
PO Box 1260
D-83292 Traunreut
Germany

3/97

TNC 406/TNC 306

Contents Technical Manual TNC 416, TNC 406, TNC 306


Update Information No. 15 - 11
Introduction
Mounting and Electrical Installation
Machine Integration
Machine Parameters
Markers and Words
PLC Programming
Data interfaces
OEM Cycles
Appendix
Subject Index

1
2
3
4
5
6
7
8
9
10
11

Introduction Contents
1 Hardware concept

2-2

2 Technical data TNC 416/406/TNC 306

2-3

3 Software
3.1 NC Software

2-8
2-8

3.1.1 NC Software number

2-8

3.1.2 Software types and hardware

2-9

3.1.3 Software releases

2-9

3.2

PLC Software

2-10

3.3.

EPROM sockets

2-11

3/2000

TNC 416/TNC 406/TNC 306

Hardware concept

2-1

1 Hardware concept
The HEIDENHAIN TNC 416/TNC 406/TNC 306 controls are designed for ram-type electrical
discharge machines.
The TNCs consists of several different assemblies. The main component is the logic unit.
The logic unit is connected to the other assemblies and to peripheral equipment by means of
connecting cables.

Encoders

Nominal value
outputs

PLC I/0 unit

Visual display unit


TNC keyboard unit

Machine operating panel

Short circuit/
touch probe
Electronic handwheel

Common
data area

NC

PLC

Data interfaces

PLC inputs

PLC outputs

Analogue input
for gap control

The logic unit contains the circuitry for both the NC and the PLC sections of the control. The
common data area contains the machine parameters, PLC markers and words. The machine
parameters define the machine hardware configuration (traverse ranges, acceleration, number of
axes, etc.). The PLC markers and words are used for the exchange of information between the NC
and the PLC.

2-2

TNC 416/TNC 406/TNC 306

Hardware concept

3/2000

2 Technical data TNC 416/TNC 406/TNC 306

Components

TNC 416/TNC 406

TNC 306

LE 406:
LE 406 logic unit
TE 400 keyboard unit
BC 110 14 color CRT
640 x 400 pixels

LE 360C logic unit


TE 355 keyboard unit
BF 110 mono chrome flat
screen (192 x 120mm)
or
BE 212 12 monochrome
CRT512 x 256 pixels

LE 416:
LE 416 logic unit
TE 420 keyboard unit
BF120 color flat screen 10,4
or
BC 120 15 color CRT
640 x 480 pixels

Control type

Program memory

Contouring control for 5 axes


with eroding gap control
Linear interpolation in 3 out of
5 axes
Circular interpolation in 2 out
of 4 axes
Helical interpolation with
simultaneous C-axis motion

10 000 program blocks


for up to 100 files

Contouring control for 4 axes


with eroding gap control
Linear interpolation in 3 out of
4 axes
Circular interpolation in 2 out of
4 axes
Helical interpolation with
simultaneous C-axis motion

5000 program blocks


for up to 32 files

(NC programs, EDM parameters tables, one datum shift table)


PLC program (if not contained in EPROM)
EPROM 128 Kbytes for PLC program, user cycles, EDM parameter
tables, dialogs for user cycles, PLC error messages

3/2000

TNC 416/TNC 406/TNC 306

Technical data TNC 416/TNC 406/TNC 306

2-3

TNC 416/TNC 406


Operating modes

Program input

Manual
Electronic handwheel
Jog positioning
Positioning with MDI
Program run, single block
Program run, full sequence
Programming and editing
Test run (logical and graphical)

In HEIDENHAIN plain language format


Manually on keyboard
Externally over data interface

Input resolution

1 m

display resolution

0,1 m

Programmable functions

2-4

TNC 306

1 m

Nominal position (absolute or incremental) in Cartesian or polar


coordinates
Linear path in 3 out of 4 axes
Circular path in 2 out of 4 axes
Helical path with simultaneous C-axis motion
Corner rounding, chamfer
Tangential contour approach and departure
Tool number and length, radius compensation, tool undersize
Spindle speed for axis C
Rapid traverse
Feed rate
Insertion of programs into other programs
Subprograms and program section repeats
Fixed cycles: disk pocket, EDM polishing, tool definition,
generator definition
Datum shift, coordinate system rotation, mirror image, scaling
Dwell time, miscellaneous functions M, program stop
Remote control via LSV2 protocol (only TNC 416/406)

TNC 416/TNC 406/TNC 306

Technical data TNC 416/TNC 406/TNC 306

3/2000

TNC 416/TNC 406


Parameter programming

TNC 306

cos,
Mathematical functions (=, +, , , , sin,______
angle from r * sin and r * cos , , a + b;
variable parameter comparison (=,,>,<)
indexed data assignment
output of parameter values over RS-232-C data interface

Maximum traverse range

30 000 mm (1181 in.)

Maximum traverse speed

30 m/min (1181 ipm)

Data interface

RS-232-C./.V.24
Baud rate 38 000; 19 200; 9600; 4800; 2400; 1200; 600; 300; 150; 110
RS-422 / V.11 (assigned to PLC)

Cycle times
Block processing time

15 ms

60 ms

Closed-loop cycle time

2 / 4 ms (selected with MP)

4 ms

PLC cycle time

20 / 40 ms (selected with MP)

40 ms

3/2000

TNC 416/TNC 406/TNC 306

(with 2000 logical PLC


commands)

Technical data TNC 416/TNC 406/TNC 306

2-5

TNC 416/TNC 406

TNC 306

Encoders

HEIDENHAIN incremental linear encoders, optionally with distancecoded reference marks, grating period 0.01/0.02/0.1 mm (or rotary
encoders)

Control inputs

LE 406:
6 encoder inputs (4 sinusoidal,
2 square-wave inputs)

5 encoder inputs (4 sinusoidal,


1 square-wave input)

LE 416:
5 sinusoidal encoder inputs
1 analog input for eroding gap
signal

1 analog input for eroding gap


signal

1 input for electronic handwheel 1 input for electronic handwheel


1 input for short circuit
detection
56 PLC inputs + 1 input for
EMERGENCY STOP signal
Additional 64 PLC inputs on
PLC board PL 410 B (optional)

Control outputs

5 analog outputs for axes

1 input for short circuit detection


55 PLC inputs + 1 input for
EMERGENCY STOP signal
Additional 64 PLC inputs on PLC
board PL 410 B (optional)
4 analog outputs for axes

31 PLC outputs
Additional 31 PLC outputs on PLC board PL 410 B (optional)
Integral PLC

Programming according to instruction list, 4000 PLC commands


(Entry on HEIDENHAIN keyboard or over data interface)

Power supply for LE

24 Vdc

2-6

TNC 416/TNC 406/TNC 306

Technical data TNC 416/TNC 406/TNC 306

3/2000

Power consumption

Ambient temperature

Weight

3/2000

TNC 416/TNC 406

TNC 306

NC:
6W
PLC:
6W
BC110: 70W
BC120: 80W
BF 120: 15W
PL 410 B: 25 W (approx.)

NC:

Operation:

0 to 45 C

Storage:

30 to 70 C

LE 416
LE 406
TE 400
BC 110
BC 120
BF 120
PL 410 B

TNC 416/TNC 406/TNC 306

6 kg
8.5 kg
2.4 kg
11 kg
14 kg
3 kg
1.5 kg

27 W (approx.) with
BE 212
BF 110: 33 W

PLC:

2 4 W (approx.)

(BF 110: 0 to 40 C)

LE 360C
TE 355
BF 110
BE 212
PL 410 B

8 kg
1.6 kg
1.7 kg
11 kg
1.5 kg

Technical data TNC 416/TNC 406/TNC 306

2-7

3 Software
The logic unit contains separate software for the NC section and the PLC section.
The software is identified by an 8-digit number. After the control is switched on, the NC and
PLC software numbers are displayed on the screen. The software number can also be directly requested
with the aid of the MOD function.
3.1 NC Software
3.1.1 NC Software number
The 8-digit NC software number identifies the control model, the dialog language
(language of the country) and the software version.

2 8 6 1 8 x -01
Software type
TNC 416
National language
0= English
1= English 2= English
German
German
German
French
Swedish
Czech
talian
Finnish
res.
Software version

2 8 0 6 2 x -01
Software type
TNC 406
National language
0= English
1= English 2= English
German
German
German
French
Swedish
Czech
Italian
Finnish
res.
Software version
2 6 0 0 3 x -01
Software type
TNC 306
National language
0= English
1= Czech
2= French
3= Italian
Software version
In addition to the above languages the TNC 306 can always use German, which may be
selected via machine parameter MP7230.

2-8

TNC 416/TNC 406/TNC 306

Software

3/2000

3.1.2 Software types and hardware


HEIDENHAIN has up to now offered several different versions of the LE 360 and LE 360C logic units
and a new LE 406. The following table shows which software type will run on which hardware
version. Since the TNC 306 and TNC 406 are not subject to export restrictions, special export
versions are not necessary.
Control

Hardware Id.-Nr.

Software type

TNC 416

336 487 3x (for flat panel display BF)


336 486 3x (for CRT color screen BC)

286 18x

TNC 406

288 513 15

280 62x

TNC 306 for BE 212


TNC 306 C for BE 212
TNC 306 C for BF 110

264 085 96
270 641 25
270 642 25

260 03x
260 03x
260 05x

3.1.3 Software releases


New NC software versions are periodically released by HEIDENHAIN.
Software version

Release date

TNC 416
286 18x-01
286 18x-02
286 18x-03
286 18x-04

3/99
4/99
4/99
2/2000

Software version

Release date

TNC 406
280 62x-01
280 62x-02
280 62x-03
280 62x-04
280 62x-05
280 62x-06
280 62x-07
280 62x-08
280 62x-09
280 62x-10

3/94
10/94
11/95
11/96
2/97
10/98
12/98
3/99
12/99
2/2000

3/2000

TNC 416/TNC 406/TNC 306

Software

2-9

Software version
TNC 306
260 03x-03
260 03x-04
260 03x-05
260 03x-06
260 03x-07
260 03x-08
260 03x-09
260 03x-10
260 03x-11
260 03x-12
260 03x-13
260 03x-14
260 03x-15
260 03x-16

Release date
2/92
3/93
8/93
11/93
3/94
6/94
6/94
11/94
2/95
6/95
11/95
2/96
11/96
1/97

Software version
TNC 306
260 05x-03
260 05x-04
260 05x-05
260 05x-06
260 05x-07
260 05x-08
260 05x-09
260 05x-10
260 05x-11
260 05x-12
260 05x-13
260 05x-14
260 05x-15
260 05x-16

Release date
2/92
3/93
8/93
11/93
3/94
6/94
6/94
11/94
2/95
6/95
11/95
2/96
11/96
1/97

3.2 PLC Software


The PLC software is produced by the machine manufacturer. Either HEIDENHAIN or the machine
manufacturer can store this software in EPROMs. HEIDENHAIN assigns PLC software numbers to
the machine manufacturers on request. HEIDENHAIN can archive the specific PLC programs in a
database, so that the installation of the correct PLC program is assured if a control has to be
exchanged.

2-10

TNC 416/TNC 406/TNC 306

Software

3/2000

3.3 EPROM sockets


EPROM sockets LE 416

EPROM sockets LE 406

EPROM sockets LE 306

3/2000

TNC 416/TNC 406/TNC 306

Software

2-11

Danger of electrical shock!


Unplug the power cord before opening the housing.
Danger to internal components!
When handling components that can be damaged by electrostatic discharge (ESD),
observe the safety recommendations in DIN EN 100 015. Use only antistatic
packaging material. Be sure that the work station and the technician are properly
grounded during installation.

2-12

TNC 416/TNC 406/TNC 306

Software

3/2000

Mounting and electrical installation Contents


1 Hardware components
1.1 Components of the TNC 416

34
34

1.2 Components of the TNC 406

34

1.3 Components of the TNC 306

34

1.4 Options

34

2 Installation
2.1 Electrical noise immunity

36
36

2.2 Heat generation and cooling

37

2.3 Humidity

38

2.4 Mechanical vibration

38

2.5 Mounting position

38

2.5.1

Logic unit

2.5.2

Visual display unit

2.5.3

PLC Input/Output board PL 410 B

39
312
312

2.6 Degree of protection

312

3 Overview of connections

313

4 Power supply
4.1 Overview

317
317

4.1.1

NC power supply

318

4.1.2

PLC power supply

319

4.1.3

Buffer battery

321

4.2 Power supply for the visual display unit

322

4.3 Grounding plans

324

4.3.1

Grounding plan TNC 416

324

4.3.2

Grounding plan TNC 406

325

4.3.3

Grounding plan TNC 306

326

5 Measuring systems
5.1 Linear measuring systems

329
329

5.2 Angular measuring systems

329

5.3 Measuring system inputs for sinusoidal signals

330

5.3.1

Connector assignments

330

5.4 Measuring system input for square-wave signals

332

5.4.1

Connector assignments

332

6 Nominal value output / Gap signal input


6.1 Connector assignment

333
334

7 Visual display unit (VDU)


7.1 Connector assignment

337
337

3/99

TNC 416/TNC 406/TNC 306

Hardware components

31

8 Short-circuit signal/Touch probe input


8.1 Connection of the short-circuit signals

340
341

8.2 Connection of the touch probe system

341

9 Data interface
9.1 RS-232-C/V.24 data interface

343
343

9.2 RS 422/V.11 data interface

344

10 Handwheel input
10.1 Portable handwheel HR 410

345
345

10.2 Panel-mounted handwheel HR 130

348

11 PLC inputs/outputs
11.1 Technical data

350
350

11.2 Connector assignment

351

11.2.1

PLC output

352

11.3 PLC I/O expansion board PL 410 B

354

11.3.1

355

PLC inputs/PLC outputs on the PL 410 B

12 Machine control panel

358

13 TNC keyboard

360

14 Cable overview
14.1 Cable overview TNC 416

362
362

14.2 Cable overview TNC 406

363

14.3 Cable overview TNC 306

364

32

TNC 416/TNC 406/TNC 306

Hardware components

3/99

15 Mounting dimensions
15.1 LE 416

366
366

15.2 LE 406

367

15.3 TE 420

368

15.4 TE 400

369

15.5 BC 120

370

15.6 BF 120

371

15.7 BC 110 B

372

15.7.1

373

LE 360 C

15.8 Keyboards for TNC 306

374

15.8.1

TE 355 A

374

15.8.2

TE 355 B

375

15.9 Visual display units for TNC 306

376

15.9.1

BE 212

376

15.9.2

BF 110

377

15.10

Input/Output boards PL 410B

378

15.11

Handwheel HR

379

15.11.1 Panel-mounted handwheel HR 130

379

15.11.2 Portable handwheels HR 410

383

15.11.3 Touchprobe system TS 220

383

15.12

384

3/99

Cable adapter

TNC 416/TNC 406/TNC 306

Hardware components

33

1 Hardware components
1.1 Components of the TNC 416
LE 416 Logic Unit for BC 120
for BF 120

Id.-Nr. 336 486-3x


Id.-Nr. 336 487-3x

TE 420 Keyboard Unit

Id.-Nr. 313 038-01

BC 120 Visual Display Unit


(15-inch color monitor)

Id.-Nr. 313 037-01

BF 120 Visual Display Unit


(10.4-inch color flat panel display)

Id.-Nr. 313 506-01

1.2 Components of the TNC 406


LE 406 Logic

Id.-Nr. 288 513-19

TE 400 Keyboard Unit

Id.-Nr. 250 517-03

BC 110 B Visual Display Unit


(14-inch color monitor)

Id.-Nr. 260 520-01

1.3 Components of the TNC 306


LE 306 Logic Unit for BE 212
for BF 110

Id.-Nr. 270 641-2x


Id.-Nr. 270 642-2x

TE 355A Keyboard Unit


TE 355 B Keyboard Unit

Id.-Nr. 255 015-06


Id.-Nr. 255 016-04

BF 110 Visual Display Unit


Id.-Nr. 267 209-01
(9-inch monochrome flat panel display)
BE 212 Visual Display Unit
(12-inch monochrome monitor)

Id.-Nr. 242 370-01

1.4 Options
PL 410 B PLC I/O board
Handwheel HR 410
Touch Probe System TS 220

34

Id. Nr. 263 371-12


Id. Nr. 296 469-01
Id. Nr. 293 488-xx

TNC 416/TNC 406/TNC 306

Hardware components

3/99

3/99

TNC 416/TNC 406/TNC 306

Hardware components

35

2 Installatio n
2.1 Electrical noise immunity
Please note that the vulnerability of electronic equipment to noise increases with faster signal
processing rates and higher sensitivity. Please protect your equipment by observing the following
rules and recommendations.
Noise voltages are mainly produced and transmitted by capacitive and inductive coupling. Electrical
noise can be picked up by the inputs and outputs to the equipment, and by the cabling.

Possible sources of interference are:

Strong magnetic fields from transformers and electric motors


Relays, contactors and solenoid valves
High-frequency equipment, pulse equipment and stray magnetic fields from switch-mode
power supplies
Mains leads and leads to the above equipment

Electrical interference can be avoided by:

A minimum distance between the logic unit (and its leads) and interfering equipment > 20 cm.
A minimum distance between the logic unit (and its leads) and cables carrying interference
signals > 10 cm.
(Where signal cables and cables which carry interference signals are laid together in metallic
ducting, adequate decoupling can be achieved by using a grounded separation shield)
Screening according to DIN VDE 0160.
Potential compensating lines 6 mm (see grounding plan).
Use of original HEIDENHAIN cables, connectors and couplings.

36

TNC 416/TNC 406/TNC 306

Installation

3/99

2.2 Heat generation and cooling


Please note that the reliability of electronic equipment is greatly reduced by continuous operation at
elevated temperatures. Please take the necessary measures to maintain the permissible ambient
temperature range.
Permissible ambient temperature during operation: 0 to 45 C (BF 110: 0 to 40 C)
The following means may be employed to ensure adequate heat removal:

Provide sufficient space for air circulation.


Build in a ventilator fan to circulate the air inside the control cabinet. The fan must reinforce the
natural convection. It must be mounted so that the warm air is extracted from the logic unit
and no pre-warmed air is blown into the unit. The warm air should flow over surfaces
that have good thermal conductivity to the external surroundings (e.g. sheet metal).
For a closed steel housing without assisted cooling, the figure for heat conduction is 3 watt/m
of surface per C air temperature difference between inside and outside.
Use a heat exchanger with separate internal and external circulation.

Forced-air cooling by blowing external air through the control cabinet to replace the internal air. In
this case the ventilator fan must be mounted so that the warm air is extracted from the control
cabinet and only filtered air can be drawn in. HEIDENHAIN advises against this method of
cooling, since the functioning and reliability of electronic assemblies are adversely affected by
contaminated air (fine dust, vapors, etc.). In addition to these disadvantages, an inadequately
serviced filter can lead to a loss in cooling efficiency. Regular servicing is therefore essential.

Correct

Incorrect

LE

Obstructive
elements

LE

Heat generating
elements

3/99

TNC 416/TNC 406/TNC 306

Installation

37

2.3 Humidity
Permissible humidity:

< 75% in continuous operation,


< 95% for not more than 30 days p.a. (randomly distributed).

In tropical areas it is recommended that the TNC remain permanently switched on to prevent
condensation on the circuit boards.

2.4 Mechanical vibration


Permissible vibration:

< 5 m/s2; 0-500 Hz

2.5 Mounting position


Note the following fundamental points on mounting:
Mechanical accessibility
Permissible environmental conditions
Electrical noise immunity
The electrical regulations which are in force in your country

38

TNC 416/TNC 406/TNC 306

Installation

3/99

2.5.1 Logic unit


HEIDENHAIN recommends the following mounting position of LE 416

5.91"

>3.54"
Air outlet

>4.72"

Air inlet

>3.54"

7.87"

3/99

TNC 416/TNC 406/TNC 306

Installation

39

HEIDENHAIN recommends the following mounting position of LE 406


>577
>110
80

80

40

40
C Air outlet

100

Minimum clearance
for servicing!
recommended: =
approx. 250 mm

*
30

*
Maintain clearance
for screwdriver

C
Air inlet

100

Connecting cables
must not hinder
swivel movement
of the control

30

160

246
160
C

30
60

83

Measuring point for


ambient temperature
Free space for air circulation
Free space for servicing

C
40

*
PL
C

32

Illustration of
max. swivel range.
The minimum angle of
swivel for exchange
of subassembly should
be at least 90.
145

40

270

40

310

40

TNC 416/TNC 406/TNC 306

Installation

3/99

HEIDENHAIN recommends the following mounting position of LE 306

>577
>110
80

80

40

40
C

Air
outlet

*
30

100

Minimum clearance
for servicing!
recommended:=
approx. 250 mm

Maintain clearance
for screwdriver

Air
inlet

30

Connecting cables
must not hinder
swivel movement
of the control
218.5

100

160

132.5
C

30
60

83

Measuring point for


ambient temperature
Free space for air circulation
Free space for servicing

40

*
PL
C

32

Illustration of
max. swivel range.
The minimum angle of
swivel for exchange
of subassembly should
be at least 90.

145

40

270
40

3/99

40

TNC 416/TNC 406/TNC 306

Installation

311

2.5.2 Visual display unit


Permissible ambient temperature:
BC 120/BC 110/BE 212/BF 120:
BF 110:

max. 45 C
max. 40 C

The VDU must be installed with a minimum clearance of 25 mm to the housing. It is particularly
recommended that a large area is left free above the unit for heat escape.
Temperature is measured at a distance of 25 mm to the housing. The above mentioned
temperatures must not be exceeded.
When installing the BC 120/BC 110/BE 212, remember that this VDU is very sensitive
to magnetic interference. The image position and geometry can be disturbed by stray
magnetic fields; alternating fields can cause periodic movement or image distortion.

For this reason, keep a minimum distance of 0.5 m between the VDU housing and sources of
interference (permanent magnets, motors, transformers, etc.)

2.5.3 PLC Input/Output board PL 410 B


One PL 410 B can be connected to the LE 406 or LE 360 C, if desired. There is no preferred
mounting position for heat removal.

2.6 Degree of protection


Visual display unit when mounted
Keyboard unit when mounted
HR 410 handwheel

Protection class IP54


Protection class IP54
Protection class IP54

IP54 = Protection against dust and splashwater

312

TNC 416/TNC 406/TNC 306

Installation

3/99

3 Overview of connections
LE 416
X1
X2
X3
X4
X6

Measuring system 1 (1Vss/11A)


Measuring system 2 (1Vss/11A)
Measuring system 3 (1Vss/11A)
Measuring system 4 (1Vss/11A)
Measuring system 5 (1Vss/11A)

X8

Nominal value outputs 1,2,3,4,5,


gap signal input

X12

Triggering touch probe for workpiece


measurement
Triggering touch probe for tool
measurement

X13

X21
X22

RS-232-C/V24 data interface


RS-422/V11 data interface

X23

Handwheel interface

X41
X42
X43
X44
X45
X46
X47
X48
X49
120)
X31

PLC output
PLC input
BC 120 VDU (alternative to BF 120)
PLC power supply
TNC keyboard
Machine operating panel
PLC expansion
PLC analog input
BF 120 flat panel (alternative to BC
NC power supply

X13, X30 Do not use


X65
not installed
B
Signal ground
Protective ground (YL/GN)

Interfaces X1, X2, X3, X4, X6, X8, X12, X21, X22, X23, X41, X42, X43, X45, X46, X47, X49
comply with the recommendations in VDE 0160, 5. 88 for separation from line power.
Danger to internal components!
Do not engage or disengage any connections while the unit is under power.
The outputs at connection X.... (indicate pin number if appropriate) are metallically isolated
from the device electronics by means of optocouplers.

3/99

TNC 416/TNC 406/TNC 306

Overview of connections

313

LE 406
X1
X2
X3
X4
X5
X6

Measuring system 1 (11A)


Measuring system 2 (11A)
Measuring system 3 (11A)
Measuring system 4 (11A)
)
Measuring system 5 (
Measuring system 6 (
)

X8

Nominal value outputs 1,2,3,4,5


gap signal input

X12

Touch probe system;


Short-circuit signal input

X21
X22

Data interface RS-232-C/V.24


Data interface RS-422/V.11

X22

X23

Electronic handwheel HR 130/HR 410

X23

X41
X42
X43
X45
X46
X47

PLC output
PLC input
VDU BC 110
TNC keyboard TE 400
Machine operating panel
PLC I/O board PL 410 B

X31
X44

Power supply 24 V for NC


Power supply 24 V for PLC

Signal ground

X1
X12

24V

X2

X44

X41 X45
X8

X31

X3

X21

X4

X42 X46
X5

X6
X47
X43

Interfaces X1, X2, X3, X4, X5, X6, X8, X12, X21, X22, X23, X41, X42, X43, X45, X46 and X47
comply with the recommendations in VDE 0160, 5. 88 for separation from line power.
Danger to internal components!
Do not engage or disengage any connections while the unit is under power.
The outputs at connection X.... (indicate pin number if appropriate) are metallically isolated
from the device electronics by means of optocouplers.

314

TNC 416/TNC 406/TNC 306

Overview of connections

3/99

LE 306

X21 X24

X1
X2
X3
X4
X6

Measuring system 1 (11A)


Measuring system 2 (11A)
Measuring system 3 (11A)
Measuring system 4 (11A)
)
Measuring system (

X25

X8

Nominal value outputs 1,2,3,4;


gap signal input

X9

VDU BE212/BF110

X11

Electronic handwheel HR 130/HR 410

X12

Touch probe system

X1
X11

24V

X2
X12

X31

X3

X4

X22

X8

X26

Short-circuit signal input


X6

X23 X27
X9

X21
X22
X23
X25
X26
X27

PLC output
PLC input
TNC keyboard TE355
Data interface RS-232-C/V.24
PLC I/O board PL 410 B
Machine operating panel

X31
X24

Power supply 24 V for NC


Power supply 24 V for PLC

Signal ground

Interfaces X1, X2, X3, X4, X6, X8, X9, X11, X12, X21, X22, X23, X25, X26, and X27 comply
with the recommendations in VDE 0160, 5. 88 for separation from line power.
Danger to internal components!
Do not engage or disengage any connections while the unit is under power.
The outputs at connection X.... (indicate pin number if appropriate) are metallically isolated
from the device electronics by means of optocouplers.

3/99

TNC 416/TNC 406/TNC 306

Overview of connections

315

316

TNC 416/TNC 406/TNC 306

Overview of connections

3/99

4 Power supp ly
4.1 Overview
The supply voltages must meet the following specifications:
Unit

Supply
voltage

Voltage range

LE 416

400 Vac

330 Vac 450 Vac

24 V DC
(VDE 0551)

lower limit

LE 406
LE 306

NC

Max. current
consumption

Power
consumption
35 W

LE 406 1.3 A
LE 306 1.5 A

24 W
28.8 to 36 W
(the BE 212 is
also supplied)

1.8 A
when half of the
inputs/ outputs
are switched on
simultaneously

Approx. 6 W
when approx. 1/3 of
inputs/ outputs are
switched on
simultaneously

PL 410 B

21 A
when half of the
inputs/ outputs
are switched on
simultaneously

Approx. 25 W
when approx. 1/3 of
inputs/ outputs are
switched on
simultaneously

BF 110

24 W typical
Approx. 1 A
with full display 32 W max.

BF 120

24 W typical
Approx. 1 A
with full display

20.4 V - - -

upper limit
PLC

BC 110
BC 120
BE 212

24 V DC
31 V - - - 1)
Base
insulation acc.
to VDE 0160)

110 V / 230 V 85 - 132 V/170 -264 V


110 V / 230 V 85 264 V
Powered through the LE 306

70 W
80 W

1) Voltage surges up to 36 V - - - for t < 100 ms are permissible.

3/99

TNC 416/TNC 406/TNC 306

Power supply

317

4.1.1 NC power supply


LE 416
Terminal
X31

Assignment
Protective ground (YL/GN)

U1

Phase 1

330 Vac to 450 Vac;

U2

Phase 2

50 to 60 Hz

UZ

Do not use

+UZ

Do not use

LE 406/LE 306
Pin number
X 31

Assignment

1
2

+ 24 V DC
0V

The NC section of the LE must not be supplied


from the control voltage of the machine. It
requires its individual, external and separately
generated supply voltage according to
VDE 0551. Use 24 V DC with a permissible AC
component of 1.5 Vpp (recommended filter
capacitor 10 000 F/40 V DC).

U
1.5 Vpp

24 V

318

TNC 416/TNC 406/TNC 306

Power supply

3/99

4.1.2 PLC power supply


Power supply for the PLC on board
LE 416/LE 406
LE 306
Pin number
1
2
3

X44
X24
Assignment
+ 24 V DC, switched off by EMERGENCY STOP
+ 24 V DC, not switched off by EMERGENCY STOP
0V

Power supply for the PL 410 B


The PLC outputs are powered in groups.
Terminal
X9
X10
X11
X12
X13
X14

Assignment
0V
+24 V power for logic and for "Control is operational"
+24 V power for outputs
+24 V power for outputs
+24 V power for outputs
+24 V power for outputs

PLC output

O32 to O39
O40 to O47
O48 to O55
O56 to O62

The PLC inputs and outputs on the LE and PL 410 B are powered by the 24 V machine control voltage
supply.
Danger to internal components!
Voltage sources for external circuitry must conform to the recommendations in VDE
0160, 5. 88 for low-voltage electrical separation.
Superimposed AC components, such as those caused by a three-phase bridge rectifier without smoothing,
are permissible up to a ripple factor of 5% (see DIN 40110/10.75, Section 1.2). This means an absolute
upper voltage limit of 32.6 V and an absolute lower voltage limit of 18.5 V:
U
32.6 V
31 V

20.4 V
18.5 V

The 0 V line of the PLC power supply must be grounded with a ground lead ( 6 mm2) to the main
signal ground of the machine.

3/99

TNC 416/TNC 406/TNC 306

Power supply

319

320

TNC 416/TNC 406/TNC 306

Power supply

3/99

4.1.3 Buffer battery


The buffer battery is the voltage source for the RAM memory for NC-programs, PLC-programs
and machine parameters when the control is switched off.
If the message "EXCHANGE BUFFER BATTERY" appears, the batteries must be exchanged.
The 3 batteries may be found behind a screw cap in the power supply section of the logic unit.
As well as the batteries, the logic unit contains an additional energy store, mounted on the
processor board, for buffering the memory contents.
This means that the mains can be switched off when replacing the batteries. The energy
store will ensure that the memory is retained while the batteries are exchanged.

LE 416

Battery type:
Three AA-size batteries, leak-proof
IEC designation: LR6

LE 406/LE306

Battery type:
Three AA-size batteries, leak-proof
IEC designation: LR6

Danger of electrical shock!


Power of before opening the housing.

3/99

TNC 416/TNC 406/TNC 306

Power supply

321

4.2 Power supply for the visual display unit


BC 120
Mains supply voltage
Supply voltage range 85 V to 264 V
Fuse rating

F 3.15 A

Frequency range

50 to 60 Hz

Power consumption

80 W

BC 110
X3 = Mains supply connection
Mains supply voltage 110 V

220 V

Supply voltage range 85V to 132 V

170V to 264 V

Fuse rating

F 3.15 A

F 3.15 A

Frequency range

50 to 60 Hz

Power consumption

70 W

Connection
L1
N

Assignment
Live (BK)
Neutral (BL)
Protective earth (GN/YL)

X4 = DC connections (only for BC 110, Id.-Nr. 254 740 01)


Pin Number
1
2

Assignment
Do not use
Do not use

Power supply for integral fan:


The power supply for the fan must be connected separately to the BC 110 (Id.-Nr. 254 740 01).
The connection to the +24 V machine control voltage must be according to VDE 0550.
Permissible voltage range +18 to +28 V; power consumption 5 W at +24 V DC.
The power supply for the fan is taken internally from the main supply voltage.

BE 212
The BE 212 visual display unit is powered through the LE 306 (connector X9).
Danger of electrical shock!
The BE 212 and BC 110 generate high voltages.
Unplug the power cord before opening the housing.

322

TNC 416/TNC 406/TNC 306

Power supply

3/99

BF 120/BF 110
X1 power supply
Pin number
1
2

Assignment
+ 24 V
0V

Danger to internal components!


Voltage sources of external circuitry must conform to the recommendations in VDE
0160, 5. 88 for low-voltage electrical separation.

3/99

TNC 416/TNC 406/TNC 306

Power supply

323

4.3 Grounding plans


4.3.1 Grounding plan TNC 416

Danger of electrical shock!


Connect a protective ground. This connection must never be interrupted.

3/99

TNC 416/TNC 406/TNC 306

Grounding plans

324

4.3.2 Grounding plan TNC 406

Danger of electrical shock!


Connect a protective ground. This connection must never be interrupted.

3/99

TNC 416/TNC 406/TNC 306

Grounding plans

325

4.3.3 Grounding plan TNC 306

Danger of electrical shock!


Connect a protective ground. This connection must never be interrupted.

3/99

TNC 416/TNC 406/TNC 306

Grounding plans

326

3/99

TNC 416/TNC 406/TNC 306

Power supply

327

328

TNC 416/TNC 406/TNC 306

Power supply

3/99

5 Measuring systems
HEIDENHAIN contouring controls are designed for the installation of incremental linear and angular
measuring systems.
The control measures the actual position with a measuring step of 0.001 mm or 0.001. Measuring
systems with a graduation period of 0.001 mm or 0.001 to 1 mm or 1 may be used.
It does not matter whether the measuring system has one or several reference marks. However,
HEIDENHAIN recommends measuring systems with distance-coded reference marks, since this
reduces the traversing distance when homing on the reference marks to a minimum. See chapter
"Machine Integration."

5.1 Linear measuring systems


Measurement of length is best performed by a linear measuring system. Insofar as it is compatible
with the accuracy requirements, linear measurement can also be made using a rotary encoder on
the ballscrew.
HEIDENHAIN recommends use of the following linear measuring systems:
LS 103 C, LS 106 C, LS 405 C, LS 406 C, LS 706 C, LB 326, ULS 300 C
For linear measurement using a rotary encoder and a ballscrew it would be possible to use, for
example, the ROD 450.

5.2 Angular measuring systems


For direct angular measurement in the A, B or C axes the following incremental angular measuring
systems are available: ROD 250 C, ROD 700 C, RON 255 C, and RON 705 C.
To meet accuracy requirements HEIDENHAIN recommends line counts of at least 18 000.

3/99

TNC 416/TNC 406/TNC 306

Measuring systems

329

5.3 Measuring system inputs for sinusoidal signals


The LE 406/LE306 can have measuring systems with sinusoidal inputs 11 APP.
The LE 416 can have measuring systems with sinusoidal inputs 11 APP or 1VPP switched over via
MP115.0.
MP115.0 Axis-specific encoder setting 11A or 1VPP (LE 416)
Input:

%xxxxx
0 = 1VPP
1 = 11A

Maximum input frequency LE 416


The maximum input frequency of the position encoder inputs of LE 416 depends on MP115.2.
MP115.2 Low/high input frequency of the position encoder inputs (LE 416)
Input:
%xxxxx
0 = 50 kHz for 1VPP; 50 kHz for 11A
1 = 350 kHz for 1VPP; 150 kHz for 11A
(recommended input value for linear encoders 50 kHz)
Maximum input frequency LE 406 50 kHz
Maximum input frequency LE 306 30 kHz

5.3.1 Connector assignments


LE 406/LE306
X1, X2, X3, X4 measuring system 1, 2, 3, 4
Flange socket with female connector insert (9-pin)
Pin number

Assignment

I1+

I1

I2+

I2

I0+

I0

+ 5 V (UP)

0 V (UN)

Inner shield

Housing

Outer shield = unit housing

330

TNC 416/TNC 406/TNC 306

Measuring systems

3/99

LE 416
X1, X2, X3, X4 and X6 Encoder (1 VPP/11A)
Logic unit

Encoder cable

D-sub
terminal
(male) 15-pin

Assignment
1 VPP

Assignment
11A

D-sub
connector
(female) 15pin

1 VPP

11A

+ 5 V (UP)

+5V

Brown/Green

Brown

0 V (UN)

0V

White/Green

White

A+

I1+

Brown

Green

I1

Green

Yellow

0V

0V

B+

I2+

Gray

Blue

I2

Pink

Red

0V

0V

+5V

+5V

Blue

10

R+

I0+

10

Red

11

0V

0V

11

White

12

I0

12

Black

13

0V

0V

13

14

Do not use

Do not use

14

15

Do not use

Do not use

15

Housing

External
shield

External shield Housing

3/99

TNC 416/TNC 406/TNC 306

White/Brown
(internal shield)

Gray
Pink

Violet
External shield

Measuring systems

External shield

331

5.4 Measuring system input for square-wave signals


One measuring system with square-wave signals can be connected to the LE 306 at input X6, two
such systems can be connected to the LE 406 at input X5 and X6.
The maximum input frequency:
LE 406 300 kHz
LE 306 200 kHz

5.4.1 Connector assignments


X5 (only LE 406), X6 measuring system 5, 6 (only LE 406/LE 306)
Flange socket with female insert (12-pin)
Pin number

Assignment

Ua1

Ua1

Ua2

Ua2

Ua0

Ua0

UaS

+ 5 V (UP)

12

+ 5 V (UP)

11

0 V (UN)

10

0 V (UN)

9 (contact spring)

shield = housing

Use only HEIDENHAIN measuring system cables, connectors and couplings.

332

TNC 416/TNC 406/TNC 306

Measuring systems

3/99

6 Nominal v alue output / Gap signal input


Nominal value output
The HEIDENHAIN contouring controls regulate the position loop servo with a nominal value potential
of 10 volts.
Maximum loading of the nominal value outputs: 2 mA
Maximum load capacitance: 2 nF
Gap signal input
The gap signal (voltage) is connected to analog input X8 of the logic unit. The gap signal voltage
must be between 0V and + 5V. The TNC uses the gap signal to calculate new nominal values for the
analog outputs. (For a detailed description, see "Gap control").
The following RC circuit is integrated in the logic unit at the analog input for filtering of surge pulses
and for storing the analog signal.
LE
Ra

X8 Pin 2 220

0V

Pin 10

100 nF

Time constant:
T = 22 s (220 100 F)
5T = 110 s
Since the output impedance Ra of the driver stage affects the entire time constant, a low output
impedance is necessary (for example 33 ).

3/99

TNC 416/TNC 406/TNC 306

Nominal value output / Gap signal input 333

6.1 Connector assignment


X8 nominal value output/Gap signal input
D-sub connector (15-pin female insert)
X8 Nominal Value Output
Logic unit

Connecting Cable

D-sub terminal
(female) 15-pin

Assignment

D-sub
connector
(male) 15-pin

Color

Nominal value output 1

BN

Analog input, gap signal

BN/GN

Nominal value output 2

YL

Nominal value output 5

RD/BL

Nominal value output 3

PK

0V Nominal value output 5

GY/PK

Nominal value output 4

RD

Nominal value output 6

VI

0V Nominal value output 1

WH

10

0V Analog input

10

WH/GY

11

0V Nominal value output 2

11

GN

12

Not used

12

13

0V Nominal value output 3

13

GY

14

0V Nominal value output 4

14

BL

15

0V Nominal value output 6

15

BK

Housing

External shield

Housing

External shield

No more than one intermediate terminal clamp is allowed on the connecting cable to the nominal
value outputs. The clamp must be made in a grounded connection box. This is necessary when the
cable must branch to physically separate servo inputs. It is only possible to ground the shielding of
the servo leads in this way. If required, suitable connection boxes are available from HEIDENHAIN
with the Id.-Nr. 251 249 01.

Connection box

The casing of the connection box must be electrically connected with the frame of the machine.
The 0 V of the nominal value differential input must be joined to signal ground, (cable cross-section
6 mm, see also under "Grounding plan").

334

TNC 416/TNC 406/TNC 306

Nominal value output / Gap signal input 3/99

Suggested solution for connecting and wiring the shielding in the connection box:
Insulated against housing

LE

Leads are provided


with end sleeves.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

IV

S
GAP

SERVO

Pin number

Assignment

1
2
3
4
5
6
7
8
11
12
13
14
15
16

Analog output
Analog output 0V
Analog output
Analog output 0V
Analog output
Analog output 0V
Analog output
Analog output 0V
Analog input
Analog input 0V
Screen connection
Screen connection
Screen connection
Screen connection

3/99

Cable screens are led onto 0.14 mm2


insulated strands via crimp eyelets.

TNC 416/TNC 406/TNC 306

X-axis
X-axis
Y-axis
Y-axis
Z-axis
Z-axis
IVth axis
IVth axis
Gap signal
Gap signal

Nominal value output / Gap signal input 335

6 Nominal value output / Gap signal input

336

TNC 416/TNC 406/TNC 306

Nominal value output / Gap signal input 3/99

7 Visual disp lay unit (VDU)


The LE 406 is prepared for connecting the BC 110 CRT screen, the LE 306C for connecting the BE
212 CRT screen or BF 110 flat luminescent screen. The status is indicated by the Id.-Nr. on the ID
label (Id.-Nr. 270 641 for BE 212 and Id.-Nr. 270 642 for BF 110).

7.1 Connector assignment


X9 Visual display unit BE 212 and BF 110
X43 Visual display unit BC 110
Flange socket with female insert
Pin number
1

BE 212
0 V power supply

BF 110

BC 110
GND

+12 V power supply

Not used

Not used

Not used

Not used

4
5
6
7
8
9
10
11
12
13
14
15
Housing

+12 V power supply


Not used
Not used

0 V power supply
V SYNC
H SYNC1

0 V Signal
Video

3/99

Not used
Not used
Video

V SYNC

0 V Signal

H SYNC 2
CLOCK
Outer shield = Unit housing

TNC 416/TNC 406/TNC 306

Not used
Not used
Not used
R
GND
V SYNC
H SYNC1
GND
Not used
Not used
G
B

Visual display unit (VDU)

BC 120
R

Do not use
Do not use
GND
GND
GND
Do not use
GND
GND
Do not use
HSYNC
VSYNC
Do not use

337

X49 Visual Display Unit BF 120 (option for LE 416)


Logic unit

Connecting cable Id. Nr.312 875../Extension cable

BF 120

Id. Nr.312 876.. or Connecting cable Id.-Nr.312 874..


D-sub connector

D-sub connector

(female) 62-pin

(male) 62-pin

(female) 62-pin

(male) 62-pin 3-row

3-row

3-row

3-row

D-sub terminal

Assignment

D-sub connector

Assignment

0 volt

CLK.P

HSYNC

BLANK

VSYNC

0 volt

R0

R1

R2

10

R3

10

10

10

11

0 volt

11

11

11

12

G0

12

12

12

13

G1

13

13

13

14

G2

14

14

14

15

G3

15

15

15

16

0 volt

16

16

16

17

B0

17

17

17

18

B1

18

18

18

19

B2

19

19

19

20

B3

20

20

20

21

0 volt

21

21

21

22

0 volt

22

22

22

23

CLK.P

23

23

23

24

HSYNC

24

24

24

25

BLANK

25

25

25

26

VSYNC

26

26

26

27

0 volt

27

27

27

28

R0

28

28

28

29

R1

29

29

29

30

R2

30

30

30

31

R3

31

31

31

32

0 volt

32

32

32

33

G0

33

33

33

34

G1

34

34

34

35

G2

35

35

35

338

TNC 416/TNC 406/TNC 306

Visual display unit (VDU)

3/99

D-sub terminal

D-sub connector

D-sub connector

(female) 62-pin

Assignment

D-sub connector
(male) 62-pin

Assignment

(female) 62-pin

(male) 62-pin 3-row

3-row

3-row

3-row

36

G3

36

36

36

37

0 volt

37

37

37

38

B0

38

38

38

39

B1

39

39

39

40

B2

40

40

40

41

B3

41

41

41

42

0 volt

42

42

42

43

DISP.LOW

43

43

43

44

DISP.LOW

44

44

44

45

DISP.ON

45

45

45

46

DISP.ON

46

46

46

47

C0

47

47

47

48

C1

48

48

48

49

C2

49

49

49

50

C3

50

50

50

51

C4

51

51

51

52

C5

52

52

52

53, 54, 55, 56, 57,

Do not use

53, 54, 55, 56, 57,

53, 54, 55, 56, 57,

53, 54, 55, 56, 57,

58, 59, 60, 61, 62

58, 59, 60, 61, 62

58, 59, 60, 61, 62

Housing

Housing

58, 59, 60, 61, 62


Housing

3/99

External shield

Housing

TNC 416/TNC 406/TNC 306

External shield

Visual display unit (VDU)

339

8 Short-circ uit signal/Touch probe input


This input allows detection of short circuits during the eroding process (see the chapter "Machine
integration", section "Gap control with feed forward control"). In addition, workpieces can be
measured or set up electronically with the manual or programmable probing functions (see the
User's Manual for the TNC 416/TNC 406/TNC 306).
Either electrodes or 3D probe systems TS 220 from HEIDENHAIN can be used for such functions.
For start-up and adjustment of the "Probing" function or of a 3D-touch probe system, see the chapter
"Machine integration."

X12 Short circuit signal/Touch probe system TS 220


Flange socket with female connector insert (15-pin)
Pin number

Signal designation

Inner shield (0 V)

Ready/standby

Start

+15 V 10 % (UP)

+ 5 V 5 % (UP)
Battery warning

0 V (UN)

Trigger signal

10

Trigger signal

2, 11 to 15

not used

340

TNC 416/TNC 406/TNC 306

Short-circuit signal/Touch probe input

3/99

8.1 Connection of the short-circuit signals


The short-circuit signal line must be connected according to the diagram, otherwise a short-circuit
message will result. If you do not wish evaluation of the short-circuit signal, set PLC Marker M2622
(see chapter "Machine integration", section "Gap control with feed forward control ").

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Short-circuit-signal1)

2.2 k

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Standby
+15V 10% (U P)
+ 5V 5% (U P)
Battery warning
0V (UN)
Trigger signal
1)
Trigger signal

1) Contact closed means no short circuit, HIGH level on pin 10

8.2 Connection of the touch probe system


The TS 220 touch probe systems are connected directly to the logic unit via a cable adapter.
See also section "Cable overview".

TS220 Id. Nr. 293 488 ..


(TS120 Id. Nr. 265 348 ..)

Adapter cable Id. Nr.274 543

D-sub
connector
(male) 15-pin

Coupling on
mounting base
6-pin

Quick
disconnect
6-pin

Gray

Pink

Gray

Brown/Green

Brown

Gray

Gray

White/Green

White

Green

Green

10

Yellow

Yellow

Housing

External shield Housing

Housing

External shield

3/99

TNC 416/TNC 406/TNC 306

Short-circuit signal/Touch probe input

341

342

TNC 416/TNC 406/TNC 306

Short-circuit signal/Touch probe input

3/99

9 Data inter face


9.1 RS-232-C/V.24 data interface
HEIDENHAIN guarantees that, if properly connected, the serial data interface RS-232-C/V.24 will
transmit data correctly up to a distance of 20 m between the logic unit and the peripheral unit.
The connection to the peripheral unit is made via a cable adapter which is attached to either the
operating console or the control cabinet. See also section "Cable overview".
For connection to the peripheral unit HEIDENHAIN offers a standard connecting cable
(Id.-Nr. 274 545 01), length 3 m.
LE 416/LE 406 X21
LE 306
D-sub

X25

Connecting cable

Adapter block

Id. Nr. 239 760 ..

Id. Nr. 239 758 01

Connecting cable
Id. Nr. 274 545 01

D-sub

D-sub

D-sub

D-sub

D-sub

D-sub

terminal

connector

connector

terminal

terminal

connector

connector

(female)

(male)

(female) 25-

(male)

(female)

(male)

(female)

25-pin

25-pin

pin

25-pin

25-pin

25-pin

25-pin

Assignment

GND

WH/BN

WH/BN

External

External

shield

shield

RXD

Green

Yellow

TXD

Yellow

Green

CTS

Gray

Pink

RTS

Pink

Gray

DTR

Blue

20

20

20

20

Brown

Signal GND

Red

Red

20

DSR

20

Brown

Blue

20

8 to 19,

Do not use

Housing

Housing

Housing

Housing

21 to 25
Housing External
shield

Housing

External
shield

External
shield

Housing

The interface complies with the recommendations in IEC 742 EN 50 178 for separation from
line power.

If your peripheral unit has a connector layout that differs from the above, the HEIDENHAIN
connecting cable cannot be used.

3/99

TNC 416/TNC 406/TNC 306

Data interface

343

9.2 RS 422/V.11 data interface


The RS-422/V.11 data interface is only integrated in the logic unit LE 416 and LE 406. It is
designated to control the generator.
If used correctly, the RS-422/V.11 serial data interface will ensure error-free data transmission up to
a distance of 1000 m between logic unit and peripheral unit.
The connection to the peripheral unit is made via a cable adapter which is attached to either the
operating console or the control cabinet. See also under the heading "Mounting dimensions" and
Cable Overview.
The cable adapter Id.-Nr. 249 819 01 is connected to the logic unit with the HEIDENHAIN
connecting cable Id.-Nr. 250 478 ..
LE416/LE 406 X22

D-sub

Adapter Block

Id. Nr. 289 208 ..

Id. Nr. 311 086 01

D-sub

D-sub

D-sub

D-sub

terminal

connector

connector

terminal

terminal

(female)

(male)

(female)

(male)

(female)

15-pin

15-pin

15-pin

15-pin

15-pin

Assignment

Connecting Cable

Chassis GND

Black
External
shield

RXD

Blue

CTS

Gray

TXD

White

RTS

Green

DSR

White/Green

DTR

Green/Pink

Signal GND

Black

RXD

Red

10

CTS

10

Pink

10

10

10

11

TXD

11

Brown

11

11

11

12

RTS

12

Yellow

12

12

12

13

DSR

13

Brown/Green 13

13

13

14

DTR

14

Red/Blue

14

14

14

15

Do not assign

15

Violet

15

15

15

Housing

External

Housing

Housing

Housing

Housing

shield

The interfaces complies with the recommendations in IEC 742 EN 50 178 for separation
from line power.
The following cable type must be used for the connection to the peripheral unit:
LIYCY 7 x 2 x 0.14 Cu

344

TNC 416/TNC 406/TNC 306

Data interface

3/99

10 Handwhee l input
The HR 130, HR 410 handwheels can be connected to the TNC 416/TNC 406 and
TNC 306. See also chapter "Machine Integration."
LE 416/LE 406 connector X23
LE 306 connector X11
Pin number

LE X23 or X11

CTS

0 V (UN)

RTS

+ 12 V (UP)

DTR

TxD

RxD

DSR

Housing

Outer shield

10.1 Portable handwheel HR 410


The HR 410 is a portable electronic handwheel with:
Five axis-selection keys
Two traverse direction keys
Three keys with predefined traverse speeds (slow, medium, fast)
Actual-position-capture key
Three keys for machine functions to be determined by the machine tool builder
Two permissive keys
EMERGENCY STOP button
Holding magnets

3/99

TNC 416/TNC 406/TNC 306

Handwheel input

345

Dummy plug for EMERGENCY STOP circuit (option)


Connecting cable (spiral cable)
Connecting cable (normal cable)
Connecting cable (with metal armor)

Id. Nr. 271 958 03


Id. Nr. 312 879 01
Id. Nr. 296 467 ..
Id. Nr. 296 687 ..

Extension cable

Adapter cable

Connecting cable

HR 410

Id. Nr. 281 429..

Id. Nr. 296 466..

Id. Nr. 296 467 05

Id. Nr. 296 469 01

D-sub

D-sub

D-sub

Coupling

Connec-

Connec-

Connec-

connec-

connec-

connec-

on mount-

tor

tor

tor

tor

tor

tor

ing base

(male)

(female)

(male)

(male)

(female)

(male)

(female)

18-pin

18-pin

18-pin

9-pin

9-pin

9-pin

18-pin

Housing

Shield

Housing

Housing

Shield

Housing

Housing

Shield

Housing

Housing

White

White

White

Brown

Brown

Brown

Yellow

Yellow

Yellow

Gray

Gray

Gray

Green

Green

Green

WH/BK

YL/BK

WH/RD 5

WH/BL

WH/GN 2

WH/YL

WH/BN 1

WH/BN 3

Contact 1 + 2

WH/YL

Contact 2 (left)

WH/GN 1

Contact 1 (right)

WH/BL

Contact 1

WH/RD 2

Contact 1

YL/BK

Contact 2

WH/BK

Contact 2

Shield

Permissive button

EMERGENCY STOP

The adapter includes plug-in terminal strips for the contacts of the EMERGENCY STOP button and
permissive button (maximum load 1.2 A, 24 V).

346

TNC 416/TNC 406/TNC 306

Handwheel input

3/99

Internal wiring of contacts to permissive buttons and EMERGENCY STOP button of the HR 410:

Right

Left

The plug-in terminal strips are included in delivery with the adapter cable. If you have an immediate
need for these terminal strips before the adapter cable, they can be ordered separately:
Plug-in terminal strip, 3-pin
Id. Nr. 266 364 06
Plug-in terminal strip, 4-pin
Id. Nr. 266 364 12

3/99

TNC 416/TNC 406/TNC 306

Handwheel input

347

10.2 Panel-mounted handwheel HR 130


The HR 130 is the panel-mount version of the HR 330 without axis keys, rapid traverse keys, etc. It
is connected to the logic unit directly or by extension cable.
The HR 130 is available in various versions (standard cable length 1 meter):
Small knob, axial cable outlet: Id. Nr. 254 040 01
Small knob, radial cable outlet: Id. Nr. 254 040 02
Large knob, axial cable outlet: Id. Nr. 254 040 03
Large knob, radial cable outlet: Id. Nr. 254 040 04
Ergonomic knob, radial cable outlet:
Id. Nr. 254 040 05
(See also the "Dimensions" section in the Appendix)
Extension cable Id. Nr. 281 429 ..
D-sub connector
(male) 9-pin

HR 130 Id. Nr. 254 040 ..

D-sub connector
(female) 9-pin

D-sub connector
(male) 9-pin

Housing

Shield

Housing

Housing

Shield

White

White

Brown

Brown

Yellow

Yellow

Green

Green

Gray

348

TNC 416/TNC 406/TNC 306

Handwheel input

3/99

3/99

TNC 416/TNC 406/TNC 306

Handwheel input

349

11 PLC input s/outputs


The HEIDENHAIN contouring control TNC 416/TNC 406 has a capacity of max. 56 PLC inputs and 31
PLC outputs, the TNC 306 has a capacity of max. 55 PLC inputs and 31 PLC outputs.
These, PLC inputs and PLC outputs can be connected directly to the logic unit.
In addition, one PLC I/O-board PL 410 B, with 64 PLC inputs and 31 PLC outputs, can be connected
to the logic unit.

11.1 Technical data


PLC inputs
PL 410B/logic unit
Potential range:
1-signal: Ue
0-signal: Ue
Current range:
1-signal: Ie
0-signal: Ie

13 V to 30.2 V
20 V to 3.2 V
3.8 mA to 8.9 mA
1.0 mA at Ue = 3.2 V

PLC outputs
Open-collector outputs with current limiting
Logic unit
Min. output potential
for 1-signal
Nominal operating
current per output

PL 410B

3 V below supply voltage


0.1 A

1.2 A

Danger to internal components!


Connect inductive loads only with a quenching diode parallel to the inductance.
It is not permissible to short-circuit more than one output from the logic unit simultaneously.
A short-circuit of one output will not cause an overload.

350

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

3/99

11.2 Connector assignment


The PLC inputs I128 to I151 are on connector X46 (LE 416/LE 406) or X27 (LE 306) for the machine
control panel.
LE416/LE 406 connector X42
LE 306 connector X22

Con. cable Id.-Nr 244 005 .. / Id. Nr. 263 954


..

D-sub connector
(female) 37-pin

Assignment

D-sub connector
(male) 37-pin

I0

Gray/Red

I1

Brown/Black

I2

White/Black

I3 acknowledge "control-is-ready"; main processor

Green/Black

I4

Brown/Red

I5

White/Red

I6

White/Green

I7

Red/Blue

I8

Yellow/Red

10

I9

10

Gray/Pink

11

I10

11

Black

12

I11

12

Pink/Brown

13

I12

13

Yellow/Blue

14

I13

14

Green/Blue

15

I14

15

Yellow

16

I15

16

Red

17

I16

17

Gray

18

I17

18

Blue

19

I18

19

Pink

20

I19

20

White/Gray

21

I20

21

Yellow/Gray

22

I21

22

Green/Red

23

I22

23

White/Pink

24

I23

24

Gray/Green

25

I24

25

Yellow/Brown

26

I25

26

Gray/Brown

27

I26

27

Yellow/Black

28

I27

28

White/Yellow

29

I28

29

Gray/Blue

30

I29

30

Pink/Blue

31

I30

31

Pink/Red

32

I31

32

Brown/Blue

33

Do not use

33

Pink/Green

34

Do not use

34

Brown

35

Do not use

35

Yellow/Pink

36

Do not use

36

Violet

37

Do not use

37

White

Housing

External shield

Housing

External shield

3/99

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

351

11.2.1 PLC output


The PLC outputs O0 to O7 are also to be found on the connector X46 (LE416/LE 406) or X27
(LE 306) for the machine control panel. See also section "Machine control panel."
LE 416/LE406 X41
LE 306
X21

Connecting cable
Id. Nr 244 005 .. / Id. Nr. 263 954 ..

D-sub terminal
(female) 37-pin

Assignment

D-sub connector
(male) 37-pin

O0

O1

Brown/Black

O2

White/Black

O3

Green/Black

O4

Brown/Red

O5

White/Red

O6

White/Green

O7

Red/Blue

O8

Yellow/Red

Gray/Red

10

O9

10

Gray/Pink

11

O10

11

Black

12

O11

12

Pink/Brown

13

O12

13

Yellow/Blue

14

O13

14

Green/Blue

15

O14

15

Yellow

16

O15

16

Red

17

O16

17

Gray

18

O17

18

Blue

19

O18

19

Pink

20

O19

20

White/Gray

21

O20

21

Yellow/Gray

22

O21

22

Green/Red

23

O22

23

White/Pink

24

O23

24

Gray/Green

25

O24

25

Yellow/Brown

26

O25

26

Gray/Brown

27

O26

27

Yellow/Black

28

O27

28

White/Yellow

29

O28

29

Gray/Blue

30

O29

30

Pink/Blue

31

O30

31

Pink/Red

32

Do not use

32

Brown/Blue

33

Do not use

33

Pink/Green

34

Control-is-ready signal

34

Brown

35

24 V (PLC) test output; Do not use

35

Yellow/Pink

36

24 V (PLC) test output; Do not use

36

Violet

37

24 V (PLC) test output; Do not use

37

White

Housing

External shield

Housing

External shield

352

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

3/99

3/99

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

353

11.3 PLC I/O expansion board PL 410 B


One PL 410 B board with 64 PLC inputs, 31 PLC outputs and the "Control is operational" output can
be connected to the logic unit. The PL 410 B can be mounted directly on the logic unit. See section
"Power supply" for the power connection.
LE416/LE 406 connector X47

Connecting cable Id. Nr. 289 111 ..

1st PL 410 B

LE 306 connector X26


X47 D-sub

D-sub

D-sub

X1 D-sub

terminal

connector

connector

terminal

(male)

(female)

(male)

(female)

25-pin

25-pin

25-pin

25-pin

0V

0V

0V

Serial IN 2
Address 6

Assignment

0V

Brown, Yellow, Pink, Red,

Assignment

Violet
2

0V

Red/Blue, Brown/Green,
Yellow/Brown, Gray/Brown,
Pink/Brown

0V

Brown/Blue, Brown/Red,
Brown /Black, Yellow/Gray,
Yellow/Pink

Do not use

Address 6

White/Green

INTERRUPT

Pink/Green

INTERRUPT

RESET

Green/Blue

RESET

WRITE EXTERNAL

White/Blue

Gray/Green

WRITE
EXTERNAL

WRITE EXTERNAL

White/Red

WRITE EXTERNAL

10

Address 5

10

Gray/Pink

10

10

Address 5

11

Address 3

11

Blue

11

11

Address 3

12

Address 1

12

Green

12

12

Address 1

13

Do not use

13

13

13

Do not use

14

PCB identifier 4

14

14

14

+ 12 V

15

15

+ 12 V

Yellow/Blue, Pink/Blue,
Yellow/Black

15

PCB identifier 3

15

Yellow/Red, Gray/Red,
Pink/Red

16

Do not use

16

Gray/Blue

16

16

PCB identifier 2

17

Do not use

17

Green/Black

17

17

PCB identifier 1

18

Address 7

18

White/Yellow

18

18

Address 7

19

Serial IN 1

19

White/Black

19

19

Serial IN 1

20

EMERGENCY STOP

20

Green/Red

20

20

EMERGENCY STOP

21

Serial OUT

21

White/Gray

21

21

Serial OUT

22

Serial OUT

22

White/Pink

22

22

Serial OUT

23

Address 4

23

Black

23

23

Address 4

24

Address 2

24

Gray

24

24

Address 2

25

Address 0

25

White

25

25

Address 0

Housing

External shield

Housing

External shield

Housing

Housing

External shield

354

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

3/99

11.3.1 PLC inputs/PLC outputs on the PL 410 B


The PLC inputs and outputs on the PL 410 B are distributed over 6 switches. The 16-pin connectors
are arranged in vertical pairs.
PLC inputs
X3

X4

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Assignment
I64
I65
I66
I67
I68
I69
I70
I71
I72
I73
I74
I75
I76
I77
I78
I79

X5

Assignment
I80
I81
I82
I83
I84
I85
I86
I87
I88
I89
I90
I91
I92
I93
I94
I95

X6

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

3/99

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Assignment
I96
I97
I98
I99
I100
I101
I102
I103
I104
I105
I106
I107
I108
I109
I110
I111

TNC 416/TNC 406/TNC 306

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Assignment
I112
I113
I114
I115
I116
I117
I118
I119
I120
I121
I122
I123
I124
I125
I126
I127

PLC inputs/outputs

355

PLC outputs
Assignment of the grouped power supply:
Terminal
X9
X10
X11
X12
X13
X14

Assignment
0V
+24V PL supply and "Control is operational"
+24 V Supply
O32 - O39
+24 V Supply
O40 - O47
+24 V Supply
O48 - O55
+24 V Supply
O56 - O62

X7

X8

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Assignment
O32
O33
O34
O35
O36
O37
O38
O39
O40
O41
O42
O43
O44
O45
O46
O47

Pin number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Assignment
O48
O49
O50
O51
O52
O53
O54
O55
O56
O57
O58
O59
O60
O61
O62
"Control is operational"

The analog inputs (X15 to X22) of the PL 410 cannot be evaluated in the LE 360 C! The PLC outputs
are powered in groups and are therefore switched off via EMERGENCY STOP in groups.
Danger to internal components!
Connect inductive loads only with a quenching diode parallel to the inductance.

356

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

3/99

3/99

TNC 416/TNC 406/TNC 306

PLC inputs/outputs

357

12 Machine c ontrol panel


A separate 37-pin female connector is mounted on the logic unit for the connection to the
manufacturer's proprietary machine control panel. This connector includes the 0 V and +24 V of the
PLC power supply. The PLC inputs I128 to I151 may be connected only with the power supply from
pins 36 and 37, since this power supply is internally secured as required.
Connecting cable Id. Nr. 263 954 ..

LE416/LE 406 connector X46


LE 306 connector X27
D-sub terminal
(female) 37-pin

Assignment

D-sub connector
(male) 37-pin

I128

I129

Brown/Black

I130

White/Black

I131

Green/Black

I132

Brown/Red

I133

White/Red

I134

White/Green

I135

Red/Blue

I136

Yellow/Red

Gray/Red

10

I137

10

Gray/Pink

11

I138

11

Black

12

I139

12

Pink/Brown

13

I140

13

Yellow/Blue

14

I141

14

Green/Blue

15

I142

15

Yellow

16

I143

16

Red

17

I144

17

Gray

18

I145

18

Blue

19

I146

19

Pink

20

I147

20

White/Gray

21

I148

21

Yellow/Gray

22

I149

22

Green/Red

23

I150

23

White/Pink

24

I151

24

Gray/Green

25

I152

25

Yellow/Brown

26

O0

26

Gray/Brown

27

O1

27

Yellow/Black

28

O2

28

White/Yellow

29

O3

29

Gray/Blue

30

O4

30

Pink/Blue

31

O5

31

Pink/Red

32

O6

32

Brown/Blue

33

O7

33

Pink/Green

34

0 V (PLC)

34

Brown

35

0 V (PLC)

35

Yellow/Pink

36

+24 V (PLC)

36

Violet

37

+24 V (PLC)

37

White

Housing

External shield

Housing

External shield

358

TNC 416/TNC 406/TNC 306

Machine control panel

3/99

3/99

TNC 416/TNC 406/TNC 306

Machine control panel

359

13 TNC keyb oard


The TNC keyboard TE 420/TE 400 and TE 355 A/B are connected to the logic unit by a connecting
cable.
Connecting cable Id. Nr. 263 954 ..

LE 416/LE 406 connector X45

TE 420/TE 400
TE 355

LE 306 connector X23

RL0

RL0

Gray/Red

RL1

RL1

Brown/Black

RL2

RL2

White/Black

RL3

RL3

Green/Black

RL4

RL4

Brown/Red

RL5

RL5

White/Red

RL6

RL6

White/Green

RL7

RL7

Red/Blue

RL8

Do not use

Yellow/Red

10

RL9

Do not use

10

Gray/Pink

10

10

11

RL10

Do not use

11

Black

11

11

12

RL11

Do not use

12

Pink/Brown

12

12

13

RL12

Do not use

13

Yellow/Blue

13

13

14

RL13

Do not use

14

Green/Blue

14

14

15

RL14

Do not use

15

Yellow

15

15

16

RL15

Do not use

16

Red

16

16

17

RL16

Do not use

17

Gray

17

17

18

RL17

Do not use

18

Blue

18

18

19

RL18

Do not use

19

Pink

19

19

20

SL0

SL0

20

White/Gray

20

20

21

SL1

SL1

21

Yellow/Gray

21

21

22

SL2

SL2

22

Green/Red

22

22

23

SL3

SL3

23

White/Pink

23

23

24

SL4

SL4

24

Gray/Green

24

24

25

SL5

SL5

25

Yellow/Brown

25

25

26

SL6

SL6

26

Gray/Brown

26

26

27

SL7

SL7

27

Yellow/Black

27

27

28

RL19

Do not use

28

White/Yellow

28

28

29

RL20

Do not use

29

Gray/Blue

29

29

30

Not used

Do not use

30

Pink/Blue

30

30

31

RL21

Do not use

31

Pink/Red

31

31

32

RL22

Do not use

32

Brown/Blue

32

32

33

RL23

Do not use

33

Pink/Green

33

33

34

Spindle override (wiper)

34

Brown

34

34

35

Feed rate override (wiper)

35

Yellow/Pink

35

35

36

+5 V override potentiometer

36

Violet

36

36

37

0 V override potentiometer

37

White

37

37

Housing

External shield

Housing

External shield

Housing

Housing

TNC 416/TNC 406/TNC 306

D-sub
connector
(male) 37-pin

X2 D-sub terminal
(male) 37-pin

Assignment
X45

360

Assignment
X23

D-sub connector
(female) 37-pin

D-sub terminal
(female) 37-pin

TNC keyboard

3/99

X1 on the TNC keyboard TE 420/TE 400 for the connecting the soft keys on the VDU

Pin Number
1
2
3
4
5
6
7
8
9

3/99

Assignment
SL0
SL1
SL2
SL3
Do not use
RL15
RL14
RL13
RL12

TNC 416/TNC 406/TNC 306

TNC keyboard

361

14 Cable overview
14.1 Cable overview TNC 416

3/99

TNC 416/TNC 406/TNC 306

Cable overview

362

14.2 Cable overview TNC 406

TNC 406
TE 420
313 038-01

BC 120
313 037-01

40m

MB 420
293 757-12

PL 410 B
263 371-12

VL: Extension cable


for separation points with connecting cable
for extending existing connecting cable

20m

23.02.99

263 954-xx

1m
Included with
visual display unit

Encoders

244 005-xx

60m

VL
312 878-xx
11 APP

310 125-xx
310 130-xx

VL
263 955-xx

Accessories
289 111-xx
296 466-xx

HR 410
50m 296 469-01

312 879-01 3 m

VL
309 774-xx

11 APP

HR 130
254 040-xx

VL
281 429-xx
4 inputs

LE 406

60m

11 APP VL
309 774-xx

289 208-xx

PC

274 545-xx

239 760-xx

2 inputs

RS-232-C Adapter
310 085-01

11 APP

20m

VL
298 400-xx

290 109-xx

244 005-xx

290 110-xx

263 954-xx

15-pin male connector


243 971-ZY
298 399-xx

3/99

TS 220
293 488-xx

40m

20m

TTL

50m
TS 120
265 348-xx

274 543-xx

Terminal box
251 249-01

309 773-xx

TTL

20m

RS-422-C Adapter
310 086-01

TNC 416/TNC 406/TNC 306

37-pin male connector


243 937-ZY
Nominal value
output

PLC I / 0

Cable overview

363

14.3 Cable overview TNC 306

TNC 306

BF 110
267 209-01

TE 355 A
255 015-06

or BE 212
or 242 370-03

PL 410 B
263 371-12

or TE 355 B
255 016 04

VL: Extension cable


for separation points with connecting cable
for extending existing connecting cable

25m
20m

311 533-xx

311 531-xx

Encoders

23.02.99

263 954-xx

60m

Accessories

289 111-xx

11 APP

310 125-xx
310 130-xx

VL
311 534-xx

VL
311 532-xx

VL
263 955-xx

296 466-xx

312 879-01 3m

HR 410
50m 296 469-01

VL
281 429-xx
HR 130
254 040-xx

11 APP

VL
309 774-xx

20m

PC
239 760-xx

4 inputs

LE 306

60m
11 APP

VL
309 774-xx

274 545-01

RS-232-C Adapter
310 085 01

1 input

50m

VL
263 955-xx

263 954-xx

11 APP

TS 120
265 348-xx

274 543-xx
309 773-xx

244 005-xx

TS 220
293 488-xx

25m

TTL

15-pin male connector


243 971-ZY

VL
298 400-xx
Terminal box
251 249-01

TTL

20m

298 399-xx
20m

3/99

TNC 416/TNC 406/TNC 306

Machine
operating
panel
37-pin male connector
243 937-ZY

290 109-xx

244 005-xx

290 110-xx

263 954-xx

Nominal value PLC I / 0


output

Cable overview

25m

364

3/99

TNC 416/TNC 406/TNC 306

Cable overview

365

15 Mounting dimensions
15.1 LE 416

366

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

135.5+2
5.3"+.08"
132.5+2
5.2"+.08"

15
.6"

13
.51"

2670.2
10.5".008"

Mounting dimensions

392
15.43"

12.5
.5"
10,5
.41"

83.5
3.29"

9
.35"

367

25
1"

328
12.9"

Befestigungsmglichkeit
PL 400
MOUNTING POSSIBILITY
PL 400

2800.3
11.024".012"

7
.28"

20
.79"

10
.4"

3260.5
12.83.02"

TNC 416/TNC 406/TNC 306

456+2
17.95"+.08"
M3 (Einschraublnge max.3)
M3 (LENGTH OF ENGAGEMENT .12")

427
16.8"

15.2 LE 406

3/99

476+5
18.7"+.2"

15.3 TE 420

368

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

371
14.6"

18
.7"

18
.7"

3880.2
15.276".008"

196
7.7"
232
9.1"

274
10.8"

2620.2
10.315".008"

105
4.1"

369

9.5
.37"

Montageflche
MOUNTING SURFACE

242+0.5
9.53"+.02"

10
DIA.4"

2620.2
10.315"0.2"

36+5
1.4"+.2"

8+1
DIA.3+.04"

25
1"

Mounting dimensions

47
1.8"

5.5
.217"

2
.08"

TNC 416/TNC 406/TNC 306

60.2
.236".008"

400
15.75"

0.5
.02"

M5

Frontplattenausschnitt
FRONT PANEL OPENING

380+0.5
14.96"+.02"

388+0.2
15.276"+.008"

15.4 TE 400

3/99
60.2
.236".008"

15.5 BC 120

370

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

BF 120

12
.47"
5.6
DIA .22"

25
.98"

2460.3
9.685.012"

264
10.39"

10
.39"

400
15.75"
3760.3
14.803.012"

20
.79"

15.6

M5

80
3.15"

252
9.92"

367
14.45"

34
1.34"

11.5
.45"

12x45
.47"x45

248+1
9.763+.039"

8
.315"

3/99

70 6"
7
2.
R

TNC 416/TNC 406/TNC 306

2
.08"

380+1
14.96+.039"

3760.2
14.803.008"

5
.18"

238
9.37"

0.5
.02"

2460.2
9.685.008"

M5

Mounting dimensions

371

375
14.76"

10
DIA.4"

8.6
DIA.34"

max.275
MAX. 10.83"

60.2
.236".008"

15
.59"

2-0.5
.08"-.02"

19
.75"

Ansicht A
VIEW A

8-1"
.31"-.04"
372+2"
14.65"+.08"

M5

292+2"
11.50"+.08"

365
14.37"

Frontplattenausschnitt
FRONT PANEL OPENING

8-1"
.31"-.04"

20
.79"

Mounting dimensions

16
.63"

1
.04"
2
.08"

14
.55"

3880.2
15.275".008"

3080.2
12.162".008"

320
12.6"

TNC 416/TNC 406/TNC 306

60.2 1120.2
2760.2
.236".008" 4.41".008" 10.866".008"

15.7 BC 110 B

372
0

400
15.75"

X4
X3

X1
X2

3/99

456+2
18"+.08"

311.5
12.26"

411.5
16.2"

132.50,2
5.2".08"

.78"

DI

15
.6"
36
20

45
1.77"

13
.51"

100.5
3.95"

.32

7
.28"

R 50
R 2.4"
36
1.42"

10
4"

800.2
3.15".008"

392
15.43"

3400.2
13.39".008"

M3 (Einschraublnge max. 3)

12.5
.5"

M3 (LENGTH OF ENGAGEMENT .12")

10.5
.41"

Mounting dimensions

Anschlukabel drfen Schwenkbereich der


Steuerung nicht beeintrchtigen!
CONNECTION CABELS SHOULD NOT INTERFERE
WITH TILTING RANGE OF CONTROL UNIT!

2100.2
8.26".008"

9
.35"

25
1"

427
16.8"

272.5
10.73"

Schutzerde M5
PROTECTION EARTH M5

Betriebserde M6
SYSTEM EARTH M6
83.5
3.3"

145
5.7"

328
12.9"

DI 10,
A 3
.4
"

2350,2
9.25".008"

280o.2
9.25".008"

134
5.3"
6.34"

160

3260.5
12.93".02"

Befestigungsmglichkeit PL 400
(Befestigungsschrauben M3x5)
MOUNTING POSSIBILITY PL 400
(FIXING SCREWS M3x5)

2670,2
10.5".008"

"

R 40
R 1.5
8"

140.50.2
5.53".08"
R 32
5
R12.8
"

8
.31"

560
22"

TNC 416/TNC 406/TNC 306

7.30.3
.29.012"

476+5
18.8"+.02"

Schwenkbereich der Steuerung


FIELD OF SWIVEL FRAME TRAVERSE

15.7.1 LE 360 C

3/99

84
3.3" 10
.4"

373

15.8 Keyboards for TNC 306

60.2
.236".008"

2690.2
10.591".008"

5.5
.217"

281
11.063"

262
10.315"

274
10.787"

60.2
.236".008"

15.8.1 TE 355 A

55
2.165"

112
4.409"

Frontplattenausschnitt 236+0.5 x 224+0.5


FRONT PANEL OPENING 9.21"+.020" x 8.819"+0.20"

8+1

25
.98"
1
.039"

31+5
1.16"+.19"
25
.98"
4
.157"
2
.079"

DIA.315"+.039"

10
DIA.394"

Dichtung 3 dick, im eingebauten Zustand 2 dick


GASKET .118" THICK INCORPORATED .079 THICK
234+2
9.212"+.079"

23.5
0.925"

224+0.5
8.819"+.020"

222+2
8.740"+.079"

18
.708"

X2

R60
R2.36

236+0.5
9.291"+.020"

374

TNC 416/TNC 406/TNC 306

Massenanschlu M5
GROUND CONNECTION M5

Frontplattenausschnitt
FRONT PANEL OPENING

Mounting dimensions

3/99

350
13.78"

3380.2
13.307".008"

205
8.07"

66.5
2.62"

1930.2
7.598".008"

96.5
3.80"

5.5
.217"

60.2
.236".008"

60.2
.236".008"

15.8.2 TE 355 B

51
2.01"

25
.98"

10
DIA .394"

3380.2
13.307".008"

187.5+1
7.38"+.04"

1910.5
752".020"
1930.2
7.598".008"

.040"

750.4
2.95".016"

248+1
9.76"+.040"

8.50.4
.335".016"

2
.079"

1
.40"

4
.157"

31+5
1.16+.19"

8+1
DIA.351"+.04"

50+5
1.97"+.20"

Dichtung 3 dick, im eingebauten Zustand 2 dick


GASKET .118" THICK INCORPORATED .079 THICK

X2

X1

R60
R2.36
"

3000.5
11.81".020"

19
.748"
Montageflche
MOUNTING SURFACE

3/99

TNC 416/TNC 406/TNC 306

0.5
.02"

Frontplattenausschnitt
FRONT PANEL OPENING

Mounting dimensions

375

15.9 Visual display units for TNC 306


15.9.1 BE 212

5.5
.217"

Freiraum fr Belftung
FREESPACE FOR AIR VENTILATION

94
3.20"
30
1.18"

.236"

3380.2
13.307".008"

min. 12
MIN. .47"

328+0.5
12.91"+.020"

max. 303
MAX. 11.93"

322.5
12.70"

Montageflche

0.5

MOUNTING SURFACE

.02"

40
1.58"

20.5
.08".02"

1
.040"
5
.197"

280
11.02"

10
DIA .394"

max. 300
MAX. 11.80"

26
1.02"

Frontplattenausschnitt
FRONT PANEL OPENING

7.8
DIA .307"+.008"

5
.197"

min. 20
MIN. .79"

30
1.18"

max. 242
MAX. 9.53"
max. 160
MAX. 6.30"

196
7.72"
2440.5
9.61".020"

2620.2
10.315".008"

274
10.79"

60.2
.236".008"

350
13.78"

60.2
.236".008"

Dichtung 3 dick
im eingebauten Zustand 2 dick
GASKET .118" THICK
INCORPORATED CONDITION .079" THICK
20
.79"

20
.79"

Freiraum fr Belftung
FREESPACE FOR AIR VENTILATION

47.5
1.87"

max. 326
MAX. 12.83"

376

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

11,50.5
.45".02"

TNC 416/TNC 406/TNC 306

Mounting dimensions

141
.55".04"

6.50.5
.26".02"

170+1
6.7"+.04"

60.2
.236".008"

1930.2
7.598".008"

M5

205
8.07"

.22"

5.5

2531
9.96".04"

256+1
10.03"+.04"

2690.2
10.59".008"

R40
R 1.6"

8
DIA
.32"

Masseanschlu M5
GROUND CONNECTION M5

Frontplattenausschnitt
FRONT PANEL OPENING

MOUNTING SURFACE

Montageflche

201
.79".04"
1651
6.5".04"

3/99
55+5
2.2"+.2"
4
.16"
8+1
.32"+.04"

60.2
.236".008"

281
11.06"

0,5
.02"

10

Dichtung 3 dick
GASKET .12" THICK

1
.04"

15.9.2 BF 110

377

15.10 Input/Output boards PL 410B


282
11.1"
2350.2
9.252.008"

23.5
.93"

8
.315"

52.5
2.07"

9
.35"

180.5
.7.02"
3.6
.14"

PL-Eingnge
PL INPUTS

10.5
.04+.02"

47.5
1.87"

2100.2
8.268.008"

228
8.98"

9.3
DIA.37"

PL-Ausgnge
PL OUTPUTS

33+2
1.3"+.08"

Masseanschlu M5
GROUND CONNECTION M5

378

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

15.11 Handwheel HR
15.11.1 Panel-mounted handwheel HR 130

100.01
100.02
DIA .3937.0004"
DIA .3937.0008"

361.5
1.417.06"

FIXING HOLE M3 x .197"

48

16

1.890"
.630"

12.5
.492"

3 x 120

120

14
.551"

36 f8
DIA 1.4173.0010"
DIA 1.4173.0025"

58
DIA 2.283"

Befestigungsgewinde M3 x 5

0.2
DIA .008"
3x

30

4.4
DIA .173

19.5+1
.768+.04"
10
.394"

3/99

TNC 416/TNC 406/TNC 306

Mounting dimensions

379

Handwheel knobs
Knob, small

M3

M3

SW 5.5

18
.709"

3x
max. 10

7
.276"

MAX .394"

6
.236"

61

DIA 2.402"

.0394"

HR ...

10
DIA .394"

SW 14
18
.709"

(18)
(.709")

Frontplatte (2)
FRONT PANEL (.079")

380

TNC 416/TNC 406/TNC 306

Mounting dimensions

3/99

Knob, large

M3

M3

SW 5.5

12
.472"

3x
7
.276"

max. 15.5
MAX .610"

6
.236"

HR ...

SW 1.5

27
1.063"
48
1.89"

(12)
(.472")

Frontplatte (2)
FRONT PANEL (.079")

3/99

TNC 416/TNC 406/TNC 306

90
3.543"
10 F7
DIA .3937 +.0011"
DIA .3937 +.0005"

Mounting dimensions

381

Knob, ergonomic

M3

17.7
.697"

M3

SW 5.5

12
.472"

3x

10
.394"

7
.276"

6
.236"

4
.158"
HR ...

SW 2

(12)
(.472")
6
.236"

70
2.756"

22
.866"
Frontplatte (2)
FRONT PANEL (.079")

382

TNC 416/TNC 406/TNC 306

10 H7
DIA .3937 +.0006"

Mounting dimensions

3/99

FCT
C

FCT
A

IV

FCT
B

70
2.756"

2.5
.984"

83
3.27"

Portable handwheels HR 410

50
1.969"

15.11.2

311
12.244"
331
13.031"

15.11.3

3/99

Touchprobe system TS 220

TNC 416/TNC 406/TNC 306

Mounting dimensions

383

15.12 Cable adapter


Cable adapter TS 220

Cable adapter HR 410

Mounting detail, wall thickness S<4

384

TNC 416/TNC 406/TNC 306

Mounting detail, wall thickness S>4

Mounting dimensions

3/99

92
3.62"
780.2
3.071.008"

7
.28"

780.2
3.071.008"
60+1
2.36+.04"

38
1.5"

M4

21+0.5
.83"+.02"

Adapter RS232C and RS-422

57
2.24"

R
4
1.5 0
7"

5
.2"

3
.12"

M5

3/99

TNC 416/TNC 406/TNC 306

Mounting dimensions

385

Machine integration Contents 4


1
1.1

Machine axes
Measuring systems

4-5
4-5

1.1.1 Signal period

4-5

1.1.2 Direction of traverse

4-7

1.1.3 Encoder monitoring


1.2

Axis designation

4-8
4-10

1.2.1 Assignment

4-11

1.2.2 Current tool axis

4-12

1.3

VDU display

4-12

1.4

Software limit switch

4-13

1.5

Lubrication pulse

4-16

1.6

Axis error compensation

4-18

1.6.1 Linear axis error compensation

4-18

1.6.2 Non-linear axis error compensation

4-19

1.6.3 Temperature compensation

4-22

1.7

PLC positioning

4-24

2
2.1

Reference marks
Passing over the reference marks

4-27
4-28

2.1.1 Encoders with distance-coded reference marks

4-29

2.1.2 Encoders with one reference mark

4-31

2.2

Machine datum

4-34

3
3.1

Servo positioning of the NC-axes


The position control loop of an NC-machine

4-37
4-37

3.2

Control with lag

4-39

3.3

Offset adjustment

4-44

3.3.1 Offset adjustment by code number

4-44

3.3.2 Automatic cyclical offset adjustment

4-44

3.4

4-45

Contouring behavior in corners

3.4.1 Radial acceleration

4-45

3.4.2 Constant feed rate in corners

4-45

3.5

4-46

Monitoring functions

3.5.1 Position monitoring for operation with lag

4-46

3.5.2 Monitoring the analog voltage difference

4-47

3.5.3 Movement monitoring

4-47

3.5.4 Standstill monitoring

4-48

3.5.5 Positioning window

4-48

3.6

4-50

Controlled axes

3.6.1 Axes as programmable position displays

3/97

TNC 406/TNC 306

4-50

4-1

3.6.2 Axis enable

4-51

3.6.3 Axes in position

4-52

3.6.4 Open control loop

4-53

3.6.5 Actual/nominal value transfer

4-53

3.6.6. Feed rate override by the PLC

4-54

3.7

Non-controlled rotary axis (M03/M04)

4-54

4
4.1

Gap control
Input characteristics of the gap signal

4-56
4-56

4.2

Short Circuit Behavior

4-59

4.3

Retraction of the electrode during erosion

4-59

4.4

Arc recognition

4-60

4.5

Free run and spark-out

4-61

4.6

Flushing the gap

4-61

4.7

Eroding parameters

4-62

4.7.1 Eroding parameters as Q-parameters in the NC program

4-63

4.7.2 Eroding parameters in erosion tables

4-63

4.7.3 Create erosion parameter table in the PLC program

4-64

4.7.4 Servo sensitivity (SV)

4-66

4.8

Transmission of eroding parameters to the PLC

4-67

4.9

Data exchange between PLC and generator control

4-68

4.9.1 Transmission from the generator control to the PLC

4-68

4.9.2 Transmission from the PLC to the generator control

4-70

5
5.1

EMERGENCY STOP routine


Connection diagram

4-71
4-72

5.2

Flow diagram

4-73

6
6.1

Display and operation


Setting the machine datum point

4-76
4-76

6.2

Graphics

4-79

6.3

Status window

4-80

6.3.1 Positional and status display

4-80

6.3.2 Feed rate display

4-82

6.3.3 Display of the M-functions M03, M04, M05, M08

4-83

6.3.4 Display of the Way-To-Go (WTG)

4-83

6.3.5 Control operational

4-84

6.3.6 Cancel status display

4-84

6.4

Display of currently active power stage number

4-84

6.5

Display of actual machining time

4-84

6.6

Error messages

4-85

6.7

Cycles

4-86

6.7.1 Cycle inhibit

4-86

6.7.2 Cycle Scaling factor

4-87

4-2

3/97

TNC 406/TNC 306

6.8

User-parameters

4-88

6.9

Code-numbers

4-89

6.10

Programming station

4-89

6.11

Decimal sign

4-89

6.12

Memory test

4-90

6.13

New program start/End of program run

4-90

6.14

Restore position

4-90

6.15

Overwrite Q-parameters

4-91

6.16

Color adjustment

4-91

7
7.1

M-functions
Generator ON/OFF (M36/M37)

4-93
4-96

7.2

Program-halt on M-functions

4-98

7.3

Program-halt on M06

4-99

7.4

M-function M89

4-99

8
8.1

Key simulation
TNC-keyboard

4-101
4-101

8.2

Machine control panel

4-110

9
9.1

Short circuit/probing
Interfacing the probing function

4-112
4-112

9.2

Successive probing

4-114

9.3

Manual probing

4-114

10

Handwheel

4-117

11

Analog inputs

4-120

12

Jog increment positioning

4-122

13

Datum correction

4-125

14
14.1

Electrode changer
Controlling an electrode changer

4-127
4-127

14.2

PLC program example

4-128

14.2.1 PLC module "TOOL CALL"

4-131

14.2.2 PLC module "REPLACE OLD TOOL"

4-132

14.2.3 PLC Module "PLC POS. NEUTRAL"

4-133

14.2.4 PLC module "SELECT NEW TOOL"

4-134

14.2.5 PLC module "POC. REG."

4-135

14.2.6 PLC Module "PLC POS. POC. 1/2/3/4/5"

4-136

14.2.7 PLC module "PLC POS. Z DOWN"

4-137

14.2.8 PLC module "PLC. POS. Z UP"

4-137

3/97

TNC 406/TNC 306

4-3

15
15.1

Commissioning and start-up procedure


Code numbers for commissioning

4-138
4-138

15.2

Preparation of the machine

4-138

15.3

Commissioning the control

4-142

15.3.1 Entry of the provisional and pre-defined machine parameters

4-142

15.3.2 Entry of the PLC-program

4-142

15.3.3 Testing the EMERGENCY STOP routine

4-142

15.3.4 Testing the direction of traverse

4-142

15.3.5 Setting the software limit switch ranges

4-144

15.3.6 Optimizing control with servo lag

4-144

15.3.7 Offset adjustment

4-147

15.3.8 Adjusting the monitoring functions

4-147

4-4

TNC 406/TNC 306

3/97

1 Machine axes
The TNC 406 and TNC 306 contouring controls from HEIDENHAIN permits the control of up to four
machine axes.
The 5th axis cannot interpolate with other axes. This axis can only be started in manual mode or in
the NC-program with a M-function (PLC-positioning)
Machine parameter MP10 can be set to define which axes should be operational on the machine.
If necessary, MP10 can be used to select all the axes functions (control, display, pass over
reference marks etc.).
MP10

Active axes
Entry range: 1 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = not active
+1 = active
+0 = not active
+2 = active
+0 = not active
+4 = active
+0 = not active
+8 = active
+0 = not active
+16 = active

1.1 Measuring systems


Incremental encoders can be connected to HEIDENHAIN contouring controls.
See also chapter "Assembly and electrical installation ."

1.1.1 Signal period


The signal period of the connected encoder in m or 0.001 is entered in machine parameter
MP330.x .
Linear measurement
For linear encoders with sinusoidal output signals the signal period is the same as the graduation
period:
Signal period (~) = grating period
The standard linear encoders from HEIDENHAIN have a graduation period of 20 m
(LS models; except for LS 101 and LS 405: 10 m) and 100 m (LB model) .
If linear measurement is performed by rotary encoder and ballscrew, the line count of the rotary
encoder (see encoder technical data) as well as the ballscrew pitch must be considered when
calculating the signal period:
spindle pitch[mm] 1000 [m/mm]
Signal period (~) =
line count
Up to 3 decimal places can be entered in MP330.x.
* only TNC 406
3/97

TNC 406/TNC 306

1 Machine axes

4-5

The TNC always does a 4-fold evaluation of the signals at the square-wave inputs.
If a counting step of < 1 m or 0.001 is desired, the signal period (
than 4 m or 0.004.

) must not be greater

Angular measurement : the signal period of angle encoders is calculated as follows:


Signal period (~) =

360
1000
line count

Signal period (

)=

or
360
1
1000
line count interpolation factor

If angular measurement is made by gearing up or down, this must be taken into account when
calculating the signal period.

MP330

Signal period
Entry range 1 to 360 in [m] or

MP330.0
MP330.1
MP330.2
MP330.3
MP330.4 *

1
[1000
]

X axis
Y axis
Z axis
Axis 4
Axis 5

* only TNC 406

4-6

TNC 406/TNC 306

1 Machine axes

3/97

1.1.2 Direction of traverse


The machine parameters MP210 and MP1040 determine the direction of traverse for the axes.
The direction of traverse for the axes of numerically controlled machine tools are defined by DIN
(see also under "Axis designation").
MP210 defines the counting direction for the encoder signals. The counting direction depends on
the mounting orientation of the encoders.
MP210

Count direction of the encoder signals


Entry range: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = positive
+1 = negative
+0 = positive
+2 = negative
+0 = positive
+4 = negative
+0 = positive
+8 = negative
+0 = positive
+16 = negative

Machine parameter MP1040 determines the polarity of the nominal value voltage during the positive
direction of traverse.
MP1040

Polarity of nominal value voltage for positive direction of traverse


Entry range: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = positive
+1 = negative
+0 = positive
+2 = negative
+0 = positive
+4 = negative
+0 = positive
+8 = negative
+0 = positive
+16 = negative

* only TNC 406

3/97

TNC 406/TNC 306

1 Machine axes

4-7

The NC uses markers to tell the PLC in which direction the axes are to travel (only active in the
operating mode "Manual"):
0 = positive
1 = negative

M2160

Set
NC

Direction of traverse
X axis
Y axis
Z axis
Axis 4
Axis 5

M2161
M2162
M2163
M2164 *

Reset
NC

1.1.3 Encoder monitoring


HEIDENHAIN contouring controls can monitor the signals from the encoders. This function must be
activated by a machine parameter.
Two different conditions can be checked:
Error
message
The amplitude of the encoder signals
The edge separation of the encoder signals

A
B

If one of these conditions is not fulfilled, the error message "Encoder <axis> defect A/B" will appear.

MP31

Checking the amplitude of the encoder signals


Entry range: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = not active
+1 = active
+0 = not active
+2 = active
+0 = not active
+4 = active
+0 = not active
+8 = active
+0 = positive
+16 = negative

* only TNC 406

4-8

TNC 406/TNC 306

1 Machine axes

3/97

MP32

Checking the edge separation of the encoder signals


Entry range: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = not active
+1 = active
+0 = not active
+2 = active
+0 = not active
+4 = active
+0 = not active
+8 = active
+0 = positive
+16 = negative

* only TNC 406

3/97

TNC 406/TNC 306

1 Machine axes

4-9

1.2 Axis designation


The coordinate axes and their directions of travel are standardized in ISO 841.
It is easy to determine the directions of traverse by using the "right-hand rule":
+Z
+Y

+X

In the direction of the spindle axis the convention is:


The movement of the tool towards the workpiece is the negative direction of traverse.
NC programs are always written assuming that the tool moves and the workpiece remains
stationary.
If it is the workpiece that moves rather than the tool, then the direction of motion and the direction
of the axis are opposite to each other. The positive relative directions of movement are then
designated +X', +Y' etc.
+X

+X

The fourth axis can be used as an axis of rotation.


While the three main axes have the standard designations X, Y and Z, the designations of the fourth
axis can be selected by a machine parameter.
An axis of rotation is designated by the letter A, B or C. The correlation with the principle axes and
determination of the direction of rotation is standardized in ISO 841.
+Z
+Y

+C
+B

+A

4-10

+X

TNC 406/TNC 306

1 Machine axes

3/97

An extra linear axis is designated by the letter U, V or W. The correlation with the principle axes
and the direction of travel are also standardized in ISO 841.
+Z
+Y

+W
+V

+U

MP410

+X

Designation of axis 4
Entry:

MP411 *

0=A
1=B
2=C

Designation of axis 5
Entry:

0=A
1=B
2=C
3=U
4=V
5=W

1.2.1 Assignment
The encoder inputs X1 to X6 and the analog outputs, Output 1 to Output 4 (on connector X8) can be
assigned to the individual axes. The assignment is determined by the machine parameters MP110
and MP120.
MP110

Assignment of the encoder inputs to the axes


Entry:

MP110.0
MP110.1
MP110.2
MP110.3
MP110.4 *

0 = encoder input X1
1 = encoder input X2
2 = encoder input X3
3 = encoder input X4
4 = encoder input X5 *
5 = encoder input X6

X axis
Y axis
Z axis
Axis 4
Axis 5

* only TNC 406

3/97

TNC 406/TNC 306

1 Machine axes

4-11

MP120

Assignment of the analog outputs


Entry:

MP120.0
MP120.1
MP120.2
MP120.3
MP110.4 *

0 = output 1
1 = output 2
2 = output 3
3 = output 4
4 = output 5 *
X axis
Y axis
Z axis
Axis 4
Axis 5

1.2.2 Current tool axis


In the NC-block "TOOL CALL" it is determined whether the tool moves parallel to one of the principle
axes X, Y, Z or to the fourth axis. The markers M2100 to M2103 are used to show which of the four
axes is currently defined as the tool axis. The appropriate marker is then set.

M2100
M2101
M2102
M2103

Set
NC

X-axis is tool axis


Y-axis is tool axis
Z-axis is tool axis
Axis 4 is tool axis

Reset
NC

1.3 VDU display


Machine parameters can be used to select which of the active axes (MP10) should be displayed in
the status window.
MP40

VDU display
Entry range: 1 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = not active
+1 = active
+0 = not active
+2 = active
+0 = not active
+4 = active
+0 = not active
+8 = active
+0 = positive
+16 = negative

* only TNC 406

4-12

TNC 406/TNC 306

1 Machine axes

3/97

1.4 Software limit switch


For each of the four axes, three different software limit switch ranges can be defined by machine
parameters (e.g. for pendulum machining).
The input values for the software limit switch are related to the reference point of the encoder. The
momentary software limit switch range is selected by the markers (M2817, M2816) and activated
by the strobe marker (M2824).
The MOD function "Axis-limit" can be used to enter an additional limitation for the actual software
limit switch range within the range of traverse.
MP910/MP920 Software limit switch range 1
MP911/MP921 Software limit switch range 2
MP912/MP922 Software limit switch range 3
Entry range:
Linear axis
Axis of rotation

30 000.000 to +30 000.000 [mm]


30 000.000 to +30 000.000 []

Software limit switch range 1


Initial values after switch-on;
Activated by PLC M2817 = 0, M2816 = 0
MP910.0
MP910.1
MP910.2
MP910.3
MP910.4 *

Software limit switch X+


Software limit switch Y+
Software limit switch Z+
Software limit switch 4+
Software limit switch 5+

MP920.0
MP920.1
MP920.2
MP920.3
MP920.4 *

Software limit switch X


Software limit switch Y
Software limit switch Z
Software limit switch 4
Software limit switch 5
Software limit switch range 2
Activated by PLC M2817 = 0, M2816 = 1

MP911.0
MP911.1
MP911.2
MP911.3
MP911.4 *

Software limit switch X+


Software limit switch Y+
Software limit switch Z+
Software limit switch 4+
Software limit switch 5+

MP921.0
MP921.1
MP921.2
MP921.3
MP921.4 *

Software limit switch X


Software limit switch Y
Software limit switch Z
Software limit switch 4
Software limit switch 5

* 0nly TNC 406

3/97

TNC 406/TNC 306

1 Machine axes

4-13

Software limit switch range 3


Activated by PLC: M2817 = 1, M2816 = 0
MP912.0
MP912.1
MP912.2
MP912.3
MP912.4 *

Software limit switch X+


Software limit switch Y+
Software limit switch Z+
Software limit switch 4+
Software limit switch 5+

MP922.0
MP922.1
MP922.2
MP922.3
MP922.4 *

Software limit switch X


Software limit switch Y
Software limit switch Z
Software limit switch 4
Software limit switch 5

The markers M2816 and M2817 are used to define the software limit switch range.
M2816

M2817

Software limit switch range

Range 1 (MP910.X; MP920.X)

Range 2 (MP911.X; MP921.X)

Range 3 (MP912.X; MP922.X)

The change-over to the selected software limit switch range must be activated by the strobe-marker
M2824 by the PLC. This strobe-marker is reset by the NC after the change-over has been carried
out.

M2824

Activation of the software limit switch ranges

Set
PLC

Reset
NC

If one of the software limit switches is reached, the error message "LIMIT SWITCH ..." appears and
the appropriate marker (M2624 to M2633) is set.

Marker

Function

Set

Reset

M2624
M2625
M2626
M2627
M2628
M2629
M2630
M2631
M2632*
M2633*

Limit switch X+
Limit switch X
Limit switch Y+
Limit switch Y
Limit switch Z+
Limit switch Z
Limit switch 4+
Limit switch 4
Limit switch 5+
Limit switch 5

NC

NC

* 0nly TNC 406

4-14

TNC 406/TNC 306

1 Machine axes

3/97

Example:
PLC program example for changing the software limit switch ranges. PLC-input I10 is used as a
condition for change.
I10 = 0
I10 = 1

Software limit switch range 1


Software limit switch range 2

127
128
129
130
131
132
133
134
135
136
137
138
139
140

LN I10
AN M555
R M2816
R M2817
S M2824
S M555
R M556
L I10
AN M556
S M2816
R M2817
S M2824
S M556
R M555

;Range 1
;already done?
;select range 1
;select range 1
;activate change
;edge recognition range 1
;reset edge recognition range 2
;Range 2
;already done?
;select range 2
;select range 2
;activate change
;edge recognition range 2
;reset edge recognition range 1

I10
M2816
M2817

M2824
M555

M556

3/97

TNC 406/TNC 306

1 Machine axes

4-15

1.5 Lubrication pulse


The PLC can control the lubrication of the guideway according to the distance traveled on each axis.
Machine parameter MP4060.X defines the distance for each axis after which lubrication is to be
performed. Entry is in units of 65 536 m.

Example:
Desired traversing distance: 100 m
Value entered =

100 000 000 m


= 1526
65 536 m

If the stored path limit for an axis is exceeded, the NC sets a marker (M2012 to M2015) to 1.
After carrying out the lubrication the PLC is able reset the accumulated traverse distance (M2548 to
M2551).

MP4060

Path-dependent lubrication
Entry range: 0 to 65 535 (units of 65 536 m)

MP4060.0
MP4060.1
MP4060.2
MP4060.3
MP4060.4 *

X axis
Y axis
Z axis
Axis 4
Axis 5

M2012

Lubrication pulse X axis, since value of MP4060.0


was exceeded
Lubrication pulse Y axis, since value of MP4060.1
was exceeded
Lubrication pulse Z axis, since value of MP4060.2
was exceeded
Lubrication pulse axis 4, since value of MP4060.3
was exceeded
Lubrication pulse axis 5, since value of MP4060.4
was exceeded

M2013
M2014
M2015
M2016 *

Set
NC

Reset
NC

* only TNC 406

4-16

TNC 406/TNC 306

1 Machine axes

3/97

M2548

Reset of accumulated distance for


lubrication X axis
Reset of accumulated distance for
lubrication Y axis
Reset of accumulated distance for
lubrication Z axis
Reset of accumulated distance for
lubrication axis 4
Reset of accumulated distance for
lubrication axis 5

M2549
M2550
M2551
M2576*

PLC

NC

Example:
Example of PLC program for activating the lubrication for the X-axis.
The traverse distance after which the X-axis is to be lubricated is entered in machine parameter
MP4060.0. The duration of lubrication is defined by timer T0 (MP4110.0).
The PLC-output O24 is to be set for the duration of the X-axis lubrication.
In our example, lubrication is activated as soon as the marker M2012 is set. If the lubrication is only
to be activated when the axis is at rest, then this must be taken into account in the PLC-program.
MP4060.0 = 1 000 (approx. 60 m)
MP4110.0 = 100 (approx. 4 sec.).
.
.
45
46
47
48
49
.

L M2012
= T0
= M2548
L T48
= O24

;lubrication pulse X axis


;start timer for duration of lubrication
;reset accumulated distance
;duration of lubrication for X axis
;set output for lubrication

M2012
M2548
T0
T48
024

* only TNC 406

3/97

TNC 406/TNC 306

1 Machine axes

4-17

1.6 Axis error compensation


The HEIDENHAIN contouring control can compensate for mechanical defects in the machine.
The following axis error compensation is possible:
linear axis error compensation,
non-linear axis error compensation,
Either linear or non-linear axis error compensation can be activated.

1.6.1 Linear axis error compensation


One linear axis error can be compensated per axis. The axis error is entered, with the correct sign, in
machine parameter MP720. The error is positive if the table travel is too long, and negative if the
travel is too short.

Error
[mm]

0.02
0.01
0
Ref. mark

-0.01
-0.02

500

1000

Measuring system
[mm]

MP720

Linear axis error compensation


Entry range: 1.000 to +1.000 in [mm/m] or [1/1000]

MP720.0
MP720.1
MP720.2
MP720.3
MP720.4 *

X axis
Y axis
Z axis
Axis 4
Axis 5

* only TNC 406

4-18

TNC 406/TNC 306

1 Machine axes

3/97

1.6.2 Non-linear axis error compensation


Depending on the design of the machine or external factors (e.g. temperature) a non-linear axis error
can occur.
Such an axis error is usually determined by a comparator measuring instrument (such as HEIDENHAIN
VM 101).

For example, the lead-screw pitch error for the Z axis (Z=F(Z)) or the sag as a function of the Y axis
(Z=F(Y)) could be measured.
In the HEIDENHAIN contouring control, an axis can only be corrected as a function of one errorrelated axis. So in our example either the lead-screw pitch or the sag can be compensated. For each
of the four axes one table of corrections with 64 correction values per table can be entered. The
following definitions must be fixed for this purpose:
Correlation:
Datum point:

Distance:

Correction as a function of which axis?


(X=F(X); X=F(Y) etc.)
Distance to the reference mark of the encoder.
The error curve must always start with
correction value = 0 at the datum point.
Distance between the correction points (grid).
entry of the exponent to base 2
(e.g. entry 11 = 211 = 2,048 mm).

When determining the error curve with the aid of a comparator measuring instrument, the above
definitions must be already taken into account.

3/97

TNC 406/TNC 306

1 Machine axes

4-19

Example:

Y = F(Z)
Measurement length on Z axis = 1 000 mm
Desired distance between correction points = 1 000 mm : 64 = 15.62 mm
Possible exponent (base 2) = 214 = 16.384 mm
Datum point: 990
Error in Y
[mm]

0.1
0.08

Datum

0.06
0.04
0.02

940.848
875.312
973.616
908.08
924.464
990
957.232
891.696

Machine
datum
0
56.112
23.344
39.728
6,96

-0.02

Z
[mm]

+9.424
+25.808

-0.04
-0.06
-0.08
-0.1
-0.12

The errors which have thus been determined can be entered in the form of a table directly into the
control unit. However, axis error compensation is only effective when it is enabled for a specific axis
by the machine parameter MP730.
Before entering the correction table the code number 105 296 must be entered and the function
"COMPENSATION VALUE LIST" must be selected. The control will initially show the correction table
for the X axis, whereby "SETUP" is the interval between correction points:
X = F(X)
DATUM POINT +0.000
SETUP 1
0 X+0.000 X+0.000
1 X+0.001 X+0.000
2 X+0.002 X+0.000
.
.
.
The orange axis key can be used to select a different fault-causing axis for the X axis. After pressing
the GOTO key, the axis keys can be used to select a correction table for one of the other axes. The
correction value which is entered may not exceed the maximum correction-value difference.

4-20

TNC 406/TNC 306

1 Machine axes

3/97

The correction-value difference is calculated as follows:


Max. correction-value difference =

Distance between correction points


64

In our example, the result is


16.384 mm
= 0.256 mm
64
Only the compensation points of the error curve should be entered. The control will automatically
make a linear interpolation between the compensation points. In the example above the correction
table is thus:
Y = F(Z)
DATUM POINT
SETUP
0 Z990
1 Z973.616
2 Z957.232
3 Z940.848
4 Z924.464
5 Z908.08
6 Z891.696
7 Z875.312
8 Z858.928
.
.
.

990
14
Y+0
Y0.06
Y0.09

Y0.12
Y0.12
Y0.1
Y0.09

No entry is necessary in lines 3 and 4 (press the NO ENT key). The individual lines of the correction
table are selected either by the arrow keys or with the GOTO key. Press the END
key twice to
leave the correction table.

Special case: Axis of rotation


In a correction table for a rotary axis, the entered distance between correction points must be large
enough that the 64 correction points will cover a complete revolution of 360. An angular separation
of at least 5.625 is therefore necessary. For an axis of rotation, correction values will only be
recognized for entries from 0 to 360.

Input and output of the correction table via the data interface
After entering the code number 105296 and selecting the function "COMPENSATION VALUE LIST"
the correction table can be entered or read out via the data interface.
As usual, data transfer is initiated with the EXT key.

3/97

TNC 406/TNC 306

1 Machine axes

4-21

MP730

Non-linear axis error compensation


Entry range: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+ 0 = not active
+ 1 = active
+ 0 = not active
+ 2 = active
+ 0 = not active
+ 4 = active
+ 0 = not active
+ 8 = active
+ 0 = not active
+ 16 = active

* only TNC 406

4-22

TNC 406/TNC 306

1 Machine axes

3/97

3/97

TNC 406/TNC 306

1 Machine axes

4-23

1.7 PLC positioning


The four axes of the control can also be positioned by the PLC. The positions of the individual axes
must be stored as doublewords (D528 to D540) before activating the positioning.
The feed for positioning the individual axes is stored in W560 to W566.
The transfer of the positions and the feed to the PLC is carried out, for example, by Q-parameters
or machine parameters (MP4210.X, MP4220.X).
All four axes can be traversed simultaneously [simultaneous activation of all the strobe-markers
(M2704 to M2707)].
PLC positioning can be interrupted by resetting the strobe-marker (M2704 to M2707).
The doublewords D528 to D540 have a multiple usage. They have the following meaning for the
PLC positioning:
Address

Function

D528
D532
D536
D540
D544 *

Position X axis [1/ 1000 mm]


Position Y axis
Position Z axis
Position axis 4
Position axis 5

Feed for PLC positioning


W560
W562
W564
W566
W568 *

Feed X axis [mm/min]


Feed Y axis
Feed Z axis
Feed axis 4
Feed axis 5

M2704
M2705
M2706
M2707
M2708 *

Activate PLC-positioning X axis


Activate PLC-positioning Y axis
Activate PLC-positioning Z axis
Activate PLC-positioning axis 4
Activate PLC-positioning axis 5

Set
PLC

Reset
NC

Note:

The positions refer to the reference marks.


Software limit switches are not taken into account.
Tool compensations not calculated.
The path compensation must be terminated before a PLC positioning.
PLC positioning is not displayed in the test graphics.

* only TNC 406

4-24

TNC 406/TNC 306

1 Machine axes

3/97

Example:
PLC positioning of the Z-axis
A PLC positioning in the Z-axis is to be initiated with the M-function M70. The target position is
stored in the machine parameter MP4210.2. The feed for the PLC positioning is defined in machine
parameter MP4220.2
.
.

L M0
ON M0
S M2719
;word processing
.
CASE B260
;M-code
.
CM 70
.
ENDC
LBL 70
CM 110
S M2706
;activate PLC positioning Z axis
LN 2706
;PLC positioning Z axis done
S M2482
;acknowledgment M-function done
LN M2045
;no M-function?
R M2482
;acknowledgment reset
EM
LBL 110
;load Z position and feed rate
L D776
;load target position from MP4210.2
= D536
;target position PLC positioning Z axis
L W964
;load feed from MP4220.2
= W564;feed PLC positioning Z axis
EM

M1970
M2045
M4
M2706
M2482

3/97

TNC 406/TNC 306

1 Machine axes

4-25

4-26

TNC 406/TNC 306

1 Machine axes

3/97

2 Reference marks
When a datum point is set, a definite position value (coordinate) is assigned to each axis position for
workpiece machining. Since the actual position value is established incrementally by the encoder,
this correlation between axis positions and position values must be re-established after every power
interruption.
HEIDENHAIN linear encoders are therefore equipped with one or more reference marks. When the
scanning head of the encoder passes over a reference mark, a signal is generated which identifies
that particular position as a reference point. Passing over the reference marks after a power
interruption re-establishes the relationship between axis positions and display values (and, at the
same time, the fixed machine relationships) last defined by datum setting.
+Z REF Value REF Value
0
44.985
Workpiece
datum
0

10 20 30 40
+X
Workpiece

Machine table
Measuring system
Reference mark
Machine datum

Since it is often inconvenient to re-establish the reference points by traversing large distances after
switch-on, HEIDENHAIN recommends the use of encoders with distance-coded reference marks.
With this kind of encoder the absolute position is available after crossing two reference marks.
The scale graduation consists of the line grating and a reference mark track which runs parallel to it.
The distances between any two consecutive reference marks are defined differently, so that the
absolute position of the machine slide can be determined from this distance.

Scale with one reference mark

Scale with distance-coded reference marks

3/97

TNC 406/TNC 306

2 Reference marks

4-27

2.1 Passing over the reference marks


The reference marks for axes must be passed over after the control is switched on. This can be
achieved by

pressing the external START key. The axis sequence is determined by machine parameter
MP1340.X (automatic passing of the reference marks),
pressing the external axis direction keys. The sequence is determined by the operator.

Only after passing over the reference mark

can the software limit switch be activated,


can the most recently set datum point be reproduced,
is PLC positioning and positioning with the miscellaneous functions M91 and M92 possible,
is the counter value for non-controlled axes set to zero.

For encoders with distance-coded reference marks, the software limit switches, PLC positioning and
positioning by M91 and M92 are referenced to the Zero reference mark. In linear encoders the Zero
reference mark is the first reference mark after the start of the measuring length; in angular
encoders the Zero reference mark is marked.
The direction of traverse and the velocity on passing the reference marks is defined by machine
parameters (MP1320, MP1330.X).
The functional sequence for passing the reference marks can be fixed specifically for the axes by
machine parameters (MP1350.X).
The operating condition "PASS OVER REFERENCE MARKS" is sent to the PLC by the NC (M2057 or
W272).
In order to avoid exceeding the traverse range when passing over the reference marks a trip dog
(reference end-position) is necessary. This trip dog must be fixed at the end of the traverse range by
the machine manufacturer. The trigger signal from the trip dog is connected to an available PLC
input. In the PLC program this PLC input is combined with the markers for "Reference end position"
(M2556 to M2560).

4-28

TNC 406/TNC 306

2 Reference marks

3/97

2.1.1 Encoders with distance-coded reference marks


Machine parameter MP1350.x = 0

Reference marks
Trip dog
"Reference end position"

Closed
Open

Traverse direction MP1320.x

3/97

TNC 406/TNC 306

2 Reference marks

4-29

Sequence "Automatic passing over reference marks" (press the external START key).
MP1350.x = 0
Press external START key

Trip dog
"Reference end position"
closed?

No

Traverse direction from


MP1320.x

Yes

Invert traverse direction


from MP1320.x

Pass over two consecutive


reference marks

Is the machine
outside the software
limit switch range?

Yes

Machine moves to
software limit switch range

No

Machine stops

4-30

TNC 406/TNC 306

2 Reference marks

3/97

2.1.2 Encoders with one reference mark


Machine parameter MP1350.x=1

Reference marks

Trip dog
"Reference end position"

Closed
Open

Traverse direction MP1320

For linear measurement using a rotary encoder a reference pulse is produced on each revolution of
the encoder. It must be ensured that, after switching on the machine, always the same reference
pulse is evaluated. This can also be achieved by using the trip dog "Reference end-position."
Measuring length

Reference pulse
Desired reference pulse

Trip dog
"Reference end position"

Closed
Open
Traverse direction MP1320

3/97

TNC 406/TNC 306

2 Reference marks

4-31

Sequence "Automatic passing over reference marks" (Press the external START key).
MP 1350.x = 1

Press the external START key

No

Trip dog
"Reference end position"
closed?

Yes

Machine traverse in direction from


MP1320 with velocity from
MP1330.x to the trip dog
"Reference end positon"

Machine traverse in inverted direction


from MP1320 and with reduced velocity from MP1331.x
The first reference pulse after opening of the trip dog
"Reference end position" is evaluated

Is the
machine outside
the software limit
switch range?

Yes

Machine moves to
software limit switch

No

Machine stops

4-32

TNC 406/TNC 306

2 Reference marks

3/97

MP1320

Direction for traversing the reference marks


Entry range: 0 to 31

Bit 0

X axis:

Bit 1

Y axis:

Bit 2

Z axis:

Bit 3

Axis 4:

Bit 4 *

Axis 5:

+ 0 = positive
+ 1 = negative
+ 0 = positive
+ 2 = negative
+ 0 = positive
+ 4 = negative
+ 0 = positive
+ 8 = negative
+ 0 = positive
+ 16 = negative

MP1330

Feed rate for traversing the reference marks


Entry range: 80 to 30 000 [mm/min]

MP1330.0
MP1330.1
MP1330.2
MP1330.3
MP1330.4 *

X axis
Y axis
Z axis
Axis 4
Axis 5

MP1331

Feed rate for leaving the reference end position


(only for encoders with one reference mark MP1350=1)
Entry range: 80 to 500 [mm/min]

MP1331.0
MP1331.1
MP1331.2
MP1331.3
MP1331.4 *

X axis
Y axis
Z axis
Axis 4
Axis 5

MP1340

Sequence for traversing reference marks


Entry:

MP1340.0
MP1340.1
MP1340.2
MP1340.3
MP1340.4 *

0 = no evaluation of the reference mark


1 = X axis
2 = Y axis
3 = Z axis
4 = Axis 4
5 = Axis 5

1st axis
2nd axis
3rd axis
4th axis
5th axis

* only TNC 406

3/97

TNC 406/TNC 306

2 Reference marks

4-33

MP1350

Type of reference mark approach


Entry:

MP1350.0
MP1550.1
MP1350.2
MP1350.3
MP1350.4*

0 = encoder with distance-coded reference marks


1 = encoder with one reference mark

X axis
Y axis
Z axis
Axis 4
Axis 5

M2556
M2557
M2558
M2559
M2560

Reference end position for X axis


Reference end position for Y axis
Reference end position for Z axis
Reference end position for axis 4
Reference end position for axis 5

W272

Operating mode
0 = Edit
1 = Manual operation
2 = Handwheel
3 = Positioning with manual entry
4 = Program run/single block
5 = Program run/full sequence
6 = Program test
7 = Pass over reference points

Set
PLC

Reset
PLC

NC

2.2 Machine datum


The reference mark defines a point on the encoder. The reference points of all axes define the scale
datum. MP960.x contains the distance from the scale datum to the machine datum. All REF-based
displays and positioning movements refer to the machine datum (see also Section "Display and
operation").

* only TNC 406

4-34

TNC 406/TNC 306

2 Reference marks

3/97

3/97

TNC 406/TNC 306

2 Reference marks

4-35

4-36

TNC 406/TNC 306

2 Reference marks

3/97

3 Servo positioning of the NC-axes


This section describes all the control functions which are important for the control and monitoring of
the NC-axes.
Further parameters for the NC-axes can be found under "Machine axes."
The control of the gap is described under "Gap control."

3.1 The position control loop of an NC-machine


In NC machines the servo control is normally implemented as a cascade control (see following block
diagram).
The motor speed control and the current control (both in the drive amplifier) are integrated into the
servo position control (NC-control). The servo controlled system consists of the motor and machine
slide.

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-37

Machine

3 Servo positioning of the NC-axes

Block diagram of the position control loop, here cascade control.

Motor

Linear/
Rotary
encoder

Tacho

Actual position

Current
regulator

Actual
current

rpm
Nominal
Nominal
regulator current
rpm

Actual
rpm

Servo amplifier

Actual
rpm

TNC 406/TNC 306

Nominal Trailing Position


position error regulator
(lag)
Actual
position

4-38

CNC Control

3/97

3.2 Control with lag


Two control methods are possible with the control:
1. Control with lag
2. Control with feed forward control only during erosion (see "Gap control with feed forward
control")
During operation the TNC automatically selects the appropriate control method.

Control with lag


Control with lag means that there is a difference (lag) between the nominal position of the axes as
defined by the NC and their actual position. Control would not be possible without this lag.
In the operating modes "Positioning with manual input", "Program run/single block" and "Program
run/full sequence" positioning without eroding (M37) is always with lag.
Lag operation is depicted in simplified form in the following block diagram for the X axis. It shows a
part of the cascade control mentioned previously.
All machine parameters which influence the control characteristic are shown here.
kv factor:

v=
at

ax
sax

X Actl

vx Noml+ +

v s

Vx

XNoml+ sax

vx Actl

Servo
amplifier

XS

MP1810

s=s0+vt

Acceleration:
MP1060
YS

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-39

The control calculates a nominal velocity value every 4 ms from the feed programmed in the NC
program and the final position (X-, Y-, Z-, C-axis), allowing for the acceleration which has been
stored (MP1060). The stored acceleration is valid for the rising as well as the falling slope. If two
or more axes are traversed simultaneously, the smallest value for acceleration will be effective.
Every 4 ms a nominal path value is calculated from the velocity nominal value.
s = so + v t

s
so
v
t

=
=
=
=

nominal path value


previous nominal path value
nominal velocity value
cycle time 4 ms

The nominal path value is resolved into the individual axis components, depending on which axes
have been programmed.
The axis-dependent nominal path value is compared with the actual value of the positions and
the lag sa is calculated.
sax = xNoml - xActl

sax = lag for X-axis


xNoml = nominal path value for X-axis
xAct l = actual path value for X-axis

The lag is multiplied by the kv factor MP1810 and passed on to the drive amplifier as a nominal
velocity value (analog voltage).
vx= kv sax

vx

= nominal velocity-value for X-axis

The kv factor (position loop gain) determines the control loop response of the machine, and it must
be matched to the machine.
If a very high kv factor is chosen, the lag is very small; however, this can lead to an overshoot when
approaching a new position. On the other hand, if the kv factor is too small then the new position will
be reached too slowly.
The optimal kv factor must be determined by trial and error (see the section "Commissioning and
start-up procedure").
The following diagram shows the response for various kv factors:
U [V]

MP1810
kv correct
kv too large
kv too small

MP1060

MP1810

t [s]

The acceleration can be programmed with machine parameter MP1060. The acceleration
determines the slope of the ramp on the rising and falling edges.

4-40

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

For axes which are mutually interpolated the kv factor must be the same, in order to avoid contour
distortion.
MP1060

Acceleration
Entry value 0.001 to 3.0 [m/s2]

MP1060.0
MP1060.1
MP1060.2
MP1060.3
MP1060.4 *

Acceleration X axis
Acceleration Y axis
Acceleration Z axis
Acceleration axis 4
Acceleration axis 5

The Kv factor in MP1810 is, in general, determined by the rapid traverse (MP1010) of the machine
and the lag, using the following formula:
m/min
kv = Ve
sa [ mm ] kv = position loop gain
ve = rapid traverse
sa = lag
or
sa = Ve
kv [mm]
Rapid traverse
[m/min]
10

kv = 2

kv = 1

6
kv = 0.5
4
2

10

12

sa [mm]

The rapid traverse (maximum traversing speed) must be adjusted by the desired analog voltage (e.g.
9 V) on the servo-amplifier (see section "Commissioning and start-up procedure"). For each axisspecific rapid traverse there is an analog voltage which is stored in machine parameter MP1050.

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-41

The resulting lag error sa thus depends on the analog voltage.


U[V]
10
8
kv = 1, Rapid traverse 10 m/min
6
4
2

10

12

sa [mm]

A special feed rate for manual operation (manual feed) is stored in machine parameter MP1020. In
general, it is significantly lower than the rapid traverse. Unlike the rapid traverse, this special feed
rate has no effect on the servo behavior.
MP1810

Kv factor for operation with lag


m/min
Entry range 0.1 to 10 [
]
mm

MP1810.0
MP1810.1
MP1810.2
MP1810.3
MP1810.4 *

kv factor X axis
kv factor Y axis
kv factor Z axis
kv factor axis 4
kv factor axis 5

MP1010

Rapid traverse
Entry range 80 to 30 000 [mm/min]

MP1010.0
MP1010.1
MP1010.2
MP1010.3
MP1010.4 *

Rapid traverse X axis


Rapid traverse Y axis
Rapid traverse Z axis
Rapid traverse axis 4
Rapid traverse axis 5

MP1050

Analog voltage for rapid traverse


Entry range 4.5 to 9 [V]

MP1050.0
MP1050.1
MP1050.2
MP1050.3
MP1050.4 *

Analog voltage X axis


Analog voltage Y axis
Analog voltage Z axis
Analog voltage axis 4
Analog voltage axis 5

* only TNC 406

4-42

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

MP1020

Manual feed
Entry range 80 to 30 000 [mm/min]

MP1020.0
MP1020.1
MP1020.2
MP1020.3
MP1020.4 *

Manual feed X axis


Manual feed Y axis
Manual feed Z axis
Manual feed axis 4
Manual feed axis 5

Servo accuracy
The internal servo accuracy and the display step of the control is always 1 m.
The control must be able to generate at least one voltage step per 1 m position deviation.

Calculation of the smallest voltage step


The control produces an analog voltage of 0 to 10 V. In the TNC the 10 V analog potential is
produced by a 14-bit ADC, giving 16 384 divisions. The resulting smallest potential step is 0.6 mV.

Potential steps per m position deviation. As described above, moving with rapid traverse (MP1010)
results in a certain lag distance sa. The rapid traverse rate is reached at a definite voltage (MP1050).
So it is possible to calculate a definite potential U per m of position deviation (lag).
U = MP1050 [mV] / sa [m]
If U is divided by the smallest voltage step which can be produced (0.6 mV), the result is the
number of voltage steps which are produced per m position deviation.

for the TNC 306:


n = U [mV]/0.6 [mV]
Example:
kv = 2

rapid traverse 5 000 [mm/min], U = 9 [V]

sa =

5 000 [m]
= 2 500 [m]
2

U =

9 000 [mV]
= 3.6 [mV/m]
2 500 [m]

n=

3.6 [mV/m]
= 6 steps/m position deviation
0.6 [mV]

* only TNC 406

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-43

3.3 Offset adjustment


The TNC includes several possibilities for compensating an offset voltage which would cause the
axes to drift.
The maximum permissible offset voltage in the control is 100 mV. If this voltage is reached or
exceeded, the error message
"Gross positioning error E"
will appear.

3.3.1 Offset adjustment by code number


An automatic offset adjustment can be activated with the code number 75368. After entering the
code number the control shows the offset values for the axes X, Y, Z, 4, in the dialog line. The
values indicate the voltage in 0.15 mV (LE406) and 0.6 mV (LE360) units. Thus a display of 10 means
10 x 0.6 mV = 6.0 mV (LE360). The display 0 means no offset.
The displayed offset value is derived from the offsets in the drive amplifier and control system.
On pressing the "ENT" key the offset values which are displayed on the VDU are automatically
compensated. The control puts out a compensating voltage. The compensation only takes place if
the offset voltage is > 0.6 mV.
To switch off the offset adjustment, enter the code number and press the "NO ENT" key.
The offset values are stored in the control and are non-volatile.
After a control exchange the offset compensation via code number must be re-activated.

3.3.2 Automatic cyclical offset adjustment


The machine parameter MP1220 can be used to program a time interval, after which an offset
adjustment will be performed cyclically. An automatic adjustment will be carried out when the
predetermined time has elapsed and the following conditions are fulfilled:
- all axes are stopped,
- MO5 status active,
- the axes are not clamped.
For each adjustment cycle there will be a 1 mV correction if the offset voltage is larger than 1 mV. If
the offset voltage is smaller than 1 mV then compensation steps of 0.6 mV will be used .
MP1220

Automatic cyclical offset adjustment


Entry value: 0 to 65 535 [s]
0 = no automatic adjustment

4-44

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3.4 Contouring behavior in corners


3.4.1 Radial acceleration
In addition to the normal acceleration (MP1060) there is also a machine parameter for radial
acceleration (MP1070).
The machine parameter limits the feed for circular movements according to the following formula:
v=

r [m] MP1070 [m/s2]

v = feed rate for circular movements [m/s]


r = radius [m] (cutter mid-point contour)

It is recommended that a value is entered which is 50100% of that in MP1060 (Acceleration). If the
programmed feed is lower than that above, then the programmed feed will be used.
MP1070

Radial acceleration
Entry value: 0.001 to 3.0 [m/s2]

3.4.2 Constant feed rate in corners


Machine parameter MP7460 defines the angle which can still be traversed with constant feed rate.
This machine parameter is effective for corners without a radius compensation, for internal corners
it is also effective with a radius compensation.

MP7460

The permissible size of the angle depends on the drives in the machine.
Realistic values are 5 to 20.
The resulting path is as follows:
Axis standstill
= Change of axis movement direction
sa = Servo lag

sa

Path when MP7460 <


Path when MP7460 >

MP7460

3/97

Constant feed rate in corners


Entry value: 0.001 to 179.999
TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-45

3.5 Monitoring functions


The NC monitors the axis positions and the dynamic behavior of the machine. If the fixed values in
the machine parameters are exceeded, an error message is displayed and the machine is stopped.
Position, standstill, movement and analog voltage are monitored.
If monitoring is not wanted at all, the following markers must be set in the PLC program:

M2688
M2689
M2690
M2691
M2692 *

Set
PLC

No monitoring X axis
No monitoring Y axis
No monitoring Z axis
No monitoring axis 4
No monitoring axis 5

Reset
PLC

Monitoring can be reactivated by resetting the markers in the PLC.

3.5.1 Position monitoring for operation with lag


The machine parameters MP1710 and MP1720 determine the ranges for the continuous position
monitoring in the machine (lag monitoring). The monitoring is active as soon as the axes are under
the control of the position control loop.
If the limits of parameter MP1710 are exceeded, the error message
"Position error"
will appear and the machine stops. The error message can be canceled by the "CE" key.
If the limit of parameter MP1720 is exceeded, the flashing error message
"Gross positioning error A"
appears.
This error can only be canceled by switching off the control. An entry value of approx. 1 to 1.4 times
lag for rapid traverse is realistic. MP1720 is larger than MP1710.

MP1710

Position monitoring for operation with lag (cancelable)


Entry value: 0.0001 to 100 [mm]

MP1720

Position monitoring for operation with lag (EMERGENCY STOP)


Entry value: 0.0001 to 100 [mm]

* only TNC 406

4-46

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3.5.2 Monitoring the analog voltage difference


Monitoring of the maximum voltage difference between two control loop cycles.
As soon as the difference is greater than the value which is stored in MP1141, the flashing error
message
"Gross positioning error F"
is displayed.
MP1141

Maximum voltage difference between two control loop cycles


Entry value: 0.03 to 10 [v]

3.5.3 Movement monitoring


Movement monitoring functions in operation with feed forward control as well as with lag.
During movement monitoring, the actual path traveled is compared with a nominal path calculated
by the NC at short intervals (several servo cycles). If during this period the actual path traveled
differs from the calculated path, the flashing error message
"Gross positioning error C"
is displayed.
Machine parameter MP1140 can store a voltage below which movement monitoring is inactive.

If 10 [V] is entered in this machine parameter, movement monitoring becomes


inactive. It is not possible to operate the machine safely without movement
monitoring.

MP1140

3/97

Movement monitoring
Entry value 0.03 to 10 [V]

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-47

3.5.4 Standstill monitoring


The monitoring functions when the axes have reached the positioning window. The range in which
the axes may move is defined in MP1110.
As soon as position deviation is greater than the value which is stored in MP1110, the flashing error
message
"Gross positioning error D"
is displayed. The message also appears if, on running-in to a position, an overshoot occurs which is
larger than the value in MP1110 or the axis moves in the opposite direction on beginning a
positioning movement.
MP1110

Standstill monitoring
Entry value: 0.001 to 30 [mm]

3.5.5 Positioning window


The positioning window defines the limits within which the control considers that a position has
been reached. After reaching the position the control starts the execution of the next block.
The size of the positioning window is defined in machine parameter MP1030.
If the value which is entered is too small, the run-in time and therefore the time between one
program block and the next will be lengthened.
If the axes have reached the positioning window after a movement, the markers M2008 to M2011
are set (see section "Axis in position").
MP1030

Positioning window
Entry value: 0.001 to 2 [mm] or []

MP1030.0
MP1030.1
MP1030.2
MP1030.3
MP1030.4 *

X axis
Y axis
Z axis
Axis 4
Axis 5

* only TNC 406

4-48

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-49

3.6 Controlled axes


Machine parameter MP50 determines which of the four NC-axes should be controlled.
MP50

Controlled axes
Entry value: 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 = not controlled
+1 = controlled
+0 = not controlled
+2 = controlled
+0 = not controlled
+4 = controlled
+0 = not controlled
+8 = controlled
+0 = not controlled
+16 = controlled

Further parameters for the NC-axes may be found in the section "machine axes."
The PLC functions which are described in the following sections are only effective for controlled
axes.

3.6.1 Axes as programmable position displays


Machine parameter MP60 defines individual axes as programmable position displays (POSITIP
function).
For example: If MP60 = 3, the X and Y axes are considered to be programmable position displays
and only Z and 4th axes would be in closed loop control. X- and Y-axis positioning can still appear in
the NC program but the axes must be moved manually before the program can continue.
MP60

Axes as programmable position displays


(POSITIP function )
Entry range 0 to 31

Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

Axis 4

Bit 4 *

Axis 5

+0 no POSITIP function
+1 with POSITIP function
+0 no POSITIP function
+2 with POSITIP function
+0 no POSITIP function
+4 with POSITIP function
+0 no POSITIP function
+8 with POSITIP function
+0 no POSITIP function
+16 with POSITIP function

* only TNC 406

4-50

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3.6.2 Axis enable


After switching on the control voltage the "Axis-enable markers" are automatically set by the NC, so
that the machine axes can be held in closed position loops by the control.
The axis-enable markers can be reset by the NC if the control loop is opened by the PLC (see
section "Open control loop").

M2000
M2001
M2002
M2003
M2004*

Axis enable X
Axis enable Y
Axis enable Z
Axis enable 4
Axis enable 5

Set
NC

Reset
NC

* only TNC 406

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-51

3.6.3 Axes in position


When the axes have reached the defined positioning window (MP1030, see section "Positioning
window") after a movement, the "axis in position" markers are set by the NC. This also happens after
the control voltage is switched on.
The markers will only be reset by the NC if the axes leave the positioning window when being
traversed in manual operation or automatic operation. This is also valid when passing over the
reference marks.
The "Axis in position" markers are not set for contours which can be machined at constant feed rate.

M2008
M2009
M2010
M2011
M2032 *

X axis in position
Y axis in position
Z axis in position
Axis 4 in position
Axis 5 in position

Set
NC

Reset
NC

* only TNC 406

4-52

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3.6.4 Open control loop


Under certain conditions it may be necessary to open the control loop for one or more axes. If the
markers M2544 to M2547 are set, the control loops for the relevant axes will be opened and the
appropriate markers M2000 to M2003 (see section "Axis enable") will be reset by the NC.
If, after the execution of an NC block, the control loop for a particular axis is opened and this axis is
clamped, then it is necessary to delay this opening to give the clamp sufficient time to operate. The
markers M2492 to M2495 and M2572 were introduced for this purpose. If one of these markers is
set, and the appropriate axis is in position, then the next NC block will only then be processed when
the "Open control loop" marker (M2544 to M2547 and M2572) has been set.

M2544
M2545
M2546
M2547
M2572 *

Open control loop X axis


Open control loop Y axis
Open control loop Z axis
Open control loop axis 4
Open control loop axis 5

M2492
M2493
M2494
M2495
M2568 *

Await open control loop X axis


Await open control loop Y axis
Await open control loop Z axis
Await open control loop axis 4
Await open control loop axis 5

Set
PLC

Reset
PLC

PLC

PLC

3.6.5 Actual/nominal value transfer


If the markers M2552 to M2555 are set, then the actual position value will be transferred to the
nominal value.
The transfer of the actual value is possible in the "Manual" operating mode, and also during an M-ST-strobe, but not in the "Full sequence" operating mode.

M2552

Actual-nominal value transfer X axis

M2553

Actual-nominal value transfer Y axis

M2554

Actual-nominal value transfer Z axis

M2555
M2564*

Actual-nominal value transfer axis 4

Set
PLC

Reset
PLC

Actual-nominal value transfer axis 5

* only TNC 406

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-53

3.6.6 Feed rate override by the PLC


The feed rate may be altered by the override potentiometer or the PLC word W766. Whenever a
value is loaded into W766 the potentiometer becomes inactive. The actual position of the override
potentiometer is loaded into PLC word W494.
W494 position of the feed rate override in percent (NC -> PLC).
W766 percent factor for the feed rate override (PLC -> NC) entry range 0 to 150.

3.7 Non-controlled rotary axis (M03/M04)


If axis 4 is defined as a rotary axis it may be operated as a freely rotating spindle with the
M-functions M03, M04 and M05.
The speed for the rotary axis is taken from machine parameter MP2090 if the PLC doubleword D726
does not contain a value. (M-function M03, M04 and M05: see section M-Functions.)
The markers M2485 and M2486 change the polarity of the analog voltage for the C-axis.
The rotation speed may be altered by the spindle override potentiometer or the PLC word W764.
Whenever a value is loaded into W764 the potentiometer becomes inactive. The actual position of
the override potentiometer is loaded into PLC word W492.

MP2090

M2485
M2486
M2487
D752
W492
W764

4-54

Speed for non-controllable rotary axis (M03/ M04)


Entry range 1 to 83 (RPM)

Status display and sign of analog voltage for C-axis


(M03)
Status display and sign of analog voltage for C-axis
(M04)
Status display for C-axis (M05)

Set
PLC

Reset
PLC

PLC

PLC

PLC

PLC

Speed for non-controlled rotary axis (M03/M04)


Position of the spindle override in percent
(NC -> PLC)
Percentage factor for spindle override
Entry range 0 to 150

TNC 406/TNC 306

3 Servo positioning of the NC-axes

3/97

3/97

TNC 406/TNC 306

3 Servo positioning of the NC-axes

4-55

4 Gap control
The gap control is switched on with M36 and switched off with M37 (see Chapter 7 M-Functions).
The control responds to the analog gap signal (0 to 5V), and the input of the gap signal as described
in the following, by sending an analog voltage to the nominal value outputs. If the gap is too small
and there is a tendency towards short-circuiting or arcing, the electrode is retracted along the
programmed contour. If the gap is too largeor at the start of the eroding processthe electrode
advances along the programmed contour. When the eroding process is stable, the gap is only
controlled to within a few m.
Feed forward control allows the control to react extremely quickly to the gap signal, resulting in very
low servo lag at low speeds. In particular this improves the gap control behavior when eroding with
graphite.
Machine parameter MP2130 defines the maximum speed at which feed forward control is to be
maintained during the eroding process. If the value is exceeded, the control switches to servo lag
mode. During an active eroding process marker M2785 is set.
MP2130

Maximum speed for feed forward control during eroding


Input range: 0 to 500 (mm/min)

M2785

Eroding process is active

Set
NC

Reset
NC

4.1 Input characteristics of the gap signal


The input characteristic of the gap signal can be adapted to the particular machine being used. The
input characteristic is defined with machine parameters MP2010, MP2020 and MP2030 (see also
Chapter 13.2.1 "Servo sensitivity").
Machine parameter MP2070 defines the speed at maximum gap voltage (5V) if MP2010 = 1 and
MP2020 = 1 and thus the scale. With machine parameter MP2080 the gap can also be inverted
(MP2080 = 1). The input characteristic can still be influenced by machine parameters MP2131 and
MP2132 over the gap signal range of 2.5 to 5V.
For calculations in the PLC, the current value of the gap signal is stored in word W392.

MP2010
MP2010.0
MP2010.1
MP2020
MP2020.0
MP2020.1

4-56

Characteristic gradient
Entry range: 0.1 to 10.000
Input characteristic range 2.5 to 5V
Input characteristic range 0 to 2.5V
Multiplication factor
Entry range: 1,000 to 10,000
Input characteristic range 2.5 to 5V
Input characteristic range 0 to 2.5V

TNC 406/TNC 306

4 Gap control

3/97

MP2030

Characteristic kink
Entry range: 0 to 100 (%)

MP2030.0

Input characteristic range 2.5 to 5V

MP2030.1

Input characteristic range 0 to 2.5V

MP2070

Feed rate at maximum gap voltage (5V)


and MP2020 = 1 and MP2030 = 1
Entry range: 1 to 100 (mm/min)

MP2080

Gap signal
Entry range: 0 to 2
0 = not inverted
1 = inverted
2 = analog input from spindle potentiometer
(for test purposes)

MP2131

Feed rate limited for switching to new eroding feed rate from MP2132
Entry range: 0 to 500 (mm/min)

MP2132

New eroding feed rate when value from MP2131 is exceeded


Entry range 0 to 500 (mm/min)

W392

Current value of the gap signal (NC -> PLC)


Range: 0 to 500 (1/100 V)

3/97

TNC 406/TNC 306

4 Gap control

(100% = 5V)
(0% = 2.5V)
(100% = 0V)
(0% = 2.5V)

4-57

Example:
F
[mm/min]
60
50
9

40

30

20

7
3

10
0

2.5
0

5V

10

Ugap [V]

Range for typical


process run

20
30
6

40
50
60
70

Electrode
moves towards
workpiece

Electrode
retracts

80
90
10
Short circuit
0V

Standstill
2.5 V

Freerun
5 V (MP 2080 = 0)

MP2030.0 = 30
MP2030.1 = 30
MP2010.0 = 1
MP2010.1 = 1
MP2020.0 = 2

Characteristic kink (characteristic range 2.5 to 5V)


Characteristic kink (characteristic range 0 to 2.5V)
Characteristic gradient (characteristic range 2.5 to 5V)
Characteristic gradient (characteristic range 0 to 2.5V)
Multiplication factor (characteristic range 2.5 to 5V)
(new slope starting at kink point is the product of MP2020 MP2010)
MP2020.1 = 2.4 Multiplication factor (characteristic range 0 to 2.5V)
(new slope starting at kink point is the product of MP2020 MP2010)
MP2070 = 20
Feed rate at maximum gap voltage (= scaling)
MP2131 = 30
Feed rate limited for a new eroding feed rate from MP2132
(MP2132 = 30)
MP2132 = 0
New eroding feed rate when value from MP2131 is exceeded
MP2133 = 100 Retracting speed during short circuit (signal at X12)

4-58

TNC 406/TNC 306

4 Gap control

3/97

4.2 Short Circuit Behavior


M36 on
The control must be able to react very quickly to a short circuit. A short circuit can occur during
normal positioning, but also during erosion.
If a short circuit occurs during erosion, i.e. when M36 is on and the gap control is active according to
the characteristic (see Chapter 4.1), the control reacts by retracting the electrode along the
programmed path. The control retracts the electrode until the short circuit is eliminated, or until 20
blocks have been retraced, or back to the NC block in which M36 was programmed. The retraction
velocity is determined by the characteristic or by the machine parameter MP2133, if a value has
been entered there.
M36 off
Marker M2623 causes a special short-circuit behavior during normal positioning (M36 off). As long
as this marker is set, the electrode retracts until the short circuit stops, then returns to the
workpiece at the programmed feed rate.
With Marker M2622, the PLC can suppress the short-circuit input X12. This may be required for a
tool change or to retreat from a eroded contour.
A short circuit is reported to the NC via X12. The NC then sets Marker M2782. The letter F is then
highlighted in the status display.
MP2133

Retraction speed during short circuit


Entry value: 0 to 500 [mm/min]
0 = Retraction speed from characteristic curve
Set

Reset

M2782

Short circuit reported at Input X12

NC

NC

M2622

Short circuit suppressed at Input X12

PLC

PLC

M2623

Retraction if short circuit occurs and M36 is off

PLC

PLC

4.3 Retraction of the electrode during erosion


If the electrode should be retracted during the erosion process (M36 on), for example to inspect it,
Marker M2617 must be set (e.g. with a button). The electrode is retracted as long as the marker is
set or for up to 20 NC blocks, or back to the NC block in which M37 was last programmed. If the
marker is reset, the electrode returns along its previous path at the last programmed feed rate or, if
no feed rate was programmed, at the feed rate entered in Machine Parameter MP1090; or if Marker
M2620 is set, at the feed rate entered in MP2060. Marker M2780 is set during electrode retraction
and reapproach. Marker M2784 is also set during reapproach. Marker M2781 is set if the maximum
retraction point is reached.

3/97

TNC 406/TNC 306

4 Gap control

4-59

Machine parameter MP2050 defines a distance to the last eroded position for traverse at the feed
rate from MP1090 or MP2060, or from the NC program. From this point on the characteristic curve
is active again.

MP1090

Feed rate for reapproach


Entry value: 0 to 30 000 [mm/min]

MP2060

Feed rate for retraction during erosion (M2620)


Entry value: 1 to 500 [mm/min]

MP2050

Distance to eroded position during reapproach (M2617)


Entry value: 1 to 500 [m]
Set

Reset

M2617

Electrode retracts as long as the marker is set

PLC

PLC

M2620

Feed rate from MP2060 becomes active


(for special applications, e.g. feed rate via key))

PLC

PLC

M2780

Electrode is retracting / reapproaching

NC

NC

M2781

Maximum retraction point has been reached

NC

NC

M2784

Electrode is reapproaching

NC

NC

4.4 Arc recognition


If a voltage between 0 V and 2.5 V (negative feed rate) is measured at the analog input for the
duration entered in machine parameter MP2120, the control positions the electrode to the beginning
of the last executed erosion block and switches erosion off with M37. Then the error message
"ERODING ERROR" is output. Marker M2788 is set at the same time.
If the control should automatically continue the program run, the start marker M2642 must be set by
the PLC. Marker M2788 is then reset by the NC, the error message is cleared and the reapproach
point is sought. If it is found, the control resumes program execution at the reapproach point. If the
reapproach point is not found, the NC program is at the program beginning, since the search is
aborted at the END PGM block of the main program.

MP2120

Time for arc recognition


Entry value: 1 to 99.9 [s]
Set

Reset

M2642

Start marker after faulty erosion process

PLC

PLC

M2788

Error message is displayed

NC

NC

4-60

TNC 406/TNC 306

4 Gap control

3/97

4.5 Free run and spark-out


If the distance between the electrode and workpiece has become so large that the gap signal has
reached 5 V, the generator can transmit a free run signal through a PLC input to the control. This can
be used to set Marker M2616 for "free run during erosion ."
When the programmed position has been reached for the first time (WTG=0) Marker M2783 is set
by the NC. The electrode remains in this position until Marker M2616 is set, and the time in machine
parameter MP2110 has expired. Then the next NC block will be executed.
Spark out in a disk cycle see chapter 6.7.3.

MP2060
MP2110

Feed rate for infeed when eroding (M2620 is set)


Entry range: 1 to 500 [mm/min]
Delay of signal for "spark-out is completed" (marker M2616)
Entry range: 0.1 to 99.9 [s]

M2616

Free run during erosion or spark-out is completed

Set
PLC

Reset
PLC

M2783

End of eroding path reached (WTG = 0)

NC

NC

M2620

Feed rate from MP2060 becomes active


(input characteristic then has no effect)

PLC

PLC

D388

Current way to go (WTG)

4.6 Flushing the gap


To make it possible to flush the erosion gap, the electrode can be automatically and cyclically lifted
away from the workpiece and returned again. This "auto jump" distance must be entered in the
Doubleword D730 and the erosion time in Doubleword D734. The cyclic movement for flushing is
started by Strobe Marker M2621. Marker M2780 is set during the up-and-down motion, Marker
M2784 is set only during downward motion, and Marker M2781 is set when the return point has
been reached. Machine Parameter MP2051 defines a distance to the last eroded position up to
which the electrode moved at the feed rate from MP1090 or MP2060, or from the NC program.
From this point on the characteristic curve is active again.
MP2051

Distance to the last eroded position during reapproach


Entry value: 1 to 500 [m]

M2621

Strobe marker for gap flushing

D756

Auto jump distance during flushing

3/97

TNC 406/TNC 306

4 Gap control

Set

Reset

PLC

PLC

4-61

The following examples for TNC 306 show how the flushing timer may be written in the PLC
program:
L
X
=
L
X
=
L
R
L
A[
L
>
]
CMT
EM
LBL
L
>
JPT
L
=
LBL
L
=
<=
S
EM

W676
K + 100
D730
W678
K + 100
D734
M2621
M2621
M910

; Auto Jump Distance (AJD)

D734
K+0

; Eroding time

; Eroding time (ER)

; Request flushing
; Flushing on buffer marker

31
31
D212
K+0
32
D734
D212
32
D212
K + 40
D212
K+0
M2621

;Timer Module
; Timer Buffer

; Eroding Timer

:PLC Cycle Time

; Request Flushing

4.7 Eroding parameters


In order to control the generator as required, the TNC stores appropriate data as eroding parameters.
Machine parameters MP2199 defined whether these eroding parameters are stored as Qparameters in the NC program or in the form of erosion tables.
MP2199 Enable erosion tables
0 = Tables not active
2 = Tables active

4-62

TNC 406/TNC 306

4 Gap control

3/97

4.7.1 Eroding parameters as Q-parameters in the NC program


If machine parameter MP2199 = 0 (erosion tables not active), Q-parameters Q90 to Q99 are
reserved for the storage of eroding parameters and are transferred to the PLC doublewords D668 to
D704 accordingly.
D668
D672
D676
D680
D684
D688
D692
D696
D700
D704

Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter
Q-parameter

(NC PLC)

Q90
Q91
Q92
Q93
Q94
Q95
Q96
Q97
Q98
Q99

4.7.2 Eroding parameters in erosion tables


If machine parameter MP2199 = 2 (erosion tables active), the eroding parameters are stored in the
form of erosion tables and transferred to the PLC addresses as defined below. Furthermore, Qparameters (Q96Q98) are also used for NC to PLC transfers.
(NC PLC)

D412
D416
D420

Q-parameter
Q-parameter
Q-parameter

B666
B667
B668

Maximum power stage


Minimum power stage
Power stage number

NR

B669
B670
B671
W672
B674
B675
W676
W678
B680
B681
W682
W684
W686
D688
W692
W694
B696
B697
B698
B699

Low voltage current


High voltage current
Nominal gap voltage
Pulse on duration
Pulse off duration
Servo sensitivity
Auto Jump Distance
Erosion Time
Arc sensitivity
Polarity electrode
High voltage selector
Wear rate
Surface finishing
Stock removal
Two-times gap
Minimum undersize
Auxiliary parameter 1
Auxiliary parameter 2
Auxiliary parameter 3
Auxiliary parameter 4

LV 2)
HV 2)
GV 2)
TON 2)
TOF 2)
SV 2)
AJD 2)
ET 2)
AR
P
HS
WR
RA
SR
2G
UNS
AUX1
AUX2
AUX3
AUX4

3/97

TNC 406/TNC 306

Q96
Q97
Q98

1)

(.E - table PLC) can be changed during


machining via Q-parameter Q99
2)

These eroding parameters can be


temporarily changed during machining
via the screen status display
(.E - table NC)
(.E - table PLC)

4 Gap control

4-63

W700
W702

Auxiliary parameter 5
Auxiliary parameter 6

AUX5
AUX6

For further calculations various eroding parameters are also assigned to extra Q-parameters:
Q96 to Q98
Q99
Q150
Q151
Q152
Q154
Q155
Q156
Q157
Q161
Q201 to Q225
Q231 to Q255

Additional eroding parameters


Current power stage number NR
Maximum NR
Minimum NR
Current eroding table number
Minimum undersize UNS of minimum NR
Two-times gap 2G of minimum NR
Two-times gap 2G of maximum NR
Value of MP2040
Eroding time
Two-times gap 2G of minimum to maximum NR
Minimum undersize UNS of minimum to maximum NR

MP2040

Factor, transmitted to Q157 if TOOL CALL or EL CALL is executed


Entry value: 0.1 to 500 [mm/min]

4.7.3 Create erosion parameter table in the PLC program


The machine tool builder can create his own erosion parameter tables in the instruction list of the
PLC through special code words. With MP 4020 one can select whether the table should be
activated from the NC (defined by HEIDENHAIN), or from the PLC.
MP 4020

Erosion parameter table from NC or PLC


Entry values: 0 or 1
0 = Erosion parameter table from NC
1 = Erosion parameter table from PLC

In order to be able to enter the code words EROTAB, TXT0, TXT1, TXT2, TXT3, NAME, ELEM,
ENDTAB for the creation of the erosion table in the instruction list, the cursor field must be opened
with the SPACE key (see example below).
Each column of the erosion parameter table requires the following information:
TXT0 ..... TXT3
NAME
ELEM

Dialog (4 languages) shown when the column in the erosion parameter


table is selected (depending on MP7230)
Column designation
B/W/D ,#, type of number, routine no., characteristic; comments
B/W/D Memory for input values
, , element is editable during erosion
,#, element is locked during erosion
Type of number (see below)
Routine no. = 0: no specification when entering a value
Routine no. = 1: specification check if value already exists
Characteristics: (must all be programmed at one time)
FRST First element on-line

4-64

TNC 406/TNC 306

4 Gap control

3/97

SENS
LAST
Q154
Q155
Q201
Q231

Element servo sensitivity (used directly by the TNC)


Last element on-line
Element of min-nr. = Q154
Element of min-nr. = Q155, element of max-nr. = Q156
Elements transferred to Q201 ... Q225 from min to max
Elements transferred to Q231 ... Q255 from min to max

Type of number
Integer (I)
I1-9999 1...9999
I1-2000
I1-255
I1-150
I1-99
I1-31
I1-25
I1-20
I1-15
I1-9
I1-3

W
1...2000 W
1...255 B
1...150 B
1...99 B
1...31 B
1...25 B
1...20 B
1...15 B
1...9
B
1...3
B

Integer (I)
I9999
I999
I255
I180
I150
I120
I100
I99
I90
I60
I31
I30
I25
I21
I20
I15
I9
I3
I2
I1

0...9999
0...999
0...255
0...180
0...150
0...120
0...100
0...99
0...90
0...60
0...31
0...30
0...25
0...21
0...20
0...15
0...9
0...3
0/1/2
0/1

W
W
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B

Real (R)
R1D200
R1D200I
R1D99
R1D99I

0.0 ... 200.0

W
W

0.0 ... 99.0

W
W

R3D9999 0.000 ... 9999.999 D


R3D9999I
R3D1000 0.000 ... 1000.000 D
R3D1000I
R3D999
R3D999I

0.000 ... 999.999 D

R3D9
R3D9I

0.000 ...

9.999 W

R3D1
R3D1I

0.000 ...

1.000 W

(The identifier I means that the


values are converted to inch if
the table is switched to INCH.)

Conditions for table structure:

The maximum number of elements in the eroding table is 32


The first two elements must be of the "byte" type
The first element must be the power stage number
Word or long elements must start at an even address
The total number of bytes must be even
The names of the elements determine the length of the element and must be equal or longer
than the cursor length (fill with space)
The cursor length is specified by the type of number

3/97

TNC 406/TNC 306

4 Gap control

4-65

Example of a table created in the PLC program:


EROTAB
;first element: byte
TXT0 "POWER STAGE NUMBER"
TXT1 "LEISTUNGSSTUFE NR."
TXT2 " French dialog"
TXT3 " Italian dialog"
NAME "NR"
ELEM B,#,I1-25,1
;byte 668 = begin of PLC-location
;
;second element: byte
TXT0 "LOW VOLTAGE CURRENT"
TXT1 "STROM BEI NIEDRIGER SPANNUNG"
TXT2 " French dialog "
TXT3 " Italian dialog "
NAME "LV"
ELEM B, ,I99,0,FRST
;669
.............
TXT0 "SERVO SENSITIVITY 1..99%"
TXT1 "SERVO EMPFINDLICHKEIT 1..99%"
TXT2 " French dialog"
TXT3 " Italian dialog "
NAME "SV"
ELEM B, ,I1-99,0,SENS ;675
.............
TXT0 "TWO-TIMES GAP [MM/INCH]"
TXT1 "DIAMETRALER SPALT [MM/INCH]"
TXT2 " French dialog"
TXT3 " Italian dialog"
NAME "2G "
ELEM W,#,R3D9I,0,Q201,Q155 ;692
..............
ENDTAB

4.7.4 Servo sensitivity (SV)


The eroding parameter Servo Sensitivity SV in the erosion table is evaluated directly by the control.
Its function is to adjust the gap control characteristic and thus the reaction speed to the gap signal.
SV is expressed as a percentage (099%) of the original characteristic gradients.
F
[mm/min]
SV = 99
0
2.5

4-66

TNC 406/TNC 306

SV = 60 5 Ugap [V]

4 Gap control

3/97

4.8 Transmission of eroding parameters to the PLC


The following PLC markers define the transmission of eroding parameters to the PLC:
Set
NC

Reset
PLC

If MP2199 = 2:
Values have been changed in editing mode in the
currently active Stage Number of the erosion table
during program run.
Acknowledgment is by a reset from the PLC.

NC

PLC

M2796

If M2795 has indicated changed values in the


currently active erosion table, M2796 should be set
by the PLC if these new values are to be
transferred immediately to the PLC (B668 and
following). The NC will reset the marker to
acknowledge successful execution.

PLC

NC

M2798

A new parameter table is active (first CYCL DEF


GENERATOR)
or M36
or eroding parameters displayed in the status during
program run have been changed
or the value of Q99 (Power Stage Number NR) has
been changed if M36 is active.
Acknowledgment is by a reset from the PLC.

NC

PLC

M2799

Strobe marker for starting transmission to the


generator control

PLC

NC

M2794

If MP2199 = 0:
a Q-parameter in the range Q90Q99 has been
changed and the values transferred to the
appropriate addresses in the PLC.
Acknowledgment is by a reset from the PLC.
If MP2199 = 2:
a Q-parameter in the range Q96Q98 has been
changed and the values transferred to the
appropriate addresses in the PLC.
Acknowledgment is by a reset from the PLC.

M2795

3/97

TNC 406/TNC 306

4 Gap control

4-67

4.9 Data exchange between PLC and generator control


The TNC 406 can transfer data from the NC to the generator control and vice versa.
This data transmission is activated by the PLC and runs through the RS-422/V.11 interface. The
RS-422/V.11 interface is permanently allocated for transmission. It can be considered an extension
to the available PLC inputs and outputs. The data is transmitted in hexadecimal code in Motorola
format (first high-byte, then low-byte).
The data format has the following fixed setting:
1 start bit, 8 data bits, even parity, 1 stop bit, 9600 baud
After reception of one data block, the receiving unit checks whether the BCCs of the transmitted
and received data blocks match. If this is the case, the receiving unit confirms the data block by
transmitting <ACK>. Otherwise it transmits <NAK> and outputs an error message.

4.9.1 Transmission from the generator control to the PLC


The transmission protocol consists of the following sequence:
Generator transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<Byte 1> < > <....> <Byte n> <BCC>

Meaning of the characters:


<SYNC>
<Number n>
<ID character>

<Hi-byte no.>
<Low-byte no.>
<Byte 1>
<......>
<Byte n>
<BCC>

= Synchronization character (= CA)


= Number of following data bytes including <ID character> without
<BCC>. Maximum 100 data bytes are allowed (01H to 64H)
= Code for command to be executed
00 = Read 8 markers (all markers permitted)
02 = Set or reset a marker (permitted M0 to M1999 and M2930 to M3023)
04 = Read x bytes or read x words (permitted B0 to B1023)
06 = Load byte or load word (B0 to B255)
= Start address High Byte
= Start address Low Byte

= Number of data bytes or data bytes (1 to n), or none of either (depending of


the function)
= Block Check Character (generated to describe all bytes except SYNC)

If the PLC has received a data block, checked the BCC and acknowledged with ACK, it then
evaluates the command byte (ID character) and executes it. A new transmission must not be started
until the old transmission has been concluded with ACK.

4-68

TNC 406/TNC 306

4 Gap control

3/97

Example: Read 8 Markers:


Eight Markers are to be read starting from Marker M1800.
Marker states: 0 0 0 1 1 1 1 0

Generator transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<BCC>
CA 03 00 07 08 0C

PLC transmits:

ACK or NAK

PLC protocol:
PLC transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<00..FF> <BCC>
CA 04 00 07 08 1E 14

Generator transmits:

ACK or NAK

Generator protocol:

Example: Reset a Marker


Marker 1800 is to be reset.

Generator transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<00..FF> <BCC>
CA 04 02 07 08 00 09

PLC transmits:

ACK or NAK

Generator protocol:

Example: Read Bytes


Five bytes are to be read starting with Byte 22 (B22=1F, B23=07, B24= 2A, B25=11, B26=00).

Generator transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<Number of data bytes> <BCC>
CA 04 04 00 16 05 13

PLC transmits:

ACK or NAK

PLC protocol:
PLC transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<Byte 1> < > <....> <Byte 5> <BCC>
CA 08 04 00 16 1F 07 2A 11 00 3B

Generator transmits:

ACK or NAK

Generator protocol:

Example: Load Bytes


Three bytes (B100, B101 and B102) are to be loaded into the 3 bytes starting with B22.

Generator transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<Byte 1> < > <Byte 3> <BCC>
CA 06 06 00 16 64 65 66 71

PLC transmits:

ACK or NAK

Generator protocol:

3/97

TNC 406/TNC 306

4 Gap control

4-69

4.9.2 Transmission from the PLC to the generator control


It becomes necessary for the PLC to transmit to the generator control when, for example, M36 is
output, a generator setting must be changed during erosion, or the operating mode of the control
must be changed.
For transmission the PLC provides Words W760 and W762, which must be loaded with the first
byte to be transmitted or with the number of the bytes to be transmitted. Strobe marker M2799
starts data transmission. If transmission is successful, ACK is transmitted to the PLC and the strobe
marker M2799 is reset. Marker M2799 must be reset before a new transmission can be started.
Data is transmitted according to the following protocol:
PLC transmits:

<SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>


<Byte 1> < > <....> <Byte n> <BCC>

Generator transmits:

ACK/NAK

If the NC recognizes an error during data transmission, it sets one of the markers from Marker
M2924 to M2928. These markers from the memory area of the PLC error messages are
permanently reserved for displaying the transmission error and must not be used for any other
purpose. Markers M2930 to M3023 can be changed as desired.
If the generator control transmits NAK (faulty transmission) to the PLC, the data will be transmitted
two more times. If the generator control transmits NAK three times, the transmission is aborted and
Marker M2924 for "transmission error" is set.

Marker

Function

Set

Reset

M2799

Strobe marker for starting transmission


to the generator control

PLC

NC

M2924
M2925
M2926
M2927
M2928

Transmission error (after three NAKs )


False marker numbers
Address exceeds memory area
Generator setting missing
External unit is not ready

NC
NC
NC
NC
NC

NC
NC
NC
NC
NC

W760
W762

No. of the first byte to be transmitted


Number of bytes to be transmitted

PLC
PLC

PLC
PLC

4-70

TNC 406/TNC 306

4 Gap control

3/97

5 EMERGENCY STOP routine


A PLC-input (LE360 X22/4, LE406 X42/4) and a PLC-output (LE306 X21/34, LE406 X41/34 and in the
PL410 X8/16) with the designation "control operational" are available in the control for the
EMERGENCY STOP routine.
If a malfunction is recognized in the control, the TNC switches the "control operational" output off, a
flashing error message appears on the VDU-screen and the PLC-program is stopped. This error
message cannot be canceled. After removing the fault the switch-on routine must be gone through
again.
If the input "control operational" is switched off by an event outside the control, the error message
"External EMERGENCY STOP" is displayed and the NC sets the marker M2190 and M2191. This
error message can only be canceled after the control voltage is switched on again.
The external EMERGENCY STOP is evaluated by the control as an external stop. If the external
EMERGENCY STOP is triggered during an axis movement, the moving axis is stopped in a
controlled manner. If the drive amplifiers are blocked by the external EMERGENCY STOP, the set
value output may exceed the position-monitoring fixed by the machine parameter. In this case, the
error message "Positioning error" or "Gross positioning error" will be displayed.

Set

Reset

M2190

Cancelable error message is displayed

NC

NC

M2191

Error message "EXTERNAL EMERGENCY


STOP" is displayed

NC

NC

3/97

TNC 406/TNC 306

5 EMERGENCY STOP routine

4-71

5.1 Connection diagram


Under fault conditions, the "control operational" output should switch off the 24-volt supply. Because
of the enormous importance of this function this output is tested by the control every time the
power is switched on.

This diagram represents a proposal for circuitry. The machine tool builder is responsible for
complying with applicable safety regulations.
Logic unit
Switch opens briefly when the control voltage
of each microprocessor is switched on
LE406
LE360

X41/34
X21/34

X44/2
X24/2

X44/1
X24/1

"Control is
ready"

24V not
24V
interruptible interruptible

EMERGENCY
STOP
buttons

Control
voltage
on

4-72

X42/4
X22/4
"Control ready"
feedback

k1

k1
K1

TNC 406/TNC 306

24 V
PLC

5 EMERGENCY STOP routine

3/97

5.2 Flow diagram


The external electronics must meet the specified conditions. In particular, the acknowledgment for
"Control operational" must reach the TNC after a maximum of 146 ms.
X21/34
X41/34

X22/4
X42/4
1

4 5

VDU-display
1.

Wait for control voltage.

2.

Recognize the control voltage on X22/4 or X42/4 and


reset the "Control operational" output on X21/34 or
X41/34 (t < 70 ms).

3.

Maximum time during which the "Control operational"


on X22/4 or X42/4 must go to 0 (t < 146 ms). If
exceeded,

4.

Recognize the acknowledgment and set output X21/34


or X41/34 (t < 24 ms).

5.

Wait for control voltage.

6.

Normal control operation. Output and acknowledgment


"Control operational" are high.

7.

Control voltage switched off externally.

8.

After the control voltage is switched on again, the error


message can be canceled, followed by normal control
operations.

9.

The control switches off the output "control operational"


(X21/34 or X41/34 ) after recognizing a fault.

3/97

TNC 406/TNC 306

EXTERNAL DC VOLTAGE MISSING

EMERGENCY STOP DEFECTIVE

EXTERNAL DC VOLTAGE MISSING

External EMERGENCY STOP

Flashing Error Message

5 EMERGENCY STOP routine

4-73

4-74

TNC 406/TNC 306

5 EMERGENCY STOP routine

3/97

3/97

TNC 406/TNC 306

5 EMERGENCY STOP routine

4-75

6 Display and operation 4


Machine parameters and PLC-markers can be used to influence the control behavior for certain
functions. All machine parameters and PLC markers which influence the display and the operation of
the control, and those for which there is no separate section in this manual, are described in the
section "Display and operation" .
The VDU-screen displays can be changed by machine parameters and PLC-markers.

6.1 Setting the machine datum point


A workpiece datum point can be defined in the operating mode "Manual operation."
NC positioning blocks normally refer to the set datum point (workpiece datum point). If a positioning
block is to be referenced to the reference point of the encoder instead of the set datum point, this
can be achieved with M91.
The distance from the machine datum to the scale datum is entered in machine parameter MP960.x.
All REF-related displays and positioning commands refer to the machine datum.
A third datum point can be defined in machine parameter MP950.X. If a positioning block is to be
referenced to this datum point, this can be achieved with M92.
M91 and M92 are effective only for the block in which they are programmed in (non-modal). The
workpiece datum, once set, will not be lost.
M91 and M92 are non-modal.

RM

RM

Workpiece datum
Scale datum

4-76

TNC 406/TNC 306

RM

Machine datum
RM = Reference mark

6 Display and operation 4

3/97

MP950

MP950.0
MP950.1
MP950.2
MP950.3
MP950.4 1)

Datum point for positioning blocks with M92


Entry range: 30 000.000 to +30 000.000 [mm] or []
Values referenced to the machine datum
X axis
Y axis
Z axis
Axis 4
Axis 5

MP960

Shift of the reference point


Entry range: 30 000.000 to +30 000.000 [mm] or []

MP960.0
MP960.1
MP960.2
MP960.3
MP960.4

X axis
Y axis
Z axis
Axis 4
Axis 5

1) only

3/97

1)

TNC 406

TNC 406/TNC 306

6 Display and operation 4

4-77

4-78

TNC 406/TNC 306

6 Display and operation 4

3/97

6.2 Graphics
Three different graphics display modes are available.
With the aid of a menu the operator can select fast image data processing instead of graphics (see
User's Manual). The graphics display on the VDU-screen can be altered by machine parameters.
The following choices are available:
The view in 3 planes mode can be generated according to either European or American convention.

Preferred European

Preferred American

Example:

The coordinate system can be rotated by +90 in the machining plane


This is useful when, for instance, the Y-axis is fixed as the tool axis.
Z

X
Rotation by +90

No rotation

MP 7310

Graphics display
Entry range: 0 to 3

Bit 0

Changeover of
view in 3 planes

+ 0 = European convention
+ 1 = American convention

Bit 1

Rotation of the coordinate system


in the machining plane by +90

+ 0 = no rotation
+ 2 = coordinate system rotated by +90

3/97

TNC 406/TNC 306

6 Display and operation 4

4-79

6.3 Status window


In the operating modes "Program run/single block", "Program run/full sequence", "Programming and
Editing" and "Test Run" the status information (position values, current tool, feed rate, eroding
functions etc.) are all displayed in the bottom half of the screen. In "Manual Operation" or "Electronic
Handwheel" mode the status information occupies the whole screen.

6.3.1 Positional and status display


The entry and display step for the HEIDENHAIN-contouring control TNC406/TNC 306 is 0.001 mm or
0.001.
The most recently selected axis is displayed inversely. The PLC is informed (by a marker) which axis
has an inverse display. This information can be evaluated, for example, in connection with handcontrol equipment.

M2096

X Key last pressed

M2097

Y Key last pressed

M2098

Z Key last pressed

M2099
M2095

1) only

4-80

Set

Reset

NC

NC

IV Key last pressed


1)

V Key last pressed

TNC 406

TNC 406/TNC 306

6 Display and operation 4

3/97

3/97

TNC 406/TNC 306

6 Display and operation 4

4-81

6.3.2 Feed rate display


In the operating modes "Program run/single block" and "Program run/full sequence" the programmed
contouring feed rate is displayed when the feed potentiometer is in the 100% position. The feed
potentiometer can be used to vary this programmed feed rate from 0 to 150%.
In the manual operating modes the axis feed rate is displayed, after the axis-direction key is pressed.

MP7271

Feed rate display


Entry values: 0 or 1
0 = display
1 = no display

4-82

TNC 406/TNC 306

6 Display and operation 4

3/97

6.3.3 Display of the M-functions M03, M04, M05, M08


The miscellaneous functions for control of the freely rotating rotary axis (M03, M04, M05) and for
the flushing (M08) are displayed in the status display. The display of these M-functions is controlled
by the PLC, i.e. the manufacturer of the machine must take this into account when creating the PLCprogram. The markers M2485 and M2486 change the polarity of the analog voltage for the rotary
axis.

M2485
M2486
M2487

Status-display and sign of S-analog for M03 PLC


Status-display and sign of S-analog for M04
Status-display for M05 and rotary axis stop

M2508

Status-display M08
0 = No status-display M08
1 = Status-display M08

M2609

Status-display M08 inverse

Set
PLC

Reset

6.3.4 Display of the Way-To-Go (WTG)


During the eroding process, the momentary "distance-to-go" of the programmed eroding path is
displayed as WTG <Position> beneath the axis display.

3/97

TNC 406/TNC 306

6 Display and operation 4

4-83

6.3.5 Control operational


If the control is operational, i.e. a positioning or M-function is performed, the status window displays
the symbol "*". If a current NC-program is interrupted with the external stop key, the "*" will flash in
the status-display.
Set

Reset

M2183

Program interruption (display "Control


operational" flashes)

NC

NC

M2184

Control operational (display "Control


operational" on or flashes)

NC

NC

6.3.6 Cancel status display


A machine parameter can be used to define whether the status display should be reset with the Mfunctions M02 and M30, as well as with NC-block "END PGM" . All the programmed values in the
status display, e.g. tool number, tool length, tool radius, scaling factor, datum-shift, feed rate etc.,
will then be reset.
The Q-parameters Q0Q255 are not immediately deleted after a power interruption. They are stored
in the battery-buffered memory. They are not defined as deleted until a program is selected with the
keys "PGM NR" and "ENT."

MP7300

Cancel Status display


Entry: 0 or 1
0 = status display not canceled
1 = status display canceled with M02, M30 or END PGM

6.4 Display of currently active power stage number


In the operating modes "Program run/single block" and "Program run/full sequence", the currently
active power stage and the first erosion parameters (LV, HV, GV, TON, TOF, SV, AJD and ET) are
displayed above the status window and can be changed directly (temporarily) with the cursor keys if
the erosion tables are activated with machine parameter MP2199 (see chapter "Eroding parameters")

6.5 Display of actual machining time


Between the erosion table with the actual power stage and the status window the actual machining
time can be displayed using MP7272 (only TNC 306).
MP7272

Display of actual machining time


Entry: 0 or 1
0 = display
1 = no display

4-84

TNC 406/TNC 306

6 Display and operation 4

3/97

6.6 Error messages


Under certain conditions error messages from the NC or the PLC will be displayed on the screen
under the display for the operating mode. Non-flashing error messages can be canceled with the CEkey. In the event of a flashing error message the machine must be switched off and the fault
corrected. If a non-flashing error message is displayed on the screen, marker M2190 will be set.
The machine manufacturer determines the conditions under which the PLC will produce error
messages. Up to 200 different PLC error messages can be generated.
The dialogs for PLC error messages can be determined by the manufacturer of the machine. Please
contact HEIDENHAIN about this. The standard version has dialogs with the reserved designations
"PLC: ERROR 0" to "PLC: ERROR 99". These PLC error messages can be activated by the PLCmarkers M2924 to M3123.
The error messages can be canceled either by pressing the CE-key or by resetting the appropriate
markers.
If several PLC error messages are activated simultaneously, they can be displayed in turn by
pressing the CE key. Then the next PLC error message activated by the lowest marker is displayed.
If the program run is to be stopped on output of a PLC error message, this must be explicitly
programmed in the PLC-program (NC STOP).
In order to show a PLC error message as a flashing message, the marker M2815 must also be set.
If marker M2815 is set, but none of the 200 PLC error messages is activated, then the flashing error
message "EMERGENCY STOP PLC" will be displayed.

Set

Reset

M2815

Flashing PLC error message

PLC

PLC

M2190

Non-flashing error message

NC

NC

PLC

PLC

is displayed
M2924

PLC error message 0 (reserved to RS-4221))

M2925

PLC error message 1 (reserved to RS-4221))

M2926

PLC error message 2 (reserved to RS-4221))

M2927

PLC error message 3 (reserved to RS-4221))

M2928

PLC error message 4 (reserved to RS-4221))

M3122

PLC error message 198

M3123

PLC error message 199

1) only

3/97

TNC 406

TNC 406/TNC 306

6 Display and operation 4

4-85

6.7 Cycles
The HEIDENHAIN contouring controls permit calling HEIDENHAIN standard-cycles within the NC
program (e.g. pecking, tapping, pocket milling etc.).
In addition, the manufacturer of the machine can program manufacturer-cycles and store them in
the control (see "OEM-cycles"). The sequence of some cycles can be altered by machine parameters
and PLC-markers.

6.7.1 Cycle inhibit


Machine parameter MP7245 can be used to selectively inhibit the HEIDENHAIN standard-cycles.
MP7245.0

Inhibit Cycles 1 to 15
Input range: 0 to 65 535

MP7245.1

Inhibit cycles 16 to 30
Input range: 0 to 65 535

Cycle 1

+ 0 = enable
+ 2 = inhibit
+ 0 = enable
+ 4 = inhibit
+ 0 = enable
+ 8 = inhibit
+ 0 = enable
+ 16 = inhibit
+ 0 = enable
+ 32 = inhibit
+ 0 = enable
+ 64 = inhibit
+ 0 = enable
+ 128 = inhibit
+ 0 = enable
+ 256 = inhibit
+ 0 = enable
+ 512 = inhibit
+ 0 = enable
+ 1024 = inhibit
+ 0 = enable
+ 2048 = inhibit
+ 0 = enable
+ 4096 = inhibit
+ 0 = enable
+ 8192 = inhibit
+ 0 = enable
+ 16 384 = inhibit
+ 0 = enable
+ 32 768 = inhibit

Cycle 16

+ 0 = enable
+ 2 = inhibit
+ 0 = enable
+ 4 = inhibit
+ 0 = enable
+ 8 = inhibit
+ 0 = enable
+ 16 = inhibit
+ 0 = enable
+ 32 = inhibit
+ 0 = enable
+ 64 = inhibit
+ 0 = enable
+ 128 = inhibit
+ 0 = enable
+ 256 = inhibit
+ 0 = enable
+ 512 = inhibit
+ 0 = enable
+ 1024 = inhibit
+ 0 = enable
+ 2048 = inhibit
+ 0 = enable
+ 4096 = inhibit
+ 0 = enable
+ 8192 = inhibit
+ 0 = enable
+ 16 384 = inhibit
+ 0 = enable
+ 32 768 = inhibit

Cycle 2
Cycle 3
Cycle 4
Cycle 5
Cycle 6
Cycle 7
Cycle 8
Cycle 9
Cycle 10
Cycle 11
Cycle 12
Cycle 13
Cycle 14
Cycle 15

4-86

TNC 406/TNC 306

Cycle 17
Cycle 18
Cycle 19
Cycle 20
Cycle 21
Cycle 22
Cycle 23
Cycle 24
Cycle 25
Cycle 26
Cycle 27
Cycle 28
Cycle 29
Cycle 30

6 Display and operation 4

3/97

6.7.2 Cycle Scaling factor


Machine parameters can be used to decide whether the "Scaling factor" cycle only operates in the
machining plane or also parallel to the tool axis.
MP7410

Cycle "Scaling factor" effective in two or three axes


Entry: 0 or 1
0 = "Scaling factor" operates in all three principle axes
1 = "Scaling factor" only operates in the machining plane

6.7.3 Disk Cycle


The Disk cycle makes it possible to program various electrode motions through MOD entries (see
your User's Manual).
The sparking-out is also influenced by MOD entry:
MOD 0 to 3 fast sparking out
MOD 4 to 7 complete sparking out
MOD 0 to 3
As soon as the Disk cycle is started in the NC program, the NC sets Marker M2786. When the final
vector is reached (i.e. the electrode has reached the programmed depth and radius), the NC sets
Marker M2783.
When the generator sets Marker M2616 (sparking out process ended) through a PLC input, it starts
a Timer (MP2110, e.g. 2 sec). If the Marker is not reset within this time, the sparking out will
continue for 1 revolutions past the point at which the marker was set. The cycle is then finished
and the NC subsequently sets Marker M2790.
If Marker M2616 is reset within the time from MP2110, the timer is also reset, and it is restarted
when the marker is set again. The sparking out process begins again.
MOD 4 to 7
As soon as the Disk cycle is started in the NC program, the NC sets Marker M2786. When the final
vector is reached (i.e. the electrode has reached the programmed depth and radius), the NC sets
Marker M2783.
When the generator sets Marker M2616 (sparking out process ended) through a PLC input, it must
remain set for 1 revolutions so that the cycle can be recognized as finished eroding. Then the
NC sets Marker M2791.
If Marker M2791 is reset within these 1 revolutions, the sparking out process begins again.

Feed rates for MOD 0 to 7:


The feed rate in the direction of the expansion vector (see the User's Manual) is determined by the
gap monitor.

3/97

TNC 406/TNC 306

6 Display and operation 4

4-87

Circular feed rates in the disk cycle


(if marker M2640 is set)
Entry range: 0 to 30 000 [mm/min]

MP1092
to
MP1097
MP1092

Modes: 0 and 4 (erosion, M2640=0)

MP1093

Modes: 0 and 4 (spark-out, M2640=1)

MP1094

Modes: 1 and 5 (erosion, M2640=0)

MP1095

Modes: 1 and 5 (spark-out, M2640=1)

MP1096

Modes: 2/3 and 6/7 (erosion, M2640=0)

MP1097

Modes: 2/3 and 6/7 (spark-out, M2640=1)

M2616

Free run during erosion or spark-out is completed

Set
PLC

Reset
PLC

M2640

Selects the circular feed rate in the disk cycle

PLC

PLC

M2783

End of eroding path reached (WTG = 0)

NC

NC

M2787

Disk erosion in the last circle

NC

NC

M2620

Feed rate from MP2060 becomes active

PLC

PLC

M2790

Disk erosion completed (MOD 0 to 3)

NC

PLC

M2791

Disk erosion completed (MOD 4 to 7)

NC

PLC

W394

Actual angle while disk cycle

NC

NC

6.8 User-parameters
With the MOD-function up to 16 different machine parameters can be made accessible to the
machine operator as User-parameters.
The machine manufacturer determines in machine parameter MP7330.x which machine parameters
are to be defined as User-parameters.
The dialogs for the user-parameters are defined in the PLC dialogs.
MP7330

Determination of user parameters accessible via MOD function


Entry range: 0 to 9999.00 (No. of the desired machine parameter).

MP7330.0
MP7330.1
.
.
.
.
MP7330.14
MP7330.15

User-parameter 0
User-parameter 1

4-88

User-parameter 14
User-parameter 15

TNC 406/TNC 306

6 Display and operation 4

3/97

6.9 Code-numbers
The MOD functions can be used to enter code-numbers for the control. These code numbers can be
used to activate certain control functions.
Code-number

Function

95 148
807 667
105 296
86 357
75 368
123
531 210

Select machine parameter list


Select PLC mode
Correction tables for the non-linear axis-error compensation
Remove program protection
Automatic offset adjustment
Select the user-available list of machine parameters
Erase markers M1000 to M2000 and Byte 0 to Byte 127

The value of the code-number which is entered is stored in Doubleword D276, except the code
numbers above The machine manufacturer can evaluate this code with the aid of the PLC and define
his own functions for code numbers or disable the preset code numbers.
D276

Value of the code-number most recently entered by MOD

6.10 Programming station


Machine parameters can be used to set the control so that it can be utilized as a programming
station, without the machine. In this setting only the operating modes "Programming and editing"
and "Test run" function. It is possible to select whether the PLC should be active or not in the
"programming station" setting.
MP7210

Programming station
Entry: 0, 1, 2
0 = Control and programming
1 = Programming station, "PLC active"
2 = Programming station, "PLC inactive"

6.11 Decimal sign


The decimal sign can be selected by machine parameter.
MP7280

3/97

Decimal sign
Entry: 0 or 1
0 = Decimal comma
1 = Decimal point

TNC 406/TNC 306

6 Display and operation 4

4-89

6.12 Memory test


A machine parameter can be used to select if the RAM and the EPROM memory areas should be
tested upon switching on the control.
MP7690

Memory test at switch-on


Entry: 0 to 3
Bit 0 RAM-test
Bit 1

EPROM-test

+ 0 = Memory test at switch-on


+ 1 = No memory test at switch-on
+ 0 = Memory test at switch-on
+ 2 = No memory test at switch-on

6.13 New program start/End of program run


If a new program is started, marker M2060 is set.
If the end of the program is reached in operating modes "Program run/single block" or "Program
run/full sequence", the NC sets marker M2061. This marker is only reset at the start of the next
program.
The information "End of program" can be evaluated by the PLC. This is necessary when operating,
for instance, with a pallet-changer.

M2060
M2061

A new program is started


END PGM, M02 or M30 has been executed

Set
NC
NC

Reset
PLC
NC

6.14 Restore position


The reapproach function can be started with the following key sequence:
TEST, PGM-NR, NR, ENT, UP TO, BLOCK NUMBER, ENT, PROGRAM RUN, NC START.
During the Test Run mode marker M2059 is set by the NC. If the TNC is then switched to Program
Run mode (full sequence or single block), marker M2059 is reset by the NC.
If the reapproach is now activated with NC-START, marker M2019 is set by the NC. The marker is
reset by the NC, when the reapproach position is reached.

M2019
M2059

4-90

Reapproach activated with NC-START


TNC in Test Run mode

TNC 406/TNC 306

6 Display and operation 4

Set
NC
NC

Reset
NC
NC

3/97

6.15 Overwrite Q-parameters


The values in the Q-Parameters Q100 to Q107 can be overwritten by the PLC. In this way
information from the PLC can be transferred to the machining program.
The value which is to be transferred is stored in Doubleword D528. The Q-parameter which is to be
overwritten is defined in Word W516. The transfer is initiated by the strobe-marker M2713.
The Doubleword D528 has a multiple usage. See also Sections "PLC positioning" and "Datum-shift."

M2713

Set
PLC

Activate the transfer of the value from D528 to the


Q-Parameter defined in W516
Number of the Q-parameter to be overwritten
(Q100 to Q107)
Value to be transferred to the Q-Parameter

W516
D528

Reset
NC

6.16 Color adjustment


The BC 110 (only TNC 406) is a 14 inch color graphics screen with a resolution of 640 x 490 pixels.
The colors in the screen-display can be selected by machine parameter. For example, the colors can
be adjusted to suit the corporate image of the machine tool builder image or the design of the
machine.
The following color adjustments cannot be altered by machine parameters:
HEIDENHAIN company logo after switching on the machine (GREEN),
flashing error messages (RED),
error message for invalid machine parameter (RED),
plan view in the graphics display (BLUE),
cursor (always inverse).
The entry values for color adjustment are byte-oriented. The preferred entry is hexadecimal.
Color
HEX Ranges
Adjustment
Entry for yellow:
$0....

Red

Green

Blue

0 to 3
Coarse

0 to F
Fine

0 to 3
Coarse

0 to F
Fine

0 to 3
Coarse

0 to F
Fine

Since it is possible to make mistakes when setting the colors (e.g., red error messages on red
background), HEIDENHAIN recommends a standard color adjustment. This standard color setting is
the setting generally used by HEIDENHAIN and is prompted by the control system when creating
the MP list.
The new soft key "SETUP COLORS" (code number 98148) enables you to adjust the colors red,
green, and blue in the machine parameter for the respective color. You can mix the colors for
foreground and background separately and accepted the change with ENT. Pressing END terminates
without changing the color.
The standard color-adjustment is given in the following list.
Machine
parameter
MP7350
MP7351

3/97

Color for ...

Standard color adjustment

Window frame
Error messages

$30200C
$3F0000

TNC 406/TNC 306

6 Display and operation 4

4-91

MP 7352
MP7352.0
MP7352.1
MP7352.2

Operating-mode "Machine"
Window Background
Operating mode display
Dialog

$000000
$342008
$3F3828

MP7353
MP7353.0
MP7353.1
MP7353.2

Operating-mode "Programming"
Window Background
Operating mode display
Dialog

$000000
$342008
$3F3828

MP7354
MP7354.0
MP7354.1
MP7354.2
MP7354.3

Program-text display "Machine"


Background
General program-text
Current block
Background of active window

$080400
$38240C
$38341C
$302410

MP7355
MP7355.0
MP7355.1
MP7355.2
MP7355.3

Program-Text display "Programming"


Background
General program-text
Current block
Background of active window

$080400
$38240C
$38341C
$302410

MP7356
MP7356.0
MP7356.1
MP7356.2

Status- and PLC-window


Background
Axis positions in the status-display
Status-display, except axis positions

$0C0800
$3F2C18
$3F280C

MP7357
MP7357.0
MP7357.1

Soft key display "Machine"


Background
Symbols

$000000
$3F3828

MP7358
MP7358.0
MP7358.1

Soft key display "Programming"


Background
Symbols

$000000
$3F3828

MP7360
MP7360.0
MP7360.1
MP7360.2
MP7360.3
MP7360.4

Graphics: 3D-depiction
Background
Surface
Front face
Text-display in graphics window
Side face

$000000
$203038
$0C1820
$3F3F3F
$102028

MP7361
MP7361.0
MP7361.1
MP7361.2
MP7361.3
MP7361.4

Graphics: view in three planes


Background
Plan (Grid)
Front and side view
Axes cross and text
Cursor

$000000
$203038
$203038
$3F3F3F
$3F0000

MP7362
MP7362.0
MP7362.1
MP7362.2
MP7362.3

Additional status-display in graphics window


Background graphics window
Background status display
Status symbols
Status values

$080400
$0C0800
$38240C
$3F2C18

4-92

TNC 406/TNC 306

6 Display and operation 4

3/97

7 M-functions
Up to 100 miscellaneous functions (M-functions) can be programmed. The code for these Mfunctions is transferred to the PLC either before or after execution of the NC-block. A number of
these M-functions have a fixed meaning for the NC. Such M-functions are marked with * in the
following table. The other M-functions are freely available.

*
*
*
*
*
*
*
*

MEffective at:
Function Start of End of
block
block
O
M 00
O
M 01
O
M 02
O
M 03
O
M 04
O
M 05
O
M 06
O
M 07
O
M 08
O
M 09
O
M 10
O
M 11
O
M 12
O
M 13
O
M 14
O
M 15
O
M 16
O
M 17
O
M 18
O
M 19
O
M 20
O
M 21
O
M 22
O
M 23
O
M 24
O
M 25
O
M 26
O
M 27
O
M 28
O
M 29
O
M 30
O
M 31
O
M 32
O
M 33

*
*
*
*

MEffective at:
Function Start of End of
block
block
O
M 34
O
M 35
O
M 36
O
M 37
O
M 38
O
M 39
O
M 40
O
M 41
O
M 42
O
M 43
O
M 44
O
M 45
O
M 46
O
M 47
O
M 48
O
M 49
O
M 50
O
M 51
O
M 52
O
M 53
O
M 54
O
M 55
O
M 56
O
M 57
O
M 58
O
M 59
O
M 60
O
M 61
O
M 62
O
M 63
O
M 64
O
M 65
O
M 66
O
M 67

*
*
*
*
*
*
*
*
*

MEffective at:
Function Start of End of
block
block
O
M 68
O
M 69
O
M 70
O
M 71
O
M 72
O
M 73
O
M 74
O
M 75
O
M 76
O
M 77
O
M 78
O
M 79
O
M 80
O
M 81
O
M 82
O
M 83
O
M 84
O
M 85
O
M 86
O
M 87
O
M 88
O
M 89
O
M 90
O
M 91
O
M 92
O
M 93
O
M 94
O
M 95
O
M 96
O
M 97
O
M 98
O
M 99

*M-function with fixed meaning for the NC

3/97

TNC 406/TNC 306

7 M-functions

4-93

Evaluation of the M-function must be programmed in the PLC. When transferring an M-function to
the PLC the code for the M-function is stored in Word W260 and the strobe-marker M2045 is set.
The execution of the M-function must be signaled to the NC by setting the markers M2482. The
next NC-block is only processed when the signal is acknowledged and the marker M2045 (strobe
signal for M-function) is reset by the NC.

Marker

Function

Set

Reset

M2045
M2482

Strobe signal for M-function


Acknowledgment of M-functionPLC

NC
NC

NC

W260

Code for M-function (NC PLC)

4-94

TNC 406/TNC 306

7 M-functions

2/97

Example:
Evaluation of the miscellaneous function M03 in the PLC.
PLC-output:
PLC-input:
199
200
201
.
.
.
901
902
903
904
905
906
907
908
.
.
.
930
931
.
.
.
1170
1171
1172
1173
1174
1175
1176
1177
1178

O10 = C-axis enable/disable


I10 = Acknowledgment of M-function
L M2045
RN M2482
CMT 77

;Change signal for M-function


;Reset acknowledgment of M-function
;Evaluation of M-function

EM
LBL 77
CASE W260
CM0
CM1
CM2
CM3
CM4

;End of main program

ENDC
EM

LBL 3
L M1
S M2485
R M2486
R M2487
S O10
L I10
S M2482
EM

;M-code

;End of module

M-function M03
Status display M03, sign of C-axis analog
Reset M04
Reset M05
C-axis enable/disable
Acknowledgment of M-function?
Acknowledgment of M-function

M2045
M2485
O10
I10
M2482

2/97

TNC 406/TNC 306

7 M-functions

4-95

7.1 Generator ON/OFF (M36/M37)


The generator and gap control are switched on and off with M36 and M37. Both M-functions are
evaluated in the PLC program (M2045 is the M function/signal, the M function is stored under Word
W260).
With M-function M36 the gap control is switched on with M37 switched off.
The markers M2618 and the complementary marker M2619 activates also the status display M36,
or M37.
If eroding process is active, marker M2785 is set.
Before M36 is evaluated by the PLC, marker M2798 (set by the NC) need to be feedback by the PLC
(see section 4.7).

M2618 = 1 Gap control on, M36 displayed


M2619 = 0
M2618 = 0 Gap control off, M37 displayed
M2619 = 1
M2785
Eroding process active

4-96

TNC 406/TNC 306

7 M-functions

Set
PLC

Reset
PLC

PLC

PLC

NC

NC

2/97

PLC example:
400
.
.
436
437
.
.
500
501
.
.
1020
1021
1022
1023
.
.
1050
1051
1052
1053
.
.
1211
1212
1213
1214
.
.
1412
1413
1414
1415
1416
1417
.
.
1476
1477
1478
1479
1480
1481
1482

2/97

CASE W260

;M-code

CM 36
CM 37

;Generator ON
;Generator OFF

ENDC
EM

LBL36
CM361
CM101
EM

;Generator ON
;M36
;Acknowledgment for M-function

LBL37
CM371
CM101
EM

;Generator OFF
;M37
;Acknowledgment for M-function

LBL101
LN M2482
S M2482
EM

;Acknowledgment for M-function


:If no feedback signal available
;Acknowledgment for M-function

LBL361
LN M2618
S M2618
R M2619
S O10
EM

;M36
;If gap control is off
;Switch on gap control
;Complementary marker for switch on gap control
;Generator ON

LBL371
L M0
ON M0
R M2618
S M2619
R O10
EM

;M37
;Set Accu to "1"
;Set Accu to "1"
;Switch off gap control
;Complementary marker for switch off gap control
;Generator OFF

TNC 406/TNC 306

7 M-functions

4-97

7.2 Program-halt on M-functions


Normally, when an M-function is produced, the program run in the operating modes "Program
run/full sequence" and "Program run/single block" is interrupted until the PLC acknowledges that the
M-function has been performed.
In some applications the program should be executed continuously and not wait for the
acknowledgment of the M-function. This function can be selected by machine parameter MP7440,
Bit 2.
If this function is selected then PLC-positioning, datum-correction, or limit switch range-change are
all not permitted during the output of the M-function.

4-98

TNC 406/TNC 306

7 M-functions

2/97

7.3 Program-halt on M06


According to ISO 6983, the M-function M06 means a tool change. Machine parameter MP7440,
bit 0 can be used to select whether on transferring M06 to the PLC the program should halt. If the
control is set so that a program-halt occurs on M06 then the program must be restarted after the
tool change. This can also be carried out directly by the PLC.

7.4 M-function M89


M89 can be used for the modal cycle-call.
The possibilities for calling a cycle are:

With the NC-block "CYCL CALL."


With the miscellaneous function M99. M99 is only effective for a single block and must
be reprogrammed for each execution.
With the miscellaneous function M89 (depending on the machine parameter).
M89 as a cycle-call is modally effective, i.e. for every following positioning block
there will be a call of the last-programmed machining-cycle. M89 is canceled by M99 or
a CYCL CALL-block.

If M89 is not defined as a modal cycle-call by machine parameters, then M89 will be transferred to
the PLC as a normal M-function at the beginning of the block.
MP7440

Output of M-functions
Entry range: 0 to 7

Bit 0

Program-halt on M06

Bit 1

modal cycle-call M89

Bit 2

Program-halt on
M-functions

2/97

TNC 406/TNC 306

+ 0 = Program-halt on M06
+ 1 = No program-halt on M06
+ 0 = Normal code-transfer of
M89 at beginning of block
+ 2 = Modal cycle-call M89 at end of block
+ 0 = Program-halt until acknowledgment
of M-function
+ 4 = No program-halt,
do not wait for acknowledgment

7 M-functions

4-99

4-100

TNC 406/TNC 306

7 M-functions

2/97

8 Key simulation
Data entry on the HEIDENHAIN contouring controls are made with the TNC keyboard and the
manufacturer's own machine control panel. The two control panels are joined to connectors X23 and
X27 (LE 306) or X45 and X46 (LE406) on the logic unit by a connecting cable (see "Mounting and
Electrical Installation").
The key-code from the TNC-keyboard is directly evaluated by the NC. PLC inputs and outputs for the
machine-control panel are available on connector X27 or X46. These PLC inputs and outputs must be
evaluated by the PLC and the appropriate information passed to the NC.

8.1 TNC-keyboard
The key-code from the TNC-keyboard is directly evaluated by the NC.
The keys on the TNC-keyboard and the soft keys on the BC 110 B can be inhibited by the PLC. With
M2876 the entire alphabetic keyboard can be inhibited. M2877 inhibits the soft-key row and M2878
inhibits the changeover keys to the right of the screen. All other keys can be inhibited selectively
with M2854 to M2923. If an inhibited key is pressed, the NC sets the marker M2182 and deposits
the key-code for the key which was operated in word W274. If a not inhibited key is pressed, the NC
sets the marker M2181 and deposits the key-code for the key which was operated in word W274.
The PLC must reset the markers M2182 or M2181 after evaluating this information.
The keys on the TNC-keyboard and the soft keys on screen can also be simulated by the PLC. To
achieve this the appropriate key-code is entered in Word W516 and activated by the strobe-marker
M2813. After execution of the key-code the NC resets the strobe-marker M2813.
A fixed code has been introduced for certain soft key functions. As with key simulation, this function
is executed by entering the required code in W516 and activating with M2813. The appropriate soft
key function must be displayed in the foreground or background mode for this. With the trailing edge
of M2813 the PLC is told whether the function was properly executed.
Address

Function

Set

Reset

W272

Operating mode
1 = Manual operation
2 = Electronic handwheel
3 = Positioning with manual entry
4 = Program run/single block
5 = Program run/full sequence
7 = Pass over reference point
Key-code for the operated, inhibited key or
not inhibited key
Word with multiple-function
Key-code for simulating TNC-key
activated by M2813
not inhibited key was operated
Inhibited key was operated
Soft key function not executed
Activate the key from W516
Inhibit the alpha keyboard
Inhibit the soft-key row below the screen
Inhibit the changeover keys at right of screen

NC

NC

NC

NC

PLC

PLC

NC
NC
NC
PLC
PLC
PLC
PLC

PLC
PLC
NC
NC
PLC
PLC
PLC

W274
W516

M2181
M2182
M2187
M2813
M2876
M2877
M2878

2/97

TNC 406/TNC 306

8 Key simulation

4-101

Marker

Function
inhibit

M2854

CHF

M2855

PGM
NAME

Keycode

Keycode

Set

Reset

M2871

75

PLC

PLC

59

M2872

76

PLC

PLC

77

PLC

PLC

58

Marker

Function
inhibit

M2856

60

M2873

M2857

RND

61

M2874

TOUCH
PROBE

78

PLC

PLC

CT

M2858

CC

62

M2880

TOOL
DEF

84

PLC

PLC

M2859

63

M2881

TOOL
CALL

85

PLC

PLC

M2860

64

M2882

R-L

86

PLC

PLC

M2861

65

M2883

R+R

87

PLC

PLC

M2862

MOD

66

M2884

88

PLC

PLC

M2863

67

M2885

89

PLC

PLC

68

M2886

90

PLC

PLC

M2864

M2865

PGM
CALL

69

M2887

CYCL
DEF

91

PLC

PLC

M2867

CR

71

M2888

CYCL
CALL

92

PLC

PLC

M2868

72

M2889

LBL
SET

93

PLC

PLC

M2869

73

M2890

LBL
CALL

94

PLC

PLC

M2870

74

4-102

TNC 406/TNC 306

8 Key simulation

2/97

Marker

Function
inhibit

Keycode

Marker

Function
inhibit

Keycode

Set

Reset

M2891

NO
ENT

95

M2907

111

PLC

PLC

M2892

STOP

96

M2908

112

PLC

PLC

M2893

EXT

97

M2909

113

PLC

PLC

114

PLC

PLC

115

PLC

PLC

M2894

CL
PGM

98

M2910

M2895

DEL

99

M2911

100

M2912

116

PLC

PLC

101

M2913

117

PLC

PLC

102

M2914

118

PLC

PLC

103

M2915

END

119

PLC

PLC

PLC

PLC

M2896

M2897

M2898

ENT

GOTO

M2899

M2901

CE

105

M2920

+/

124

M2902

IV

106

M2921

125

PLC

PLC

M2903

107

M2922

126

PLC

PLC

M2904

108

M2923

127

PLC

PLC

M2905

109

PLC

PLC

M2906

110

PLC

PLC

2/97

TNC 406/TNC 306

8 Key simulation

4-103

Key-code for the alphabetic keyboard:


xx 50 (Hex)
ASCII key-code (see "Appendix")

Key-code for the soft-key row on the screen:


xx51 (Hex)
xx results as follows:

08

00

01

02

03

04

05

06

07

09

Key code for changeover keys at right of screen:


xx52 (Hex)
xx results as follows:
00
GRAPHICS
TEXT
SPLIT
SCREEN

01

Special codes:
0080 (Hex): NC-Start
0081 (Hex): NC-Stop

The HEX-Code must be calculate to the Decimal-Code before entered in W516!

4-104

TNC 406/TNC 306

8 Key simulation

2/97

Example:
If the "Position-transfer" key is pressed in the operating mode "Positioning with manual entry", a
linear NC-block with all three principal coordinates (X, Y, Z) is to be generated.
66
.
70
.
75
.
1102

CASE W272
.
CM 3
.
ENDC
.
EM

;Interrogate - operating mode


.
;Positioning with manual entry
.

1103
1104
1105
1106
1107
1108

LBL 3
L M10
SN M2896
L M2182
CMT 31
EM

;Operating mode: Positioning with manual entry


;Key simulation active?
;No, then disable "Position-transfer" key
;Disabled key pressed?
;Yes, then call key simulation

1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124

LBL 31
L M10
R M2896
SN M10
CASE B200
CM 130
CM 131
CM 132
CM 133
CM 132
CM 134
CM 132
CM 135
CM 141
ENDC
EM

;Key simulation
;Key simulation active?
;Yes, then enable "Position-transfer" key
;Otherwise set key simulation active
;Perform single-step
;Key L(line)
;Key X
;Key "Position-transfer"
;Key Y
;Key "Position-transfer"
;Key Z
;Key "Position-transfer"
;Key "END-BLOCK"
;Reset key simulation

1125
1126
1127
1128
1129
1130
1131
1132
1133
1134

LBL 130
L K60
= W102
CM 136
EM
LBL 131
L K109
= W102
CM 136
EM

;L(ine)
;Key-code for L(ine)

1135
1136
1137
1138
1139

LBL 132
L K100
= W102
CM 136
EM

2/97

TNC 406/TNC 306

.
;End main program

;Simulate key
;X
;Key-code for X
;Simulate key

;"Position-transfer"
;Key-code for "Position-transfer"
;Simulate key

8 Key simulation

4-105

1140
1141
1142
1143
1144

LBL 133
L K108
= W 102
CM 136
EM

1145
1146
1147
1148
1149

LBL 134
L K107
= W102
CM 136
EM

1150
1151
1152
1153
1154

LBL 135
L K119
= W102
CM 136
EM

1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165

LBL 136
L M2813
JPT 137
L B200
+ K+1
= B200
L W102
= W516
LN M2813
S M2813
EM

1166
1167

LBL 137
EM

;Return marker

1168
1169
1170
1171
1172
1173
1174
1175
1176

LBL 141
L M2813
JPT 137
L K+0
= B200
L M10
R M10
R M2182
EM

;End key simulation


;Simulation performed?
;No, then wait

4-106

TNC 406/TNC 306

;Y
;Key-code for Y
;Simulate key

;Z
;Key-code for Z
;Simulate key

;"END BLOCK"
;Key-code for "END BLOCK"
;Simulate key

;Key simulation
;Strobe - key transfer from W516
;Still set, then wait
;Case byte
;Increment case byte
;Buffered key-code
;To NC
;Set strobe (activate simulation)

;Reset step counter


;Reset marker "Key simulation active"
;Reset marker "Disabled key pressed"

8 Key simulation

2/97

2/97

TNC 406/TNC 306

8 Key simulation

4-107

4-108

TNC 406/TNC 306

8 Key simulation

2/97

2/97

TNC 406/TNC 306

8 Key simulation

4-109

8.2 Machine control panel


A manufacturer's specific machine control panel can be connected to the HEIDENHAIN contouring
controls. See "Mounting and Electrical Installation."
There are 24 PLC inputs (I128 to I151) and 8 PLC outputs (O 0 to O 7) available on the female
connector X27 for the evaluation of the keys on the machine control panel. The evaluation of the
signals from the machine control panel must be performed in the PLC-program. The appropriate
markers will be set thereby. For safety reasons a complement-marker must be reset when some
functions are activated. If the complement-marker is not properly set or reset, the flashing error
message "Error in PLC-program" will appear. The displayed code identifies the marker where the
error has occurred.
An axis-direction key which has been pressed can be stored by marker M2450 (Complement-marker
M2466) . This means that the axis will be traversed until the marker M2450 is reset. This memory
function must be activated by machine parameter MP7680 Bit 9.
MP7680

Memory function for axis-direction keys


0 = Not stored
1 = Stored

Marker

Function

Error
message

Set

Reset

M2448
M2464

NC-start (edge evaluation)


Complement NC-start

1A

PLC

PLC

M2449
M2465

Rapid traverse
Complement rapid traverse

1B

M2488
M2450
M2466

NC-stop ("0" signifies stop)


Memory function for axis-direction keys
Complement memory function for axisdirection keys

M2451
M2467

Feed enable
Complement feed enable

1D

M2456
M2472

Manual traverse X+
Complement manual traverse X+

1I

M2457
M2473

Manual traverse X
Complement manual traverse X

1J

M2458
M2474

Manual traverse Y+
Complement manual traverse Y+

1K

M2459
M2475

Manual traverse Y
Complement manual traverse Y

1L

4-110

TNC 406/TNC 306

1C

8 Key simulation

2/97

Marker

Function

Error
message

Set

Reset

M2460
M2476

Manual traverse Z+
Complement manual traverse Z+

1M

PLC

PLC

M2461
M2477

Manual traverse Z
Complement - manual traverse Z

1N

M2462
M2478

Manual traverse 4+
Complement manual traverse 4+

1O

M2463
M2479

Manual traverse 4
Complement manual traverse 4

1P

M2452
M2468

Manual traverse 5+
Complement manual traverse 5+

2M

M2453
M2469

Manual traverse 5
Complement manual traverse 5

2N

Example:
NC-start key with two contacts I128 and I129
axis-direction key X+ with one contact I130

71
72
73
74
100
101
102
103

2/97

.
L I128
= M2448
LN I129
= M2464
.
L I130
= M2456
LN I130
= M2472

;First contact NC-start key


;NC-start
;Second contact NC-start key
;Complement NC-start
;Axis-direction key X+
;Manual traverse X+
;Complement - manual traverse X+

TNC 406/TNC 306

8 Key simulation

4-111

9 Short circuit/probing
The TNC normally uses input X12 as the short-circuit input (see also section "Short circuit, CYCL
STOP and arcing"). If the TNC probing functions are to be utilized, either the electrode or a probe
system from HEIDENHAIN (such as the TS 120) can be used to perform the probing.
Marker M2028 indicates whether the control is currently in one of the probing functions, for
example so that a test voltage can be turned on between the electrode and the workpiece.
The chapter "Installation and electrical connection" contains instructions for connecting the short
circuit input X12.

9.1 Interfacing the probing function


If the probing function is used (such as the TS 120 touch probe), the machine tool manufacturer
must ensure that the rotary axis, if present, cannot turn when the touch probe is in use.
The probing functions can be controlled either with the probing cycles in the "Manual" and "Electronic
Handwheel" modes or by the "Touch Probe" function in the NC program (see TNC User's Manual).
The probing function is interfaced to the measuring conditions using machine parameters MP6120
to MP6150.

F2

Max. measuring range


(MP6130)

F2 = Probing feed rate (MP6120)

4-112

TNC 406/TNC 306

9 Short circuit/probing

2/97

The error message "Touch point inaccessible" appears if the maximum measuring range (MP6130) is
exceeded.
The probing sequence must be enabled by the PLC with marker M2503. This marker is set by the
NC after a probing cycle starts and the NC waits until the PLC resets marker M2503 before
executing the probing function. A number of conditions are transferred to the PLC with markers
M2022 to M2072. This information can be processed further in the PLC program. The probing
function is controlled entirely from the NC.
In all modes when the stylus is deflected and marker M2502 is set, the controller stops the
machine. If M2502 is not set, the controller only detects stylus deflection if the probing function has
started. This is why HEIDENHAIN recommend setting marker M2502 as soon as the touch probe is
in the spindle.
MP6120

Probing feed rate


Input range: 80 to 30000 [mm/min]

MP6130

Maximum measuring range


Input range: 0.001 to 99999.9999 [mm]

MP6150

Retraction feed rate in probing cycle


Input range: 80 to 30000 [mm/min]

M2502

NC STOP with deflected stylus in all modes

Set
PLC

Reset
PLC

M2503

Enable marker for probing functions

PLC

PLC

M2022

Touch probe not ready (no standby signal at


connector X12)

NC

NC

M2023

Probe triggered before start of probing cycle

NC

NC

M2025

Probe triggered (probing sequence is executed)

NC

PLC

M2026

Probing sequence ended or interrupted

NC

NC

M2027

Low battery voltage (battery warning at connector


X12); only evaluated during the probing sequence)

NC

NC

M2028

Probing function activated (for switch on/off test


voltage)

NC

NC

2/97

TNC 406/TNC 306

9 Short circuit/probing

4-113

9.2 Successive probing


The probing procedure is so that the electrode automatically makes contact several times in
succession. MP6100 defines the number of times contact is to be made. The measured value
resulting from the first contact is not saved; it serves merely to push aside the small layer of dirt
from the surface of the electrode. The subsequent values are saved: their mean value is calculated
and used as the measuring result. If MP6100 = 0 or 1, the electrode makes contact twice but only
the second measured value is saved.
MP6110 defines the maximum permitted difference of probe values during successive probing. If
this value is exceeded the error message Probing value incorrect appears.
MP6100

Number of contacts in probing cycle


Input range: 0 to 5

MP6110

Maximum difference between probe values


Input range: 0 to 2 mm

9.3 Manual probing


The menu item TOUCH PROBE MANUAL is for probing in one axis (for example the Z axis),
whereby the other axes (for example X and Y) can be moved with the handwheel. The probing
process does not end upon contact; the electrode merely backs off by the value in MP6140 and then
probes again. In this way the user can find cavities, for example, in the workpiece. Probing continues
until marker M2617 is set by the PLC.
If the input value of MP6140 is 0, the electrode is returned to the starting point.
The probing path in the probing direction can be limited by entering a value before beginning.
Positioning stops when the entered limit is reached. If no value is entered, the value from MP6130
is used.

MP6140

Retraction distance in TOUCH PROBE MANUAL


Input range: 0 to 30 mm

MP6130

Maximum measuring range in TOUCH PROBE MANUAL


Input range: 0 to 30 000 mm

M2617

Probing stop in TOUCH PROBE MANUAL

4-114

TNC 406/TNC 306

9 Short circuit/probing

Set
PLC

Reset
PLC

2/97

2/97

TNC 406/TNC 306

9 Short circuit/probing

4-115

4-116

TNC 406/TNC 306

9 Short circuit/probing

2/97

10 Handwheel
Either an integral handwheel (HR 130) or a portable handwheel (HR 330 or HR 410) can be
connected to HEIDENHAIN contouring controls TNC406 and TNC306 (see also chapter "Mounting
and Electrical Installation"). The operation of the electronic handwheel is described in the TNC User's
Manuals.
If electronic handwheel operation is chosen but no handwheel is connected, the error message
"HANDWHEEL NOT READY" will appear.
Shock and vibration can cause a slight movement of the handwheel and thus lead to an unwanted
traverse movement. To avoid this, a threshold sensitivity for the electronic handwheel can be
entered in machine parameter MP7660 .
The count direction for the encoder signals from the handwheel is entered in machine parameter
MP7650.
MP7640

Handwheel
Entry: 0 to 3
0 = no handwheel
1 = HR 330
2 = HR 130
3 = HR 410

MP7650

Count direction for handwheel


Entry: 0 or 1
0 = positive count direction
1 = negative count direction

MP 7660

Threshold sensitivity for electronic handwheel


Entry range: 0 to 65 535 [increments]

HR 330
A subdivision factor can be selected in the "Handwheel" operating mode (only HR330). This
subdivision factor determines the traverse distance per turn. In order to ensure that the rapid
traverse rate fixed by the machine parameter MP1010.x is not exceeded, the NC determines the
minimum entry value for the interpolation factor. The NC goes by the smallest value which was
entered, i.e. according to the slowest axis.
Machine parameter MP7670.0 can be used to select a higher limit than that calculated by the NC.
Interpolation factor

Traverse distance per turn [mm]

0
1
2
3
4
5
6
7
8
9
10
2/97

TNC 406/TNC 306

20
10
5
2.5
1.25
0.625
0.312
0.156
0.078
0.039
0.019

Effective from rapid traverse rate:


MP1010.x [mm/min]
12 000
6 000
3 000
1 500
750
80
80
80
80
80
80

10 Handwheel

4-117

MP7670.0

Minimum subdivision factor for handwheel HR 330 and HR 130


Entry range: 0 to 10

M2789

Operating mode "Handwheel"


0=highlight display on "Increment"
1= highlight display on "Interpolation factor"

Set
PLC

Reset
PLC

HR 410
Machine parameter MP7640=2 activates the functions for the HR410 handwheel.
When the control transfers the initializing parameters, it transmits to the handwheel a code that
depends on the value entered in MP7640. After initialization is completed, the handwheel must
answer with a corresponding code. If the code is incorrect, the error message "HANDWHEEL NOT
READY appears.
All keys of the handwheel except for the function keys A, B, and C are evaluated by the NC. All
outputs except O109 to O111 are driven by the NC. The function keys A, B, and C, and the outputs
O109 to O111 must therefore still be evaluated or controlled by the PLC.
Machine parameters MP7670.0 to MP7670.2 determine which subdivision factors are in effect for
low, medium and high speed.
The machine parameters MP7671.0 to MP7671.2 define the speed of the speed levels (low,
medium, high) with the percentage factor from MP1020. The last adjusted speed level (the key last
pressed) remains stored even if power is interrupted.
If the handwheel is active, that is, it the handwheel symbol is shown for one of the axes, the NC will
use the value entered in MP7671.x to calculate the feed rate when the HR 410 axis keys are
pressed. For this reason the axis direction keys on the machine control panel are inhibited whenever
the handwheel axis direction keys are being used.
Assignment of handwheel inputs/outputs for PLC evaluation:
Function key A
Function key B
Function key C

I173
I174
I175

O109
O110
O111

Assignment of handwheel inputs only for information to the PLC:


Slow feed rate
I168
Medium feed rate
I169
Fast feed rate
I170
Axis direction
I171
Axis direction +
I172

4-118

TNC 406/TNC 306

10 Handwheel

2/97

MP7670.0

Interpolation factor for HR 410 at smallest speed range


Input range: 0 to 10

MP7670.1

Interpolation factor for HR 410 at medium speed range


Input range: 0 to 10

MP7670.2

Interpolation factor for HR 410 at greatest speed range


Input range: 0 to 10

MP7671.0

% Factor from MP1020.x for feed rate with smallest speed range for HR410
Input range: 0 to 1000%

MP7671.1

% Factor from MP1020.x for feed rate with medium speed range for HR410
Input range: 0 to 1000%

MP7671.2

% Factor from MP1020.x for feed rate with greatest speed range for HR410
Input range: 0 to 1000%

2/97

TNC 406/TNC 306

10 Handwheel

4-119

11 Analog inputs
The analog input of the LE360 and LE406 is connected to the gap signal to effect gap control. The
gap signal is a voltage in the range of 0 to +5 V and should never exceed this.
A detailed description can be found in the chapter "Gap Control" and the chapter "Mounting and
Electrical Installation."

4-120

TNC 406/TNC 306

11 Analog inputs

2/97

2/97

TNC 406/TNC 306

11 Analog inputs

4-121

12 Jog increment positioning


In the operating mode "Electronic Handwheel" the jog increment feature may be activated by the
PLC program. By pressing one of the axis direction keys (e.g. X+) the corresponding axis will move
by the programmed increment (0.001 to 50mm).
Increment positioning is enabled by the PLC marker M2498. In "Electronic Handwheel" mode the
prompt "Increment" appears in the line above that of "Interpolation Factor."
Normally, jog increment positioning is initiated by the axis direction keys. In order to move only one
increment per press of a key, the edge evaluation of inputs function in the PLC is used. (See the
chapter "PLC Programming", section "Edge Evaluation of PLC Inputs.") The continuous jog function of
the axis direction keys must also be inhibited in "Electronic Handwheel" mode.
Marker

Function

M2052

Set

Reset

Operating mode "Electronic Handwheel"


also W272

NC

NC

M2497

Enable edge evaluation of PLC Inputs

PLC

PLC

M2498

Enable increment positioning

PLC

PLC

M2512
M2528
M2513
M2529

Increment positioning X+
Complement increment positioning X+
Increment positioning X
Complement increment positioning X

2A

PLC

PLC

2B

PLC

PLC

M2514
M2530
M2515
M2531

Increment positioning Y+
Complement increment positioning Y+
Increment positioning Y
Complement increment positioning Y

2C

PLC

PLC

2D

PLC

PLC

M2516
M2532
M2517
M2533

Increment positioning Z+
Complement increment positioning Z+
Increment positioning Z
Complement increment positioning Z

2E

PLC

PLC

2F

PLC

PLC

M2518
M2534
M2519
M2535

Increment positioning IV+


Complement increment positioning IV+
Increment positioning IV
Complement increment positioning IV

2G

PLC

PLC

2H

PLC

PLC

M2520
M2536
M2521
M2537

Increment positioning V+
Complement increment positioning V+
Increment positioning V
Complement increment positioning V

2I

PLC

PLC

2J

PLC

PLC

4-122

TNC 406/TNC 306

Error Message

12 Jog increment positioning

2/97

Example:
Axis direction button X+ (I138)
Axis direction button X (I133)
L
L
L
CMT
.
.
EM
.
.
LBL 10
L

M2052
M2052
M2052
10

Electronic handwheel mode


Operating mode
Electronic handwheel mode
Electronic handwheel

M2498

Enable increment positioning

M2512

Reset increment positioning


markers for X axis

R
S
S

M2513
M2528
M2529

L
AN
S
R

M1638
I133
M2512
M2528

Increment positioning X+

L
AN
S
R

M1633
I138
M2513
M2529

Increment positioning X

End of main program

M2052

EM
.
.
.

2/97

TNC 406/TNC 306

12 Jog increment positioning

4-123

4-124

TNC 406/TNC 306

12 Jog increment positioning

2/97

13 Datum correction
The PLC datum correction function is used to shift the zero or datum point with the PLC program.
Datum corrections are required for machines that have swivel heads.
Each axis (X, Y, Z, 4) is assigned a double word (D528 to D540) for the correction value. If a value for
the appropriate axis is entered via the PLC program, strobe marker M2716 is to be set during a
M/S/T strobe to active datum correction. The correction is computed in the actual position display.
The display then indicates the shifted coordinate system.
Example:
Actual position display for X axis without correction = 50
Correction in D528 = +20
Strobe marker M2716 set, i.e. correction is active
New actual position display X= +70
The corrections can be transferred to double words, D528 to D540 as follows:
Enter values in MP4210.0 to MP4210.47 and they will also be in D768 to D956; now copy values via
PLC program into D528 to D544.
Marker

Function

Set

Reset

M2716

Strobe marker for datum correction

PLC

NC

D528
D532
D536
D540
D544

1) only

2/97

Datum correction for X axis


Datum correction for Y axis
Datum correction for Z axis
Datum correction for axis 4
Datum correction for axis 5 1)

TNC 406

TNC 406/TNC 306

13 Datum correction

4-125

PLC example:
Datum correction in Z axis with M20 activated, with M21 deactivated
.
.
L
W260
==
K+20
;M20 activated
A
M2045
S
M10
;buffered marker for strobe marker 2716
CMT 200
;datum correction call
R
M10
L
W260
==
K+21
;M21 activated
A
M2045
S
M10
;buffered marker for strobe marker 2716
CMT 201
;deactivate datum correction call
R
M10
EM
;end of main program
LBL 200
L
=
...
...
L
S
EM
LBL 201
L
=
L
S
EM
.
.

4-126

D896
D536

;activate module for datum correction


;value from MP4210.32
;for the other axis the correction value 0 must be entered

M10
M2716

D900
D536
M10
M2716

;deactivate module for datum correction


;value from MP4210.33

TNC 406/TNC 306

13 Datum correction

2/97

14 Electrode changer
The PLC enables implementation of a simple electrode changer with fixed tool positions, such as a
pick-and-place rack type.
For electrode changers that function with proximity switches, reference should be made to the
description in the technical manual TNC360 / TNC335.
The geometric information of the electrodes is defined by the TOOL DEF or the "TOOL DEFINITION"
cycle in the NC program.

14.1 Controlling an electrode changer


The control of an electrode changer, i.e. positioning and change sequence, must be written in the
PLC program. The evaluation of the TOOL DEF and TOOL CALL blocks as well as the "TOOL
DEFINITION" cycle is performed by the NC. Communication between NC and PLC is via markers
and words.
NC Program Example
.
.
.
TOOL
CYCL
CYCL
CYCL
CYCL
.
.
.
TOOL
.
.
.
TOOL
.
.
.

2/97

DEF 1
DEF 3.0
DEF 3.1
DEF 3.2
DEF 3.3

L+2.73 R+5
TOOL DEFINITION
T2
R+2.7
X+10.3 Y15.02
Z+18.15 C+1.23

CALL 1

U+0.42

CALL 2

U+2.24

TNC 406/TNC 306

14 Electrode changer

4-127

14.2 PLC program example


The following description covers a five station pick-and-place electrode changer with corresponding
flowcharts and PLC functions. Before production of a PLC program the outline structure for the
program run must be taken into consideration (sequencing, interlocks, buffer marks etc.)

Each electrode change should be commenced with a TOOL CALL command. The TOOL DEF
command has no function within the PLC. In this example each rack position in the electrode
changer is defined by two machine parameters (X coordinate and Y coordinate). In the following flow
charts variable names are used to aid understanding of the logic. In the PLC program these variable
names would be replaced by the word addresses.
In program run a TOOL CALL block is executed by the NC in accordance with the value in machine
parameter MP7480.0. If MP7480.0 = 1, the NC only loads the new tool number into the PLC word
W262 if it is different from the current tool number. If MP7480.0 = 2, PLC word W262 is loaded with
the new tool number at every TOOL CALL. When a value is loaded into W262, the NC sets strobe
marker M2046 to inform the PLC program which should then take appropriate action, i.e. change the
electrode. With the change sequence completed the PLC program should set marker M2483 to
indicate to the NC the end of the TOOL CALL block thus allowing the NC run to continue.
MP7480.0

Output of Tool Number


0 = No output
1 = Output only when tool number changes
2 = Output with every TOOL CALL
(See Chapter 5, "Machine Parameter List")

W262

4-128

Tool Number (if MP7480.0 = 1 or 2)

TNC 406/TNC 306

14 Electrode changer

2/97

Function

Set

Reset

M2046

Strobe for tool number output

NC

NC

M2483

Acknowledgment for electrode change complete

PLC

PLC

Machine parameter allocation for this example:


MP4210.20
to

X-axis rack positions for electrode 1 to 5


(D848 to D864)

MP4210.24
MP4210.30
to

Y axis rack position for electrode 1 to 5


(D888 to D904)

MP4210.34
MP4210.40

Z axis UP position (D928)

MP4210.41

Z axis DOWN position (D932)

MP4210.42

X axis NEUTRAL position (D936)

MP4210.43

Y axis NEUTRAL position (D940)

2/97

TNC 406/TNC 306

14 Electrode changer

4-129

The flowchart for this Electrode Changer example is written in the form of modules which are listed
below:
TOOL CALL

Automatic Electrode Change

REPLACE OLD TOOL

Return current electrode to original rack location

PLC POS. NEUTRAL

Move to clearance position in X, Y and Z

SELECT NEW TOOL

Take new electrode from defined rack position

POC. REG

Determine electrode rack position

PLC POS. POC 1/2/3/4/5 Move to defined rack position


PLC POS. Z DOWN

Move to Z axis position for electrode change

PLC POS. Z UP

Move to Z axis clearance position

For the electrode change, five conditions need to be considered:


1

T-code > Tmax


=> Error Message: "INCORRECT TOOL NUMBER"

0 < T-code < = Tmax and SPIREG = 0


=> No current tool, select new tool only

T-code = 0 and 0 < SPIREG <= Tmax


=>Replace old tool, no new tool

0 < T - code <= Tmax and 0 < SPIREG <= Tmax


=> Replace old tool, select new tool

T-code = SPIREG
=> No T-code is sent from the NC to the PLC or direct acknowledgment sent from
the PLC

Note:

4-130

T-code = New tool number transmitted to W262


Tmax = Maximum tool number (i.e. 5)
SPIREG = Current tool number

TNC 406/TNC 306

14 Electrode changer

2/97

14.2.1 PLC module "TOOL CALL"


Automatic Electrode Change
T-code > Tmax
NO
T-code
<=
Tmax

ERROR
"INCORRECT
TOOL
NUMBER"

YES
T-code = SPIREG
NO

T-code
=
SPIREG

YES
Module:
PLC POS.
NEUTRAL

SPIREG
=
0

SPIREG = 0
NO

YES
Module:
Replace Old
Tool

T code
=
0

NO

Module
SELECT
NEW TOOL

YES

Module
PLC POS.
NEUTRAL

NO

Axis X and 4
in Position
?

Update necessary
operands &
acknowledge
TOOL CALL

Return to
NC program

YES

2/97

TNC 406/TNC 306

14 Electrode changer

4-131

14.2.2 PLC module "REPLACE OLD TOOL"


Return Current Electrode to Original Rack Position

Push
SPIREG - 1
To Stack

Module:
POC. REG.

No

TOOL RACK
POS. REACHED
?
Yes
Module:
PLC. POS.
Z DOWN

Tool Unclamped
and set
SPRIEG to 0

Module:
PLC. POS.
Z UP

TOOL CLAMP

END

4-132

TNC 406/TNC 306

14 Electrode changer

2/97

14.2.3 PLC Module "PLC POS. NEUTRAL"


Move to Clearance position in X, Y, & Z axes

PLC position
To Z UP
position

No

Achse Z
in position

Yes
PLC pos. in X and Y
to neutral pos.
X and Y

No

Axes X und Y
in position

Yes

END

2/97

TNC 406/TNC 306

14 Electrode changer

4-133

14.2.4 PLC module "SELECT NEW TOOL"


Gather New Electrode from Defined Rack Position
Push
T-code -1
to Stack

Module:
POC. REG.

No

RACK
POSITION
REACHED
?
Yes
UNCLAMP
TOOL

Module:
PLC. POS.
Z DOWN

Clamp tool &


load SPIREG
with T-code

Module:
PLC. POS.
NEUTRAL

END

4-134

TNC 406/TNC 306

14 Electrode changer

2/97

14.2.5 PLC module "POC. REG."


Determine Electrode Rack Position
LOAD
"POSREG"
with stack
contents

POSREG
=0

NO

POSREG = 0

Module:
PLC. POS. RACK
POSITION 1

YES

POSREG
=1

NO

POSREG = 1

Module:
PLC. POS. RACK
POSITION 2

YES

POSREG
=2

NO

POSREG = 2

Module:
PLC POS. RACK
POSITION 3

YES

POSREG
=3

NO

POSREG = 3

NO

POSREG = 4

Module:
PLC. POS. RACK
POSITION 4

YES

POSREG
=4

Module:
PLC. POS. RACK
POSITION 5

YES
END
(DEPENDENT ON Tmax)

2/97

TNC 406/TNC 306

14 Electrode changer

4-135

14.2.6 PLC Module "PLC POS. POC. 1/2/3/4/5"


Move to Corresponding Rack Position

Marker
Mpocpos
no set

No

Yes
Mpocpos = 0

Mpocpos = 1

Axes X
and Y not
in pos.

No

Axes X and Y
in position

Yes

Assign Xp, Yp to the


addresses (D528, D532)

Assign PLC positioning


feed rate to the addresses (W560, W562)

Set start marker to


activate PLC pos.
in X, Y (M2704, M2705)

Set marker Mpocpos


for PLC pos. is active

Set marker Mxpyp rack


pos. reached

END

4-136

TNC 406/TNC 306

14 Electrode changer

2/97

14.2.7 PLC module "PLC POS. Z DOWN"


Move to Z Axis Position for Electrode Change
PLC Position
to Z DOWN
Position

No

Axis Z
in Position

Yes
END

14.2.8 PLC module "PLC. POS. Z UP"


Move to Z Axis Clearance Position
PLC Position
to Z UP
Position

No

Axis Z
in Position

Yes
END

2/97

TNC 406/TNC 306

14 Electrode changer

4-137

15 Commissioning and start-up procedure


This section describes the commissioning procedure for the controls step-by-step. Detailed
descriptions of the functions may be found by referring to the appropriate sections.

15.1 Code numbers for commissioning


Certain operating conditions and functions for the commissioning procedure must be selected by
code numbers (see section "Display and operation").
Code number
95 148
807 667
531 210
75 368
105 296

Function
List of machine parameters (see "Machine parameters")
PLC-operation (see "PLC-programming")
Erasing the entire physical RAM memory (not NC-programs, erosion tables
and datum shift table)
Automatic offset adjustment (see section "Servo positioning")
Non-linear axis error compensation (see "Machine integration")

15.2 Preparation of the machine


The machine is prepared without a control being connected.
For the commissioning of the drive amplifiers please follow the sequence below:

Disconnect and short together the nominal value inputs of the drive amplifiers.
0 V must be applied to the input!

Connect the servo-enable input to 24 V (normally) and thus activate the servo.

Connect the power supply to the drive amplifiers.

Rough offset adjustment. If the axis moves even though the nominal value input is clamped to
0 V, the offset potentiometer must be so adjusted that the axis comes to a stop. After the offset
adjustment remove the short-circuit link on the nominal value!

Rough velocity adjustment. Connect battery supply to the nominal value input. Adjust the battery
supply to 9 V and adjust the drive motor with the tacho-potentiometer to the desired speed
(which equals the maximum rapid traverse rate). The rated speed can be read from the drive
motor with a tachometer.

Tuning of the drive amplifier. As far as the control is concerned, the actual servo-loop consists of
the drive amplifier, motor and axis slide (see section "Servo positioning"). Before the position
control loop in the control can be optimized, the servo-loop must be tuned.
To achieve this, a battery supply is used to apply a (9 V) step function to the nominal value input
of the drive amplifier. The step response of the tachometer signal can be recorded by an
oscilloscope. The axis should be loaded with the permissible workpiece weight while the step
response is being recorded. The subordinate control loop (current control, spindle speed control)
must be so optimized that the step response shows an overshoot.

4-138

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

The following curve represents the ideal response of the tachometer signal:

U [V]

Given step
function

1 Overshoot

Umax
Tacho-signal

t [ms]

The following curves show incorrectly adjusted tachosignals:

Several overshoots

U [V]
Umax

Incorrect!

t [ms]
P-component of the subordinate control loop too
high or I-component too low

U [V]
Umax
Too flat
Incorrect!

t [ms]
P-component of the subordinate control loop too
low or I-component too high

2/97

TNC 406/TNC 306

15 Commissioning and start-up procedure

4-139

Determining the acceleration


The maximum acceleration time T can be deduced from the step response.
U [V]
Umax

t [ms]

To calculate the acceleration, increase T by 10%.


From this it follows that:
a = vmax

vmax = velocity at Umax

----------

T1.1

a = acceleration

The step response must be investigated for all axes.


The acquired acceleration values are entered in MP1060.0 to MP1060.3.
After adjustment, switch off the supply voltage to the drive amplifiers.

The preparation of the drive amplifiers is now finished.

4-140

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

2/97

TNC 406/TNC 306

15 Commissioning and start-up procedure

4-141

15.3 Commissioning the control


The preparation of the machine in accordance with section 16.2 must be completed before the
machine parameters for the commissioning can be optimized.
Before connecting the control, the NC- and PLC- supply voltages and the ground connections should
be tested once more (see "Mounting and Electrical Installation ").

15.3.1 Entry of the provisional and pre-defined machine parameters


After switching on the machine for the first time, the control will first display the message
"Operation parameters erased", which means that the machine parameters still have to be entered
(see "Machine parameters").
Most machine parameters can be pre-defined and entered according to the machine parameter list
and the functional descriptions. The parameters which affect the control loop must be assigned
provisional values (see section 16.3.6).
In order to avoid lengthy delays on restarting during the commissioning of the control, the memory
test can be suppressed by MP7690 (see section "Display and operation").

15.3.2 Entry of the PLC-program


A complete PLC-program for all machine functions must be created for commissioning and stored
either in EPROM or RAM (see "PLC-programming").
Machine parameter MP4010 (see section "Display and operation") selects whether the processing
uses a PLC-program from the EPROM or the RAM.
The PLC-program in RAM is used for commissioning purposes. It only makes sense to create an
EPROM when all functions are operating without error.
In case of doubt, please contact HEIDENHAIN customer service.

15.3.3 Testing the EMERGENCY STOP routine


Since the EMERGENCY STOP circuit is very important for the machine it is vital that it is tested.

Test the Function "Control operational" according to the section "EMERGENCY STOP routine."
Test the EMERGENCY STOP-circuit by pressing the EMERGENCY STOP keys and by traversing
past the EMERGENCY STOP limit switches.

15.3.4 Testing the direction of traverse


Test the controls for the direction of traverse according to the following diagram (effective machine
parameters: MP210 count direction of the encoder signals, MP1040 polarity of the nominal value
voltage, MP1320 direction of traverse on passing over the reference marks).

4-142

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

START
Line voltage on

"Cross positioning error"


or incorrect
traverse direction
after passing over
ref. marks?

Yes
Change
MP210
MP1040
MP1320

No
Erase POWER INTERRUPTED error message with CE
Line
voltage
off

Control voltage on;


axes are in the control loop
Gross
positioning error
(MP1040 or
MP210 incorrect)
?

Yes

No
Reference traverse with
machine START button

No

Traverse
direction correct?
(as defined
in MP1320)

No

Start reference
traverse with
axis direction keys
?
Yes
Axis traverse
direction correct?
(defined in MP1040
and MP210)

(Both types of
referencing must
be performed!)

No

Yes
Test the traverse direction of
referencing in each axis

Test the traverse direction


in each axis

This flow diagram must be worked through for every axis!

2/97

TNC 406/TNC 306

15 Commissioning and start-up procedure

4-143

15.3.5 Setting the software limit switch ranges


Determine the software limit switch ranges (see section "Machine axes") as follows:

In "Manual operation" mode select the REFdisplay with the MOD key.

Positional-displays show the distance to the


reference point

Move all axes with the aid of the direction keys or


the handwheel in positive and negative direction to
just before the EMERGENCY STOP limit switches. Note the
values in the positional-displays and their sign.

Enter the noted values in MP910 or MP920.

Select actual-value display with MOD key.

15.3.6 Optimizing control with servo lag


The following provisional values can be entered for the machine parameters which determine the
control characteristics:
Machine parameter

Function

Preliminary entry value

MP1050

9V

MP1060

Analog voltage for rapid


traverse
Acceleration

MP1810

kv factor

As measured on the machine


(see "Preparation of the machine")
1

These values can usually be further optimized.

4-144

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

Kv factor
Adjust the Kv factor (MP1810) so that the voltage characteristic is as described in the section "Servo
positioning." If a different Kv factor is required for rapid traverse to that for the machining feed rate, it
must be optimized separately.
Optimize Kv factor for the machining feed rate (X axis)
Connect storage oscilloscope to tachometer
of the servo-amplifier of X axis.

Enter following program in


"PROGRAMMING AND EDITING"
operating mode:
LBL 1
X 1001) R0 F2)...
X 0 R0 F2)...
CALL LBL 1 REP 100/100

Press machine START button in the


"PROGRAM RUN/FULL SEQUENCE"
operating mode. Machine runs.
Note: Set feed override to 100%.

MP1810: Increase entry value until position loop oscillates or


until an overshoot occurs after the acceleration ramp.
U [V]

t [s]

Machining feed

MP1810 (kv factor): Reduce entry value until no oscillations are detectable.
U [V]

t [s]

Repeat adjustment for axes Y, Z, IV and V.


1)
2)

Program the traverse paths for the axis concerned as large as possible.
Enter the max. feed rate for machining.

For axes which are mutually interpolated the Kv factors must be the same.
In this case the worst axis determines the entry value.
2/97

TNC 406/TNC 306

15 Commissioning and start-up procedure

4-145

4-146

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

15.3.7 Offset adjustment


The rough offset adjustment has already been carried out on the servo amplifier. The offset
adjustment possibility described in the section "Servo positioning" lets a fine offset adjustment be
performed.

15.3.8 Adjusting the monitoring functions


The following entry values are recommended for the monitoring functions (see section "Servo
positioning"):
Machine parameter

Function

Entry value

MP1710
MP1720

Position monitoring
Position monitoring (EMERGENCY
STOP)

1.2 lag in rapid traverse


1.4 lag in rapid traverse

MP1140
MP1030
MP1110

Movement monitoring
Positioning window
Standstill monitoring

0.5 [V]
0.005 [mm]
0.1 [mm]

If the drives of the machine permit narrower limits, these may be entered.

2/97

TNC 406/TNC 306

15 Commissioning and start-up procedure

4-147

4-148

TNC 406/TNC 306

15 Commissioning and start-up procedure

2/97

Machine parameters Contents


1
1.1

What are machine parameters?


User parameters

52
52

2
2.1

Input/output of machine parameters


Entry format

53
53

2.2

Activating the machine parameter settings

54

2.3

Changing input values

54

3
3.1

List of machine parameters


Measuring systems and machines

55
55

3.2

Positioning

511

3.3

Operation with servo lag

513

3.4

Eroding

514

3.5

Integral PLC

517

3.6

Adaptation of the data interface

518

3.7

Probing

519

3.8

Display and programming

519

3.9

Status display and graphics depiction

522

3.10

Color adjustment

524

3.11

Machining and program run

525

3.12

Hardware

527

3/2000

TNC 416/TNC 406/TNC 306

5-1

What are machine parameters?

A contouring control must have access to specific data (e.g., paths of traverse, acceleration) before
it can execute its programmed instructions.
The machine tool builder provides these data in so-called machine parameters. In addition, machine
parameters can be used to activate functions that are possible with HEIDENHAIN contouring
controls but are required only on certain types of machines (such as automatic tool changers).
The machine parameters are grouped according to function:
Machine parameters

Functional group

0
1000
1700
2000
4000
5000
6000
7200
7400
7600

Measuring systems and machines


Positioning
Operation with servo lag
Eroding
Integrate PLC
Setting the data interface
Probing
Display and programming
Machining and program run
Hardware

to
to
to
to
to
to
to
to
to
to

999
1399
1999
2999
4999
5999
6199
7399
7599
7699

If there is more than one input value for a single function (e.g., a separate input for each axis), the
parameter number is provided with indices.
Example:
MP330 Grating period
MP330.0 Grating period for axis X
MP330.1 Grating period for axis Y
MP330.2 Grating period for axis Z
MP330.3 Grating period for axis 4
MP330.4 Grating period for axis 5
The indices are assigned to the corresponding axes according to a fixed pattern. For example, if
entry is only possible in axis 4, then only index 3 will appear.

1.1 User parameters


The MOD function "User Parameters" permits the control operator to easily access and change
certain machine parameters. The machine tool builder can define up to 16 different machine
parameters as user parameters with MP7330 (see Chapter "Machine Adjustment", Section "Display
and operation").

5-2

TNC 416/TNC 406/TNC 306

What are machine parameters?

3/2000

Input/output of machine parameters

If the machine parameters have not yet been entered into the control (e.g., during commissioning),
the TNC presents the list of machine parameters after performing the memory test. The input values
must now be entered either by hand on the keyboard or through the data interface. The data
interface is activated by pressing EXT. It is pre-set to FE mode. This default setting can be changed
through the MOD functions (see Chapter "Data Interface").

2.1 Entry format


A number is entered for each machine parameter. This value can be, for example, the acceleration in
mm/s2 of an individual axis, or the analog voltage in volts.
Some machine parameters have multiple functions. The entry values for these machine parameters
are calculated in decimal values according to the function to be activated or they can be entered in
binary or hexadecimal format. This depends on the TNC type.
TNC 406: The input values can be entered in decimal, binary (%) or hexadecimal ($) format.
TNC 306: The input values can be entered in decimal.
Example:
Activating axes with encoders by setting machine parameter MP10:
Bit 0

X axis

Bit 1

Y axis

Bit 2

Z axis

Bit 3

4th Axis

Bit 4

5th Axis

+ 0 = Not active
+ 1 = Active
+ 0 = Not active
+ 2 = Active
+ 0 = Not active
+ 4 = Active
+ 0 = Not active
+ 8 = Active
+ 0 = Not active
+ 16 = Active

Example: If you wish to activate axes X, Y and Z, the decimal entry value for MP10 is 1 + 2 + 4=7,
the binary value is % 00111, the hexadecimal value is $ 07.

3/2000

TNC 416/TNC 406/TNC 306

Input/output of machine parameters

5-3

2.2 Activating the machine parameter settings


When the values for the machine have been entered, exit the machine parameter list by pressing
. Missing or incorrect entries result in error messages from the control that prompt you to
END
make corrections.
If the control does not recognize any errors, it automatically exits the machine parameter editor and
is ready for operation.

2.3 Changing input values


Call the machine parameter editor through the MOD function "code number."
Enter code number 95148 or 105296 to access the complete list of machine parameters.
Code number 123 opens a partial list of machine parameters. These are the machine parameters
that may be changed by the user (see TNC 306 User's Manual). Those machine parameters which
can be accessed with code number 123 are identified in the machine parameter list with "123" in the
column "Change via."
Exit the machine parameter editor by pressing END

Code number 53 12 10 delete all machine parameter settings.

5-4

TNC 416/TNC 406/TNC 306

Input/output of machine parameters

3/2000

List of machine parameters

3.1 Measuring systems and machines


Machine
parameter

Function and input

MP10

Active axes
Entry range:
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4 *

MP31

Y
Z
IV
V*

Y
Z
IV
V*

Page

RESET

4-5

RESET

4-8

RESET

4-9

+0 = Monitoring not active


+1 = Monitoring active
+0 = Monitoring not active
+2 = Monitoring active
+0 = Monitoring not active
+4 = Monitoring active
+0 = Monitoring not active
+8 = Monitoring active
+0 = Monitoring not active
+16 = Monitoring active

Frequency monitoring
Entry range:
1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
X

Reaction

1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
X axis +0 = Not active
+1 = Active
Y axis +0 = Not active
+2 = Active
Z axis +0 = Not active
+4 = Active
4th axis +0 = Not active
+8 = Active
5th axis +0 = Not active
+16 = Active

Amplitude monitoring of the measuring


system signals
Entry range:
1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
X

MP32

Change
via

+0 = Monitoring not active


+1 = Monitoring active
+0 = Monitoring not active
+2 = Monitoring active
+0 = Monitoring not active
+4 = Monitoring active
+0 = Monitoring not active
+8 = Monitoring active
+0 = Monitoring not active
+16 = Monitoring active

* only TNC 416/406

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-5

Machine
parameter

Function and input

Reaction

Page

MP40

Display on screen
Entry range:
1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Not active
+1 = Active
Bit 1
Y axis +0 = Not active
+2 = Active
Bit 2
Z axis +0 = Not active
+4 = Active
Bit 3
4th axis +0 = Not active
+8 = Active
Bit 4 * 5th axis +0 = Not active
+16 = Active

RESET

4-12

MP50

Controlled axes
Entry range:
1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Not controlled
+1 = Controlled
Bit 1
Y axis +0 = Not controlled
+2 = Controlled
Bit 2
Z axis +0 = Not controlled
+4 = Controlled
Bit 3
4th axis +0 = Not controlled
+8 = Controlled
Bit 4 * 5th axis +0 = Not controlled
+16 = Controlled

RESET

4-50

MP60

Axis as programmable position display


Entry range:
1 to 15 (TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Not active
+1 = Active
Bit 1
Y axis +0 = Not active
+2 = Active
Bit 2
Z axis +0 = Not active
+4 = Active
Bit 3
4th Axis +0 = Not active
+8 = Active
Bit 4 * 5th axis +0 = Not active
+16 = Active

RESET

4-50

MP110.0-4

Assignment of encoder inputs to axes


Entry range: 0 to 5
0 = Encoder input X1
1 = Encoder input X2
2 = Encoder input X3
3 = Encoder input X4
4 = Encoder input X5 (only LE 406)
5 = Encoder input X6

RESET

4-11

Change
via

* only TNC 416/406

5-6

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

MP115.0

Position encoder inputs 1VPP or 11A


Input: %xxxxx
0 = 1 VPP
1 = 11A

MP115.1

Reserved
Input: %00000

Change
via

Reaction

Page

RESET

RESET

RESET

4-12

RESET

4-7

New MP in TNC 416 software 286 180-01

New MP in TNC 416 software 286 180-01


MP115.2

Input frequency of position encoders


Input: %xxxxx
0 = 50kHz for 1VPP; 50kHz for 11A
1 = 350kHz for 1VPP; 150kHz for 11A
New MP in TNC 416 software 286 180-01

MP 120.0-4

Assignment of the analog outputs


Entry range: 0 to 4
0 = Analog output 1
1 = Analog output 2
2 = Analog output 3
3 = Analog output 4
4 = Analog output 5 *

MP210

Counting direction of the encoder signals


Entry range:
0 to 31 (TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Positive
+1 = Negative
Bit 1
Y axis +0 = Positive
+2 = Negative
Bit 2
Z axis +0 = Positive
+4 = Negative
Bit 3
4th axis +0 = Positive
+8 = Negative
Bit 4 * 5th axis +0 = Positive
+16 = Negative

MP330.0-4

Grating period
Entry range: 1 to 360 [m] or [1/1000 ]

4-6

MP330.0
X axis
MP330.1
Y axis
MP330.2
Z axis
MP330.3
4th axis
MP330.4
5th axis
Canceled in TNC 416 software 286 180-01
Canceled in TNC 406 software 280 620-08

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-7

Machine
parameter

Function and input

MP331.0-4

Distance per number of signal periods out of


MP332
Input:
0.001 to 99 999.999 [mm or ]

Change
via

Reaction

Page

Reset

New MP in TNC 416 software 286 180-01


New MP in TNC 406 software 280 620-08
MP332.0-4

Number of signal periods in the distance from


MP331
Input:
1 to 16 777 215

Reset

New MP in TNC 416 software 286 180-01


New MP in TNC 406 software 280 620-08
MP334.0-4

Distance between reference marks for encoders


with distance-coded reference marks
Input: 0 to 65535 [grating periods]
0=1000 grating periods
(standard setting)

Reset

New MP in TNC 416 software 286 180-01


New MP in TNC 406 software 280 620-08
MP410

Designation of axis 4
Entry value: 0 to 2

RESET

4-11

0=A
1=B
2=C
MP411 *

Designation of axis 5
Entry value: 0 to 5

4-11

0=A
1=B
2=C
3=U
4=V
5=W
MP720.0-4

Correction factor for linear compensation


Entry range: 1.000 to +1.000 [mm/m]
MP720.0
X axis
MP720.1
Y axis
MP720.2
Z axis
MP720.3
4th axis
MP720.4 *
5th axis

4-18

MP710

Backlash compensation for axis 4


Input:
1.000 to +1.000 [mm] or []

MP711

Backlash compensation for axis 5


Input:
1.000 to +1.000 [mm] or []

5-8

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

MP720.0-4

Linear axis-error compensation


Input: 1.0000 to +1.0000 [mm/m]

MP730

Enable for non-linear axis error compensation


Entry range: 0 to 15 (TNC 306)
% xxxxx (TNC 416/406)

4-22

Bit 0
Bit 1
Bit 2
Bit 3
Bit 4 *

Change
via

Page

X axis

+0 = Not active
+1 = Active
Y axis +0 = Not active
+2 = Active
Z axis +0 = Not active
+4 = Active
4th axis +0 = Not active
+8 = Active
5th axis +0 = Not active
+16 = Active

MP910
MP920

Software limit switch range 1


Entry range linear axis:
30 000.000 to +30 000.000 [mm]
Entry range rotary axis:
30 000.000 to +30 000.000 []

MP910.0
MP910.1
MP910.2
MP910.3
MP910.4 *
MP920.0
MP920.1
MP920.2
MP920.3
MP920.4 *

X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V

MP911
MP921

Software limit switch range 2


Entry range, linear axis:
30 000.000 to +30 000.000 [mm]
Entry range, rotary axis:
30 000.000 to +30 000.000 []

MP911.0
MP911.1
MP911.2
MP911.3
MP911.4 *
MP921.0
MP921.1
MP921.2
MP921.3
MP921.4 *

X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V

3/2000

Reaction

TNC 416/TNC 406/TNC 306

List of machine parameters

4-13

4-13

5-9

Machine
parameter

Function and input

MP912
MP922

Software limit switch range 3


Entry range, linear axis:
30 000.000 to +30 000.000 [mm]
Entry range, rotary axis:
30 000.000 to +30 000.000 []

MP912.0
MP912.1
MP912.2
MP912.3
MP912.4 *
MP922.0
MP922.1
MP922.2
MP922.3
MP922.4 *

X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V

MP950.04

Datum for positioning blocks with M92


Entry range, linear axis:
30 000.000 to +30 000.000 [mm]
Entry range, rotary axis:
30 000.000 to +30 000.000 []

Change
via

Reaction

Page
414

477

Values referenced to machine datum (see


MP960.x)
MP960.04

Machine datum
Entry range:
30 000.000 to +30 000.000 [mm] or []

477

Values referenced to scale datum


*only TNC 416/406

5-10

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

3.2 Positioning
Machine
parameter

Function and input

Change
via

MP1010.04 Rapid traverse

Reaction

Page
442

Entry range, linear axis:


80 to 30 000 [mm/min]
Entry range, rotary axis:
80 to 30 000 [/min]
MP1020.04 Manual feed
Entry range, linear axis:
80 to 30 000 [mm/min]
Entry range, rotary axis:
80 to 30 000 [/min]

443

MP1030.04 Positioning window


Entry range, linear axis:
0.001 to 2.000 [mm]
Entry range, rotary axis:
0.001 to 2.000 []

448

MP1040

47

Polarity of the nominal value voltage for positive


traverse direction
Entry range: 0 to 15 (TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Positive
+1 = Negative
Bit 1
Y axis +0 = Positive
+2 = Negative
Bit 2
Z axis +0 = Positive
+4 = Negative
Bit 3
4th axis +0 = Positive
+8 = Negative
Bit 4 * 5th axis +0 = Positive
+16 = Negative

MP1050.04 Analog voltage for rapid traverse


Entry range: +4.5 to +9 [V]

442

MP1060.04 Acceleration
Entry range: 0.001 to 9.0 [m/s2]

441

MP1070

Radial acceleration
Entry range: 0.001 to 3.0 [m/s2]

445

MP1090

Default feed rate during positioning


Entry range: 0 to 30 000 [mm/min]

123

460

Circular feed rates in the disk cycle (marker M2640)


Entry range: 0 to 30 000 [mm/min]
Modes 0 and 4 (erosion, M2640=0)
Modes 0 and 4 (sparkout, M2640=1)
Modes 1 and 5 (erosion, M2640=0)
Modes 1 and 5 (sparkout, M2640=1)
Modes 2/3 and 6/7 (erosion, M2640=0)
Modes 2/3 and 6/7 (sparkout, M2640=1)

123

488

MP1092
MP1093
MP1094
MP1095
MP1096
MP1097

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-11

Machine
parameter

Function and input

MP1110

Standstill monitoring (Error D)


Entry range: 0.001 to 30 [mm]

448

MP1140

Movement monitoring (Error C)


Entry range: 0.03 to 10 [V]

447

MP1141

Maximum voltage difference between two control


loop cycles (Error F)
Entry range: 0.03 to 10 [V]

447

Change
via

Reaction

Page

Removed in TNC 406 as of software version


280 620-07, because the acceleration monitoring
is now automatic.
MP 1220

Automatic drive offset adjustment


Entry range: 0 to 65 535 [s]

MP1320

Traverse direction when approaching the


reference marks
Entry range: 0 to 15(TNC 306)
% xxxxx (TNC 416/406)
Bit 0
X axis +0 = Positive
+1 = Negative
Bit 1
Y axis +0 = Positive
+2 = Negative
Bit 2
Z axis +0 = Positive
+4 = Negative
Bit 3
4th axis +0 = Positive
+8 = Negative
Bit 4 * 5th axis +0 = Positive
+16 = Negative

444

0 = No automatic adjustment
433

MP1330.04 Feed rate for crossing the reference marks


Entry range: 80 to 30 000 [mm/min]

433

MP1331.04 Feed rate when leaving reference end position


(only for encoders with one reference mark,
MP1350 = 1)

433

Entry range: 80 to 500 [mm/min]


MP1340.04 Axis sequence for crossing the reference marks
Entry range: 0 to 5

433

0 = No reference mark evaluation


1 = X axis first
2 = Y axis first
3 = Z axis first
4 = 4th axis first
5 = 5th axis first *

only TNC 416/406

5-12

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

Change
via

Reaction

MP1350.04 Type of reference mark approach


Entry values: 0 or 1
+0 =

+1 =

Page
434

Encoder with distancecoded


reference marks (for square-wave inputs
the encoder must have a 5-fold EXE if
distance-coded reference marks are used.)
Encoder without distancecoded reference
marks

3.3 Operation with servo lag


Machine
parameter

Function and input

MP1530

Overshoot behavior during acceleration with


feedforward.
It influences the overshoot behavior during
acceleration in the gap control in feedforward
mode.
Entry range: 0 to 0.999
If MP1530 is programmed to equal 0, the
standard value 0.25 is used.
Input value 0.999 = steepest characteristic curve

MP1540

Braking behavior during feedforward


It influences braking to a target in feedforward
mode.
Entry range: 0 to 0.999
If MP1530 is programmed to equal 0, the
standard value 0.5 is used.
Input value 0.999 = steepest characteristic curve

MP1550

Filter for feedforward


Entry range: 0 or 1
1 = Switch off the filter in the feedforward
voltages

MP1700

Selecting the system cycle times


Entry: 0 to 2
0
gap control 4ms PLC 40 ms
1
gap control 4ms PLC 40 ms
2
gap control 2ms PLC 40 ms

3/2000

TNC 416/TNC 406/TNC 306

Change
via

List of machine parameters

Reaction

Page

5-13

Machine
parameter

Function and input

Change
via

Reaction

MP1710.04 Position monitoring for operation with lag


(erasable)
Entry range: 0 to 100,000 [mm]

Page
446

Removed in TNC 406 as of software 280 620-07.


The control now multiplies the value of the normal
servo lag by 1.5 and uses the product as limit for
servo-lag monitoring (erasable error message). A
value of 1.8 * servo lag should therefore be used
for MP1720.x.
MP1720.04 Position monitoring for operation with lag
(Emergency Stop, error A)
Entry range: 0 to 100,000 [mm]

446

MP1810.04 Kv factor for positioning


Entry range: 0.1 to 10,000

442

3.4 Eroding
Machine
parameter

Function and input

MP2010

Characteristic gradient
Entry range: 0.001 to 60 . 000

MP2010.0
MP2010.1

Input characteristic range 2.5 to 5 V


Input characteristic range 0 to 2.5 V

MP2020

Multiplication factor
Entry range: 1.000 to 10 . 000

MP2020.0
MP2020.1

Input characteristic range 2.5 to 5 V


Input characteristic range 0 to 2.5 V

MP2030

Characteristic kink
Entry range: 0 to 100 [%]

MP2030.0
MP2030.1

Input characteristic range 2.5 to 5 V


Input characteristic range 0 to 2.5 V

MP2040

Factor for following electrode


Entry range: 0.1 to 60,000

123

464

MP2050

Move back reapproach position after short circuit


or CYCL STOP
Entry range: 0 to 2 [mm]

123

460

MP2051

Move back reapproach position after flushing


Entry range: 0 to 2 [mm]

123

461

5-14

TNC 416/TNC 406/TNC 306

Change
via

Reaction

Page
456

456

457

List of machine parameters

3/2000

Machine
parameter

Function and input

MP2052

Advanced switch-on distance for reapproach;


After timing (M2780=1), the oscillator signal of the
generator can be switch on earlier. In this way the
control receives a correct analog gap signal during
the transition from positioning to gap control.
Entry range: 0 to 2 [mm]

MP2060

Infeed rate when eroding on (M36) and marker


M2620 is set
Entry range: 1 to 500 [mm/min]

Change
via

Reaction

Page

123

460

Removed in TNC 406 as of software 280 620-07.


If the function is needed for special applications,
you can use MP2081=1 to realize a two-position
control without characteristic curve. An other
possibility: The threshold for free-run feed rate
from MP2141 can be defined with W520 (0..500).
MP2070

Feed rate at maximum gap voltage (5V) and


MP 2020 = 1 and MP 2030 = 1;
Calibration of input characteristic
Entry range: 1 to 3000 [mm/min]

457

MP2080

Gap signal input


Entry range: 0 to 2
0 = Not inverted
1 = Inverted
2 = Analog input from spindle potentiometer
(for testing purposes only)

456

MP2081

Selection of gap control


Entry range: 0 or 1
0 = Analog input is velocity signal
1 = Analog input is gap signal

MP2090

Speed for a non-controlled rotary axis (M3/M4)


Entry range: 1 to 100 [rpm]

MP2100

Editing possible in defined positions of eroding


table
Entry value: 0 to 255

MP2110

Delay of "spark-out is completed" signal (marker


M2616)
Entry range: 0.1 to 99.9 [s]

3/2000

TNC 416/TNC 406/TNC 306

123

4-54

123

List of machine parameters

4-61

5-15

Machine
parameter

Function and input

Change
via

MP2120

Arc detection
(electrode retraction time)
Entry range: 1 to 99.9 [s]

123

MP2130

Maximum speed for feed forward control during


erosion
Entry range: 0 to 500 [mm/min]

4-56

MP2131

Feed rate limit to switch to new eroding feed rate


from MP 2132
Entry range: 0 to 500 [mm/min]

4-57

MP2132

New eroding feed rate when value from MP 2131


exceeded
Entry range: 0 to 500 [mm/min]

4-57

MP2133

Retraction speed during short circuit detected at


connector X12
Entry range: 0 to 500 [mm/min]

4-59

MP2141

Free-run feed rate if analog input is greater than


threshold from W520 (MP2081)
Entry range: 0 to 3000 [mm/min]

MP2142

Erosion feed rate (MP2081=1)


Forward: F = MP2142 * SV [%]
Backward: F = MP2142 * SV [%] * W522 [Factor]
Entry range: 0 to 3000 [mm/min]

MP2190

Constant-speed positioning during flushing


Entry values: 0, 1, 2
0=
1=
2=

123

Reaction

Page
4-60

Electrode braked between each block


If the path is geometrically continuous,
the electrode moves at constant speed
Electrode moves at constant speed even
if the path is non-continuous

Removed in TNC 406 as of software 280 620-07


MP2199

5-16

Erosion table on/off


Entry values: 0 or 2
0=
Tables not active
2=
Tables active

TNC 416/TNC 406/TNC 306

4-62

List of machine parameters

3/2000

3.5 Integral PLC


Machine
parameter

Function and input

MP4010

PLC program from RAM or from EPROM


Entry value: 0 or 1
0=
1=

Change
via

Reaction

Page
7-21

EPROM
RAM

MP4020

Erosion parameter table from RAM or from


EPROM
Entry value: 0 or 1
0=
EPROM
1=
RAM

4-64

MP4030

Switchover of the PLC interface from marker


area to word area
Input value: 0 or 1
0=
marker range active (M2000 to M2548)
1 = word range active (W1024 to W1060)"
New MP in TNC 416 software 286 180-04
New MP in TNC 406 software 280 620-10

MP4060.0-4

Path-dependent lubrication
Entry range: 0 to 65 535 (in units of 65 536 m)

4-16

MP4110.0-47

PLC: programmed duration for timers 047


Entry range: 0 to 65 535 (in units of

7-17

40 ms)20/40 ms, depending of MP1700)


MP4120.0-31

PLC: counter preset value for counters 031


Entry range: 0 to 65 535 in units of 40 ms
(TNC 406: 20 or 40 ms depending on MP 1700)

7-19

MP4210.0-47

PLC: 48 positioning values for PLC positioning or


datum shift
Entry range: 30.000 to +30.000 [mm]

7-16

MP4220.0-7

Setting a number in the PLC (W960 ... W974)


Entry range: 0 to 65 535

7-16

MP4310.0-15

Setting a number in the PLC (W976 ... W1006)


Entry range: 0 to 65 535

7-16

MP4320.0-7

Setting a number in the PLC (W1008 ... W1022)


Entry range: 0 to 65 535

7-16

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-17

3.6 Adaptation of the data interface


Machine
parameter

Function and input

Change
via

MP5010

EXT mode:
ASCII character for end of data
Entry range: 0 to 127

123

8-26

MP5011

EXT mode:
ASCII character for end of transmission
Entry range: 0 to 127

123

8-26

MP5020

EXT mode: interface configuration


Bit 0

Bit 1
Bit 2

Bit 3

Bit 4

Bit 5

Bit 6
Bit 7

MP5100

123

Reaction

Page

8-27

Seven or eight data bits


+0 = 7 data bits
+1 = 8 data bits
No function
Transmission stop via RTS
+0 = inactive
+4 = active
Transmission stop via DC3
+0 = inactive
+8 = active
Character parity even or odd
+0 = even
+16 = odd
Character parity required
+0 = not required
+32 = required
No function
Number of stop bits
+0
= 2 stop bits
+128
= 1 stop bit

Parity Bit for LSV2-Protocol


Entry value: 0 to 2

0 = no parity
1 = even parity
2 = odd parity
MP5200

Baud rate for RS-422 interface of the


0 = baud rate 9600
1 = baud rate 38400

MP5990

Check block number sequence with external data


transfer
Entry value: 0 or 1

123

8-26

0 = Check block number sequence


1 = No check

5-18

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

3.7 Probing
Machine
parameter

Function and input

MP6100

Successive probing
Entry range: 1 to 5

4-114

MP6110

Maximum difference of probe values during


successive probing
Entry range: 0 to 2 [mm]

4-114

MP6120

Probing feed rate


Entry range: 1 to 30.000 [mm/min]

123

4-113

MP6130

Maximum measuring range


Entry range: 0 to 30.000 [mm]

123

4-114

MP6140

Retraction path
Entry range: 0 to 30 000 [mm]

MP6150

Retraction feed rate in probing cycle


Entry range: 1 to 30 000 [mm/min]

Change
via

Reaction

Page

4-114
123

4-113

3.8 Display and programming


Machine
parameter

Function and input

Change
via

Reaction

Page

MP7210

Programming station
Entry values: 0, 1, 2
0 = Control
1 = Programming station: PLC active
2 = Programming station: PLC inactive

123

RESET

4-89

MP7212 *)

Acknowledgment of Power interrupted


Entry values: 0 or 1
0 = Power interrupted must be acknowledged
with CE key
1 = automatically acknowledged after 3 sec

MP7230

Dialog language
Entry values: 0 to 3
Software Nr.:
286 180/
286 181/
280 620
280 621
0 = English
English
1 = German
German
2 = French
Swedish
3 = Italian
Finnish

MP7231

3/2000

123

286 182/
280 622
English
German
Czech
Reserved

OEM label
Entry values: 0 to 99
0 = standard label
1 to 99 = number of PLC error message,
displayed as OEM label

TNC 416/TNC 406/TNC 306

List of machine parameters

5-19

Machine
parameter

Function and input

MP7232

Enable Chinese Dialog


Entry range: 0 to 9
0=
Disable Chinese dialog
1 to 9 = Enable Chinese dialog
Character spacing in pixels

MP7240

PGM entry inhibited if PGM NR. same as OEM


cycle number
Entry values: 0 or 1
0 = Program entry inhibited
1 = Program entry not inhibited

MP7241

Inhibit the blocks ELCALL and WPCALL


Entry value: 0 or 1
0 = Soft keys inhibited
1 = Soft keys not inhibited

MP7245.0

Inhibit the HEIDENHAIN standard cycles 1 to 15


Entry range: 0 to 65 535
0 = No cycle inhibited

4-86

MP7245.1

Inhibit HEIDENHAIN cycles 16 to 31


Entry range: 0 to 65 535
0 = No cycle inhibited

4-86

MP7250

Difference between Q parameter numbers for


DLG DEF block and DLG CALL block in OEM cycle
Entry range: 0 to 50

9-3

MP7251

Number of global Q parameters transferred from


OEM cycle to calling program
Entry range: 0 to 100
10 = Q parameters Q90 to Q99 are global
(Q90 to Q99 are eroding parameters)

9-4

5-20

TNC 416/TNC 406/TNC 306

Change
via

Reaction

Page

123

List of machine parameters

9-3

3/2000

Machine
parameter

Function and input

Change
via

MP7271

Display feed rate


Entry values: 0 or 1
0 = Display
1 = Do not display

123

4-82

MP7272 *)

Display actual machining time


Entry values: 0 or 1
0 = Display
1 = No machining time display

123

4-84

MP7273

Display of blocks being tested during Program


Test
Entry values: 0 or 1
0 = No block display
1 = Block display

123

MP7274.0

Display of rotary axis defined with MP410


Entry values: 0 or 1
0 = Display 0 to 359.999 []
1 = Display - 180 to +179.999 []; (MP7470 = 0!)

MP7274.1

Display of rotary axis defined with MP411


Entry values: 0 or 1
0 = Display 0 to 359.999 []
1 = Display - 180 to +179.999 []; (MP7470 = 0!)

MP7280

Decimal character
Entry values: 0 or 1

123

Reaction

Page

4-89

0 = Comma
1 = Point
*) only TNC 306

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-21

Machine
parameter

Function and input

MP7290.0-5

Display step The finest resolution is 1/10 m.


Entry values: 0 to 6
Value of MP
0
1
2
3
4
5
6

Change
via

Reaction

Page

Reaction

Page

Resolution of display
m
inch
0.1 m
0.00001
0.5 m
0.00002
1 m
0.0001
5 m
0.0002
10 m
0.001
50 m
0.002
100 m
0.01

3.9 Status display and graphics depiction


Machine
parameter

Function and input

Change
via

MP7300

Cancel program data and status display with M02,


M30 and end of program
Entry values: %xxx
Bit0
0=Do not cancel status display
1=Delete program data and display
status with PGM END or M02, M30
which means that it functions like a
program selection or the reset soft key
Bit 1
1=Do not delete Q parameters when
program is selected or reset soft key is
pressed
Bit 2
1=Do not delete tool data and Q
parameters when program is selected or
reset soft key is pressed.

123

4-84

The Q parameters are always deleted after power


interruption, and the tool data are always retained.
MP7305

5-22

GOTO to a CYCL CALL in mode program run


is permitted
Entry values: 0 or 1
0=
GOTO permitted
1=
GOTO not permitted

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

Change
via

MP7310

Graphics display
Entry range: 0 to 3
Bit 0
Projection type for "Projection in 3
planes" display
+ 0 = European preferred
+ 1 = American preferred
Bit 1
Rotation of coordinate system in the
working plane by +90
+ 0 = No rotation
+ 2 = Rotation

123

MP7315

Tool radius for graphic simulation without


TOOL CALL

Reaction

Page
4-79

Entry range: 0.000 to 30 000.000 [mm]


MP7316

Tool penetration depth

Entry range: 0.000 to 30 000.000 [mm]


MP7330.015

Determination of user parameters accessible via


MOD function

4-88

Entry range: 0 to 9999.99 (number of desired


machine parameter)

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-23

3.10 Color adjustment


Machine
parameter

Function and input

MP7350 *
MP7351*

Window frame
Error messages

$30200C
$3F0000

MP7352 *
MP7352.0
MP7352.1
MP7352.2

Operating mode "Machine"


Window background
Operating-mode display
Dialog

$000000
$342008
$3F3828

MP7353 *
MP7353.0
MP7353.1
MP7353.2

Operating-mode Programming
Window background
Operating-mode display
Dialog

$000000
$342008
$3F3828

MP7354 *
MP7354.0
MP7354.1
MP7354.2
MP7354.3

Program-text display Machine


Background
General program text
Current block
Background of active window

$080400
$38240C
$38341C
$302410

MP7355 *
MP7355.0
MP7355.1
MP7355.2
MP7355.3

Program-text-display Programming
Background
$080400
General program text
$38240C
Current block
$38341C
Background of active window
$302410

MP7356 *
MP7356.0
MP7356.1
MP7356.2

Status-window
Background
$0C0800
Axis positions in the status-display $3F2C18
Status-display, except axis position $3F280C

MP7357 *
MP7357.0
MP7357.1

Soft-key display Machine


Background
Symbols

$000000
$3F3828

MP7358 *
MP7358.0
MP7358.1

Soft-key display Programming


Background
Symbols

$000000
$3F3828

MP7360 *
MP7360.0
MP7360.1
MP7360.2
MP7360.3
MP7360.4

Graphics: 3-D view


Background
Surface
Front face
Text-display in graphics window
Side face

$000000
$203038
$0C1820
$3F3F3F
$102028

Change
via

Reaction

Page
4-91

*) only TNC 416/406

5-24

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

MP7361 *
MP7361.0
MP7361.1
MP7361.2
MP7361.3
MP7361.4

Graphics: view in three planes


Background
Plan (Grating)
Front and side view
Axis cross and text
Cursor

MP7362 *
MP7362.0
MP7362.1
MP7362.2
MP7362.3

Additional status-display in graphics window


Background graphics window
$080400
Background status display
$0C0800
Status symbols
$38240C
Status values
$3F2C18

MP7365 *

Colors of the oscilloscope

MP7365.0
MP7365.1
MP7365.2
MP7365.3
MP7365.4
MP7365.5
MP7365.6
MP7365.7

Background
Channel 1
Channel 2
Channel 3
Channel 4
Reserved
Grating
Cursor and text

Change
via

Reaction

Page
4-92

$000000
$203038
$203038
$3F3F3F
$3F0000

$000000
$003F3F
$3F3F00
$003F00
$3F1230
$000000
$30200C
$3F3F3F

New MP in TNC 416 software 286 180-01


New MP in TNC 406 software 280 620-07

*) only TNC 416/406

3.11 Machining and program run


Machine
parameter

Function and input

Change
via

Reaction

Page

MP7410

Scaling factor cycle effective in two or three


axes
Entry values: 0 or 1

123

4-87

123

0 = Effective in three axes


1 = Effective in working plane
MP7411

Rotation of coordinate system during datum shift


from datum table
Entry values: 0 or 1
0 = Rotate coordinate system
1 = No rotation

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-25

Machine
parameter

Function and input

Change
via

Reaction

Page

MP7412

Behavior of CYCL CALL after a CYCL DEF 12:


PGM CALL xxxx block
Entry values: 0 or 1
0 = PGM xxxx is called with CYCL CALL like a
user cycle (PGM blocks do not appear)
1 = PGM xxxx is called with CYCL CALL or
M89/99 like a PGM CALL xxxx (PGM blocks
appear)
canceled in 286 18x-04/280 62x-10

123

MP7440

Output of M-functions
Entry range: 0 to 7

123

4-99

123

4-45

Programmed stop with M06


Bit 0
+0=
Programmed stop with M06
+1=
No programmed stop with M06
Output of M89, modal cycle call
Bit 1
+0=
No cycle call, normal output of
M89 at beginning of block
+2=
Modal cycle call at end of block
Axis standstill upon output of an M function
Bit 2
+0=
Axis standstill
+4=
No axis standstill
MP7460

Constant feed rate in corners


Entry range: 0 to 179.999 []

MP7470.0

Display mode for rotary axis defined with MP 410


Input: 0 or 1
0 =
0 to + 359.999 [] (no software limit
switch)
1 =
30 000.000 to + 30 000.000
(software limit switch active)

MP7470.1

Display mode for rotary axis defined with MP 411


Input: 0 or 1
0 =
0 to + 359.999 [] (no software limit
switch)
1 =
30 000.000 to + 30 000.000
(software limit switch active)
Output of tool numbers with TOOL CALL block
Entry values: 0 to 2

MP7480

5-26

0=

No output

1=

Output of tool number only when tool


number changes

2=

Output of tool number with every TOOL


CALL block

TNC 416/TNC 406/TNC 306

List of machine parameters

4-128

3/2000

Machine
parameter

Function and input

MP7481

Generate the last TOOL CALL after block scan in


test mode
Entry values: 0 or 1
0 = no TOOL CALL generating
1 = TOOL CALL generating before returning to
the contour

MP7490

Transmitting M-function after block scan in test


mode
Entry values: 0 or 1
0 = no transmission
1 = transmission of M-function

Activating software limit switch in test graphic

MP7491

Change
via

Reaction

Page

Entry values: 0 or 2
0 = software limit switch active
1 = software limit switch not active

3.12 Hardware
Machine
parameter

Function and input

Change
via

MP7620

Feed rate override


Entry range: 0 to 7

123

Reaction

Page

Feed rate override active when rapid traverse


button pressed in program run mode
Bit 0
+0 = Override not active
+1 = Override active
Feed rate override in 2% or 1% steps
Bit 1
+0 = 2% steps
+2 = 1% steps
Feed rate override if rapid traverse button and axis
direction button pressed
Bit 2
+0 = Override not active
+4 = Override active
MP7640

3/2000

Handwheel definition
Entry values: 0 or 1
0 = No handwheel is active
1 = HR 330
2 = HR 130
3 = HR 410

TNC 416/TNC 406/TNC 306

List of machine parameters

4-117

5-27

Machine
parameter

Function and input

MP7645

Initializing parameters for handwheel


HR410
Input: 0 or 1
0=
evaluation of the keys via NC
1=
evaluation of the keys via PLC

MP7650

Handwheel counting direction


Entry values: 0 or 1

4-117

Change
via

Reaction

Page

0 = Positive counting direction


1 = Negative counting direction
MP7651

Short circuit monitoring during manual handwheel


traversing
Input:
0 = Short-circuit monitoring on
1 = Short-circuit monitoring off
as of 286 18x-04/280 62x-10 removed

MP7655

Positioning with the handwheel


Entry values: 0 or 1
1 = Positioning with the handwheel is also
effective in the PROGRAMMING AND EDITING
mode of operation.

MP7660

Threshold sensitivity for electronic handwheel


Entry value: 0 to 65 535 [increments]

4-117

MP7670.0

Smallest interpolation factor for electronic


handwheel (HR 410/HR 130)

4-118

MP7670.0
MP7670.1
MP7670.2

Interpolation factor for HR 410 at smallest speed


Interpolation factor for HR 410 at medium speed
Interpolation factor for HR 410 at greatest speed
Entry range: 0 to 10

MP7671

% Factor from MP1020.x for feed rate for HR410

MP 7671.0
MP 7671.1
MP 7671.2

% Factor for HR 410 at smallest feed rate


% Factor for HR 410 at medium feed rate
% Factor for HR 410 at greatest feed rate

4-119

Input range: 0 to 1000%


MP7680

Memory function for direction buttons


Entry values: 0 or 1

4-110

0 = Not stored
1 = stored

5-28

TNC 416/TNC 406/TNC 306

List of machine parameters

3/2000

Machine
parameter

Function and input

MP7690

Memory test at switch-on


Entry range: 0 to 3

Change
via

Reaction

Page
4-90

RAM test
Bit 0
+ 0 = Test performed
+ 1 = Test not performed
EPROM test
Bit 1
+ 0 = Test performed
+ 2 = Test not performed

3/2000

TNC 416/TNC 406/TNC 306

List of machine parameters

5-29

1 List of Markers
Marker

Function

Set

Reset

Page

M2000

Axis enable X

NC

NC

4-51

M2001

Axis enable Y

NC

NC

4-51

M2002

Axis enable Z

NC

NC

4-51

M2003

Axis enable 4

NC

NC

4-51

M2004

Axis enable 5

NC

NC

4-51

M2008

Axis X in position

NC

NC

4-52

M2009

Axis Y in position

NC

NC

4-52

M2010

Axis Z in position

NC

NC

4-52

M2011

Axis 4 in position

NC

NC

4-52

M2012

Lubrication pulse axis X, since value of MP4060.0


was exceeded

NC

NC

4-16

M2013

Lubrication pulse axis Y, since value of MP4060.1


was exceeded

NC

NC

4-16

M2014

Lubrication pulse axis Z, since value of MP4060.2


was exceeded

NC

NC

4-16

M2015

Lubrication pulse axis 4, since value of MP4060.3


was exceeded

NC

NC

4-16

M2016

Lubrication pulse axis 5, since value of MP4060.4


was exceeded

NC

NC

4-16

M2019

Reapproach active in "Full sequence" or "Single block" mode

NC

NC

4-90

M2022

Stylus not ready

NC

NC

4-113

M2023

Stylus already deflected at start of probe operation

NC

NC

4-113

M2024

Error message Touch probe not ready

NC

NC

M2025

Stylus deflected (probe operation has been performed)

NC

PLC

4-113

M2026

Probe operation ended or interrupted

NC

NC

4-113

M2027

Battery voltage too low (battery-warning on connector X12);


evaluated only during the probe operation

NC

NC

4-113

M2028

Probing function activated (for switch test voltage on/off)

NC

NC

4-113

M2032

Axis 5 in position

NC

NC

4-52

M2039

NC PGM unit of measure: 0 = mm / 1 = inch

NC

NC

M2040

Axis display unit of measure, set in MOD: 0 = mm / 1 = inch

NC

NC

M2044

S Strobe (EL Call, WP Call)

NC

NC

M2045

M Strobe

NC

NC

4-94

M2046

T Strobe (TOOL CALL)

NC

NC

4-129

M2049

Operating mode programming and editing during


Program run

NC

NC

M2050

Operating mode programming and editing

NC

NC

M2051

Operating mode: Manual

NC

NC

3/2000

TNC416/TNC 406/TNC 306

List of Markers

61

Marker

Function

Set

Reset

Page

M2052

Operating mode: Electronic handwheel

NC

NC

M2053

Operating mode: Positioning with manual data input

NC

NC

M2054

Operating mode: Program run, single block

NC

NC

M2055

Operating mode: Program run, full sequence

NC

NC

M2056

Operating mode: Program test

NC

NC

M2057

Operating mode: Crossing the reference marks

NC

NC

M2059

Restore active in mode Program test

NC

NC

4-90

M2060

New program start in Full sequence or Single block


mode

NC

PLC

4-90

M2061

END PGM, or M02 or M30 has been executed

NC

NC

4-90

M2070

Status is transferred in bit 13 from M_RI

PLC

PLC

M2095

V key last pressed

NC

NC

4-80

M2096

X key last pressed

NC

NC

4-80

M2097

Y key last pressed

NC

NC

4-80

M2098

Z key last pressed

NC

NC

4-80

M2099

IV key last pressed

NC

NC

4-80

M2100

Axis X is tool axis

NC

NC

4-12

M2101

Axis Y is tool axis

NC

NC

4-12

M2102

Axis Z is tool axis

NC

NC

4-12

M2103

Axis 4 is tool axis

NC

NC

4-12

M2136

Reference mark X-axis not passed

NC

NC

M2137

Reference mark Y-axis not passed

NC

NC

M2138

Reference mark Z-axis not passed

NC

NC

M2139

Reference mark axis 4 not passed

NC

NC

M2140

Reference mark axis 5 not passed

NC

NC

M2149

Strobe marker FN19

NC

NC

M2160

Axis X traverse direction

0 = positive, 1 = negative

NC

NC

4-8

M2161

Axis Y traverse direction

0 = positive, 1 = negative

NC

NC

4-8

M2162

Axis Z traverse direction

0 = positive, 1 = negative

NC

NC

4-8

M2163

Axis 4 traverse direction

0 = positive, 1 = negative

NC

NC

4-8

M2164

Axis 5 traverse direction

0 = positive, 1 = negative

NC

NC

4-8

M2180

1st PLC scan after switch-on

NC

NC

M2181

Not disabled key was pressed

NC

PLC

4-101

M2182

Disabled key was pressed

NC

PLC

4-101

M2183

External Stop ("Control operational" symbol flashes)

NC

NC

4-84

M2184

Control operational ("Control operational" symbol on or


flashes)

NC

NC

4-84

M2185

1st PLC scan after interruption of PLC program

NC

NC

M2187

Severe control loop error

NC

NC

62

TNC416/TNC 406/TNC 306

List of Markers

3/2000

Marker

Function

Set

Reset

Page

M2188

PLC utilization > 230%

NC

NC

M2189

PLC: error message displayed

NC

NC

M2190

NC: Cancelable error message displayed

NC

NC

4-85

M2191

EXTERNAL EMERGENCY STOP message displayed

NC

NC

4-71

M2192
to
M2239

Markers can be changed


via MP4310.0, MP 4310.1 and MP 4310.2

NC

NC

M2240

Disable OEM Cycle 68

PLC

PLC

9-5

M2241

Disable OEM Cycle 69

PLC

PLC

9-5

M2242

Disable OEM Cycle 70

PLC

PLC

9-5

M2243

Disable OEM Cycle 71

PLC

PLC

9-5

M2244

Disable OEM Cycle 72

PLC

PLC

9-5

M2245

Disable OEM Cycle 73

PLC

PLC

9-5

M2246

Disable OEM Cycle 74

PLC

PLC

9-5

M2247

Disable OEM Cycle 75

PLC

PLC

9-5

M2248

Disable OEM Cycle 76

PLC

PLC

9-5

M2249

Disable OEM Cycle 77

PLC

PLC

9-5

M2250

Disable OEM Cycle 78

PLC

PLC

9-5

M2251

Disable OEM Cycle 79

PLC

PLC

9-5

M2252

Disable OEM Cycle 80

PLC

PLC

9-5

M2253

Disable OEM Cycle 81

PLC

PLC

9-5

M2254

Disable OEM Cycle 82

PLC

PLC

9-5

M2255

Disable OEM Cycle 83

PLC

PLC

9-5

M2256

Disable OEM Cycle 84

PLC

PLC

9-5

M2257

Disable OEM Cycle 85

PLC

PLC

9-5

M2258

Disable OEM Cycle 86

PLC

PLC

9-5

M2259

Disable OEM Cycle 87

PLC

PLC

9-5

M2260

Disable OEM Cycle 88

PLC

PLC

9-5

M2261

Disable OEM Cycle 89

PLC

PLC

9-5

M2262

Disable OEM Cycle 90

PLC

PLC

9-5

M2263

Disable OEM Cycle 91

PLC

PLC

9-5

M2264

Disable OEM Cycle 92

PLC

PLC

9-5

M2265

Disable OEM Cycle 93

PLC

PLC

9-5

M2266

Disable OEM Cycle 94

PLC

PLC

9-5

M2267

Disable OEM Cycle 95

PLC

PLC

9-5

M2268

Disable OEM Cycle 96

PLC

PLC

9-5

M2269

Disable OEM Cycle 97

PLC

PLC

9-5

M2270

Disable OEM Cycle 98

PLC

PLC

9-5

M2271

Disable OEM Cycle 99

PLC

PLC

9-5

3/2000

TNC416/TNC 406/TNC 306

List of Markers

63

Marker

Function

Set

Reset

Page

M2448

NC start (edge evaluation)

PLC

PLC

4-110

M2449

Rapid traverse

PLC

PLC

4-110

M2450

Memory function for axis direction keys

PLC

PLC

4-110

M2451

Feed enable

PLC

PLC

4-110

M2452

Manual traverse 5+

PLC

PLC

4-111

M2453

Manual traverse 5

PLC

PLC

4-111

M2456

Manual traverse X+

PLC

PLC

4-110

M2457

Manual traverse X

PLC

PLC

4-110

M2458

Manual traverse Y+

PLC

PLC

4-110

M2459

Manual traverse Y

PLC

PLC

4-110

M2460

Manual traverse Z+

PLC

PLC

4-111

M2461

Manual traverse Z

PLC

PLC

4-111

M2462

Manual traverse 4+

PLC

PLC

4-111

M2463

Manual traverse 4

PLC

PLC

4-111

M2481

Acknowledgment of S-strobe

PLC

PLC

M2482

Acknowledgment of M-strobe

PLC

PLC

4-94

M2483

Acknowledgment of T strobe

PLC

PLC

4-129

M2485

Status-display and sign of analog voltage for C axis (M3)

PLC

PLC

4-54

M2486

Status-display and sign of analog voltage for C axis (M4)

PLC

PLC

4-54

M2487

Status-display for C axis Stop (M5)

PLC

PLC

4-54

M2488

NC-stop (0 signifies stop)

PLC

PLC

4-110

M2492

Await open control loop axis X

PLC

PLC

4-53

M2493

Await open control loop axis Y

PLC

PLC

4-53

M2494

Await open control loop axis Z

PLC

PLC

4-53

M2495

Await open control loop axis 4

PLC

PLC

4-53

M2497

Activate the edge evaluation for PLC inputs;


Rising-edge marker M1500 to M1651
Falling-edge marker M1700 to M1851

PLC

PLC

7-20

M2498

Enable jog positioning

PLC

PLC

4-122

M2503

Enable marker for probe functions

NC

PLC

4-113

M2504

Enable marker for program run via LSV2

NC

NC

M2507

Status display M07

NC

NC

M2508

Status display M08

NC

NC

4-83

M2510

S-Override = 100% (ROT C-Axis)

PLC

PLC

M2511

F-Override = 100%

PLC

PLC

M2512

Jog positioning axis X+

PLC

PLC

4-122

M2513

Jog positioning axis X

PLC

PLC

4-122

M2514

Jog positioning axis Y+

PLC

PLC

4-122

M2515

Jog positioning axis Y

PLC

PLC

4-122

64

TNC416/TNC 406/TNC 306

List of Markers

3/2000

Marker

Function

Set

Reset

Page

M2516

Jog positioning axis Z+

PLC

PLC

4-122

M2517

Jog positioning axis Z

PLC

PLC

4-122

M2518

Jog positioning axis 4+

PLC

PLC

4-122

M2519

Jog positioning axis 4

PLC

PLC

4-122

M2520

Jog positioning axis 5+

PLC

PLC

4-122

M2521

Jog positioning axis 5

PLC

PLC

4-122

M2544

Open control loop axis X

PLC

PLC

4-53

M2545

Open control loop axis Y

PLC

PLC

4-53

M2546

Open control loop axis Z

PLC

PLC

4-53

M2547

Open control loop axis 4

PLC

PLC

4-53

M2548

Reset of accumulated distance for lubrication axis X

PLC

PLC

4-17

M2549

Reset of accumulated distance for lubrication axis Y

PLC

PLC

4-17

M2550

Reset of accumulated distance for lubrication axis Z

PLC

PLC

4-17

M2551

Reset of accumulated distance for lubrication axis 4

PLC

PLC

4-17

M2552

Actual-nominal value transfer axis X


(M2552ff:
effective in all operating modes;
the servo lag is set to 0 for an axis that has been taken out
of the control loop;
monitoring the limit switches is active)

PLC

PLC

4-53

M2553

Actual-nominal value transfer axis Y

PLC

PLC

4-53

M2554

Actual-nominal value transfer axis Z

PLC

PLC

4-53

M2555

Actual-nominal value transfer axis 4

PLC

PLC

4-53

M2556

Reference end position for axis X

PLC

PLC

4-34

M2557

Reference end position for axis Y

PLC

PLC

4-34

M2558

Reference end position for axis Z

PLC

PLC

4-34

M2559

Reference end position for axis 4

PLC

PLC

4-34

M2560

Reference end position for axis 5

PLC

PLC

4-34

M2564

Actual-nominal value transfer axis 5

PLC

PLC

4-53

M2568

Await open control loop axis 5

PLC

PLC

4-53

M2572

Open control loop axis 5

PLC

PLC

4-53

M2576

Reset of accumulated distance for lubrication axis 5

PLC

PLC

4-17

M2609

Status display M08 inverse

PLC

PLC

4-83

M2611

Acknowledgment FN19

PLC

PLC

M2616

Free run during erosion or spark out is completed

PLC

PLC

4-61

M2617

Retraction until signal is reset / Probing stop in TOUCH


PROBE MANUAL

PLC

PLC

4-60
4-114

M2618

Switch-on gap control (0=M37, 1=M36)

PLC

PLC

4-96

M2619

Complement switch on gap control (0=M36,1=M37)

PLC

PLC

4-96

M2620

Retraction feed rate from MP2060 during erosion

PLC

PLC

4-88

3/2000

TNC416/TNC 406/TNC 306

List of Markers

65

Marker

Function

Set

Reset

Page

M2621

Strobe signal (flushing)

PLC

PLC

4-61

M2622

Blocking of the short circuit on socket X12

PLC

PLC

4-59

M2623

Retraction as long as marker is set

PLC

PLC

4-59

M2624

Limit switch X+

NC

NC

4-14

M2625

Limit switch X

NC

NC

4-14

M2626

Limit switch Y+

NC

NC

4-14

M2627

Limit switch Y

NC

NC

4-14

M2628

Limit switch Z+

NC

NC

4-14

M2629

Limit switch Z

NC

NC

4-14

M2630

Limit switch 4+

NC

NC

4-14

M2631

Limit switch 4

NC

NC

4-14

M2632

Limit switch 5+

NC

NC

4-14

M2633

Limit switch 5

NC

NC

4-14

M2640

Selects the circular feed rate in the disk cycle

PLC

PLC

4-88

M2642

Start marker after erosion error

PLC

PLC

4-60

M2704

Activate PLC positioning axis X

PLC

NC

4-24

M2705

Activate PLC positioning axis Y

PLC

NC

4-24

M2706

Activate PLC positioning axis Z

PLC

NC

4-24

M2707

Activate PLC positioning axis 4

PLC

NC

4-24

M2708

Activate PLC positioning axis 5

PLC

NC

4-24

M2713

Strobe marker, activate the transfer of the value from D528


to the Q parameter defined in W516

PLC

NC

4-90

M2716

Strobe marker for datum correction

PLC

NC

4-125

M2718

Strobe marker, activate the transfer of the value from D528


to the Q parameter Q99

PLC

NC

M2719

Always = 1 (in TNC 360 activating the word processing)

M2780

Electrode is retracting

NC

NC

4-60

M2781

Reversing point has been reached during retraction

NC

NC

4-60

M2782

Short circuit at socket X12

NC

NC

4-59

M2783

End of eroding path reached (WTG = 0)

NC

NC

4-61

M2784

Reapproach the last eroded position

NC

NC

4-60

M2785

Erosion process on

NC

NC

4-56

M2786

Eroding a disk

NC

NC

4-88

M2787

Disk erosion in the last circle

NC

NC

4-88

M2788

Erosion error

NC

NC

4-60

M2789

Operating mode "handwheel" (0=Highlight display on


INCREMENT, 1=Highlight display on INTERPOL. FACTOR

NC

NC

4-118

M2790

Disk erosion completed (MOD 0 to 3)

NC

PLC

4-88

M2791

Disk erosion completed (MOD 4 to 7)

NC

PLC

4-88

66

TNC416/TNC 406/TNC 306

List of Markers

3/2000

Marker

Function

Set

Reset

Page

M2794

Changed values in eroding parameters Q96 to Q98


(without erosion tables: Q90 to Q99)

NC

PLC

4-67

M27951)

Changed values in current table during program run


(M2796)

NC

PLC

4-67

M27961)

Transfer changed values in current table to the PLC


(M2795)

PLC

NC

4-67

M2797
M27981)

Changed values in the status line and Q99 during erosion

Manual generator setting


NC

PLC

4-67

M27992)

Strobe marker for activate the data transfer via RS-422/V.11

PLC

NC

4-70

1) Active if MP2199 = 2 (see chapter "Machine integration," section "Eroding parameters")


2) only TNC 416/406

3/2000

TNC416/TNC 406/TNC 306

List of Markers

67

Marker

Function

Set

Reset

Page

M2800

Code for TNC keys (lsb)


(no function in TNC 416/TNC 406 as of software 280 62x-07)

NC

NC

M2801

Code for TNC keys

NC

NC

M2802

Code for TNC keys

NC

NC

M2803

Code for TNC keys

NC

NC

M2804

Code for TNC keys

NC

NC

M2805

Code for TNC keys

NC

NC

M2806

Code for TNC keys

NC

NC

M2807

Code for TNC keys (msb)

NC

NC

M2808

Strobe TNC key code


(no function in TNC 416/ TNC 406 as of software 280 62x-07)

NC

PLC

M2813

Activate the key from W516


(no function in TNC 416/ TNC 406 as of software 280 62x-07)

PLC

NC

4-101

M2815

Blinking PLC error message

PLC

PLC

4-85

M2816

Software limit switch range Bit 0

PLC

PLC

4-14

M2817

Software limit switch range Bit 1

PLC

PLC

4-14

M2824

Activate software limit switch ranges

PLC

NC

4-14

M2826

Disable feed rate of the handwheel.

PLC

PLC

M2832

Code for disabled TNC keys (lsb)


(no function in TNC 416/ TNC 406 as of software 280 62x-07)

NC

NC

M2833

Code for disabled TNC keys

NC

NC

M2834

Code for disabled TNC keys

NC

NC

M2835

Code for disabled TNC keys

NC

NC

M2836

Code for disabled TNC keys

NC

NC

M2837

Code for disabled TNC keys

NC

NC

M2838

Code for disabled TNC keys

NC

NC

M2839

Code for disabled TNC keys (msb)

NC

NC

M2855
to M2923

Disable a TNC key


(no function in TNC 416/ TNC 406 as of software 280 62x-07)

PLC

PLC

4-102

M2924
to M3123

200 PLC error messages

NC;
PLC

PLC

4-85

M3168

Overflow during multiplication

NC

PLC

7-58

M3169

Division by 0

NC

PLC

7-59

M3170

MODULO incorrectly executed

NC

PLC

7-60

M3171

Error in module 90xx execution

M3172

Reserved for errors that the PLC programmer would like to


trap

NC

NC

M3200
to M3263

Values from MP4310.3 to MP4310.6

NC

NC

68

TNC416/TNC 406/TNC 306

List of Markers

3/2000

2 List of Bytes, Words and Double Words


Word

Function

Transmission

Page

W258

S-Code (EL-Call, WP-Call)

W260

M-Code (Strobe M2045)

NC PLC

4-94

W262

T-Code, 16 bit (Strobe M2046)

NC PLC

4-128

W266

Number of NC error message

NC PLC

D268

T-Code, 32 bit

W272

Operating mode:
0 = Programming and editing
1 = Manual operation
2 = Electronic handwheel
3 = Positioning with manual entry
4 = Program run/single block
5 = Program run/full sequence
6 = Program test
7 = Pass over reference point

NC PLC
NC PLC

4-101

W274

Code number for the pressed disabled key, signal via M2182
Code number which is not evaluate from the NC

NC PLC
NC PLC

4-101

D276
D280

1st value with FN19

NC PLC

D284

2nd value with FN19

NC PLC

D288

Actual position X

NC PLC

D292

Actual position Y

NC PLC

D296

Actual position Z

NC PLC

D300

Actual position 4

NC PLC

D304

Actual position 5

NC PLC

D308

Start address PLC memory for first line in PLC window

NC PLC

D312

Start address PLC memory for second line in PLC window

NC PLC

D316

Start address PLC memory for third line in PLC window

NC PLC

D324

Nominal position X

NC PLC

D328

Nominal position Y

NC PLC

D332

Nominal position Z

NC PLC

D336

Nominal position 4

NC PLC

D340

Nominal position 5

NC PLC

D360

Programmed feed rate

NC PLC

D364

Ref position X

NC PLC

D368

Ref position Y

NC PLC

D372

Ref position Z

NC PLC

D376

Ref position 4

NC PLC

D380

Ref position 5

NC PLC

D384

Total length of path for erosion/positioning

NC PLC

D388

Current way to go (WTG)

NC PLC

4-61

3/2000

TNC416/TNC 406/TNC 306

List of Bytes, Words and Double Words

69

Word

Function

Transmission

Page

W392

Current value of the analog input

NC PLC

4-57

W394

Actual angle while disk cycle

NC PLC

4-88

B396

Mode of cycle 17 disk (0...7)

B397

Axis of cycle 17 disk 0/1/2=X/Y/Z

B398

Actual feed rate [mm/min]

D400

Angle of basic rotation

NC PLC

D412

Q parameter Q96*

NC PLC

4-63

D416

Q parameter Q97*

NC PLC

4-63

D420

Q parameter Q98*

NC PLC

4-63

W490

Control temperature in degrees Celsius

W492

Spindle override factor in %

NC PLC

4-54

W494

Feed rate override factor in %

NC PLC

4-54

W498

Actual handwheel axis (X=1, Y=2, Z=3,...)

NC PLC

D512

Return value for FN19 (Q parameter xx)

NC PLC

W516

Word with multiple function;


Code number for simulating TNC keys activated by M2813
Number of the Q parameter to be overwritten (Q100 to Q107)

PLC NC

4-101

W520

Threshold for free-run velocity (when MP2081=1)

PLC NC

W522

Factor for gap feed rate backwards (when MP2081=1)

PLC NC

W524

Nominal value for sparking gap (when MP2081=1)

PLC NC

W526

Code no. for erosion parameter table (0 = JH standard table)

PLC NC

D528

Value to be transferred to the Q parameter (strobe 2718);


PLC position axis X (strobe M2704);
Datum correction, axis X (strobe M2716)

PLC NC

4-125

D532

PLC positioning axis Y (strobe M2705);


Datum correction axis Y (strobe M2716)

PLC NC

4-125

D536

PLC positioning axis Z (strobe M2706);


Datum correction axis Z (strobe M2716)

PLC NC

4-125

D540

PLC positioning axis 4 (strobe M2707);


Datum correction, axis 4 (strobe M2716)

PLC NC

4-125

D544

PLC positioning axis 5 (strobe M2708);


Datum correction, axis 5 (strobe M2716)

PLC NC

4-125

W560

Feed, axis X (strobe M2704)

PLC NC

4-24

W562

Feed, axis Y (strobe M2705)


Feed, axis Z (strobe M2706)

PLC NC
PLC NC

4-24

W564
W566

Feed, axis 4 (strobe M2707)

PLC NC

4-24

W568

Feed, axis 5 (strobe M2708)

PLC NC

4-24

W576

Axis error compensation, axis X

PLC NC

4-22

W578

Axis error compensation, axis Y


Axis error compensation, axis Z

PLC NC
PLC NC

4-22

W580
W582

Axis error compensation, axis 4

PLC NC

4-22

610

TNC416/TNC 406/TNC 306

List of Bytes, Words and Double Words

4-24

4-22

3/2000

Word

Function

Transmission

Page

W584

Axis error compensation, axis 5

PLC NC

4-22

W586

Nominal value output on analog output 6 (default value 500 =


5,0 Volt) (TNC 406 as of software 280 62x-08)

PLC NC

W588

MP2010.0 (100...10000)

W590

MP2010.1 (100...10000)

W592

MP2020.0 (100...10000)

W594

MP2020.1 (100...10000)

B596

MP2030.0 (0...100%)

B597

MP2030.1 (0...100%)

B600

Identifier: 1=EL CALL; 2=WP CALL

NC PLC

B601.... Vacant
.B603

NC PLC

B604...
B619

NC PLC

B620.... Vacant
B623

NC PLC

B624.... Vacant
B627

PLC NC

PLC NC

16-byte ASCII string EL name or WP name

D628
D632
D636
D640
D644
D648

Identifier 1, EL CALL
Compensation in X
Compensation in Y
Compensation in Z
Compensation in C
Undersize
Radius

B666

LS max cycle generator (Q150)

NC PLC

B667

LS min cycle generator (Q151)

NC PLC

B668

Power stage number

NR*

E-table PLC

4-63

B669

Low voltage current

LV*

E-table PLC

4-63

B670

High voltage current

HV*

E-table PLC

4-63

B671

Gap voltage

GV*

E-table PLC

4-63

W672

Pulse ON duration

TON*

E-table PLC

4-63

B674

Pulse OFF duration

TOF*

E-table PLC

4-63

B675

Servo sensitivity

SV*

E-table NC

4-63

W676

Auto jump distance

AJD*

E-table PLC

4-63

W678

Erosion time

ET*

E-table PLC

4-63

B680

Arc sensitivity

AR*

E-table PLC

4-63

B681

Polarity electrode 0="+", 1=""

P*

E-table PLC

4-63

W682

High voltage selector

HS*

E-table PLC

4-63

W684

Wear rate [%]

WR*

E-table PLC

4-63

W686

Surface finish

RA*

E-table PLC

4-63

D688

Stock removal

SR*

E-table PLC

4-63

3/2000

TNC416/TNC 406/TNC 306

Identifier 2, WP CALL
Shift in X
Shift in Y
Shift in Z
Rotation in C

List of Bytes, Words and Double Words

611

Word

Function

Transmission

Page

W692

Two-times gap

2G*

E-table PLC

4-63

W694

Minimum undersize

UNS*

E-table PLC

4-63

B696

Auxiliary parameter 1

AUX1*

E-table PLC

4-63

B697

Auxiliary parameter 2

AUX2*

E-table PLC

4-63

B698

Auxiliary parameter 3

AUX3*

E-table PLC

4-63

B699

Auxiliary parameter 4

AUX4*

E-table PLC

4-63

W700

Auxiliary parameter 5

AUX5*

E-table PLC

4-63

W702

Auxiliary parameter 6

AUX6*

E-table PLC

4-63

B703 B747

Bytes reserved for eroding table

W748

Free rotation of a second angular axis


If the 5th axis has also been defined as angle axis (A or B), you
can switch on the free rotation of this axis (behavior is similar
to ROT-C) by loading the PLC ouble word D748 with the speed
value (e.g. 10 000 for 10 rpm). By loading a negative value you
can reverse the direction of rotation.
An M function as with ROT-C is not required.

W750

Reserved

W752

Speed of a non-controlled rotary axis (M03, M04)

PLC NC

4-54

W756

Retraction distance for eroding timer

PLC NC

4-62

W760

First byte to transmit via RS-422/V.11

PLC NC

4-70

W762

Number of bytes to transmit via RS-422/V.11

PLC NC

4-70

W764

Spindle override factor in %

PLC NC

4-54

W766

Feed rate override factor in %

PLC NC

4-54

D768
to
D956

Value from MP4210.0 to MP4210.47

NC PLC

7-14

W960
to
W974

Value from MP4220.0 to MP4220.7

NC PLC

7-16

W976
to
W1006

Value from MP4310.0 to MP4310.15

NC PLC

7-16

W1008
to
W1022

Value from MP4320.0 to MP4320.7

NC PLC

7-16

W1024

Axis releases, bit-coded (5/4/Z/Y/X)

NC PLC

W1026

Axes in position, bit-coded (5/4/Z/Y/X)

NC PLC

W1028

Reserved

W1030

Traverse direction, bit-coded (5/4/Z/Y/X) 0 = positive; 1 =


negative

W1032

Reference marks not yet traversed, bit-coded (5/4/Z/Y/X)

612

TNC416/TNC 406/TNC 306

NC PLC

List of Bytes, Words and Double Words

3/2000

Word

Function

Transmission

W1034

Positive software limit switch was traversed, bit-coded


(5/4/Z/Y/X)

NC PLC

W1036

Negative software limit switch was traversed, bit-coded


(5/4/Z/Y/X)

NC PLC

W1038

Preparing to open the position control loop, bit-coded


(5/4/Z/Y/X)

NC PLC

W1040

Opening the control loop, bit-coded (5/4/Z/Y/X)

NC PLC

W1042

Reserved

W1044

Actual position capture, bit-coded (5/4/Z/Y/X)

NC PLC

W1046

Manual traversing with + direction button, bit-coded (5/4/Z/Y/X)

NC PLC

W1048

Manual traversing with direction button, bit-coded (5/4/Z/Y/X)

NC PLC

W1050

Incremental jog positioning +, bit-coded (5/4/Z/Y/X)

NC PLC

W1052

Incremental jog positioning , bit-coded (5/4/Z/Y/X)

NC PLC

W1054

Reference end position, bit-coded (5/4/Z/Y/X)

NC PLC

W1056

Lubrication pulse. Value from MP4060.x exceeded, bit-coded


(5/4/Z/Y/X)

NC PLC

W1058

Reset the accumulated distance for lubrication, bit-coded


(5/4/Z/Y/X)

NC PLC

W1060

Reserved

W1062

lock Handwheel pulses (bit-coded)

W1064
to
W1098

Reserved

3/2000

TNC416/TNC 406/TNC 306

List of Bytes, Words and Double Words

Page

613

PLC Programming Contents

1
1.1

PLC-functions
Selecting PLC-operation

7-5
7-5

1.2

PLC Main menu

7-6

1.2.1 Editing PLC-programs

7-6

1.2.2 Deleting PLC-programs

7-8

1.2.3 Transferring programs from EPROM

7-8

1.2.4 Translating PLC programs

7-8

1.2.5 Utilization

7-8

1.3

7-9

Test functions for the PLC-program

1.3.1 TRACE function

7-9

1.3.2 TABLE function

7-10

1.3.3 Debug Functions

7-10

1.3.4 Transferring the PLC-program

7-11

2
2.1

7-12
7-12

Program creation
Program structure

2.1.1 Command

7-12

2.1.2 Module technique

7-13

2.2

Address allocation

7-14

2.2.1 Operand directory

7-14

2.2.2 Addressing the word memory

7-14

2.3

Data transfer PLC NC and NC PLC

2.4

Timers and counters

7-15
7-18

2.4.1 Timers

7-18

2.4.2 Counters

7-20

2.5

Edge evaluation of the PLC-inputs

7-21

2.6

EPROM-creation

7-21

2.7

Error-messages

7-23

2.7.1 Syntax errors within a command line

7-23

2.7.2 Syntax errors in the course of a program

7-23

2.7.3 Run-time errors

7-24

3
3.1

7-26
7-26

Commands
Load and Assign Commands

3.1.1 LOAD (L) L

7-26

3.1.2 LOAD NOT (LN) LN

7-28

3.1.3 LOAD TWO'S COMPLEMENT (L) L

7-30

3.1.4 LOAD BYTE (LB) LB

7-31

3.1.5 LOAD WORD (LW) LW

7-31

3.1.6 LOAD DOUBLEWORD (LD) LD

7-31

3.1.7 ASSIGN (=) =

7-33

3.1.8 ASSIGN BYTE (B=) B=

7-35

3/2000

TNC 416/TNC 406/TNC 306

PLC-functions

7-1

3.1.9 ASSIGN WORD (W=) W=

7-35

3.1.10 ASSIGN DOUBLEWORD (D=) D=

7-35

3.1.11 ASSIGN NOT (=N)

7-36

3.1.12 ASSIGN TWO'S COMPLEMENT (= -)

7-36

3.2

Set-commands

7-38

3.2.1 SET (S) S

7-38

3.2.2 RESET (R) R

7-39

3.2.3 SET NOT (SN) SN

7-40

3.2.4 RESET NOT (RN) RN

7-41

3.3

Logic Gates

7-43

3.3.1 AND (A) A

7-43

3.3.2 AND NOT (AN) A

7-45

3.3.3 OR (O)

7-47

3.3.4 OR NOT (ON)

7-49

3.3.5 EXCLUSIVE OR (XO)

7-51

3.3.6 EXCLUSIVE OR NOT (XON) XON

7-53

3.4

7-56

Arithmetic commands

3.4.1 ADDITION (+) +

7-56

3.4.2 SUBTRACTION ()

7-57

3.4.3 MULTIPLICATION (x) x

7-58

3.4.4 DIVISION (/) /

7-59

3.4.5 REMAINDER (MOD) MOD

7-60

3.5

Comparisons

7-62

3.5.1 EQUAL TO (==) ==

7-62

3.5.2 LESS THAN (<) <

7-63

3.5.3 GREATER THAN (>) >

7-64

3.5.4 LESS THAN OR EQUAL TO (<=) <=

7-65

3.5.5 GREATER THAN OR EQUAL TO (>=)

7-66

3.5.6 UNEQUAL (<>)<


3.6

>

Parentheses with logical gating

7-67
7-69

3.6.1 AND [ ] (A[ ]) A[ ]

7-69

3.6.2 AND NOT [ ] (AN[ ]) AN[ ]

7-69

3.6.3 OR [ ] (O[ ]) O[ ]

7-69

3.6.4 OR NOT [ ] (ON[ ]) ON[ ]

7-69

3.6.5 EXCLUSIVE OR [ ] (XO[ ]) XO[ ]

7-70

3.6.6 EXCLUSIVE OR NOT [ ] (XON[ ]) XON[ ]

7-70

3.7

7-73

Parentheses with arithmetic commands

3.7.1 ADDITION [ ] (+[ ]) + [ ]

7-73

3.7.2 SUBTRACTION [ ] ([ ]) [ ]

7-73

3.7.3 MULTIPLICATION [ ] (x[ ]) X [ ]

7-73

3.7.4 DIVISION [ ] (/[ ]) / [ ]

7-73

3.7.5 REMAINDER [ ] (MOD[ ]) MOD [ ]

7-74

3.7.6 INCREMENT (INC)

7-76

3.7.7 DECREMENT (DEC)

7-76

7-2

TNC 416/TNC 406/TNC 306

PLC-functions

3/2000

3.8

Parentheses with comparison commands

7-77

3.8.1 EQUAL TO [ ] (==[ ]) (== [ ]

7-77

3.8.2 LESS THAN [ ] (<[ ]) < [ ]

7-77

3.8.3 GREATER THAN [ ] (>[ ])> [ ]

7-77

3.8.4 LESS THAN OR EQUAL TO [ ] (<=[ ]) <= [ ]

7-77

3.8.5 GREATER THAN OR EQUAL TOL[ ] (>=[ ]) >= [ ]

7-78

3.8.6 NOT EQUAL TO [ ] (<>[ ]) <> [ ]

7-78

3.9

Shift Commands

7-81

3.9.1 SHIFT LEFT (<<) <<

7-81

3.9.2 SHIFT RIGHT (>>) >>

7-82

3.10

Bit commands

7-84

3.10.1 BIT SET (BS, BSX) BS

7-84

3.10.2 BIT RESET (BC, BCX) BC

7-85

3.10.3 BIT TEST (BT, BTX) BT

7-86

3.11

Stack operations

7-88

3.11.1 Load data onto Data Stack (PS)PS

7-88

3.11.2 Pull data from Data Stack (PL)

7-89

3.11.3 Load logic accumulator onto Data Stack (PSL) PSL

7-89

3.11.4 Load word accumulator onto Data Stack (PSW) P

SW

7-90

3.11.5 Pull logic accumulator from Data Stack (PLL) PLL

7-90

3.11.6 Pull word accumulator from Data Stack (PLW)

7-90

3.12

Jump commands

7-93

3.12.1 Unconditional jump (JP) JP

7-93

3.12.2 Jump if Logic Accumulator = 1 (JPT)


3.12.3 Jump if Logic Accumulator = 0 (JPF) J
3.12.4 Call Module (CM) CM

7-93
PF

7-93
7-95

3.12.5 Call Module if Logic Accumulator = 1 (CMT) CMT

7-95

3.12.6 Call Module if Logic Accumulator = 0 (CMF) CMF

7-95

3.12.7 End of Module, Program End (EM) EM

7-97

3.12.8 Jump Label (LBL) LBL

7-97

3.12.9 End of Module if Logic Accumulator = 1 (EMT)

7-97

3.12.10 End of Module if Logic Accumulator = 0 (EMF)

7-97

3.13

CASE statement

7-99

3.13.1 Indexed call module (CASE) CASE

7-99

3.13.2 End indexed call module (ENDC) ENDC


3.14

Commands for STRING Execution

7-99
7-100

3.14.1 LOAD (L)

7-101

3.14.2 ADD (+)

7-102

3.14.3 Storing a STRING (=)

7-102

3.14.4 Overwriting of a STRING (OVWR)

7-103

3.15

7-104

Submit Programs

3.15.1 Call up of the Submit Program (SUBM)

7-104

3.15.2 Status Interrogation of a Submit Program (RPLY)

7-105

3.15.3 Cancellation of a Submit Program (CAN)

7-105

3/2000

TNC 416/TNC 406/TNC 306

PLC-functions

7-3

3.16

INDEX-Register

7-108

3.17

Program Structures

7-109

3.17.1 IF ... ELSE ... ENDI Structure

7-109

3.17.2 REPEAT ... UNTIL Structure

7-110

3.17.3 WHILE ... ENDW Structure

7-110

4
4.1

PLC Modules for TNC 416/406


Copy in Marker or Word Range (Module 9000/9001)

7-111
7-111

4.2

Read Edges of PLC Inputs (Module 9004)

7-112

4.3

Read in Word Range (Module 9010/9011/9012)

7-113

4.4

Write in Word Range (Module 9020/9021/9022)

7-114

4.5

Read Machine Parameter (Module 9032)

7-115

4.6

Number Conversion binary to ASCII (Module 9051)

7-115

4.7

Compute string length (Module 9071)

7-116

4.8

Transmit String buffer to Log buffer (Module 9079)

7-117

4.9

Delete PLC Window (Module 9080)

7-117

4.10

Interrogate PLC Window (Module 9081)

7-117

4.11

Display String (Module 9082)

7-118

4.12

Display Bar Chart (Module 9083)

7-120

4.13

Reading the axis coordinates (Module 9040)

7-121

4.14

PLC Positioning (Module 9221)

7-122

7-4

TNC 416/TNC 406/TNC 306

PLC-functions

3/2000

1 PLC-functions
The integrated PLC in the TNC 406 and TNC 306 contains its own text editor for creating the list of
instructions for the PLC-program. Commands and comments are entered via the ASCII-keyboard on
the control panel of the TNC 406 or the keyboard of the TNC 306 (see Section "Programming and
editing-files").
The functions TRACE and TABLE, as well as a syntax check on entering the PLC commands and a
logical test with the Function COMPILE can make it easier to find faults in the PLC-program (see
section "Test functions").
8 ms are available for a PLC-run. Up to 4000 logic commands, equivalent to 32 Kbytes, can be
processed within this period (executable memory). A new PLC-run commences every 40 ms/20 ms
(depending on MP1700), i.e. every 40 ms/20 ms the inputs are read and outputs are set.
The following section shows how to start PLC-operation.

1.1

Selecting PLC-operation

PLC-operation covers all functions for creating and testing the PLC-programs.
It can be selected as follows, using code number 807 667.
Select NC operating-mode
"Programming and editing"

Press MOD
key

TNC 306: Enter code number 807 667


NC 406: Press soft key key code
and enter code number 807 667

TNC 306: ENT key

PLC-operation is selected
(Main menu)

PLC-operation can be stopped by pressing END

3/2000

TNC 416/TNC 406/TNC 306

PLC-functions

7-5

1.2

PLC Main menu

TNC 406
PROCESSING TIME

MAXIMUM:
CURRENT:

TOTAL MEMORY
VACANT MEMORY

:
:

XX KBYTE
XX KBYTE

CODE LENGTH

XX KBYTE

Select PLC
editing
mode

Select
tables
M/I/O/T/C
/B/W/D

Select TRACE
mode

Compile PLC
program

XXX%
XXX%

Copy from
EPROM to
RAM

Erase PLC
Program

Quit PLC
Mode

TNC 306
ERASE PLC PROGRAM
TRANSFER PROGRAM FROM EPROM
PLC EDITING MODE
PLC PROGRAM TRACE MODE
TABLES M/I/O/C/T/B/W/D
TRANSLATE PLC PROGRAM
UTILIZATION/MEMORY
Select the desired mode with the cursor keys and and activate by pressing ENT.
To exit the menu and return to the previous NC mode, press END again.

1.2.1 Editing PLC-programs


In the operating mode PLC EDITING MODE (TNC 406 Soft key EDIT) an instruction list can be edited
via TNC keyboard.
The keys of the TNC 306 assume new assignments, which are indicated on a special tactile
membrane that is place over the TNC keyboard. The tactile membrane is included with this
Technical Manual. Before editing a new program, it is necessary to reserve memory in the
UTILIZATION/ MEMORY mode.
After the ENT key is pressed, the editor identifies itself with
"0

EM"

"0" stands for program line 0 and "EM" for End of Module.
When entering an instruction, "EM" automatically moves downward by one line.
The PLC editing mode can be exited by pressing the END key/ soft key.

7-6

TNC 416/TNC 406/TNC 306

PLC-functions

3/2000

A complete instruction list comprises:


.Line numbers
.Command from command store (see Section "Commands")
.Operand type
.Operand number
.Comment
The line number is automatically generated on entering a command.
The command, operand type, operand number and the comment must be transferred with ENT. The
cursor then jumps to the next positions within the instruction. The instruction is completed after the
comments are entered. If no comment is to be entered, the position is simply concluded the ENT.
Lines that are to contain only a comment should be started with a semicolon (;) instead of a
command. A comment can therefore cover several lines if each line commences with ";". A line
contains a maximum of 26 characters for the comment and may include all numeral, letters and
other characters on the keyboard.

A "find function" makes is easier to find certain operands.


If you wish to find a certain marker in the program listing, use the arrow keys to move the cursor to
a marker and press GOTO. Enter the number of the desired marker. Then press ENT to find the
marker.
Key assignments for the TNC 306 PLC editor

+
_

*
/

[
]

DEL

EXT

<
=

MOD

>

ENT

GOTO

NO
ENT

+/

CE

W
<
=

>

END

DEL

EXT

MOD

ENT

+/

CE

END

GOTO

J
O

K
P

L
Q

M
R

TE 355A

3/2000

A
NO
ENT

TE 355B

TNC 416/TNC 406/TNC 306

PLC-functions

7-7

1.2.2 Deleting PLC-programs


With the soft key DELETE (TNC406) or in the operating mode ERASE PLC PROGRAM (TNC 306), a
PLC program located in RAM can be deleted.
The entire RAM memory can be deleted by entering the code number 53 12 10

1.2.3 Transferring programs from EPROM


With the soft key COPY ROM RAM (TNC406) or in the operating mode TRANSFER PROGRAM
FROM EPROM (TNC 306), a program that is stored in the EPROM can be copied into the RAM (see
also MP 4010).

1.2.4 Translating PLC programs


A PLC program created with the PLC editor and stored in RAM must first be compiled by pressing
the soft key COMPILE (TNC406) or in the mode TRANSLATE PLC PROGRAM (TNC 306) before it
can be tested.
If a PLC program is already in the RAM prior to TNC switch-on, it is automatically translated.
Errors in the program can be found during the translation run (see Section "Program creation", "Error
messages").

1.2.5 Utilization
In the main menu (TNC 406) or in the mode UTILIZATION (TNC 306) the occupied PLC processing
time and the vacant PLC memory are displayed.
The vacant memory is derived from the total (reserved) memory and the occupied memory.
The vacant PLC memory is displayed in bytes.
100% processing time corresponds to 5 ms (TNC 406) or 4 ms (TNC 306). The maximum possible
processing time is 10 ms (TNC 406) or 8 ms (TNC 306). The current processing time indicates the
duration of the last PLC scan. If the current processing time exceeds the maximum, the blinking
error message ERROR IN PLC PROGRAM 53 will appear.
TNC 306:
Please note that the processing time increases by 20% during RS-232 data transfer and by 5%
during handwheel operation. A PLC program should therefore be tested during data transfer or
handwheel operation.

7-8

TNC 416/TNC 406/TNC 306

PLC-functions

3/2000

1.3

Test functions for the PLC-program

1.3.1 TRACE function


The TRACE function makes it possible to check the logical states of the markers, inputs, outputs,
timers and counters.
If this function is selected, the following menu appears:
TNC 406

TNC 306
SELECT I/O/C/T/M
DISPLAY TRACE BUFFER
START TRACE
END TRACE

SELECT I/O/C/T/M
Those inputs (I), outputs (O), counters (C), timers (T) or markers (M) whose logical states are to be
checked can be entered into a table in the SELECT I/O/C/T/M function. A maximum of 16 markers,
timers etc. can be simultaneously verified. Each position is interrogated via dialog. Erroneous entries
can be deleted by pressing DEL.
The memory for the trace mode (TRACE BUFFER) has space for 1024 individual states per operand,
i.e. 1024 PLC processes are recorded. In order to record the required time duration of the user, a
TRIGGER condition can be entered for each operand:
"1" = Recording when operand is logically "1"
"0" = Recording when operand is logically "0"
If the trigger position is verified with the NOENT key, it means that a trigger condition is not
required. 512 states are recorded before and after a trigger event. The trigger event is regarded as
fulfilled only when the conditions for all operands are simultaneously fulfilled with TRIGGER.
Example:

M2618 1
M2780 0
M2781 1
I5
Trigger event:

M2618 logical "1"


M2780 logical "0"
M2781 logical "1"
The state of I5 has no significance for the trigger event: it is, however, recorded.

If no trigger condition is entered for the operands, the states of the operands are continually
recorded and, after ending the trace mode, the last 1024 states are displayed.
To exit the SELECT I/O/C/T/M function, press END.

3/2000

TNC 416/TNC 406/TNC 306

PLC-functions

7-9

DISPLAY TRACE BUFFER


In the TNC 406 the trace buffer is immediately shown after the soft key TRACE is pressed.
With the function DISPLAY TRACE BUFFER (TNC 306) the logic states 0 or 1 of the selected
operands are graphically displayed in a diagram. With simultaneous triggering, the counter is reset to
0 (upper left in screen). By using the cursor keys and (TNC 306) or the soft keys PAGE (TNC
406),
512 logic states before and after the trigger event can be observed.
This can be used to determine, for example, whether a marker, output etc. was set too late or too
early. Taking the PLC processing time of 40 ms into account, a time displacement in ms can be
detected.

START TRACE
With this mode, TRACE is started. Until the trigger event occurs, the display PCTR blinks in the
status field. When the trigger event occurs, PCTR is on, and after the trace is stored, the display
goes out.
If marker M2622 is set the display COLL (TNC 306) or a symbol for a electrode (TNC 406) blinks.
END TRACE / STOP TRACE
If the trigger event does not occur, the trace can be aborted with the END TRACE or STOP TRACE
function. In this case, the last 1024 states of the selected operands are stored.

1.3.2 TABLE function


In the TABLE function the states of inputs (I), outputs (O), counters (C), timers (T), markers (M),
bytes (B), words (W) and double words (D) can be dynamically displayed on the screen.
The individual tables for inputs, outputs, etc. are selected with the corresponding letter (TNC 306), or
with a soft key (TNC 406).
The desired operand number is selected with the cursor keys.
The operands I/O/C/T/M can be changed with Set (S) or Reset (R), and in the TNC 406 Bytes (B),
Words (W) and Double words (D) can be overwrite, provided they are not defined through the PLC
program.
Bytes (B), Words (W) and Double words (D) can be displayed in HEX or in DECIMAL.

1.3.3 Debug Functions


This Debug function can be activated only on the TNC 406! Double words D308/D312/D316 make it
possible to display any memory area of the PLC in the PLC status window in up to three lines. The
values are hexadecimal coded. The function is activated by entering the starting address of the
marker area to be tested in D308/D312/D316. With K+0 in D308/D312/D316 the function is made
inactive. Byte markers appear as 80..FF with Marker =1, and 00..7F with Marker = 0.

7-10

TNC 416/TNC 406/TNC 306

PLC-functions

3/2000

Base addresses of the individual areas:


Bit Marker M:
Input I:
Output O:
-34224
Counter C:
-34032
Timer T:
Word Marker B/W/D:

-37888
-34608

($FFFF6C00)

-33888
-33792

Example for the display of 12 markers starting with M2616:


L K-37888
+ K+2616
= D308
Example for the display of 12 bytes starting with B668:
L K-33792
+ K+668
= D312

1.3.4 Transferring the PLC-program


Data transmission can be activated with the EXT key from the main menu.
The following menu appears:
READ-IN SELECTED PROGRAM
OUTPUT ASCII
OUTPUT ASCII UNFORMATTED
OUTPUT ASCII WITH CROSS-REF.
BINARY OUTPUT
PLC programs written on a computer can be transferred into the PLC RAM with the RS-232-C
interface. To load a program, select READ IN SELECTED PROGRAM. It is not necessary to reserve
memory in the RAM when you transfer a PLC-program via RS-232-C.
With the OUTPUT ASCII function the PLC program can be transferred from the RAM to an external
device. It can be transferred with the cross references of all its operands.
It is also possible to transfer the program in unformatted or binary form by selecting the
corresponding menu items (see Section "Program creation", "EPROM creation").

3/2000

TNC 416/TNC 406/TNC 306

PLC-functions

7-11

2 Program creation
The PLC program can be created directly on HEIDENHAIN contouring controls. For this purpose, the
PLC editor must be called with code number 807 667 (see Section "PLC-functions").
The PLC program can also be written with a special HEIDENHAIN compiler software (PLC.EXE).

2.1

Program structure

2.1.1 Command
A command is the smallest unit in a PLC-program. It consists of the operation and the operand.
A

Operation

Operand
designation
(I, O, M, T, C,
B, W, D, K)

(A, AN...)

28

;Comment

Operand
address;
constant value

Operand

The operation describes the function which is to be performed on the operand.


The operand indicates what is to be operated on. It consists of the operand abbreviation and a
parameter (address). Register and memory contents can be gated, erased and loaded by using PLCcommands.
Both Bit- and Word-processing are possible. In Word-processing it is possible to address memory
contents with a length of 8 Bits (Byte), 16 Bits (Word) or 32 Bits (Double word) (see Section
"Commands").

7-12

TNC 416/TNC 406/TNC 306

Program creation

3/2000

2.1.2 Module technique


It is good practice to make the maintenance of the PLC-programs easier by creating the program
with the most transparent structure possible. This can be best achieved by dividing the PLC-program
into individual Modules (structured programming).
Only the most important PLC-functions should be programmed in the main routine.
Individual PLC-functions such as M-function evaluation are programmed in their own Modules.
0
1
2
3
4
5

L M2719
SN M2719
L M2497
SN M2497
L M2496
SN M2496

.
.
20
21
22
23
.
.
.
95
122
.
.
125
.
.
.
151
152
153
154
.
.
.
220
.
.
.225
.
.

.
.
L M1936
A M2045
AN M2618
CMT 36
.
.
.
EM
LBL 101
.
.
EM
.
.
.
LBL 36
CM 361
CM 101
EM
.
.
.
LBL 361
.
.
EM
.
.

;Activate the strobes for word processing


;Activate the edge evaluation
;Activate transfer of decoded M-codes
;(M1900 to M1999)
.
.
;M-Function M36
;Change-signal for M-function
;Gap control already active?
;Gap control
.
.
.
;End main program
;Acknowledgment for M function
.
.
.
.
.
;Gap control
;Eroding ON
Acknowledgment for M functions
.
.
.
.
;Eroding ON
.
.
.
.

Error conditions in the machine should be interrogated in the PLC-program and a plain language error
message should be displayed on the screen. See Chapter "Machine integration", Section "Display
and operation" and Chapter "PLC-programming", Section "Modules".

3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-13

2.2

Address allocation

2.2.1 Operand directory


Operand

Abbreviation

Address range

Marker
Input

M (Marker)
I (Input)

Output

O (Output)

Counter

C (Counter)

Timer

T (Timer)

Byte
Word
Double word
Constant

B (Byte)
W (Word)
D (Double word)
K

0 to 3263
I0 to I31; I128 to I151;
I64 to I126 (PL 400) or up to I127 (PL 410)
O0 to O30;
O32 to O62(PL 400/PL 410)
Set counter : C0 to C31
Counter-contents: C48 to C79
Release count pulse: C96 to C127
Timer-start: T0 to T47
Timer running: T48 to T95
0 to 1023 (8 Bit)
0 to 1022 (16 Bit)
0 to 1020 (32 Bit)
2 147 483 647 to + 2 147 483 647

2.2.2 Addressing the word memory


The memory for the operands B (8 bits), W (16 bits), D (32 bits) is only 8 bits wide. Since the
operands can be 8,16 or 32 bits wide, an overlap of the memory areas will occur, which must be
taken into account in addressing the memory.
8 bit
D0

W0
W2

D4

W4

..
.

..
.

D1020

W1020
..
.
W1022

B0
B1
B2
B3
B4
B5

High-Byte for W; Highest-Byte for D


Low-Byte for W
Lowest-Byte for D

..
.
B1020
B1021
B1022
B1023

In byte addressing every address from 0 to 1023 is accessible. In word addressing, every second
address from 0 to 1022 is accessible and in double word addressing every fourth from 0 to 1020.
The address parameter gives the High byte for a word Address (W) , or the Highest byte for a double
word address (D).
Markers M1000 to M2000 and bytes B0 to B127 are non-volatile, i.e. the contents of this memory
are not lost when the power supply is switched off.

7-14

TNC 416/TNC 406/TNC 306

Program creation

3/2000

B0 to B127
B128 to B255
B256 to B511
B512 to B767
B768 to B1023

2.3

Freely available, not deleted with RESET


Freely available, deleted with RESET
Data transfer NC PLC
Data transfer PLC NC
Machine parameters PLC

Data transfer PLC NC and NC PLC

PLC NC
The Q parameters Q100 to Q107 transfer numbers from the PLC to the part program. This means
that Q100 to Q107 can be overwritten by the PLC. The numerical value is registered in Double word
D528 and the Q parameter numbers 0 to 7 are defined in Word W516. The numbers 0 to 7
correspond to parameters Q100 to Q107. The transfer is activated with the strobe marker M2713,
which must be set with the next M/S/T strobe.
Marker

Function

Set

Reset

M2713

Activate the transfer of the value from D528


to the Q-Parameter defined in W516

PLC

NC

Address

Function
Double word with multiple function, here data for transfer from the
PLC to the NC
Q-Parameter No. for numerical transfer from PLC to NC
(0 7 = Q100 Q107)

D 528
W516

NC PLC
Various machine parameters are reserved for data transfer in the PLC. These machine parameters
are kept in the Double words D768 to D956 and the Words W960 to W974 and W976 to W1006.
PLC-positioning, datum-shifts, feed rates for PLC-positioning or coding for the release of certain
PLC-functions etc. can be filed in these machine parameters. The eroding parameters are still
available, which, depending on whether they are defined as Q parameters in the NC program or with
a table, are transferred by the NC or E-table into the PLC. The evaluation of all numerical values
transferred to the PLC takes place in the PLC program. (See chapter "Machine integration", section
"Eroding parameters.")
Address
D768
D772
D776
D780
D784
D788

3/2000

Function
Value from MP4210.0
Value from MP4210.1
Value from MP4210.2
Value from MP4210.3
Value from MP4210.4
Value from MP4210.5

TNC 416/TNC 406/TNC 306

Program creation

7-15

Address
D792
D796
D800
D804
D808

Function
Value from MP4210.6
Value from MP4210.7
Value from MP4210.8
Value from MP4210.9
Value from MP4210.10

D812
D816
D820
D824
D828

Value from MP4210.11


Value from MP4210.12
Value from MP4210.13
Value from MP4210.14
Value from MP4210.15

D832
D836
D840
D844
D848

Value from MP4210.16


Value from MP4210.17
Value from MP4210.18
Value from MP4210.19
Value from MP4210.20

D852
D856
D860
D864
D868

Value from MP4210.21


Value from MP4210.22
Value from MP4210.23
Value from MP4210.24
Value from MP4210.25

D872
D876
D880
D884
D888

Value from MP4210.26


Value from MP4210.27
Value from MP4210.28
Value from MP4210.29
Value from MP4210.30

D892
D896
D900
D904
D908

Value from MP4210.31


Value from MP4210.32
Value from MP4210.33
Value from MP4210.34
Value from MP4210.35

D912
D916
D920
D924
D928

Value from MP4210.36


Value from MP4210.37
Value from MP4210.38
Value from MP4210.39
Value from MP4210.40

D932
D936
D940
D944
D948

Value from MP4210.41


Value from MP4210.42
Value from MP4210.43
Value from MP4210.44
Value from MP4210.45

D952
D956

Value from MP4210.46


Value from MP4210.47

7-16

TNC 416/TNC 406/TNC 306

Program creation

3/2000

Address
W960
W962
W964
W966
W968

Function
Value from MP 4220.0
Value from MP 4220.1
Value from MP 4220.2
Value from MP 4220.3
Value from MP 4220.4

W970
W972
W974
W976
W978

Value from MP 4220.5


Value from MP 4220.6
Value from MP 4220.7
Value from MP 4310.0
Value from MP 4310.1

W980
W982
W984
W986
W988

Value from MP 4310.2


Value from MP 4310.3
Value from MP 4310.4
Value from MP 4310.5
Value from MP 4310.6

W990
W992
W994
W996
W998

Value from MP 4310.7


Value from MP 4310.8
Value from MP 4310.9
Value from MP 4310.10
Value from MP 4310.11

W1000
W1002
W1004
W1006
W1008

Value from MP 4310.12


Value from MP 4310.13
Value from MP 4310.14
Value from MP 4310.15
Value from MP 4320.0

W1010
W1012
W1014
W1016
W1018

Value from MP 4320.1


Value from MP 4320.2
Value from MP 4320.3
Value from MP 4320.4
Value from MP 4320.5

W1020
W1022

Value from MP 4320.6


Value from MP 4320.7

MP4210.0
to MP4210.47

Set a number in the PLC


Input range: 99 999.999 to +99 999.999

MP4220
to MP4220.7

Set a number in the PLC: In the Word range W960 to W974


Input range: 80 to 30 000

MP4310.0
to MP4310.15
and
MP4320.0
to
MP4320.7

Set a number in the PLC: in the Word range W976 to W1022


Input range: 0 to 65 535

3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-17

2.4

Timers and counters

2.4.1 Timers
There are 48 timers available in the PLC. These timers are controlled by special markers with the
symbol T. The time period for the timers is defined in the machine parameter MP4110.X. The time
unit corresponds to the PLC cycle time.
The timers are started by setting markers T0 to T47 which also sets them to the value from
MP4110.X. This activation may only be performed for a single PLC run, as otherwise the timers will
be restarted upon every succeeding run.
The markers T48 to T95 (timer running) will remain set for the period defined in the machine
parameters.

Example:
Start of Timer 1
Period in MP4110.1 = 9 (PLC-cycles)

T1
T49

7-18

TNC 416/TNC 406/TNC 306

Program creation

3/2000

Timer start
T0
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
T15
T16
T17
T18
T19
T20
T21
T22
T23
T24
T25
T26
T27
T28
T29
T30
T31
T32
T33
T34
T35
T36
T37
T38
T39
T40
T41
T42
T43
T44
T45
T46
T47

Timer running
T48
T49
T50
T51
T52
T53
T54
T55
T56
T57
T58
T59
T60
T61
T62
T63
T64
T65
T66
T67
T68
T69
T70
T71
T72
T73
T74
T75
T76
T77
T78
T79
T80
T81
T82
T83
T84
T85
T86
T87
T88
T89
T90
T91
T92
T93
T94
T95

MP4110.x

Time for timers


Input range: 0 to 65 535 [PLC cycles] (= 20/40 ms depending on MP1700)

3/2000

Machine parameter
MP4110.0
MP4110.1
MP4110.2
MP4110.3
MP4110.4
MP4110.5
MP4110.6
MP4110.7
MP4110.8
MP4110.9
MP4110.10
MP4110.11
MP4110.12
MP4110.13
MP4110.14
MP4110.15
MP4110.16
MP4110.17
MP4110.18
MP4110.19
MP4110.20
MP4110.21
MP4110.22
MP4110.23
MP4110.24
MP4110.25
MP4110.26
MP4110.27
MP4110.28
MP4110.29
MP4110.30
MP4110.31
MP4110.32
MP4110.33
MP4110.34
MP4110.35
MP4110.36
MP4110.37
MP4110.38
MP4110.39
MP4110.40
MP4110.41
MP4110.42
MP4110.43
MP4110.44
MP4110.45
MP4110.46
MP4110.47

TNC 416/TNC 406/TNC 306

Program creation

7-19

2.4.2 Counters
There are 32 counters available in the PLC. Each of these counters is controlled by special markers
with the symbol C. After setting a marker from the range C0 to C31 the counter is loaded with the
value from machine parameter MP4120.X. The marker range C48 to C79 indicates whether the
count has been completed or not. The marker range C96 to C127 is used to start the counter
(counter release pulse).
Example:

Logic diagram for counter C1


Contents of machine parameter MP4120.1 = 10 (PLC cycles)

C1
C49
C97
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
C11
C12
C13
C14
C15
C16
C17
C18
C19
C20
C21
C22
C23
C24
C25
C26
C27
C28
C29
C30
C31

7-20

C48
C49
C50
C51
C52
C53
C54
C55
C56
C57
C58
C59
C60
C61
C62
C63
C64
C65
C66
C67
C68
C69
C70
C71
C72
C73
C74
C75
C76
C77
C78
C79

TNC 416/TNC 406/TNC 306

C96
C97
C98
C99
C100
C101
C102
C103
C104
C105
C106
C107
C108
C109
C110
C111
C112
C113
C114
C115
C116
C117
C118
C119
C120
C121
C122
C123
C124
C125
C126
C127

Program creation

MP4120.0
MP4120.1
MP4120.2
MP4120.3
MP4120.4
MP4120.5
MP4120.6
MP4120.7
MP4120.8
MP4120.9
MP4120.10
MP4120.11
MP4120.12
MP4120.13
MP4120.14
MP4120.15
MP4120.16
MP4120.17
MP4120.18
MP4120.19
MP4120.20
MP4120.21
MP4120.22
MP4120.23
MP4120.24
MP4120.25
MP4120.26
MP4120.27
MP4120.28
MP4120.29
MP4120.30
MP4120.31

3/2000

MP4120.x

2.5

Pre-set value for counters C0 to C31


Input range: 0 to 65 535 [PLC cycles]

Edge evaluation of the PLC-inputs

The edge evaluation for the PLC-inputs can be activated by marker M2497. Edge evaluation means
that if the signal at the PLC-input changes, a certain marker will be set for the duration of one PLCrun. If marker M2497 is set, the following markers will be set if the signals change at the PLCinputs.
Marker for rising edges at the PLC-inputs:
Marker
M1500 to M1531
M1564 to M1626
M1628 to M1651

PLC-inputs
I0 to I31
I64 to I126 (PL 400) or I127 (PL410)
I128 to I151

Marker for falling edges at the PLC-inputs:


Marker
M1700 to M1731
M1764 to M1826
M1828 to M1851

Marker
M2497

2.6

PLC-inputs
I0 to I31
I64 to I126 (PL 400) or I127 (PL410)
I128 to I151

Function
Activate the edge evaluation for PLC-inputs
Rising-edge marker M1500 to M1651
Falling-edge marker M1700 to M1851

Set
PLC

Reset
PLC

EPROM-creation

Once the PLC program has been written and tested in the TNC 406 or TNC 306 it can then be
transferred in binary code to the PC via RS-232-C serial port (Motorola EXORMAX S3 Record
format).
This binary code is needed to create EPROMs with the MEGA-PROMMER software (version 2.12 or
higher). The TNC 306 must be equipped with 1-MB EPROMs, and the TNC 406 (beginning with
version 280 62x 03) with 2-MB EPROMs.
Starting with software version 280 62x 03 (code number for PLC chip is $0002, previously $0000 as
on the TNC 306) the output of the TNC 406 will be in a new binary format. This format cannot be
read by older software versions.
With binary output from the TNC 406, the machine parameters and the compensation value table
will be automatically transferred. The erosion parameter tables and OEM cycles must be confirmed
individually with the ENT key. A transfer in progress can be interrupted with the END
key.

3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-21

During commissioning of the control the machine parameters and the compensation table can be
transferred to the RAM memory with the COPY ROMRAM soft key (only with TNC 406). They
become active the next time the control is started.
The PLC program can also be transferred to the RAM memory with the COPY ROMRAM soft key
(on TNC 406) or the TRANSFER PROGRAM FROM EPROM soft key (on TNC 306).
Machine parameter MP4010 selects whether the PLC program is run from the RAM area of the
control or the EPROM area.
During the creation and test of the PLC program the control should operate from the RAM area.
HEIDENHAIN recommends that an EPROM is created for the PLC-program before delivering the
machine to the customer (see also Chapter "Introduction").

MP4010

PLC program from RAM or from EPROM


Input: 0 or 1
0 = EPROM operation
1 = RAM operation

Please contact your HEIDENHAIN customer service representative if you have any questions.

7-22

TNC 416/TNC 406/TNC 306

Program creation

3/2000

2.7

Error-messages

Error messages aid the programmer in creating the instruction list and testing of the program.

2.7.1 Syntax errors within a command line


These errors may occur when editing a line or on reading it in via the interface.
0
1
2
4
5
6

No valid command.
Operand for jump is not a Label. (Can only happen when reading in via the interface.
For a Jump command a type abbreviation is available for the Operand).
Invalid Operand-type (the command cannot be combined with this Operand).
Operand outside the permissible range (the stated number is too high, or odd address for
Word or Double word).
No limiter after command. (Can only happen when reading in via the interface. The comment
after the command was not designated by ";" or "*").
Line end not found (Can only happen when reading in via the interface. Comment too long).

2.7.2 Syntax errors in the course of a program


These errors are recognized during the compilation process. The Editor points to the line where the
error was found. If the PLC-program is compiled on switching-on (for example, because the control
was switched off immediately after editing the PLC-program) then a flashing message "ERROR IN
PLC-PROGRAM" will be displayed. Remedy: switch off and on again, and call the PLC-Editor with
the code-number. The Editor indicates the position of the error.
7
8
9
10
11
12
13
14
15
16
17
18
19

Called Label has not been defined.


No End-program condition found (the program does not contain an EM instruction, or it
contains a JP-instruction without a following LBL-instruction).
Program is too long (RAM-overflow) (insufficient memory for the program code which is to be
generated).
Assign within parentheses (an =, S, SN, R, RN, or PS-instruction or a Jump-command has
been programmed, although arithmetic parentheses are open).
Excessive nesting of parentheses (more than 16 parentheses successively opened).
Jump within a gating sequence (an unconditional jump has been programmed, although the
gating sequence was not closed with an Assign ).
"Close-parentheses" without "open-parentheses" (a "close-parentheses" command was
programmed, although no parentheses were open).
Label within parentheses (a LBL-instruction has been programmed, although parentheses are
open).
Label within a gating sequence (a LBL-instruction has been programmed, although the
previous gating was not closed with an Assign).
Jump within parentheses (a jump instruction has been programmed, although parentheses
are open).
Parentheses open at end of block (an EM-instruction has been programmed, although
parentheses are open).
Label defined twice.
Word Assign missing (a Logic-instruction has been programmed, although the previous Wordgating was not closed with an Assign).

3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-23

20
21
22
23

24

25
26
27
28
29
30

31

32

Logic Assign missing (a Word-instruction has been programmed, although the previous Logicgating was not closed with an Assign)
Word Accumulator not loaded (a Word Assign or gating has been programmed, although the
Word Accumulator does not contain a definite value).
Logic-Accumulator not loaded (a Logic Assign has been programmed, although the Logic
Accumulator does not contain a definite value).
Accumulators not loaded on "open-parentheses" (an A[, AN[, O[, ON[, or XON[ command has
been programmed, although neither the Word- nor the Logic Accumulator has been gated or
loaded).
Incorrect type of the parentheses result (a different type has been calculated in the
parentheses from that which was defined at the "open-parentheses" command, i.e. Logic
instead of Word or vice versa).
Conditional jump with incorrect Logic Accumulator (a conditional jump has been programmed,
although the Logic Accumulator does not contain a definite value).
Empty CASE-instruction.
"END-CASE" missing.
Too many table entries in CASE
A CASE table with more than 128 entries has been programmed
Blank CASE instruction
A CASE instruction has been programmed followed immediately by an ENDC label
String accumulator not loaded
A command has been programmed which gates, assigns or manipulates the already loaded
string accumulator even though the accumulator was not previously loaded.
String instruction within parentheses
A string instruction has been programmed within parentheses even though string gates
cannot be nested with parentheses
No string assignment
A new gating chain has started without assigning the gating result previously formed in the
string accumulator

2.7.3 Run-time errors


These errors only appear when the PLC-program is executed. A flashing error-message "ERROR IN
PLC-PROGRAM NR" is displayed. After switching the control off and on again, the Editor can be
accessed by using the code number. The message INPUT ERROR is then displayed and the
Editor stands at the erroneous line or, if the program run-time has been exceeded, at the jump
instruction which was last processed.
50
51
52
53
54

7-24

Excessive nesting (too many modules nested inside one another).


STACK underflow (an attempt was made to acquire data from the STACK, although it was
empty).
STACK overflow (an attempt was made to load too much data onto the STACK).
Time-out (the permissible program run-time has been exceeded by more than twice. Check
the subprogram structure).
CASE arguments are larger than the number of entries in the table.

TNC 416/TNC 406/TNC 306

Program creation

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Program creation

7-25

3 Commands
3.1

Load and Assign Commands

3.1.1 LOAD (L)

Abbreviation for the PLC-Editor:

L (LOAD)
Logic
1.2
4

Execution time [s]


Number of bytes

Byte/Word
2.0/1.6
6

Double
1.6
4

Constant
1.2
6

Logic execution with LOAD command


Operands: M, I, O, T, C
Operation:
The addressed operand is copied into the Accumulator. A load command is always used at the start
of a logic chain, in order to enable subsequent gating commands. The same function is achieved
when the gating commands A, O, XO are used at the start of a logic chain, however this should
only be used when compatibility with the TNC 355 is required.
Example:
Inputs I4 and I5 are to be gated with AND and the result assigned to output O2. Thus the logic state
of input I4 is loaded into the Accumulator to enable subsequent gating commands.
Initial state:

Input
Input
Output

Line Instruction

I4 = 1
I5 = 0
O2 = ?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

A I5

... x x x x x x 0 x x x x x x x

= O2

... x x x x x x 0 x x x x x x x

Line 1: The operand contents are loaded into the Logic Accumulator.
Line 2: The contents of the Logic Accumulator and input I5 are gated with AND.
Line 3: The gating result is assigned to output O2.

7-26

TNC 416/TNC 406/TNC 306

Commands

3/2000

Word execution with the LOAD command


Operands: B, W, D, K
Operation:
The addressed Operand (B, W, D) or a Constant (K) is copied into the Word Accumulator. In addition,
the Accumulator is filled, if necessary, according to the sign bit. In contrast to logic execution the
start of a word gating chain must always be with the L command. It is not possible to use a gating
command.
Example:
A Constant and Byte B5 are to be gated with AND and the result assigned to Byte B8.
Initial state:

Byte
Constant:
Byte

Line Instruction

B5 = 2A (hex)
54 = 36 (hex)
B8 = ?

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
7

L K+54

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0

A B5

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00101010

= B8

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00100010

Line 1: The Constant is loaded into the Word Accumulator.


Line 2: The contents of the Word Accumulator and Byte B5 are gated with AND.
Line 3: The gating result is assigned to Byte B8.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-27

3.1.2 LOAD NOT (LN)

LN

Abbreviation for the PLC-Editor:

LN (LOAD NOT)
Logic
1.6
6

Execution time [s]


Number of bytes

Byte/Word
2.4/2.0
8

Double
2.2
6

Constant
1.8
8

Logic execution with the LOAD NOT command


Operands: M, I, O, T, C
Operation:
The complement of the addressed operand is loaded into the Logic Accumulator. A load command is
always used at the start of a logic chain in order to enable subsequent gating commands. The same
function is achieved when the gating commands AN, ON, XON are used at the start of a logic chain,
however this should only be used when compatibility with TNC 355 is required.
Example:
The inverted logic state of inputs I4 and I5 is to be gated with AND and the result assigned to output
O2. Thus the inverted logic state of Input I4 is loaded into the Accumulator to enable subsequent
gating commands.
Initial state:

Input
Input
Output

Line Instruction

I4 = 0
I5 = 1
O2 = ?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

LN I4

... x x x x x x 1 x x x x x x x

A I5

... x x x x x x 1 x x x x x x x

= O2

... x x x x x x 1 x x x x x x x

Line 1: The inverted operand contents are loaded into the Logic Accumulator.
Line 2: The contents of the Logic Accumulator and Input I5 are gated with AND.
Line 3: The gating result is assigned to Output O2.

7-28

TNC 416/TNC 406/TNC 306

Commands

3/2000

Word execution with the LOAD NOT command


Operands: B, W, D, K
Operation:
The complement of the contents of the addressed Operand (B, W, D) or Constant (K) is loaded into
the Word Accumulator. In addition, the Accumulator is filled, if necessary, according to the sign bit.
In contrast to logic execution a word gating chain must always start with a load command. It is not
possible to use a gating command.
Example:
The complement of Byte B6 and Byte B5 is to be gated with AND and the result assigned to Byte
B8.
Initial state:

Byte B5 = 2A (hex)
Byte B6 = B6 (hex)
Byte B8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
7

LN B6

... 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1

10110110

A B5

... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

00101010

= B8

... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

00001000

Line 1: The inverted contents of Byte B6 are loaded into the Word Accumulator.
Line 2: The contents of the Word Accumulator and Byte B5 are gated with AND.
Line 3: The gating result is assigned to Byte B8.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-29

3.1.3 LOAD TWO'S COMPLEMENT (L)


Abbreviation for the PLC-Editor:

Execution time [s]


Number of bytes

L (LOAD MINUS)
Logic
-------

Byte/Word
2.4/2.0
8

Double
2.2
6

Constant
1.8
8

Operands: B, W, D, K
Operation:
The contents of the addressed Operand (B, W, D) or a Constant (K) are loaded into the Word
Accumulator as a two's complement. In addition, the Accumulator is filled, if necessary, according to
the sign bit. The two's complement allows negative numbers to be stored. i.e. a number loaded with
the L command appears in the Accumulator with an inverted sign.
This command may only be used with Word execution.
Example:
The contents of Byte B5 is to be negated, added to Byte B6 and the result assigned to Byte B8.
Initial state:

Byte B5 = 15 (dec)
Byte B6 = 20 (dec)
Byte B8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
7

L B5

... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 (15)

(+15) 00001111

+ B6

... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 (+ 5)

(+20) 00010100

= B8

... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 (+ 5)

(+5) 00000101

To aid understanding of this example, the contents of the Accumulator and operands are shown as
decimal values in parentheses.
Line 1: The contents of Byte B5 are loaded into the Accumulator and the sign of the value is
inverted.
Line 2: The contents of the Word Accumulator and Byte B6 are added.
Line 3: The result is assigned to Byte B8.

7-30

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.1.4 LOAD BYTE (LB) LB


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

LB (LOAD BYTE)
30.0
18

Operands: M, I, O, T, C
Operation:
With the command LB, 8 Markers, Inputs, Outputs, Timers or Counters with ascending numbering
are loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The
designated operand address occupies the LSB in the Accumulator, the designated address + 1 the
LSB + 1 and so on. In this way, the last affected operand occupies the MSB!
If necessary, the Accumulator is filled according to the sign bit.

3.1.5 LOAD WORD (LW)


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

LW

LW (LOAD WORD)
57.2
18

Operands: M, I, O, T, C
Operation:
With the command LW, 16 Markers, Inputs, Outputs, Timers or Counters with ascending numbering
are loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The
designated operand address occupies the LSB in the Accumulator, the designated address + 1 the
LSB + 1 and so on. In this way, the last affected operand occupies the MSB!
If necessary, the Accumulator is filled according to the sign bit.

3.1.6 LOAD DOUBLEWORD (LD)


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

LD

LD (LOAD DOUBLE WORD)


117.2
16

Operands: M, I, O, T, C
Operation:
With the command LD, 32 Markers, Inputs, Outputs, Timers or Counters with ascending numbering
are loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The
designated operand address occupies the LSB in the Accumulator, the designated address + 1 the
LSB + 1 and so on. In this way, the last affected operand occupies the MSB!
If necessary, the Accumulator is filled according to the sign bit.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-31

Example for the commands LB, LW and LD:


A binary coded value is to be read in via inputs I3 to I10 and assigned to byte B8 for further use.
Initial state:

Input
Input
Input
Input

Line Instruction

LB I3

=
=
=
=

1
1
1
0

Input
Input
Input
Input

I7 =
I8 =
I9 =
I10 =

0
1
1
0

Accumulator contents
Bit

I3
I4
I5
I6

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x
... 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1

Operand contents
I10

01100111
7

= B8

... 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1

I3

01100111

Line 1: Inputs I3 to I10 are loaded into the Word Accumulator (Bit 0 to Bit 7).
Line 2: The Accumulator contents are assigned to Byte 8.
The commands LW and LD are processed in the same way except that 16 or 32 operands are used
accordingly.

7-32

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.1.7 ASSIGN (=) =


Abbreviation for the PLC-Editor:

= (ASSIGN)
Logic
1.2
4

Execution time [s]


Number of bytes

Byte/Word
1.2/1.2
4

Double
1.6
4

Constant
----

Logic execution with the ASSIGN command


Operands: M, I, O, T, C
Operation:
ASSIGN in conjunction with the Logic-Operands (M, I, O, T, C) copies the contents of the Logic
Accumulator to the addressed operand. The = command is only used at the end of a logic chain in
order that a gating result is available. The command may be used several times in succession (see
example).
Example:
Inputs I4 and I5 are to be gated with AND and the result assigned to Outputs O2 and O5.

Initial state:

Input
Input
Output
Output

Line Instruction

I4 = 1
I5 = 0
O2 = ?
O5 = ?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

A I5

... x x x x x x 0 x x x x x x x

= O2

... x x x x x x 0 x x x x x x x

= O5

... x x x x x x 0 x x x x x x x

Line 1:
Line 2:
Line 3:
Line 4:

3/2000

The operand contents are loaded into the Logic Accumulator.


The contents of the Logic Accumulator and input I5 are gated with AND.
The gating result is assigned to output O2.
The gating result is assigned to output O5.

TNC 416/TNC 406/TNC 306

Commands

7-33

Word execution with the ASSIGN command


Operands: B, W, D
Operation:
ASSIGN in conjunction with the Word-Operands (B, W, D) copies the contents of the Word
Accumulator to the addressed operand. The = command is only used at the end of a gating chain in
order that a gating result is available. The command can be used several times in succession (see
example).
Example:
A Constant (K) and the contents of Byte B5 should be gated with AND and the result assigned to
Byte B8 and Byte B10.
Initial state:

Byte
Constant
Byte
Byte

Line Instruction

B5 = 2A
54 = 36
B8 = ?
B10 = ?

(hex)
(hex)

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
7

L K+54

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0

A B5

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00101010

= B8

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00100010

= B10

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00100010

Line 1:
Line 2:
Line 3:
Line 4:

7-34

The Constant is loaded into the Word Accumulator.


The contents of the Word Accumulator and Byte B5 are gated with AND.
The gating result is assigned to Byte B8.
The gating result is assigned to Byte B10.

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.1.8 ASSIGN BYTE (B=)


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

B=

B= (ASSIGN BYTE)
26.0
14

Operands: M, I, O, T, C
Operation:
With the command B=, 8 bits are copied from the Word Accumulator to Markers, Inputs, Outputs,
Timers or Counters with ascending numbering. Each bit corresponds to 1 operand. The LSB in the
Accumulator is copied to the designated operand address, the LSB + 1 to the designated address +
1 and so on. The last affected operand is occupied by the MSB.

3.1.9 ASSIGN WORD (W=)


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

W=

W= (ASSIGN WORD)
50
14

Operands: M, I, O, T, C
Operation:
With the command W=, 16 bits are copied from the Word Accumulator to Markers, Inputs,
Outputs, Timers or Counters with ascending numbering. Each bit corresponds to 1 operand. The
LSB in the Accumulator is copied to the designated operand address, the LSB + 1 to the designated
address + 1 and so on. The last affected operand is occupied by the MSB.

3.1.10 ASSIGN DOUBLEWORD (D=) D=


Abbreviation for the PLC-Editor:
Execution time [s]
Number of bytes

D= (ASSIGN DOUBLE)
104.4
14

Operands: M, I, O, T, C
Operation:
With the command D=, 32 bits are copied from the Word Accumulator to Markers, Inputs, Outputs,
Timers or Counters with ascending numbering. Each bit corresponds to 1 operand. The LSB in the
Accumulator is copied to the designated operand address, the LSB + 1 to the designated address +
1 and so on. The last affected operand is occupied by the MSB.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-35

Example:
A bit pattern, as defined in Word W8 , is to be assigned to Outputs O5 to O20.

Initial state:

Word W8: 36 FF

Line Instruction

Accumulator contents
Bit

(hex)

L W8

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x
... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1

Operand contents
15

W= O5

... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1

00110110 11111111
O20

87

... ...

O5

00110110 11111111

Line 1: The contents of Word W8 are loaded into the Accumulator.


Line 2: The contents of the Accumulator are assigned to outputs O5 to O20.
The Commands B= and D= are processed in the same way except that 8 or 32 bits are used
accordingly.

3.1.11 ASSIGN NOT (=N)


Abbreviation for the PLC Editor: =N (STORE NOT)
Logic processing
Operands: M, I, O, T, C
Operation:
An ASSIGN NOT in conjunction with a logic operand (M,I,O,T,C) copies the one's complement of the
contents of the logic accumulator to the addressed operand.
For example see ASSIGN command (=).
Word processing
Operands: B, W, D
Operation:
An ASSIGN NOT in conjunction with a word operand (B,W,D) copies the one's complement of the
contents of the word accumulator to the addressed operand.
For example see ASSIGN command (=).

3.1.12 ASSIGN TWO'S COMPLEMENT (= -)


Abbreviation for the PLC Editor: = - (STORE MINUS)
Operands: B, W, D
Operation:
An ASSIGN TWO'S COMPLEMENT copies the two's complement of the contents of the word
accumulator to the addressed operand.
For example see ASSIGN command (=).
7-36

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-37

3.2

Set-commands

3.2.1 SET (S)

Abbreviation for the PLC Editor:

Execution time [s]


Number of bytes

S (SET)

Operand changed
2.0 to 2.40
8 (6)

Operand unchanged
1.0 to 1.4

Byte value in parentheses:


With certain preceding program sequences, the command may be shortened.
Operands: M, I, O, T, C
Operation:
The function of the command depends on the contents of the Logic Accumulator. If the Logic
Accumulator = 1, the addressed operand is set to 1, otherwise the operand remains unchanged. An
S-command is used at the end of a logic chain so that the gating result may influence the operand.
The command may be used several times in succession (see example).
Example:
Inputs I4 and I5 are to be gated with OR.
If the gating result is 1, output O2 and marker M500 are to be set.
Initial state:

Input
Input
Output
Marker

Line Instruction

I4
I5
O2
M500

=1
=0
=?
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

O I5

... x x x x x x 1 x x x x x x x

S O2

... x x x x x x 1 x x x x x x x

S M500

... x x x x x x 1 x x x x x x x

Line 1:
Line 2:
Line 3:
Line 4:

7-38

The contents of the operand are loaded into the Accumulator.


The contents of the Logic Accumulator and Input I5 are gated with OR.
The gating result = 1: output O2 is set.
The gating result = 1: marker M500 is set.

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.2.2 RESET (R) R


Abbreviation for the PLC-Editor:

Execution time [s]


Number of bytes

R (RESET)

Operand changed
2.0 to 2.4
8 (6)

Operand unchanged
1.0 to 1.4

Byte value in parentheses:


With certain preceding program sequences the command may be shortened.
Operands: M, I, O, T, C
Operation:
The function of the command is dependent on the contents of the Logic Accumulator. If the Logic
Accumulator = 1, the addressed operand is set to 0, otherwise the operand remains unchanged. An
R command is used at the end of a logic chain, in order that a gating result may influence the
operand. The command may be used several times in succession (see example).
Example:
Inputs I4 and I5 are to be gated with OR.
If the gating result = 1, Output O2 and Marker M500 are to be reset.
Initial state:

Input
Input
Output
Marker

Line Instruction

I4
I5
O2
M500

=1
=0
=?
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

O I5

... x x x x x x 1 x x x x x x x

R O2

... x x x x x x 1 x x x x x x x

R M500

... x x x x x x 1 x x x x x x x

Line 1:
Line 2:
Line 3:
Line 4:

3/2000

The operand contents are loaded into the Accumulator.


The contents of the Logic Accumulator and input I5 are gated with OR.
The gating result = 1: Output O2 is reset.
The gating result = 1: Marker 500 is reset.

TNC 416/TNC 406/TNC 306

Commands

7-39

3.2.3 SET NOT (SN)

SN

Abbreviation for the PLC-Editor:

SN (SET NOT)

Execution time [s]


Number of bytes

Operand changed
2.0 to 2.4
8 (6)

Operand unchanged
1.0 to 1.4

Byte value in parentheses:


With certain preceding program sequences the command may be shortened.
Operands: M, I, O, T, C
Operation:
The function of the command is dependent upon the contents of the Logic Accumulator. If the Logic
Accumulator = 0 , then the addressed operand is set to 1, otherwise the operand remains
unchanged. An SN command is used at the end of a logic chain, in order that a gating result may
influence the operand. The command may be used several times in succession (see example).
Example:
Input I4 and Input I5 are to be gated with OR.
If the gating result = 0, Output O2 and Marker M500 are set.
Initial state:

Input
Input
Output
Marker

Line Instruction

I4
I5
O2
M500

=0
=0
=?
=?

Accumulator Contents
Bit

31

Operand Contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 0 x x x x x x x

O I5

... x x x x x x 0 x x x x x x x

SN O2

... x x x x x x 0 x x x x x x x

SN M500

... x x x x x x 0 x x x x x x x

Line 1:
Line 2:
Line 3:
Line 4:

7-40

The operand contents are loaded into the Accumulator.


The contents of the Logic Accumulator and Input I5 are gated with OR.
The gating result = 0: Output O2 is set.
The gating result = 0: Marker 500 is set.

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.2.4 RESET NOT (RN) RN


Abbreviation for the PLC-Editor:

Execution time [s]


Number of bytes

RN (RESET NOT)

Operand changed
2.0 to 2.4
8 (6)

Operand unchanged
1.0 to 1.4

Byte value in parentheses:


With certain preceding program sequences the command may be shortened.
Operands: M, I, O, T, C
Operation:
The function of the command is dependent upon the contents of the Logic Accumulator. If the Logic
Accumulator = 0, then the addressed operand is set to 0, otherwise the operand remains
unchanged. An RN command is used at the end of a logic chain, in order that a gating result may
influence the operand. The command may be used several times in succession (see example).
Example:
Inputs I4 and I5 are to be gated with OR.
If the gating result = 0, Output O2 and Marker M500 are reset.
Initial state:

Input
Input
Output
Marker

Line Instruction

I4
I5
O2
M500

=0
=0
=?
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 0 x x x x x x x

O I5

... x x x x x x 0 x x x x x x x

RN O2

... x x x x x x 0 x x x x x x x

RN M500

... x x x x x x 0 x x x x x x x

Line 1:
Line 2:
Line 3:
Line 4:

3/2000

The operand contents are loaded into the Accumulator.


The contents of the Logic Accumulator and input I5 are gated with OR.
The gating result = 0: Output O2 is reset.
The gating result = 0: Marker M500 is reset.

TNC 416/TNC 406/TNC 306

Commands

7-41

7-42

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3

Logic Gates

3.3.1 AND (A)

Abbreviation for the PLC-Editor:

A (AND)
Logic
1.2
4

Execution time [s]


Number of bytes

Byte/Word
1.2/1.2
4

Double
1.8
4

Constant
1.6
6

Logic execution with the AND command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain the command functions as an L command, i.e. the logic state of the
operand is loaded into the Logic Accumulator. This is to ensure compatibility with the TNC 355
control which did not have the special L command. In PLC programs for the TNC 306, a logic
chain should always be started with a load command (see L, LN, L).
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with AND. The gating result is stored in the Logic Accumulator.
Example:
Inputs I4 and I5 are to be gated with AND and the result assigned to Output O2.
Initial state:

Input
Input
Output

Line Instruction

I4
I5
O2

=1
=0
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x x x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

A I5

... x x x x x x 0 x x x x x x x

= O2

... x x x x x x 0 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I5 are gated with AND.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-43

Word execution with the AND Command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
AND. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit), 8, 16
or 32 bits will be influenced in the Accumulator.
Thus:

Bit 0 of the Accumulator is gated with bit 0 of the operand


Bit 1 of the Accumulator is gated with bit 1 of the operand and so on.

The result of the operation is stored in the Word Accumulator.


Example:
The contents of Byte B5 and Byte B6 should be gated with AND and the result assigned to Byte B8.
Initial state:

Byte B5 = 2A
Byte B6 = 36
Byte B8 = ?

Line Instruction

(hex)
(hex)

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L B6

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0

00110110

A B5

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00101010

= B8

... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0

00100010

Line 1: The contents of Byte B6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Byte B5 are gated with AND.
Line 3: The gating result is assigned to Byte B8.

7-44

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3.2 AND NOT (AN)

AN

Abbreviation for the PLC-Editor:

AN (AND NOT)
Logic
2.0
8

Execution time [s]


Number of bytes

Byte/Word
2.0/2.0
8

Double
3.0
8

Constant
2.6
10

Logic execution with the AND NOT command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain the command functions as an LN command, i.e. the complement of
the operand is loaded into the Logic Accumulator. This is to ensure compatibility with the
TNC 355 control which did not have the special LN command. In PLC programs for the TNC 306 a
logic chain should always be started with a load command (see L, LN, L).
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with AND NOT.
The gating result is stored in the Logic Accumulator.
Example:
Inputs I4 and I5 are to be gated with AND NOT and the result assigned to Output O2.
Initial state:

Input
I4
Input
I5
Output O2

Line Instruction

=1
=1
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x x x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

AN I5

... x x x x x x 0 x x x x x x x

= O2

... x x x x x x 0 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I5 are gated with AND NOT.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-45

Word execution with the AND NOT command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
AND NOT. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus:

Bit 0 in the Accumulator is gated with bit 0 in the operand.


Bit 1 in the Accumulator is gated with bit 1 in the operand and so on.

The result of the operation is stored in the Word Accumulator.


Example:
The contents of Word W4 and Word W6 should be gated with AND NOT and the result assigned to
Word W8.
Initial state:

Word W4 = 36 AA (hex)
Word W6 = 3C 36
(hex)
Word W8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L W6

... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0

00111100 00110110

AN W4

... 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0

00110110 10101010

= W8

... 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0

00001000 00010100

Line 1: The contents of Word W6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Word W4 are gated with AND NOT.
Line 3: The gating result is assigned to Word W8.

7-46

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3.3 OR (O)
Abbreviation for the PLC-Editor:

O (OR)
Logic
1.2
4

Execution time [s]


Number of bytes

Byte/Word
1.2/1.2
4

Double
1.8
4

Constant
1.6
6

Logic execution with the OR command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain the command functions as an L command, i.e. the logic state of the
operand is loaded into the Logic Accumulator. This is to ensure compatibility with the TNC 355
control which did not have the special L command. In PLC programs for the TNC 306 a logic chain
should always be started with a load command (see L, LN, L).
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with OR. The result of the operation is stored in the Logic Accumulator.
Example:
Input I4 and Input I5 are to be gated with OR and the result assigned to Output O2.
Initial state:

Input
Input
Output

Line Instruction

I4 = 0
I5 = 1
O2 = ?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x x x x x x x x x

L I4

... x x x x x x 0 x x x x x x x

O I5

... x x x x x x 1 x x x x x x x

= O2

... x x x x x x 1 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I5 are gated with OR.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-47

Word execution with the OR command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit), 8, 16 or
32 bits will be influenced in the Accumulator.
Thus:

Bit 0 in the Accumulator is gated with bit 0 in the operand


Bit 1 in the Accumulator is gated with bit 1 in the operand and so on.

The result of the operation is stored in the Word Accumulator.


Example:
The contents of Byte B5 and Byte B6 are to be gated with OR and the result assigned to Word W8.
Initial state:

Byte B5 = 2A (hex)
Byte B6 = 36 (hex)
Word W8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L B6

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0

00110110

O B5

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

00101010

= W8

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

00000000 00111110

Line 1: The contents of Byte B6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Byte B5 are gated with OR.
Line 3: The gating result is assigned to Word W8.

7-48

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3.4 OR NOT (ON)


Abbreviation for the PLC-Editor:

ON (OR NOT)
Logic
2.0
8

Execution time [s]


Number of bytes

Byte/Word
2.0/2.0
8

Double
3.0
8

Constant
2.6
10

Logic execution with the OR NOT command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain this command functions as an LN command, i.e. the complement of
the operand is loaded into the Logic Accumulator. This is to ensure compatibility with the
TNC 355 control which did not have the special LN command. In PLC programs for the TNC 306
a logic chain should always be started with a load command (see L, LN, L).
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with OR NOT. The result of the operation is stored in the Logic Accumulator.
Example:
Inputs I4 and I5 are to be gated with OR NOT and the result assigned to Output O2.
Initial state:

Input
Input
Output

Line Instruction

I4
I5
O2

=0
=0
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x x x x x x x x x

L I4

... x x x x x x 0 x x x x x x x

ON I5

... x x x x x x 1 x x x x x x x

= O2

... x x x x x x 1 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I5 are gated with OR NOT.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-49

Word execution with the OR NOT command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR NOT. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit), 8,
16 or 32 bits will be influenced in the Accumulator.
Thus:

Bit 0 in the Accumulator is gated with bit 0 in the operand


Bit 1 in the Accumulator is gated with bit 1 in the operand and so on.

The result of the operation is stored in the Word Accumulator.


Example:
The contents of Word W4 and Word W6 are to be gated with OR NOT and the result assigned to
Word W8.
Initial state:

Word W4 = 36 AA (hex)
Word W6 = 3C 36 (hex)
Word W8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L W6

... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0

00111100 00110110

ON W4

... 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1

00110110 10101010

= W8

... 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1

11111101 01110111

Line 1: The contents of Word W6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Word W4 are gated with OR NOT.
Line 3: The gating result is assigned to Word W8.

7-50

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3.5 EXCLUSIVE OR (XO)


Abbreviation for the PLC-Editor:

XO (EXCLUSIVE OR)
Logic
1.6
6

Execution time [s]


Number of bytes

Byte/Word
1.6/1.6
6

Double
2.4
6

Constant
2.0
8

Logic execution with the EXCLUSIVE OR command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain the command functions as an L command, i.e. the logic state of the
operand is loaded into the Logic Accumulator. This is to ensure compatibility with the TNC 355
control which did not have the special L command. In PLC programs for the TNC 306 a logic chain
should always be started with a load command (see L, LN, L).
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with EXCLUSIVE OR. The result of the operation is stored in the Logic
Accumulator.
Example:
Inputs I4 and I5 are to be gated with EXCLUSIVE OR and the result assigned to Output O2.
Initial state:

Input
Input
Output

Line Instruction

I4 = 1
I5 = 1
O2 = ?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L I4

... x x x x x x 1 x x x x x x x

XO I5

... x x x x x x 0 x x x x x x x

= O2

... x x x x x x 0 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I5 are gated with EXCLUSIVE OR.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-51

Word execution with the EXCLUSIVE OR command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
EXCLUSIVE OR. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit;
D = K = 32 bit), 8, 16 or 32 bits will be influenced in the Accumulator.
Thus:

Bit 0 in the Accumulator is gated with bit 0 in the operand


Bit 1 in the Accumulator is gated with bit 1 in the operand and so on.

The result of the operation is stored in the Word Accumulator.


Example:
The contents of Byte B5 and Byte B6 are to be gated with EXCLUSIVE OR and the result assigned
to Word W8.
Initial state

Byte
Byte
Word

Line Instruction

B5 = 2A
B6 = 36
W8 = ?

(hex)
(hex)

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L B6

... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0

00110110

XO B5

... 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0

00101010

= W8

... 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0

00000000 00011100

Line 1: The contents of Byte B6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Byte B5 are gated with EXCLUSIVE OR.
Line 3: The gating result is assigned to Word W8.

7-52

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.3.6 EXCLUSIVE OR NOT (XON)


Abbreviation for the PLC-Editor:

XON (EXCLUSIVE OR NOT)


Logic
2.0
8

Execution time [s]


Number of bytes

XON

Byte/Word
2.0
8

Double
3.0
8

Constant
2.6
10

Logic execution with the EXCLUSIVE OR NOT command


Operands: M, I, O, T, C
Operation:
This command functions in different ways according to its position in the program:
a) At the start of a logic chain this command functions as a LN command, i.e. the complement of the
operand is loaded into the Logic Accumulator. This is to ensure compatibility with the TNC 355
control which did not have the special LN command. In PLC programs for the TNC 306 a logic
chain should always be started with a load command (see L, LN, L).
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with EXCLUSIVE OR NOT. The result of the operation is stored in the Logic
Accumulator.
Example:
Input I4 and Marker M500 are to be gated with EXCLUSIVE OR NOT and the result assigned to
Output O2.
Initial state:

Input
Marker
Output

Line Instruction

I4
=0
M500 = 0
O2
=?

Accumulator contents
Bit

31

Operand contents

. . .
7
0
... x x x x x x X x x x x x x x

L M500

... x x x x x x 0 x x x x x x x

XON I4

... x x x x x x 1 x x x x x x x

= O2

... x x x x x x 1 x x x x x x x

Line 1: The operand contents are loaded into the Accumulator.


Line 2: The contents of the Logic Accumulator and input I4 are gated with
EXCLUSIVE OR NOT.
Line 3: The gating result is assigned to Output O2.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-53

Word execution with the EXCLUSIVE OR NOT command


Operands: B, W, D, K
Operation:
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
EXCLUSIVE OR NOT. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K
= 32 bit), 8, 16 or 32 bits will be influenced in the Accumulator.
Thus:

Bit 0 in the Accumulator is gated with bit 0 in the operand


Bit 1 in the Accumulator is gated with bit 1 in the operand and so on.

The result of the operation is stored in the Logic Accumulator.


Example:
The contents of Word W4 and Word W6 are to be gated with EXCLUSIVE OR NOT and the result
assigned to Word W8.
Initial state:

Word W4 = 36 AA (hex)
Word W6 = 3C 36 (hex)
Word W8 = ?

Line Instruction

Accumulator contents
Bit

31 . . . 15
7
0
... x x x x x x x x x x x x x x x x x x

Operand contents
15

87

L W6

... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0

00111100 00110110

XON W4

... 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1

00110110 10101010

= W8

... 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1

11110101 01100011

Line 1: The contents of Word W6 are loaded into the Accumulator.


Line 2: The contents of the Word Accumulator and Word W4 are gated with
EXCLUSIVE OR NOT.
Line 3: The gating result is assigned to Word W8.

7-54

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-55

3.4

Arithmetic commands

3.4.1 ADDITION (+)

Abbreviation for the PLC-Editor:

+ (PLUS)
Logic
-------

Execution time [s]


Number of bytes

Byte/Word
2.8/2.4
8

Double
1.8
4

Constant
1.6
6

Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the contents of the operand are added to the Word Accumulator. The result of the operation is
stored in the Word Accumulator and may be processed further.
Example:
A constant and a stored value in Word W6 are to be added. The result is then stored in Double word
D8.
Initial state:

Constant
= 100 000 (dec)
Word
W6 = 200
(dec)
Double word D8 = ?

In the interests of clarity the contents of the Accumulator and operand are shown in decimal
notation.
The 10 bit wide Accumulator allows the entry of the highest possible Accumulator contents
(2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

L K100000

1 0 0

0 0 0

+ W6

1 0 0

2 0 0

= D8

1 0 0

2 0 0

2 0 0
1 0 0

2 0 0

Line 1: The Constant is loaded into the Accumulator.


Line 2: The contents of the Accumulator and Word W6 are added.
Line 3: The result is assigned to Double word D8.

7-56

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.4.2 SUBTRACTION ()
Abbreviation for the PLC-Editor:

(MINUS)
Logic
-------

Execution time [s]


Number of bytes

Byte/Word
2.8/2.4
8

Double
1.8
4

Constant
1.6
6

Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the contents of the operand are subtracted from the contents of the Word Accumulator. The
result of the operation is stored in the Word Accumulator and may be processed further.
Example:
A stored value in Word W6 is to be subtracted from a Constant. The result is then stored in Double
word D8.
Initial state:

Constant
= 100 000 (dec)
Word
W6 = 200
(dec)
Double word D8 = ?

In the interests of clarity the contents of the Accumulator and the operand are shown in decimal
notation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulator
contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

1 0 0

0 0 0

L K100000

W6

9 9

8 0 0

= D8

9 9

8 0 0

2 0 0
9 9

8 0 0

Line 1: The Constant is loaded into the Accumulator.


Line 2: The contents of Word W6 are subtracted from the Accumulator.
Line 3: The result is assigned to Double word D8.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-57

3.4.3 MULTIPLICATION (x)


Abbreviation for the PLC-Editor:

x (MULTIPLY)
Logic
-------

Execution time [s]*


Number of bytes

Byte/Word
10.2/9.4
14

Double
--10

Constant
9.8
14

* Only a maximum processing time can be entered with the arithmetic operations X, / and MOD.
The processing time may be shorter, depending on the operands.
Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the contents of the operand are multiplied with the contents of the Word Accumulator. The
result of the operation is stored in the Word Accumulator and may be processed further. If the result
of multiplication causes an overflow, Marker M3168 is set, otherwise it is reset.
Example:
A Constant and a value stored in Word W6 are to be multiplied. The result is then stored in Double
word D8.
Initial state

Constant
= 100
Word
W6 = 20
Double word D8 = ?

(dec)
(dec)

In the interests of clarity the contents of the Accumulator and the operand are shown in decimal
notation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulator
contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

L K100

1 0 0

x W6

0 0 0

= D8

0 0 0

2 0
2

0 0 0

Line 1: The Constant is loaded into the Accumulator.


Line 2: The contents of the Accumulator are multiplied by the contents of Word W6.
Line 3: The result is assigned to Double word D8.

7-58

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.4.4 DIVISION (/)

Abbreviation for the PLC-Editor:

/ (DIVIDE)
Logic
-------

Execution time [s] *) **)


Number of bytes

Byte/Word
20.2/19.8
16

Double
--14

Constant
19.8
16

*) see Multiplication
**) An error in division and modulo (divisor = 0) results in a execution time of 3.8 s.
An error condition (Divisor = 0) results in an execution time of 1.0 to 1.8 s.
Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits) .
Then the contents of the Word Accumulator are divided by the contents of the operand. The result
of the operation is stored in the Word Accumulator and may be processed further. If division by 0 is
attempted, the Marker M3169 is set, otherwise it is reset.
Example:
A Constant is to be divided by the value stored in Word W6 . The result is then assigned to Double
word D8.
Initial state:
Constant
= 100 (dec)
Word
W6 = 20
(dec)
Double word D8 = ?
In the interests of clarity the contents of the Accumulator and the operand are shown in decimal
notation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulator
contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

x x x

Operand contents
x x x

L K100

1 0 0

/ W6

2 0

= D8

Line 1: The Constant is loaded into the Accumulator.


Line 2: The contents of the Accumulator are divided by the contents of Word W6.
Line 3: The result is assigned to Double word D8.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-59

3.4.5 REMAINDER (MOD)


Abbreviation for the PLC-Editor:

MOD

MOD (MODULO)
Logic
-------

Execution time [s]


Number of bytes

Byte/Word
20.6 to 20.2
18

Double
16

Constant
20.2
12

*) see Multiplication
**) see Division
An error condition (Divisor = 0) results in an execution time of 1.0 to 1.8 s.
Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the REMAINDER is determined from a division of the contents of the Word Accumulator by
the contents of the operand. The REMAINDER is stored in the Word Accumulator and may be
processed further. If the MOD command is not correctly executed then the Marker M3170 is set,
otherwise it is reset.
Example:
The REMAINDER of a division of the value stored in Word W6 by a constant is to be determined.
The REMAINDER is then stored in Double word D8.
Initial state:

Word
W6 = 50
Constant
K
= 15
Double word D8 = ?

(dec)
(dec)

In the interests of clarity the contents of the Accumulator and the operand are shown in decimal
notation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulator
contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

x x x

Operand contents
x x x

L W6

5 0

MOD K15

5 0

= D8

Line 1: The contents of Word W6 are loaded into the Accumulator.


Line 2: The contents of the Accumulator are divided by the constant and the integer
REMAINDER is left in the Accumulator.
Line 3: The REMAINDER is assigned to Double word D8.

7-60

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-61

3.5

Comparisons

3.5.1 EQUAL TO (==)

==

Abbreviation for the PLC-Editor:

== (EQUAL)

Execution time [s]


Number of bytes

Byte/Word/Double
1.8 to 2.4
6

Constant
2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic processing occurs. The contents of the
Word Accumulator and the contents of the addressed operand are compared. If the Word
Accumulator and the operand are equal, the condition is true and the Logic Accumulator is set to 1.
If they are not equal the Logic Accumulator is set to 0. The comparison takes place over the number
of bits corresponding to the operand, i.e. B = 8 bit, W = 16 bit and D = K = 32 bit.
Example:
A constant is to be compared with the contents of Double word D8. The result is then assigned to
Marker M500.
Initial state:

Constant
= 16 000
Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulator
allows the entry of the highest possible Accumulator contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

1 6

0 0 0

L K16000

== D8

. . .
7
0
... x x x x x x 0 x x x x x x x

= M500

... x x x x x x 0 x x x x x x x

Bit

31

1 5

0 0 0
0

Line 1: The constant is loaded into the Accumulator.


Line 2: The contents of the Accumulator and the Double word D8 are compared
( Accumulator = Operand ? ).
As the condition is not fulfilled the Logic Accumulator is set to 0.
Line 3: The contents of the Logic Accumulator (The result of the comparison) are
assigned to Marker M500.

7-62

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.5.2 LESS THAN (<)

<

Abbreviation for the PLC-Editor:

< (LESS THAN)

Execution time [s]


Number of bytes

Byte/Word/Double
1.8 to 2.4
6

Constant
2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic processing occurs. The contents of the
Word Accumulator are compared with the contents of the addressed operand. If the Word
Accumulator is smaller than the operand, the condition is true and the Logic Accumulator is set to 1.
If the Word Accumulator is smaller or equal to the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits in the operand, i.e. B = 8 bit, W = 16 bit and
D = K = 32 bit.
Example:
A constant is to be compared with the contents of Double word D8. The result is then assigned to
Marker M500.
Initial state:

Constant
= 16 000
Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulator
allows the entry of the highest possible Accumulator contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

1 6

0 0 0

L K16000

< D8

. . .
7
0
... x x x x x x 0 x x x x x x x

= M500

... x x x x x x 0 x x x x x x x

Bit

31

1 5

0 0 0
0

Line 1: The constant is loaded into the Accumulator


Line 2: The contents of the Accumulator and the Operand are compared
(Accumulator < Operand ?).
As the condition is not fulfilled the Logic Accumulator is set to 0.
Line 3: The contents of the Logic Accumulator (The result of the comparison) are
assigned to Marker M500.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-63

3.5.3 GREATER THAN (>)


Abbreviation for the PLC-Editor:

Execution time [s]


Number of bytes

>

> (GREATER THAN)

Byte/Word/Double
1.8 to 2.4
6

Constant
2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic processing occurs. The contents of the
Word Accumulator are compared with the contents of the addressed operand. If the Word
Accumulator is greater than the operand, the condition is true and the Logic Accumulator is set to 1.
If the Word Accumulator is less than or equal to the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits in the operand, i.e. B = 8 bit, W = 16 bit and D = K
= 32 bit.
Example:
A constant is to be compared with the contents of Double word D8. The result is then assigned to
Marker M500.
Initial state:

Constant
= 16 000
Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulator
allows the entry of the highest possible Accumulator contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

1 6

0 0 0

L K16000

> D8

. . .
7
0
... x x x x x x 1 x x x x x x x

= M500

... x x x x x x 1 x x x x x x x

Bit

31

1 5

0 0 0
1

Line 1: The constant is loaded into the Accumulator


Line 2: The contents of the Accumulator and the Operand are compared (Accumulator
> Operand ? ). As this condition is fulfilled the Logic Accumulator is set to 1.
Line 3: The contents of the Logic Accumulator (The result of the comparison) are
assigned to Marker M500.

7-64

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.5.4 LESS THAN OR EQUAL TO (<=)


Abbreviation for the PLC-Editor:

Execution time [s]


Number of bytes

<=

<= (LESS EQUAL)

Byte/Word/Double
1.8 to 2.4
6

Constant
1.8 to 2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic processing occurs. The contents of the
Word Accumulator are compared with the contents of the addressed operand. If the Word
Accumulator is less than or equal to the operand, the condition is true and the Logic Accumulator is
set to 1. If the Word Accumulator is greater than the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits in the operand, i.e. B = 8 bit, W = 16 bit and D = K
= 32 bit.
Example:
A constant is to be compared with the contents of Double word D8. The result is then assigned to
Marker M500.
Initial state:

Constant
= 16 000
Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulator
allows the entry of the highest possible Accumulator contents (2 147 483 647).
Line Instruction

Accumulator contents
x

x x x

Operand contents

x x x

x x x

1 6

0 0 0

L K16000

<= D8

. . .
7
0
... x x x x x x 0 x x x x x x x

= M500

... x x x x x x 0 x x x x x x x

Bit

31

1 5

0 0 0
0

Line 1: The constant is loaded into the Accumulator.


Line 2: The contents of the Accumulator and the Operand are compared (Accumulator <=
Operand). As this condition is not fulfilled the Logic Accumulator is set to 0.
Line 3: The contents of the Logic Accumulator (The result of the comparison) are
assigned to Marker M500.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-65

3.5.5 GREATER THAN OR EQUAL TO (>=)


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

>= (GREATER EQUAL)

Byte/Word/Double
1.8 to 2.4
6

Constant
1.8 to 2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic execution occurs. The content of the Word
Accumulator is compared with the content of the addressed operand. If the Word Accumulator is
greater than or equal to the operand, the condition is true and the Logic Accumulator is set to 1. If
the Word Accumulator is smaller than the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits corresponding to the operand i.e. B=8 bit, W=16 bit
and D=K=32 bit.
Example:
A constant is to be compared with the content of Double word D8. The result is then assigned to
marker M500.
Initial state:

Constant
= 16 000
Double word D8 = 15 000

Accumulator and operand contents are entered here in decimal notation. The ten-position
Accumulator thus permits the maximum possible Accumulator content (2 147 483 647).
Line Instruction

Accumulator content
x

x x x

Operand content

x x x

x x x

1 6

0 0 0

L K16000

>= D8

. . .
7
0
... x x x x x x 1 x x x x x x x

= M500

... x x x x x x 1 x x x x x x x

Bit

31

1 5

0 0 0
1

Line 1: The constant is loaded into the Word Accumulator.


Line 2: The contents of the Word Accumulator and operand are compared according to the
following criteria: Word Accumulator >= Operand. As this condition is fulfilled, the Logic
Accumulator is set to 1.
Line 3: The content of the Logic Accumulator (result of the comparison) is assigned to marker
M500.

7-66

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.5.6 UNEQUAL (<>)<>


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

<> (NOT EQUAL)

Byte/Word/Double
1.8 to 2.4
6

Constant
1.8 to 2.0
8

Operands: B, W, D, K
Operation:
With this command, a direct transfer from Word to Logic execution occurs. The content of the Word
Accumulator is compared with the content of the addressed operand. If the Word Accumulator and
the operand are not equal, the condition is true and the Logic Accumulator is set to 1. If the Word
Accumulator is equal to the operand, the Logic Accumulator is set to 0. The comparison takes place
over the number of bits corresponding to the operand i.e. B=8 bit,W=16 bit and D=K=32 bit.
Example:
A constant is to be compared with the contents of Double word D8. The result is then assigned to
marker M500.
Output state

Constant
= 16 000
Double word D8 = 15 000

Accumulator and operand contents are entered here in decimal notation. The ten position
Accumulator thus permits the maximum possible Accumulator content (2 147 483 647).
Line Instruction

Accumulator content
x

x x x

Operand content

x x x

x x x

1 6

0 0 0

L K16000

<> D8

. . .
7
0
... x x x x x x 1 x x x x x x x

= M500

... x x x x x x 1 x x x x x x x

Bit

31

1 5

0 0 0
1

Line 1: The constant is loaded into the Word Accumulator.


Line 2: Contents of the Word Accumulator and operand are compared according to the following
criteria: Word Accumulator <> Operand. If this condition is fulfilled, the Logic Accumulator
is set to 1.
Line 3: The contents of the Logic Accumulator [result of the comparison] is assigned to
marker M500.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-67

7-68

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.6

Parentheses with logical gating

Execution time and code length are summarized respectively for the "open-parentheses" and
corresponding "close-parentheses" commands.

3.6.1 AND [ ] (A[ ])

A[ ]

Abbreviation for PLC Editor:

A[ ] (AND [ ])

Execution time [s]


Number of bytes

Logic
1.6
6

Byte/Word/Double
2.6
6

Operands: none

3.6.2 AND NOT [ ] (AN[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

AN[ ]

AN[ ] (AND NOT [ ])


Logic
2.0
6

Byte/Word/Double
3.2
6

Operands: none

3.6.3 OR [ ] (O[ ]) O[ ]
Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

O[ ] (OR [ ])
Logic
1.6
6

Byte/Word/Double
2.6
6

Operands: none

3.6.4 OR NOT [ ] (ON[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

ON[ ]

ON[ ] (OR NOT [ ])


Logic
2.0
6

Byte/Word/Double
3.2
6

Operands: none

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-69

3.6.5 EXCLUSIVE OR [ ] (XO[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

XO[ ]

XO[ ] (EXCL: OR [ ])
Logic
2.0
6

Byte/Word/Double
3.2
6

Operands: none

3.6.6 EXCLUSIVE OR NOT [ ] (XON[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

XON[ ]

XON[ ] (EXCL: OR NOT [ ])


Logic
2.4
8

Byte/Word/Double
3.8
8

Operands: none

Function of Parentheses with Logic Commands:


The execution sequence in a ladder may be altered by the use of parentheses. The "openparentheses" command loads the contents of the Accumulator onto the Program Stack. If the Logic
Accumulator is addressed in the previous command, prior to a "parentheses-open" instruction, the
content of the Logic Accumulator is loaded into the Program Stack. By addressing the Word
Accumulator, the content of the Word Accumulator will be distributed.
The "close-parentheses" instruction initiates the gating of the buffered value from the Program Stack
with the Logic Accumulator and/or the Word Accumulator, depending on which Accumulator was
addressed prior to the "parentheses-open" instruction. The result is then available in the
corresponding Accumulator. The maximum nesting level is 16 parentheses.

7-70

TNC 416/TNC 406/TNC 306

Commands

3/2000

Examples for the commands AND [ ], AND NOT [ ], OR [ ], OR NOT [ ], EXCLUSIVE OR [ ],


EXCLUSIVE OR NOT [ ].
With the use of parentheses, an instruction listing may be developed according to the following logic
block-diagram.
M500
OR
M501
AND

O12

I0
OR
I1
Initial state:
Line

Marker M500 = 0Input I0 = 0


Marker M501 = 1Input I1 = 1

Instruction
bit

Output O12 = ?

Accumulator Contents
31

Operand Contents
0

... x x x x x x

x x x x x x x x

L M500

... x x x x x x

0 x x x x x x x

O M501

... x x x x x x

1 x x x x x x x

A [

... x x x x x x

1 x x x x x x x

L I0

... x x x x x x

0 x x x x x x x

O I1

... x x x x x x

1 x x x x x x x

... x x x x x x

1 x x x x x x x

= O12

... x x x x x x

1 x x x x x x x

1
Program-stack:
xxxxxxxx

1 xxxxxxx

bit
15
7
0
Marker state M500 is loaded into the Logic Accumulator.
The Logic Accumulator is gated with Marker M501.
Open parentheses: the Accumulator contents are buffered on the Program Stack.
Input state I0 is loaded into the Logic Accumulator.
The Logic Accumulator is gated with Input I1.
Close parentheses: Accumulator content is gated with the content of the Program Stack,
according to the command (A[, O[, NO[ ...).
Line 7: The result of the complete logical process is assigned to Output O12.
Note:
The functional sequence is in principle the same for word execution, with the exception that the
whole Accumulator is written onto the Stack.

Line 1:
Line 2:
Line 3:
Line 4:
Line 5:
Line 6:

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-71

7-72

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.7

Parentheses with arithmetic commands

Execution time and code length are summarized respectively for the "open-parentheses" and
corresponding "close-parentheses" commands.

3.7.1 ADDITION [ ] (+[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

+[]

+ [ ] (PLUS [ ])
Logic
---------

Byte/Word/Double
2.6
6

Operands: none

3.7.2 SUBTRACTION [ ] ([ ]) [ ]
Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

[ ] (MINUS [ ])
Logic
---------

Byte/Word/Double
3.2
6

Operands: none

3.7.3 MULTIPLICATION [ ] (x[ ])


Abbreviation for PLC Editor:

Execution time [s] *)


Number of bytes

X[]

x [ ] (MULTIPLY [ ])
Logic
---------

Byte/Word/Double
11.0
12

Operands: none

3.7.4 DIVISION [ ] (/[ ]) / [ ]


Abbreviation for PLC Editor:

Execution time [s] *) **)


Number of bytes

/ [ ] (DIVIDE [ ])
Logic
---------

Byte/Word/Double
20.2
16

In the event of an error (Divisor = 0) in the Division and MODULO functions, the execution time will
be in the range 0.9 to 1.3 s.
Operands: none
*) See Multiplication
**) See Division

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-73

3.7.5 REMAINDER [ ] (MOD[ ])


Abbreviation for PLC Editor:

Execution time [s] *) **)


Number of bytes

MOD [ ]

MOD [ ] (MODULO [ ])
Logic
---------

Byte/Word/Double
20.6
14

*) See Multiplication
**) See Division
In the event of an error (Divisor = 0) in the Division and MODULO functions, the execution time will
be in the range 0.9 to 1.3 s.
Operands: none
Function of Parentheses with Arithmetic Commands:
With arithmetic commands, only word execution comes into question. The execution sequence in a
ladder may be altered by the use of parentheses. The "open-parentheses" command loads the
content of the Word Accumulator onto the Program Stack. Then the Accumulator is available for the
calculation of intermediate results. The "close-parentheses" instruction initiates the gating of the
buffered value from the Program Stack with the content of the Word Accumulator. The result is
again loaded into the Accumulator. The maximum nesting level is 16 parentheses.
Example for the commands ADD [ ], SUBTRACT [ ], MULTIPLY [ ], DIVIDE [ ], DIVISION
REMAINDER [ ]
The following example demonstrates how parentheses influence the result of the operation.
Initial state:

Constant
Double word
Double word
Double word

D12
D36
D100

= 1000
= 15000
= 100
=?

(decimal)
(decimal)
(decimal)

The specification of Accumulator and operand contents is given in decimal notation. The ten-place
Accumulator thus permits the maximum possible Accumulator content of (2 147 483 647).

7-74

TNC 416/TNC 406/TNC 306

Commands

3/2000

Command sequence without parentheses:


Line Instruction

Accumulator content
x

x x x

Operand content

x x x

x x x

L D12

1 5

0 0 0

1 5

0 0 0

+ K1000

1 6

0 0 0

/ D36

1 6 0

1 0 0

= D100

1 6 0

1 0 0

Commend sequence with parentheses:


Line

Instruction

Accumulator Contents
x

x x x

Operand Contents

x x x

x x x

L D12

1 5

0 0 0

+ [

1 5

0 0 0

L K1000

0 0 0

/ D36

1 5

0 1 0

= D100

1 5

0 1 0

1 5

1 0

0 0 0

1 0 0

1 5

0 1 0

1 5

0 0 0

Program-stack:

Line 1:
Line 2:
Line 3:
Line 4:
Line 5:

The content of Double word D12 is loaded into the Word Accumulator.
Open parentheses: buffer the Accumulator content in the Program Stack.
A constant is loaded into the Word Accumulator.
The content of the Word Accumulator is divided by the content of Double word D12.
Close parentheses: Accumulator content is gated, corresponding to the command (+[, -[, x[
...) with the content of the Program Stack.
Line 6: The result of the complete logical process is assigned to Double word D100.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-75

3.7.6 INCREMENT (INC)


INCREMENT Operand
Abbreviation for the PLC Editor: INC
Operands: B, W, D
Operation:
The contents of the addressed operand increases by one.
INCREMENT Word Accumulator
Abbreviation for the PLC Editor: INCW
Operation:
The contents of the word accumulator increases by one.

3.7.7 DECREMENT (DEC)


DECREMENT Operand
Abbreviation for the PLC Editor: DEC
Operands: B, W, D
Operation:
The contents of the addressed operand decreases by one.
INCREMENT Word Accumulator
Abbreviation for the PLC Editor: DECW
Operation:
The contents of the word accumulator decreases by one.

7-76

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.8

Parentheses with comparison commands

Execution time and code length are summarized respectively for the "open-parenthesis" and the
corresponding "close-parenthesis" commands.

3.8.1 EQUAL TO [ ] (==[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

(== [ ]

== [ ] (EQUAL [ ])
Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none

3.8.2 LESS THAN [ ] (<[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

<[]

< [ ] (LESS THAN [ ])


Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none

3.8.3 GREATER THAN [ ] (>[ ])> [ ]


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

> [ ] (GREATER THAN [ ])


Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none

3.8.4 LESS THAN OR EQUAL TO [ ] (<=[ ]) <= [ ]


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

<= [ ] (LESS EQUAL [ ])


Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-77

3.8.5 GREATER THAN OR EQUAL TOL[ ] (>=[ ]) >= [ ]


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

>= [ ] (GREATER EQUAL [ ])


Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none

3.8.6 NOT EQUAL TO [ ] (<>[ ])


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

<> [ ]

<> [ ] (NOT EQUAL [ ])


Logic
-------

Byte/Word/Double
3.0 to 3.2
6

Operands: none
Function of parentheses with comparison commands:
The execution sequence in a ladder may be altered by the use of parentheses. The "openparentheses" command loads the contents of the Word Accumulator onto the Program Stack. The
Accumulator is now available for the calculation of intermediate results.
The "close-parentheses" instruction initiates the gating of the buffered value from the Program Stack
with the content of the complete Word Accumulator. The result is loaded again into the
Accumulator. The maximum nesting depth is 16 parentheses.
A direct transition from Word to Logic execution takes place with comparison commands. If the
comparison condition is "true", the Logic Accumulator is set to "1". If the condition is not fulfilled, the
Logic Accumulator is set to "0".

7-78

TNC 416/TNC 406/TNC 306

Commands

3/2000

Example:
Initial state:

Constant
Double word D12= 15000
Double word D36= 10
Output
O15 = ?

= 1000
(decimal)
(decimal)
(decimal)

The Accumulator contents and operand contents are shown in decimal notation. The ten-position
Accumulator thus permits the maximum possible Accumulator content of 2 147 483 647.
The Accumulator is again represented in binary notation after program line 5, as the transition to
logic execution occurs here.
Line

Instruction

Accumulator Contents
x

x x x

Operand Contents

x x x

x x x

L D12

1 5

0 0 0

>= [

1 5

0 0 0

L K1000

0 0 0

x D36

1 0

0 0 0

bit 31

. . .

1 5

0 0 0

1 0

x x x x

1 x x x x x x x

= O15

x x x x

1 x x x x x x x

1
Program-stack:
1 5

0 0 0

Line 1:
Line 2:
Line 3:
Line 4:
Line 5:

The content of Double word D12 is loaded into the Word Accumulator.
Open parentheses: buffering of the Accumulator content in the Program Stack.
Loading of a Constant into the Word Accumulator.
The content of the Word Accumulator is multiplied by the content of Double word D12.
Close parentheses: Word Accumulator content is gated, corresponding to the
command(==[, >=[, <=[ ...) with the content of the Program Stack . The transition from
Word to Logic processing occurs in this program line. The Logic Accumulator is set or
reset, depending on the result of the comparison.
Line 6: The result of the complete logical process is assigned to output O15.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-79

7-80

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.9

Shift Commands

3.9.1 SHIFT LEFT (<<) <<


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

<< (SHIFT LEFT)

Byte/Word/Double
Constant
2.0 + 0.2 x n
2.0 + 0.2 x n
6
8

Operands: B, W, D, K
Operation:
Since the sign bit (MSB) is included with this command, it is grouped in with arithmetic commands.
For this reason and out of time considerations, this command should not be used for the isolation of bits.
A SHIFT LEFT instruction causes the contents of the Word Accumulator to be multiplied by two. For this
purpose, the bits in the Accumulator are simply shifted by one place to the left. The number of the shift
operations is determined via the operand. Thus the set bits, which are shifted beyond the Accumulator to
the left, are lost; the Accumulator is filled with nulls from the right-hand side. With operand contents
greater than 32, the operand value Modulo 32 is used, i.e. the integer remainder from the division (operand
value)/32.
Example:
The content of the Double word D8 is to be shifted four times to the left and then stored in D12.
Initial state:

Double word D8 = 3E 80 (hex)


Double word D12 = ?

The Accumulator content is shown here in binary notation, and the operand content in hexadecimal
notation.
Line Instruction

Accumulator content

Operand content

xxxxxxxx

xxxxxxxx

xxxxxxxxx

xxxxxxxxx

L D8

00000000

00000000 00111110

10000000

<< K+1

00000000

00000000 01111101

00000000

<< K+1

00000000

00000000 11111010

00000000

<< K+1

00000000

00000001 11110100

00000000

<< K+1

00000000

00000011 11101000

00000000

= D12

00000000

00000011 11101000

00000000

Line 1:
Line 2 to 5:

Line 6:

3/2000

00

00

3E

80

00

03

E8

00

Load Double word D8 into the Accumulator.


The content of the Word Accumulator is shifted to the left by the number of bits
specified in the operand. The complete operation can also be undertaken with the
command << K+4.
The result is stored in the Double word D12.

TNC 416/TNC 406/TNC 306

Commands

7-81

3.9.2 SHIFT RIGHT (>>) >>


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

>> (SHIFT RIGHT)

Byte/Word/Double
Constant
2.0 + 0.2 x n
2.0 + 0.2 x n
6
8

Operands: B, W, D, K
Operation:
Since the sign bit (MSB) is included with this command, it is grouped in with arithmetic commands.
For this reason and out of time considerations, this command should not be used for the isolation of bits.
A SHIFT RIGHT instruction causes the contents of the Word Accumulator to be divided by two. For this
purpose, the bits in the Accumulator are simply shifted by one place to the right. The number of the shift
operations is determined via the operand. Thus the set bits, which are shifted beyond the Accumulator to
the right, are lost; the Accumulator is filled according to the sign, from the left-hand side. With operand
contents greater than 32, the operand value Modulo 32 is used, i.e. the integer remainder from the division
(operand value)/32.
Example:
The content of the Double word D8 is to be shifted four times to the right and then stored in D12.
Initial state:

Double word D8 = 3E 80 (hex)


Double word D12 = ?

The Accumulator content is shown here in binary notation and the operand content in hexadecimal
notation.
Line Instruction

Accumulator content

Operand
content

xxxxxxxx

xxxxxxxx

xxxxxxxx

xxxxxxxx

L D8

00000000

00000000 00111110

10000000

>> K1

00000000

00000000 00011111

01000000

>> K1

00000000

00000000 00001111

10100000

>> K1

00000000

00000000 00000111

11010000

>> K1

00000000

00000000 00000011

11101000

= D12

00000000

00000000 00000011

11101000

Line 1:
Line 2 to 5:

Line 6:

7-82

00

00

3E

80

00

00

03

E8

Load Double word D8 into the Accumulator.


The content of the Word Accumulator is shifted to the right by the number of bits
specified in the operand. The complete operation can also be undertaken with the
command >> K+4.
The result is stored in Double word D12.

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-83

3.10

Bit commands

3.10.1 BIT SET (BS, BSX)


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

BS

BS (BIT SET)

Byte/Word/Double
2.0 to 2.4
6

Constant
2.0
8

Operands: B, W, D, K, X

Operation:
With this command, each bit in the Accumulator can be acted on. The addressed bit is set to "1"
through the use of the BS command. The selection (addressing) of the corresponding bit is derived
from the content of the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to
the LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 is
used, i.e. the integer remainder from the division (operand value)/32.
Example:
Load Double word D8 in the Accumulator, set the bit 0 of the Accumulator to "1" and store the result
in Double word D12.
Initial state:

Double word D8 = 3E 80
Double word D12 = ?

(hex)

Accumulator and operand contents are shown here in hexadecimal notation.


Line Instruction

Accumulator content
xx

xx

xx

xx

L D8

00

00

3E

80

BS K+0

00

00

3E

81

= D12

00

00

3E

81

Operand content

00

00

3E

80

00

00

3E

81

Line 1: Load Double word D8 into the Accumulator.


Line 2: The bit specified in the operand is set to 1.
Line 3: The result is stored in Double word D12.

7-84

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.10.2 BIT RESET (BC, BCX) BC


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

BC (BIT CLEAR)

Byte/Word/Double
2.2 to 2.6
6

Constant
2.2
8

Operands: B, W, D, K, X
Operation:
With this command, each bit in the Accumulator can be acted on. The addressed bit is set to "0"
through the use of the BC command. The selection (addressing) of the corresponding bit is derived
from the content of the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to
the LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 is
used, i.e. the integer remainder from the division (operand value)/32.
Example:
Load Double word D8 in the Accumulator, set bit 0 of the Accumulator to "0" and store the result in
Double word D12.
Initial state:

Double word D8 = 3E
Double word D12 = ?

81 (hex)

Accumulator and operand contents are shown here in hexadecimal notation.


Line Instruction

Accumulator content
xx

xx

xx

xx

L D8

00

00

3E

81

BC K+0

00

00

3E

80

= D12

00

00

3E

80

Operand content

00

00

3E

81

00

00

3E

80

Line 1: Load Double word D8 into the Accumulator.


Line 2: The bit specified in the operand is set to "0".
Line 3: The result is stored in Double word D12.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-85

3.10.3 BIT TEST (BT, BTX)


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

BT

BT (BIT TEST)

Byte/Word/Double
2.2 to 2.8
8

Constant
2.2 to 2.4
0

Operands: B, W, D, K, X
Operation:
With this command, the status of each individual bit in the Accumulator may be interrogated. Direct
transition from Word to Logic execution takes place. The BIT TEST tests the status of a bit from the
Word Accumulator and then acts correspondingly on the Logic Accumulator. If the tested bit is "1",
then the Logic Accumulator is also set to "1"; if it is "0" ,it is set to "0". The program continues in logic
execution. The selection (addressing) of the corresponding bit is derived from the content of the
specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to the LSB and bit 31 the
MSB. For operand contents larger than 32, the operand value Modulo 32 is used, i.e. the integer
remainder from the division (operand value)/32.
Example:
Load Double word D8 in the Accumulator, and assign the logic state of bit 0 to an Output.
Initial state:

Double word D8 = 3E 81
Output
O12 = ?

(hex)

Word Accumulator and operand contents are shown here in hexadecimal notation, the Logic
Accumulator in binary representation.
Line Instruction

Accumulator content
xx

xx

xx

xx

L D8

00

00

3E

81

BT K+0

00

00

3E

81

= O12

Operand content

00

x x x x x x 1 x x x x x x x

00

3E

81

Line 1: Load Double word D8 into the Accumulator.


Line 2: The bit specified in the operand is tested as to its status.
Line 3: The Logic Accumulator is assigned to Output O12.

7-86

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-87

3.11

Stack operations

It should be noted that with Stack operations all read/write operations on the Data Stack take place
according to the LIFO principle (Last In First Out).

3.11.1 Load data onto Data Stack (PS)PS


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

PS (PUSH)
Logic
4.2
24

Byte/Word
5.4/5.0
26

Double
5.5
22

Constant
4.2
24

Logic Execution with the PS Command


Operands: M, I, O, T, C
Operation:
With the PS command, data can be buffered. Thus the addressed operand is loaded onto the Data
Stack. Since the Data Stack is organized as 16 bit, a minimum width of one Word must be used in
writing to it. During this the operand value is copied into bit 7 of the current address in the Data
Stack. The free bits of the reserved memory are undefined or unused. In the event of a Stack
overflow, an error message will be issued.
Memory allocation in the Data Stack:
Bit 15
7
0
x x x x x x x x L x x x x x x x

Word Execution with the PS Command


Operands: B, W, D, K
Operation:
With the PS command, data can be buffered. Thus the addressed memory area (B, W, D, K) is
copied into the current address of the Data Stack. With Word execution, two Words are reserved as
standard on the Data Stack per PS command. The operand is extended in the Stack with sign
justification corresponding to the MSB. In the event of a stack overflow, an error message will be
issued.
Memory allocation in the Data Stack upon saving of:

Byte

Bit 31
X X X X X X X X X X X X X X X X

15
7
0
X X X X X X X X B B B B B B B B

Word

X X X X X X X X X X X X X X X X

W WW WW WW W W W W WW WW W

Double word

DDDDDDDDDDDDDDDD

DDDDDDDDDDDDDDDD

Constant

K K K K K K K K K K K K K K K K

K K K K K K K K K K K K K K K K

7-88

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.11.2 Pull data from Data Stack (PL)


Abbreviation for PLC Editor:

PL (PULL)
Logic
3.4
20

Execution time [s]


Number of bytes

Byte/Word
3.8
20

Double
4.2
18

Constant
-------

Logic Execution with the PL Command


Operands: M, I, O, T, C
Operation:
The PL command complements the PS command. Data which are saved with PUSH can be taken
from the Data Stack again with PULL. With logic execution, bit 7 is copied from the current address
of the Data Stack into the addressed operand with a PL command. If the Stack is empty, an error
message will be issued.

Logic Execution with the PL Command


Operands: B, W, D
Operation:
The PL command complements the PS command. Data which are saved with PUSH can be taken
from the Data Stack again with PULL. With Word execution, two Words are copied from the current
address of the Data Stack into the addressed memory area with a PL command. If the Stack is
empty, an error message will be issued.

3.11.3 Load logic accumulator onto Data Stack (PSL) PSL


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

PSL (PUSH LOGICACCU)


3.0
20

Operands: none
Operation:
The Logic Accumulator can be buffered with the PSL command. For this purpose, the Logic
Accumulator is loaded onto the Data Stack. Since the Data Stack is organized as 16 bits, it must be
written to with a minimum width of one Word. During this the content of the Logic Accumulator is
copied into the current address of the Data Stack. The free bits of the reserved memory are
undefined or unused. In the event of a Stack overflow, an error message will be issued.
Memory allocation in the Data Stack:
Bit 15
7
0
x x x x x x x x L x x x x x x x

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-89

3.11.4 Load word accumulator onto Data Stack (PSW) PSW


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

PSW (PUSH WORDACCU)


3.4
20

Operands: none
Operation:
The content of the Word Accumulator can be buffered with the PSW command. For this purpose,
the Word Accumulator is copied into the Data Stack. The content of the Word Accumulator (32 bit)
reserves two Words on the Data Stack. In the event of a stack overflow, an error message will be
issued.

3.11.5 Pull logic accumulator from Data Stack (PLL)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

PLL

PLL (PULL LOGICACCU)


2.2
16

Operands: none
Operation:
The PLL command complements the PSL command. With a PLL instruction, bit 7 from the current
address of the Data Stack is copied into the Logic Accumulator. If the stack is empty, an error
message will be issued.

3.11.6 Pull word accumulator from Data Stack (PLW)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

PLW (PULL WORDACCU)


2.6
16

Operands: none
Operation:
The PLW command complements the PSW command. With a PLW instruction, two Words are
copied from the Data Stack into the Word Accumulator. If the stack is empty, an error message will
be issued.

7-90

TNC 416/TNC 406/TNC 306

Commands

3/2000

Examples for the commands PS, PL, PSL, PSW, PLL, PLW
The Module 15 is to be called at a specific point in the program. After the return into the main
program, the original Accumulator content is again required for further program run.
Accumulator contents prior to the Call Module:
Line

1A 44 3E 18

49

Instruction
.
.
.

Accumulator Contents

1 A

4 4

3 E

1 8

50

PSW

1 A

4 4

3 E

1 8

52

CM 15

54

PLW

1 A

4 4

3 E

1 8

55

.
.
.
Data stack:
1 A
3 E

4 4
1 8

Line 50: Save the Word Accumulator onto the Data Stack.
Line 52: Subprogram 15 is called up.
Line 54: The original Accumulator contents are transferred back from the Data Stack and
is available for further program run.
Note:
The sequence for stack operations is the same for all commands. Only the data width varies.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-91

7-92

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.12

Jump commands

3.12.1 Unconditional jump (JP)


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

JP

JP (JUMP)

Jump processed
2.2
8

Jump not processed


----

Operands: jump address (LBL)


Operation:
A JP command instructs the processor to continue the program at the specified jump address
(Label). This command interrupts a logic sequence.

3.12.2 Jump if Logic Accumulator = 1 (JPT)


Abbreviation for PLC Editor:

JPT (JUMP IF TRUE)

Jump processed
Jump not processed
Execution time [s]
3.0 to 3.4
1.0 to 1.4
Number of bytes
12 (10)
Byte information in brackets:
A shorter command is employed in certain high-priority program sequences.
Operands: jump address (LBL)
Operation:
A JPT command is a conditional jump command. If the Logic Accumulator is "1", the program is
continued from the specified jump address (Label). If the Logic Accumulator is "0" the jump is not
processed. This command interrupts a logic sequence.

3.12.3 Jump if Logic Accumulator = 0 (JPF)


Abbreviation for PLC Editor:

JPF

JPF (JUMP IF FALSE)

Jump processed
Jump not processed
Execution time [s]
3.0 to 3.4
1.0 to 1.4
Number of bytes
12 (10)
Byte information in brackets:
A shorter command is employed in certain high-priority program sequences.
Operands: jump address (LBL)
Operation:
A JPF command is a conditional jump command. If the Logic Accumulator is "0", the program is
continued from the specified jump address (Label). If the Logic Accumulator is "1", the jump is not
processed. This command interrupts a logic sequence.
3/2000

TNC 416/TNC 406/TNC 306

Commands

7-93

Example for the commands JP, JPT, JPF


A certain program section is to be skipped, depending on Input 15.
Initial state:

Input I5 = 1

Line Instruction

Accumulator content
Bit

31

. . .
7
0
... x x x x x x X x x x x x x x

L I5

... x x x x x x 1 x x x x x x x

JPT 10

... x x x x x x 1 x x x x x x x

L I3

O M500

= O20

LBL 10

L M100

Line 1:
Line 2:
Line 3:
Line 4:
Line 5:
Line 6:

7-94

Operand content

... x x x x x x 0 x x x x x x x

Load the operand contents in the Accumulator.


Dependent on Input I5, a program jump is processed.
Skipped in this example.
Skipped in this example.
Skipped in this example.
Jump address: The program run is continued from here.

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.12.4 Call Module (CM)


Abbreviation for PLC Editor:

CM

CM (CALL MODULE)

Jump processed

Jump not processed

Execution time [s]

5.0

----

Number of bytes

22

Special Library Call:


Execution time [s]
Number of bytes

6.2
24

----

Operands: jump address (LBL)


Operation:
A Call Module instructs the processor to leave the main program and process the Module
designated by the jump address (LBL). Modules are independent subprograms and are terminated
by the command EM. They can also be called at multiple points in the main program. This command
interrupts a logic sequence.

3.12.5 Call Module if Logic Accumulator = 1 (CMT)


Abbreviation for PLC Editor:

CMT

CMT (CALL MODULE IF TRUE)

Jump processed

Jump not processed

Execution time [s]


Number of bytes

6.8 to 7.2
26 (24)

1.0 to 1.4

Special Library Call:


Execution time [s]
Number of bytes

7.4
28

1.4

Byte information in brackets:


A shorter command is employed in certain high-priority program sequences.
Operands: jump address (LBL)
Operation:
A CMT command is a conditional Call Module. If the Logic Accumulator is "1", the Module with the
specified jump address (Label) is processed. If the Logic Accumulator is "0", the main program
continues without a Call Module. This command interrupts a logic sequence.

3.12.6 Call Module if Logic Accumulator = 0 (CMF)


Abbreviation for PLC Editor:

CMF (CALL MODULE IF FALSE)

Execution time [s]


Number of bytes

Jump processed
6.8 to 7.2
26 (24)

Jump not processed


1.0 to 1.4

Special Library Call:


Execution time [s]
Number of bytes

7.4
28

1.4

3/2000

CMF

TNC 416/TNC 406/TNC 306

Commands

7-95

Byte information in brackets:


A shorter command is employed in certain high-priority program sequences.
Operands: jump address (LBL)
Operation:
A CMF command is a conditional Call Module. If the Logic Accumulator is "0", the Module with the
specified jump address (Label) is processed. If the Logic Accumulator is "1", the main program
continues without a Call Module. This command interrupts a logic sequence.
Example for the commands CM, CMT, CMF
A certain Module is to be called, depending on input I5.
Initial state:

Input I5 = 0

Line Instruction

Accumulator content
Bit

31

Operand content

. . .
7
0
... x x x x x x X x x x x x x x

L I5

... x x x x x x 0 x x x x x x x

CMF 10

... x x x x x x 0 x x x x x x x

L M100

499 EM

... x x x x x x 1 x x x x x x x

501 L I3

... x x x x x x 0 x x x x x x x

502 OM 500

... x x x x x x 1 x x x x x x x

503 = O20

... x x x x x x 1 x x x x x x x

500 LBL 10

504 EM
Line 1:
Line 2:
Line 499:
Line 500:
Line 501:
Line 502:
Line 503:
Line 504:
Line 3:

Load the operand contents in the Accumulator.


Dependent on input I5, the Call Module is processed.
End Module of the main program.
Start of the Module, identified by LBL.
Instruction in the subprogram.
Instruction in the subprogram.
Instruction in the subprogram.
End Module: Effects the return to the main program.
The main program continues at this point once the Module is processed.

7-96

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.12.7 End of Module, Program End (EM) EM


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

EM (END OF MODULE)
2.0
4

Operands: none
Operation:
Every program and/or every subprogram (Module) is terminated with an EM command. An EM
command in a Module initiates the return jump to the Call Module (CM, CMT, CMF). The program is
continued with the instruction following the Call Module. The command EM is handled as program
end criterion; thus subsequent program instructions can be reached using a jump address.

3.12.8 Jump Label (LBL)

LBL

Abbreviation for PLC Editor:

LBL (LABEL)

Execution time [s]


Number of bytes

0
0

Operands: 0 to 1023
Operation:
The jump label defines a program position as an entry point for the CM and JP commands. Jump
labels may be allocated addresses in the range 0 to 1023.

3.12.9 End of Module if Logic Accumulator = 1 (EMT)


Abbreviation for the PLC Editor: EMT (END OF MODULE IF TRUE)
Operation:
An EMT command only initiates a return jump to the Call Module (CM, CMT, CMF) when the Logic
Accumulator is "1".

3.12.10 End of Module if Logic Accumulator = 0 (EMF)


Abbreviation for the PLC Editor: EMF (END OF MODULE IF FALSE)
Operation:
An EMF command only initiates a return jump to the Call Module (CM, CMT, CMF) when the Logic
Accumulator is "0".

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-97

7-98

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.13

CASE statement

3.13.1 Indexed call module (CASE) CASE


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

CASE (CASE OF)


Byte
12.0
46

Word
12.0
44

4 Bytes must be added to the length for each entry in the table (CM).
Operands: B, W
Operation:
With the CASE command, a specific subprogram may be selected from a list of Call Modules (CM).
These CM commands immediately follow the CASE command and are internally numbered in an
ascending sequence from 0 to a maximum of 127. The content of the operands (B, W) addresses
the required Module.

3.13.2 End indexed call module (ENDC)


Abbreviation for PLC Editor:

Execution time [s]


Number of bytes

ENDC

ENDC (ENDCASE)
Byte
0
0

Word
0
0

Operands: none
Operation:
The ENDC command is used in conjunction with the CASE command. It must immediately follow
the list of CM commands.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-99

Structure of a CASE statement:


Internal Addressing (0 to max. 127)
CASE B 150
CM 100 <------- (0)
CM 200 <------- (1)
CM 201 <------- (2)
CM 202 <------- (3)
CM 203 <------- (4)
CM 204 <------- (5)
CM 300 <------- (6)
ENDC

1
2
3
4
5
6
7
8
9

Line 1: Command + operand; The internal address of the required Module must be loaded into the
operand
Line 2: Call Module for operand contents 0
Line 3: Call Module for operand contents 1
Line 4: Call Module for operand contents 2
Line 5: Call Module for operand contents 3
Line 6: Call Module for operand contents 4
Line 7: Call Module for operand contents 5
Line 8: Call Module for operand contents 6
Line 9: End of the CASE statement

3.14

Commands for STRING Execution

STRING execution is only possible with TNC 406/TNC 416!


STRING execution allows the creation and manipulation of any texts via the PLC program. These
texts may be displayed in the PLC window of the screen by the use of Module 9082, and/or deleted
again with Module 9080 (refer to PLC modules). A STRING Accumulator and four STRING memories
are provided in the control for STRING execution. A maximum of 128 characters may be loaded into
this.
STRING accumulator:

128 Characters

128

STRING memory:

128 Characters

128

S0
S1
S2
S3
Example:
1
C O O L A N T

7-100

128
1

O N

TNC 416/TNC 406/TNC 306

Commands

3/2000

STRING Accumulator and STRING memory are volatile, and so are again deleted upon powering off.
For STRING execution, the new operand "S" has been introduced. The operand "S" may be used with
various arguments.
Explanation of the Operand:
The operand "S" is only used in STRING execution. The following locations may be addressed with
the various arguments:
STRING memory: Should a STRING memory be addressed, the number of the required memory
(S0-S3) must be specified after the Operand-Designation.
Immediate STRING: A STRING can also be entered directly into the PLC program. The Text
STRING, which may contain 0 37 characters, must be identified by quotation marks.
Example: S "COOLANT 1 ON"
Text from the PLC error messages and/or from the PLC dialogs: Text from the active error
message or dialog files may be read by the input of the line number.
PLC-ERROR:
PLC-DIALOG:

S#Exx
S#Dxx

xx: Number from the PLC-Error Messages (0 to 199)


xx: Number from the PLC-Dialogs (0 to 199)

The character sequence #Exx or #Dxx is entered in the Argument <arg> for the STRING-Command.
A 5 Byte long character train <SUB> E0xx or <SUB> D0xx is loaded into the Accumulator ( <SUB>
= ASCII <SUB> ). Instead of this character train, the line xx of the active error message or dialog file
is read for display on the screen.
Note:
The execution times depend on the length of the STRINGS. The specified times indicate maximum
values. For the Immediate STRINGS, the length "n" of the STRINGS must respectively be added to
the command length; should this be odd, the next larger even length must be added.

3.14.1 LOAD (L)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

L (LOAD)

STRING memory:
Immediate STRING:
STRING from error message or dialog files

< 80
10
18 + n
24

Operands: S <arg>
Operation:
The STRING Accumulator is loaded with this L command. The selection of the STRINGS to be
loaded, proceeds using the Argument <arg> after the operand designation.
Refer also to operand explanation.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-101

3.14.2 ADD (+)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

STRING memory:
Immediate STRING:
STRING from error message or dialog files

< 80
10
18 + n
24

Operands: S <arg>
Operation:
With this command another STRING is added to the STRING in the STRING Accumulator. The
selection of the STRINGS, which should be added, proceeds using the Argument <arg> after the
operand designation. Refer also to operand explanation. The resultant STRING must not be longer
than 128 characters.

3.14.3 Storing a STRING (=)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

STRING memory
Immediate STRING
STRING from error message or dialog files

< 80
10

Operands: S <arg>
Operation:
With the = command a STRING from the STRING Accumulator is stored in a STRING memory. The
selection of the memory, into which the STRING should be copied, proceeds using the Argument
<arg> after the operand designation. Whereby only the Arguments 0 3, which address a STRING
memory (S0 S3) are valid here.

7-102

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.14.4 Overwriting of a STRING (OVWR)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

OVWR (OVERWRITE)

STRING memory
Immediate STRING
STRING from error message or dialog files

< 80
10

Operands: S <arg>
Operation:
With the OVWR command a STRING from the STRING Accumulator is stored in a STRING memory.
This command functions in a similar manner to the = command, with the difference that the
character "STRING-End" is not transferred alongside. By this means, the beginning of a STRING
which is already in the STRING memory, can be overwritten.
The selection of the memory, into which the STRING should be copied, proceeds using the
Argument <arg> after the operand designation. Whereby only the Arguments 0 3, which address a
STRING memory (S0 S3) are valid here.
Example for storing a string:

Initial condition:

PLC ERROR MESSAGE (Line 10):HYDRAULIC OIL

128

S0
S1
S2
S3
Instructions
Line

STRING Accumulator

Instruction
1

128

L S#E10

H Y D R A U L I C

O I L

= S0

H Y D R A U L I C

O I L

Final condition:
S0
S1
S2
S3

128
H Y D R A U L I C

O I L

Line 1: Load the STRING from PLC ERROR MESSAGE line 10 into the STRING accumulator.
Line 2: The contents of the STRING accumulator is loaded into the STRING memory S0

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-103

3.15

Submit Programs

Submit programs are subprograms which the PLC submits to the NC for processing. This allows
tasks to be performed which are very processor-intensive, require program loops or must wait for
external results. It is assumed, however, that these programs are not bound by a particular time
frame. Depending on processor loading, each Submit program is allocated a certain computing
power, but always at least 5% of the total power. Submit programs are started from the PLC
program and can access all the same data memories (M/B/W/D) as can the main program. This can
lead to problems in certain circumstances. Such problems can be avoided if the data processed by
the PLC program are clearly separated from the data processed by the Submit program.
Up to eight Submit programs can be entered in a queue (Submit Queue). Each receives an
"Identifier", a number between 1 and 255 allocated by the NC, which is transferred into the Word
Accumulator. With this "Identifier" and the REPLY function, it can be interrogated whether or not the
program is in the queue, is being processed or is already complete. The Submit programs are
executed in the order of their placement in the queue. Should an error occur during the execution of
the Submit programs, the following Markers are set:
M3168:
M3169:
M3170:
M3171:
M3172:

Overflow during Multiplication


Division by 0
MODULO incorrectly executed
Error status for PLC module
Reserved for errors, which the PLC programmer would like to intercept

These markers are listed separately in the submit job. This means that the same markers can be
edited as those in the PLC run program without changing the original markers.
Exact times cannot be given for the commands for the management of the Submit queue. The
execution times denote maximum values.

3.15.1 Call up of the Submit Program (SUBM)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

SUBM (SUBMIT)
< 30
10

Operands: jump address (LBL)


Operation:
The SUBM command allots an "Identifier" (1 to 255) to the subprogram, designated by the jump
address (LBL). Simultaneously, the allocated number is written to the Word Accumulator. If there
are already programs transferred into the Submit queue, the addressed program will not be
processed until the program immediately prior to it is finished. A submission to the queue may only
take place from a PLC program, a SUBM command in a Submit program is not possible.
If no location is free in the queue, or if the SUBM command is programmed in a Submit program
(nesting), a "0" will be returned to the Word Accumulator.

7-104

TNC 416/TNC 406/TNC 306

Commands

3/2000

3.15.2 Status Interrogation of a Submit Program (RPLY)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

RPLY (REPLY)
<5
10

Operands: B
Operation:
With the RPLY command the Status of the Submit program is interrogated with the specified
Identifier. This Identifier must already be stored in a Byte prior to the calling up of the Submit
program. With the RPLY command and the memory address specified above, which contains the
Identifier, one of the following messages about the status is transferred to the Word Accumulator:
Word Accumulator 0: Program complete/not in the queue
Word Accumulator 1: Program running
Word Accumulator 2: Program in the queue

3.15.3 Cancellation of a Submit Program (CAN)


Abbreviation for PLC Editor:
Execution time [s]
Number of bytes

CAN (CANCEL)
< 40
10

Operands: B
Operation:
With the CAN command the Submit-Program with the specified Identifier is canceled during
execution or removed from the queue. This Identifier must already be stored in a Byte prior to the
calling up of the Submit-Program. After the cancellation of the Program, the next Submit program in
the queue will immediately be processed.
The PLC modules 908x cannot be canceled with CAN at any desired point.
In these cases, the RPLY command must be used to check whether or not the CAN command may
be used.

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-105

Example of the use of the SUBM command:


Dependent on Input I10 the subprogram with the Label LBL 300 is handed over to the NC for
processing. In addition, the execution of the subprogram is checked in the main program with the
RPLY command and canceled with the CAN command in conjunction with Input I11.

Line

Instruction

Program Comments:

1
2

L
JPF

I10
100

3
4

RPLY
<>

B 128
K+0

JPT

100

6
7
8
9
10

SUBM 300
=
B 128
LBL 100
L
I 11
JPF
110

11

CAN

12

XX

LBL 110

EM

;Interrogate state of Input I10


;Dependent on Input I10 skip
;Call Module
;Interrogate status of the Submit program
;Submit program already transferred to
;the NC for processing ?
;If program already transferred to the NC,
;renewed program call skipped
;Call up Submit program
;Store Identifier in Byte 128
;Jump address
;Interrogate state of Input I11
;Dependent on Input I11, skip the deletion
;of the Submit program
;Interrupt execution of the Submit program
;or remove program from the queue
;Jump address
;Continuation
;Main program
;
;End main program

XX
XX
XX
XX
XX

LBL

EM

B 128

300

;Begin Submit program (is added as with Modules


;at the end of the main program)
;
;
;End Submit program

In this case, the contents of the Submit program could, for example, be a display in the PLC
window, which can be done via a fixed PLC Module.

7-106

TNC 416/TNC 406/TNC 306

Commands

3/2000

3/2000

TNC 416/TNC 406/TNC 306

Commands

7-107

3.16

INDEX-Register

Under the control of the PLC programmer this register can be used for data transfer, intermediate
storage of results and for indexed addressing of operands. The register is 32 bits wide but only the
lower 16 bits are used for index addressing. The X register can be used anywhere in the program
there is no contents validity check however there is a check for address space overflow with
indexed write accesses.

Example: =

B100[X]

If the address space is overshot the error message PLC: index range incorrect flashes in the
display. Reset with END to display the error line in the PLC Editor.
Before using a command with the index-register it must be assigned a defined value. At the
beginning of each PLC cycle the index register is set to 0.

The following operands can be addressed.


Mn[X]
In[X]
On[X]
Cn[X]
Tn[X]

Operand number = n+X

Bn[X]
Wn[X]
Dn[X]

Operand number = n+X


Operand number = n+2*X
Operand number = n+4*X

BTX
BCX
BSX

Contents of index register = operand


Contents of index register = operand
Contents of index register = operand

Commands for operating the Index Register:


The following commands have been introduced to permit data interchange between the Word
Accumulator and the Index Register or between the Stack and Index Register:
LX
=X
PSX
PLX
INCX
DECX

7-108

(Load Index to Accu)


(Store Accu to Index)
(Push Index Register)
(Pull Index Register)
(Increment Index Register)
(Decrement Index Register)

TNC 416/TNC 406/TNC 306

Commands

Index Register --> Word Accumulator


Word Accumulator --> Index Register
Index Register --> Stack
Stack --> Index Register

3/2000

3.17

Program Structures

A program is split up into program sequences so as to make it clearer. To do this the programmer
uses jump labels (LBL) and conditional and unconditional jumps.
When structured instructions are used, the jump labels and jump commands are created by the
Compiler. Remember that internal jump labels are generated to implement these structured
commands, so the total number of available jump labels will be reduced accordingly. Structured
instructions can be nested to up to 16 levels but there must be no "interleaving".
Right:

IFT
...
WHILEF
...
ENDW
...
ENDI

Wrong: IFT
...
WHILEF
...
END
...
ENDW

Instructions IFT, IFF, WHILET, WHILEF, ENDW, UNTILT and UNTILF require a valid gating result in
the Logic Accumulator. They terminate the gating chain. Instructions ELSE, ENDI and REPEAT
require all gating chains to be terminated first.

3.17.1 IF ... ELSE ... ENDI Structure


The IF ... ELSE ... ENDI structure permits the alternative processing of two program branches
depending on the value in the Logic Accumulator. The ELSE branch can be omitted. The following
commands are available:

IFT
IFF
ELSE
ENDI

(If Logic Accu True)


(If Logic Accu False)
(else)
(End of IF-Structure)

Following code only if Logic Accumulator=1


Following code only if Logic Accumulator=0
Following code only if IF not fulfilled
End of IF Structure

Example:
L
IFT
....
ELSE
....
ENDI

3/2000

I0
;If Logic Accu=1
;Program code for I0 = 1
;
;Program code for I0 = 0
;end of conditional processing

TNC 416/TNC 406/TNC 306

Commands

can be omitted
can be omitted

7-109

3.17.2 REPEAT ... UNTIL Structure


The REPEAT ... UNTIL structure repeats a program sequence until a condition is fulfilled.
Under no circumstances may this structure wait for an external event in the cyclical PLC
program to happen!
The following commands are available:

REPEAT
UNTILT
UNTILF

(Repeat)
(Until True)
(Until False)

Repeat program sequence from here


Repeat sequence until Logic Accumulator=1
Repeat sequence until Logic Accumulator=0

A REPEAT ... UNTIL loop is always run at least once!


Example:
=
REPEAT
.....
LX
>=
UNTILT

M100

K100

;end of previous chain


;repeat following code
;code to be executed
;load Index Register
;check Index Register
;repeat until X>=100

3.17.3 WHILE ... ENDW Structure


The WHILE ... ENDW structure repeats a program sequence if a condition is fulfilled.
Under no circumstances must this structure wait for an external event in the cyclical PLC program to
happen!
The following commands are available:

WHILET
WHILEF
ENDW

(While True)
(While False)
(End While)

Execute sequence if Logic Accumulator=1


Execute sequence if Logic Accumulator=0
End of program sequence, go back to beginning

A WHILE ... ENDW loop is only run when the WHILE condition is fulfilled at the beginning. The
execution condition must be repeated before the ENDW instruction. The condition can also be
repeated differently than before the WHILE instruction!
Example:
.....
L
WHILET
.....
L
A
ENDW

M100

M101
M102

;create condition for 1st WHILE scan


;execute following code if Logic Accumulator = 1
;code to be executed
;create condition for repeat processing
;next condition
;return to WHILE scan

Two internal jump labels are generated for the WHILE ... ENDW structure.

7-110

TNC 416/TNC 406/TNC 306

Commands

3/2000

4 PLC Modules for TNC 416/406


A number of PLC modules are available for PLC functions that cannot be executed or which are very
complicated to execute with PLC commands. The error status is displayed after execution of the
module in Marker 3171.

4.1

Copy in Marker or Word Range (Module 9000/9001)

Modules 9000 (Marker) and 9001 (Byte/Word/Double) copy a block with a certain number of markers
or bytes beginning from the start address to the specified target address.
For module 9001 the length should always be defined in bytes.
Constraints:
- Copying is sequential, starting with the first memory cell. This means that the function is not
guaranteed when the source and destination blocks overlap and the source block begins at a lower
address than the destination block. In this case the overlapping part of the source block is
overwritten before copying takes place.
Possible errors:
- A block of the defined length cannot be read from the defined address in the marker or word RAM
(address is too high or block is too long).
- A block of the defined length cannot be written to the defined address in the marker or word RAM
(address is too high or block is too long).
Call:
PS
PS
PS
CM

B/W/D/K
B/W/D/K
B/W/D/K
9000

<Number 1st marker source block>


<Number 1st marker destination block>
<Length of block in markers>
Transfer in marker range

B/W/D/K
B/W/D/K
B/W/D/K
9001

<Number 1st byte source block>


<Number 1st byte destination block>
<Length of block in bytes>
Transfer in word range

or
PS
PS
PS
CM

Error status after call: M3171 =

3/2000

0: Block was transferred


1: Error conditions see above

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-111

4.2

Read Edges of PLC Inputs (Module 9004)

Module 9004 detects the rising or falling edges of PLC inputs and sets corresponding edge markers
or bits in the specified byte range. Changes to inputs can be detected only if a change has also
been made to the PLC memories.
Constraints:
Ensure that the edge markers or bytes are placed in a range which is still free
The edge bytes are assigned beginning with the LSB in ascending order and rising byte
address; unnecessary bits are deleted.
Possible errors:
One of the input parameters is negative.
The parameter for the edge evaluation is set greater than three.
The sum of the 1st PLC input and the number of PLC inputs is greater than the
maximum permitted PLC input number (I383).
The sum of the 1st edge marker and the number of PLC inputs is greater than the
maximum permitted marker number (M3279).
The sum of the 1st edge byte and the number of bytes required is greater than the
maximum permitted byte number.
Call:
PS
PS
PS
PS

B/W/D/K
B/W/D/K
B/W/D/K
B/W/D/K

CM

9004

Error status after call: M3171

7-112

<Number 1st PLC input>


<Number 1st edge marker or 1st edge byte>
<Number of PLC inputs>
<edge evaluation>
0: rising edge; entry in edge marker
1: falling edge; entry in edge marker
2: rising edge; entry in edge byte
3: falling edge; entry in edge byte

=0:
=1:

TNC 416/TNC 406/TNC 306

Edge markers have been set


See above for error conditions

PLC Modules for TNC 416/406

3/2000

4.3

Read in Word Range (Module 9010/9011/9012)

A byte, word or double word is read from the defined position in the word memory and returned to
the stack as an output variable. Indexed reading in the memory is possible by specifying a variable
as the name of the memory cell.
Possible errors:
- The defined address is outside the valid range (0..1023).
- Module 9011: The defined address is not a word address (not divisible by 2).
- Module 9012: The defined address is not a double word address (not divisible by 4).
Call:
PS
CM
PL

B/W/D/K
9010
B

<Number of byte to be read>


read byte
<byte read>

(Address)

B/W/D/K
9011
W

<Number of word to be read>


read word
<word read>

(Address)

B/W/D/K
9012
D

<Number of double word to be read>


read double word
<double word read>

(Address)

(Value)

or
PS
CM
PL

(Value)

or
PS
CM
PL

(Value)

Example of Module 9010


Wortspeicher
B10

STACK

35
35 (80)

B35

80

B100

80

Error status after call: M3171 =

3/2000

..
.
PS B10
CM9010
PL
.. B100
.

0: Byte/word/double word was read


1: Error condition see above

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-113

4.4

Write in Word Range (Module 9020/9021/9022)

The defined byte, word or double word is written to the defined position in the word memory.
Indexed reading in the memory is possible by specifying a variable as the name of the memory cell.
Possible errors:
- The defined address is outside the valid range (0..1023).
- Module 9021: The defined address is not a word address (not divisible by 2).
- Module 9022: The defined address is not a double word address (not divisible by 4).
Call:

PS
PS
CM

B/W/D/K
B/W/D/K
9020

<Number of byte to be written>


<byte to be written>
write byte

(Address)

B/W/D/K
B/W/D/K
9021

<Number of word to be written>


<byte to be written>
write word

(Address)

B/W/D/K
B/W/D/K
9022

<Number of double word to be written>


<byte to be written>
write double word

(Address)

(Value)

or
PS
PS
CM

(Value)

or
PS
PS
CM

(Value)

Example of Module 9020


Wortspeicher
B10

STACK

35
120

B35

120

B100

120

Error status after call: M3171 =

7-114

35

..
.
PS B10
PS B100
CM9020
..
.

0: Byte/word/double word was written


1: Error condition see above

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

3/2000

4.5

Read Machine Parameter (Module 9032)

Reads the value of a machine parameter that is defined by its number and index from the editable
machine parameter list.
Constraints:
- The value of the machine parameter is returned as an integer, with the decimal point being shifted
by the number of possible places after the decimal. Example MP910.0 = 100.12 mm is read as
1001200 (four places after the decimal lead to a multiplication by 10000).
- Only the value from the editable machine parameter list is read, not any value in the run-time
memory.
- Zero must be given as the index for non-indexed machine parameters.
Possible errors:
- The machine parameter specified by the MP number and index does not exist.
- The module was not called from a Submit Job.
Call:
PS
PS
CM
PL

B/W/D/K
B/W/D/K
9032
B/W/D

<MP Number>
<MP Index>
<MP value> / <Error Code>
1: No such MP number
2: No separator
3: MP value out of range
4: MP not in file
5: No MP file found
6: Call was not from SUBMIT Job

Error status after call: M3171 =

4.6

0: MP was read
1: Error condition see above

Number Conversion binary to ASCII (Module 9051)

Converts a binary numerical value to an ASCII-coded decimal number in the format specified.
The specified number is converted to a decimal number and stored as a string in the specified
address.
The number is notated as a two's complement. When notated without a sign the absolute amount
of the number is converted without a sign being put before the string. With the signed notation a
sign ("+" or "-") is placed before the string in any event.
With the inch notation the numerical value is divided by 25.4 before being converted. If the number
has more decimal places than the total of specified places before and after the decimal point, then
the highest-value decimal places are omitted. With right-justified notation leading zeroes before the
decimal point are replaced by blanks, with left-justified notation they are suppressed. Trailing zeroes
after the decimal point are always converted.
Constraints:
- The decimal sign is defined by machine parameter MP7280 as a decimal comma (MP7280 = 0) or
a decimal point (MP7280 = 1).

3/2000

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-115

Possible errors:
- The number of the target string is outside the permitted range (0..3).
- There are more than 16 decimal places in all (before and after decimal point).
- No places before the decimal point are specified.
Call:
PS
PS

K/B/W/D
K/B/W/D

<numerical value to be converted>


<display mode (bit coded)>
Bit #3: display with sign
Bit #2: display converted to INCH
Bit #1/#0: Format
00: Sign and number left-justified
01: Sign left-justified, number right-justified
10: Sign and number right-justified
11: Not permitted

PS
PS
PS
CM

K/B/W/D
K/B/W/D
K/B/W/D
9051

<Number of places after the decimal point>


<Number of places before the decimal point>
<Target address in string buffer>

Error status after call: M3171 =

4.7

0: Number was converted


1: Error condition see above

Compute string length (Module 9071)

Computes the length of the string with the specified number in the string buffer.
Possible errors:
The number of the source string is outside the valid range (0..3).
The source string has been searched without an end of string (<NUL>) being found.
Call:
PS
CM
PL

K/B/W/D
9071
PL

<Number of source string>


<Length of string>

Error status after call: M3171 =

7-116

0: String length was computed


1: Error conditions see above

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

3/2000

4.8

Transmit String buffer to Log buffer (Module 9079)

Transmits the String buffer (0 to 3) to the log buffer.


Call:
PS
CM

K
9079

; string 0...3

Error status after call: M3171 =

4.9

0: String was transferred


1: String was not transferred

Delete PLC Window (Module 9080)

Deletes the screen window for the PLC status display. The background color of the window is
defined in machine parameter MP7320.2 or MP7356.0.
Constraints:
- This job cannot be aborted by a CAN command during processing of the module in a SUBMIT Job.
The module is also active when the currently selected screen shows no PLC status window (e.g.
large graphic displays) or when the screen with PLC status window is in the background.
Possible errors:
- The module has not been called from a SUBMIT Job.
Call:
CM

9080

Error status after call: M3171 =

4.10

0: Screen window was deleted


1: Error condition see above

Interrogate PLC Window (Module 9081)

Interrogates the status of the screen window for the PLC status display.
The status is transferred bit-coded to the stack. Bit #0 is set when a window for PLC status display
is on the selected screen. This is not the case with a full-page graphic display, when a program is
selected or in the MOD operating mode. Bit #1 is set when the screen with the PLC status window
is in the foreground. All other bits are canceled.
Call:
CM
PL

9081
B/W/D

<Status of screen window>

Marker M3171 is not affected.

3/2000

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-117

4.11

Display String (Module 9082)

Displays a string in the screen window for the PLC status display at the specified position and in the
specified color.
The string that is identified by the string number and which ends on the ASCII character <NUL> is
displayed in the screen window for the PLC status display on line 0 (top line) or 1 (bottom line) and
from column 0 (left margin) to 37 (right margin) in the specified color (1 to 15).
Line 0
Line 1
Column

37

References to PLC dialogs or PLC error messages are deleted. If the specified dialog or error
number is greater than the length of the corresponding file, then ASCII character `@' is displayed
instead . If the text contains a non-displayable character except the string end, then ASCII character
`^' is displayed instead.
Constraints:
- The character set that is used is determined by the size of the screen window, i.e. the current
operating mode, and cannot be modified. The color refers to one of the machine parameters
MP735x and can be seen from the following table:

Color 0:
Color 1:
Color 2:
Color 3:
Color 4:
Color 5:
Color 6:
Color 7:
Color 8:
Color 9:
Color 10:
Color 11:
Color 12:
Color 13:
Color 14:
Color 15:

Operating mode Machine


MP736x.0
MP7354.0
MP7356.0
MP7352.0
MP7353.0
MP7357.0
MP7352.1
MP7354.3
MP7350
MP7357.1
MP7354.1
MP7356.2
MP7356.1
MP7354.2
MP7352.2
MP7351

Operating mode Edit


MP736x.0
MP7355.0
MP7356.0
MP7353.0
MP7352.0
MP7358.0
MP7353.1
MP7355.3
MP7358.1
MP7355.1
MP7356.2
MP7356.1
MP7355.2
MP7356.2
MP7353.2
MP7351

If color 0 is specified, then the text appears in the same color as the last displayed character.
Because the complete line is always displayed again in the window when a string is displayed (even
when a column greater than 0 is specified), a text with the color 0 is always displayed in the color of
the numerical value to its left (e.g. color 11 when output is under 110% and color 15 when output is
over 110%) even though PLC Module 9082 only displays the numerical value again. If the color 0 is
specified for the first characters on a line however, then the color in which these characters are
displayed is defined in the MP7356.1.
If no screen window is currently shown for the PLC status display (window is not opened or in
background) the module will run through normally and the string is not displayed until the
7-118

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

3/2000

corresponding screen window is displayed again and provided the string has not been overwritten
by a repeat call of Module 9082 in the meantime. Module 9081 can be used to check whether the
display is currently active.
This job cannot be aborted by a CAN command during processing of the module in a SUBMIT Job.
Possible errors:
- The module has not been called from a SUBMIT Job.
- A line less than 0 or greater than 1 was specified.
- A column less than 0 or greater than 37 was specified.
- The number of the string is outside the permitted range (0..3).
- No end of string was found.
- The last character(s) in the string cannot be displayed in the screen window.
The string is not displayed on screen in any of these error modes.
Call:
PS
PS
PS
PS
CM

K/B/W/D
K/B/W/D
K/B/W/D
K/B/W/D
9082

Line number (0...1)


Column number (0...37)
Color number (0...15)
String number (0...3)

Error status after call: M3171 =

3/2000

0: String displayed (when screen window for


PLC status is displayed)
1: No display, error condition see above

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-119

4.12

Display Bar Chart (Module 9083)

Displays a bar chart in the screen window for the PLC status display on the specified line, with the
specified lengths and in the specified colors.
A bar chart can be displayed in the left half of each line in the PLC status window. In this mode the
ASCII text only appears in the right half of every line (19 characters max.).
Line 0
Line 1
Column

150

19

The operator must specify the line, maximum length (0...150), current length (<= maximum length)
and the colors of the bars or the margin and scale graduation (0...15). If the maximum length
exceeds 150 it is limited to 150. If current length exceeds maximum length then it is limited to the
maximum length.
The chart comprises a rectangular grid with the maximum length and height of the ASCII characters.
A scale graduation is shown at the top after every 10 units. The bar starts from the left hand edge of
the grid. The unused part of the grid is filled in with the background color.
Constraints:
- The height of the bar chart varies according to the size of the screen window, i.e. the current
operating mode, and cannot be modified.
The specified color refers to one of the machine parameters MP735x and can be seen from the
following table:

Color 0:
Color 1:
Color 2:
Color 3:
Color 4:
Color 5:
Color 6:
Color 7:
Color 8:
Color 9:
Color 10:
Color 11:
Color 12:
Color 13:
Color 14:
Color 15:

7-120

Operating mode Machine


MP736x.0
MP7354.0
MP7356.0
MP7352.0
MP7353.0
MP7357.0
MP7352.1
MP7354.3
MP7350
MP7357.1
MP7354.1
MP7356.2
MP7356.1
MP7354.2
MP7352.2
MP7351

TNC 416/TNC 406/TNC 306

Operating mode Edit


MP736x.0
MP7355.0
MP7356.0
MP7353.0
MP7352.0
MP7358.0
MP7353.1
MP7355.3
MP7358.1
MP7355.1
MP7356.2
MP7356.1
MP7355.2
MP7356.2
MP7353.2
MP7351

PLC Modules for TNC 416/406

3/2000

Color 2 is the background color for the screen window and can be used for margin and scale
graduations if these are not to be displayed. If no screen window is currently shown for the PLC
status display (window is not opened or in background) the module will cycle normally and the bar
chart will not be displayed until the corresponding screen window reappears and provided the chart
is not overwritten by a repeat call of Module 9083 in the meantime. Module 9081 can be used to
check whether the display is currently active. This job cannot be aborted by a CAN command during
processing of the module in a SUBMIT Job.
Possible errors:
- The module has not been called from a SUBMIT Job.
- A line less than 0 or greater than 1 was specified.
The bar chart is not displayed on screen in any of these error modes.
Call:
PS
PS
PS
PS
PS
CM

K/B/W/D
K/B/W/D
K/B/W/D
K/B/W/D
K/B/W/D
9083

Line number (0...1)


Color for bar (0...15)
Color for frame and scale graduation (0...15)
Current length of bar (0...150)
Maximum length of bar (0...150)

Error status after call: M3171 =

4.13

0: String displayed (when screen window for PLC status is


displayed)
1: No display, error condition see above

Reading the axis coordinates (Module 9040)

With Modules 9040 you can read the axis coordinates. The values are stored in five double words,
beginning with the given target address. Regardless of whether individual axes have been excluded
through MP10, the coordinate values are always read for all axes. The values for excluded axes
remain undefined. The coordinate value of an axis remains undefined until the reference point has
been traversed.
PS
PS

K/B/W/D
K/B/W/D

CM

3/2000

<Target address Dxxxx>


<Coordinate type>
0 = actual values
1 = nominal values
2 = actual values in the reference system
3 = servo lag
4 = distance-to-go
9040 or CM 9041

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-121

4.14

PLC Positioning (Module 9221)

With Module 9221 you can position a NC axis by transferring the following parameters:
Axis to be positioned
Target position
Feed rate
A simultaneous PLC positioning movement of several axes is interpolated. If you start an additional
axis while already positioning another, the first movement is aborted, and then all the programmed
axes (e.g. X, Y and Z) are positioned together.
There is no tool compensation. The tool path compensation must be ended before a PLC
positioning command. PLC positioning is not shown in the test graphics.
After the module call the corresponding markers M4120 to M4128 are set. You can abort
the PLC positioning command by resetting this marker. If you wish to change a parameter (e.g. feed
rate) of a positioning command in progress, you must first abort it with M4120 to M4128, change
the parameter, and call Module 9221 again.
The NC aborts the PLC positioning command when:
An NC STOP occurs in the Manual or Handwheel mode of operation.
An NC STOP and internal stop occur in the automatic modes of operation.
An EMERGENCY STOP occurs.
An error message occurs that results in a STOP.
Start PLC positioning command :
PS B/W/D/K
<Axis>
[0 to 8]
PS B/W/D/K
<Target position>
[0.0001mm]
PS B/W/D/K
<Feed rate>
[mm/min]
PS B/W/D/K
<Mode>
Bit 0: Target position type
=0: Absolute, referenced to the machine datum
=1: Incremental
Bit 1: Software limit switch
=0: Not active
=1: Active
CM 9221

7-122

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

3/2000

3/2000

TNC 416/TNC 406/TNC 306

PLC Modules for TNC 416/406

7-123

Data Interface Contents 8


1
1.1

Introduction
Principles of data transfer

8-3
8-4

1.1.1 Serial/parallel

8-4

1.1.2 Asynchronous data format

8-5

1.1.3 Checking data

8-7

1.1.4 Data transfer rate

8-8

1.2

Handshaking

8-9

1.2.1 Hardware handshaking

8-9

1.2.2 Software handshaking

8-9

2
2.1

TNC data interfaces


General

8-10
8-10

2.2

RS-232-C/V.24 interface

8-10

2.2.1 Hardware

8-10

2.2.2 Signal levels

8-11

2.2.3 Signal designation

8-11

2.2.4 Pin layouts

8-13

2.3

8-14

Data interface functions

2.3.1 Saving/reading files

8-14

2.3.2 Output to external devices

8-15

2.3.3 Communication between TNCs

8-15

2.4

8-16

Data transmission protocols

2.4.1 Standard transmission protocol (ME and EXT modes)

8-16

2.4.2 Data transfer with Block Check Character (FE1 mode)

8-17

2.5

8-22

Interface configuration

2.5.1 Selection of the interface

8-22

2.5.2 Freely configurable interfaces

8-22

2.6

External programming

8-26

2.7

Interfacing with other equipment

8-26

3
3.1

Standard data transmission protocol


General

8-28
8-28

3.1.1 Calling the program directory

8-28

3.1.2 Outputting a selected program

8-30

3.1.3 Outputting all programs

8-30

3.1.4 Reading in selected program

8-30

3.1.5 Reading in all programs

8-32

3.1.6 Reading in an offered program

8-33

3/97

TNC 406/TNC 306

8-1

4
4.1

Data transfer with BCC


General

8-34
8-34

4.1.1 Calling a program directory

8-35

4.1.2 Outputting a selected program

8-36

4.1.3 Outputting all programs

8-36

4.1.4 Reading in a selected program

8-37

4.1.5 Reading in all programs

8-38

Data transfer with LSV2-protocol

8-39

6
6.1

Error messages
TNC error messages

8-40
8-40

6.2

Error codes of HEIDENHAIN peripheral devices

8-41

6.3

Data transmission software error messages

8-42

8-2

TNC 406/TNC 306

3/97

1 Introduction
In addition to its CPU (Central Processing Unit), a computer system (for example a PC or controller)
utilizes a wide variety of peripheral equipment such as printers, external memories (floppy disk
drives, hard disks) or other computer systems.
A data interface makes it possible for the CPU and its peripheral equipment to communicate with
each other.
Such communication requires facilities for transferring data to the peripherals. Peripheral device
control and communication via the interface is generally the responsibility of the computer system,
which therefore has to meet certain requirements.
The interfaces, which consist primarily of the physical links between the computer system and the
peripherals, need appropriate software in order to control the transfer of information between the
individual devices. The relationship between hardware and software, which fully defines an interface, is illustrated in the following diagram:

Interface
Computer

Software

Hardware

e.g. PC,
Controller

Software

Peripheral
e.g. Printer,
external memory

The "hardware" in the diagram includes all the physical components such as the circuitry, pin layout,
electrical characteristics, and so forth. The "software" includes such components as the drivers for
the output modules and is associated with both the operating software of the computer system and
the peripherals.
Due to the wide variety of computers, controllers and peripherals available today, standard
interfaces have been introduced whichideallyenable widely different types of devices to be
connected to each other.
Standard interfaces include the RS-232-C/V.24 interface which is described in detail later.

3/97

TNC 406/TNC 306

1 Introduction

8-3

1.1 Principles of data transfer


Since all information is conveyed as data, one first needs to become familiar with a few of the
principles of data transfer. The term data is used to describe all of the information which the
computer is capable of collecting and processing.

1.1.1 Serial/parallel
Data can be transmitted in either serial or parallel format.
Data in a computer system is coded, e.g. as bytes (8 bits), and supplied to the interface in parallel.
In the case of serial data transmission, the parallel information from the computer system has to be
converted into a serial data-flow by using a USART (Universal Synchronous/Asynchronous
Receiver/Transmitter).
The receiver accepts the serial data-flow and converts it back again into parallel information.
Sender
Transmitter

Empfnger
Receiver

Speicher Schnittstellen-Puffer
Memory
Interface buffer
0
1
1
0
1
0
1
1

Schnittstellen-Puffer
Interface buffer

MSB 0
1
1
0
1
0
1
LSB 1

Speicher
Memory

0 MSB
1
1
0
1
0
1
1 LSB
0

0
1
1
0
1
0
1
1

bertragungsstrecke
Transmission path

A parallel interface, on the other hand, does not need a USART, just a line driver. The computer
system and the peripheral are usually connected with a 36-pole ribbon cable. The maximum cable
length is generally about 3 metros.

8-4

TNC 406/TNC 306

1 Introduction

3/97

Empfnger
Receiver

Sender
Transmitter
Speicher Schnittstellen-Puffer
Memory
Interface buffer
0
1
1
0
1
0
1
1

Schnittstellen-Puffer Speicher
Memory
Interface buffer

MSB 0
1
1
0
1
0
1
LSB 1

0
1
1
0
1
0
1
1

0 MSB
1
1
0
1
0
1
1 LSB

0
1
1
0
1
0
1
1

bertragungsstrecke
Transmission path

One obvious advantage of serial data transmission becomes apparent when long distances have to
be covered. With parallel transmission, the cost of the cable increases with every additional bit
which has to be transmitted. In addition, the effect of interference on adjacent wires from sharp
signal edges and electrical coupling is far greater over long lines than it is with serial transmission
which is relatively slower and uses fewer wires.
The comparatively slow speed of serial data transmission is, at the same time, its greatest
drawback. Since the individual bits are sent along the line one after the other and each transfer takes
a certain amount of time, it takes far longer to send a binary word to the receiver than with parallel
transmission. As it happens, however, most peripheral devices work fairly slowly and in fact cannot
cope with high-speed data transmission. Serial data transmission is generally adequate for devices
such as external memories or mechanical printers, especially as such devices have a large internal
buffer for incoming characters.

1.1.2 Asynchronous data format


In order for communication to be established between two devices involved in data interchange,
they have to use a common language. In the field of computer engineering, this language consists
digitally coded letters, numbers and control characters.
One of the most common codes is the ASCII code (American Standard Code for Information
Interchange) which codes all characters with seven bits.
In all, it is possible to code 27 = 128 characters. According to the ASCII code, the control character
"Line Feed" or <LF> is coded with the following combination of bits:
0 0 0 1 0 1 0
MSB

3/97

TNC 406/TNC 306

10 dec = 0A hex

LSB

1 Introduction

8-5

The letter z is represented by the following combination of bits:


1 1 1 1 0 1 0
MSB

122 dec = 7A hex

LSB

That is, when the letter z is transmitted serially, the appropriate bits are sent one after the other. The
ASCII code is shown in full in the Appendix.
Proper data transmission requires the device concerned to interpret incoming data correctly and, in
particular, to detect the start of a transmission. For this purpose there is a synchronization process
which ensures that the receiver detects the first bit of a character correctly. With an asynchronous
data format, a start bit is sent before each data word and the word is then ended by one or two stop
bits. One feature of this data format is that, starting from a quiescent state, transmission of a data
word can begin at any time.
A quiescent state exists before switch-on and is reverted to after each transmission. Before a data
bit can be transmitted this has to be communicated to the receiver. Otherwise, if the first bit of the
data word has the same value as the quiescent state, the receiver will not notice any difference
from the quiescent state.
A so-called start bit is used for this purpose:
For the duration of a single bit, the transmitter emits a logic value which clearly differs from the
quiescent state and which gives the receiver an opportunity to prepare its polling logic to read in the
data bit. After the start bit has been sent, the data word is transmitted, bit by bit, starting with the
LSB (Least Significant Bit). After the MSB (Most Significant Bit) of the data word, a so-called parity
bit is inserted (see Section 1.1.3 "Checking data").
The parity bit is followed by one or two stop bits. These final stop bits ensure that the receiver has
enough time to recognize the transmitter again before the start of the next character.
Synchronization is repeated before each character.
Synchronization is repeated before every word and is valid for one character frame.

Character frame
Quiescent state

Quiescent state
Start 1st Bit 2nd Bit 3rd Bit 4th Bit 5th Bit 6th Bit 7th Bit Parity 1 or 2
bit
stop bits
LSB
MSB bit
Data bits

8-6

TNC 406/TNC 306

1 Introduction

3/97

1.1.3 Checking data


With an asynchronous character frame, transmission errors can be detected by using a parity-check
procedure. A parity bit is sent in addition to the data bits. The evaluation of this bit enables the
receiver to check the parity of received data.
The parity bit can take three different forms; the same form of parity must be set at both interfaces.
No parity check
Error detection is dispensed with.
Even parity
The transmitter counts bits with a value of 1. If the number is odd, the parity bit is set to 1,
otherwise it is reset to 0. The sum of the set data bits and the parity bit is therefore always even.
Upon receiving a word, the receiver counts all of the set bits, including the parity bit. If this count
yields an odd number, there is a transmission error and the data word must be repeated, or an error
message will be displayed.
Odd parity
In this case, the parity bit is so chosen by the transmitter that the total number of all the set bits is
odd. In this case, an error will be detected if the receiver observes an even number of set bits in its
evaluation.
Example:
Parity bit
1

Even parity

Letter: "z" 1111010


0 Odd parity

3/97

TNC 406/TNC 306

1 Introduction

8-7

1.1.4 Data transfer rate


The data transfer rate of an interface is given in baud and indicates the number of bits of data
transmitted in one second.

[ Bits]

1 baud = 1

Common baud rates are:


110, 150, 300, 600, 1200, 2400, 4800, 9600, 19 200 and 38 400
The time required for transmission of one bit (tB) can be calculated from the baud rate:

"1"
"0"

t
tB
tB =

1
bits
Baud rate[
]
s

For example, a baud rate of 19,200 baud will have a bit duration of tB = 52.083 s.
The number of characters transmitted per second can be calculated from the baud rate and the
transmission format:
bits
]
Baud rate[
s
Characters per second =
Number of bits per character
Example:
With a transmission format of one start bit, seven data bits and two stop bits, and assuming a data
transfer rate of 300 baud, the number of characters transmitted per second will be
300 Baud
= 30 characters per second
10 bits

8-8

TNC 406/TNC 306

1 Introduction

3/97

1.2 Handshaking
A handshake procedure is often used in connection with interfaces. This means that two devices
are, as it were, working "hand in hand" in order to control data transfer. A distinction is drawn
between "software handshaking" and "hardware handshaking".
Either hardware or software handshaking can be chosen for communication between two units.

1.2.1 Hardware handshaking


Here, data transfer is controlled by electrical signals. Important information, such as Clear To Send,
Data Set Ready, Start Transmission and Stop Transmission, is signaled by the hardware.
For example, when a computer character is to be transmitted, the CTS (Clear To Send) signal line
(see Section 2.2 "RS-232-C/V.24 interface") is checked to see whether it is active (ON). If it is, the
character is transmitted. Otherwise the computer will delay transmission until the CTS line is
switched to active.
Hardware handshaking requires, as a minimum, two data lines TxD and RxD, the RTS control line,
the CTS signal line and a ground connection.

1.2.2 Software handshaking


With the software handshake, control of data transfer is achieved by appropriate control characters
transmitted via the data line. One such handshake is the XON/XOFF method, which is in widespread
use on the RS-232-C/V.24 interface. The meaning "XON" is assigned to an ASCII code control
character (DC1) and the meaning "XOFF" to another (DC3). Before transmitting a character, the
computer checks whether the receiving unit is transmitting the XOFF character. If it is, it delays
transmission until it receives the character XON, indicating that the connected unit is ready to
receive further characters.
Apart from the data lines (TxD, RxD), and ground, no other lines are needed for software
handshaking.

3/97

TNC 406/TNC 306

1 Introduction

8-9

2 TNC data interfaces


2.1 General
The TNC 306 has a data interface, the RS-232-C. The HEIDENHAIN FE 401 floppy disk unit, ME 101
magnetic tape unit and external devices with appropriate data interfaces (computers, printers,
readers, punches) can be connected via the RS-232-C interface.
Two transmission protocols are available for data transfer:
Standard data transmission protocol (ME 101 and non-HEIDENHAIN devices)
Data transfer with Block Check Character (FE 401 and PC with HEIDENHAIN data transfer
software)

2.2 RS-232-C/V.24 interface


RS-232-C is the designation of a serial interface based on the EIA standard of the same name and
can handle transmission rates up to 19 200 baud. Data transfer is executed asynchronously, with a
start bit before each character and one or two stop bits after each character. The interface is
designed for transmission distances of up to 20 metros.
The RS-232-C interface has been adopted with slight modifications and introduced into Europe as
the V.24 interface. The relevant German standard is DIN 66020.

2.2.1 Hardware
The physical connection between two RS-232-C interfaces is an asymmetrical line, i.e. the common
ground connection between transmitter and receiver is used as a return line.
Physical connections:
Sender
Transmitter

Empfnger
Receiver

TxD

RxD

RxD

TxD

bertragungsstrecke
Transmission path

8-10

TNC 406/TNC 306

2 TNC data interfaces

3/97

2.2.2 Signal levels


The RS-232-C interface must differentiate between two different signal lines and their levels.
Data lines:
The data signals are defined as being logic "1" (MARK) over the range 3V to 15V and as logical "0"
(SPACE) over the range +3V to +15V.
Control and signal lines:
These signals are defined as being ON (High) over the range +3V to +15V and as OFF (Low) over the
range from 3V to 15V.
For all of the signals, the voltage range from 3V to +3V is not defined as a logic level and can
therefore not be evaluated.

Datensignale
Data signals

U [V]

Steuer- und Meldesignal


Control and message signal

+ 15
"0"
SPACE

HIGH
ON

"1"
MARK

LOW
OFF

+ 13
0
13

15

2.2.3 Signal designation


The RS-232-C interface distinguishes between data lines, control/signal lines and the earth
conductor.
Data lines:
TxD
RxD

3/97

Transmitted data
Received data

TNC 406/TNC 306

2 TNC data interfaces

8-11

Control and signal lines:


DCD (Data Carrier Detect):

Received signal level. The DCD signal indicates


to the transmitter that the information received
at the receiver lies within the defined level.
The DCD signal (pin 8) is not used by the TNC,
i.e. the TNC delivers no signal from pin 8.

DTR (Data Terminal Ready):

This signal shows that the TNC is ready for service


(e.g. receiving buffer full => DTR = Low).

DSR (Data Set Ready):

Peripheral ready for service.

RTS (Request to Send):

Hardware handshake:
Output of the receiving unit

CTS (Clear to Send):

Hardware handshake:
Output of the transmitting unit

Earth conductor (cables for power supply):


Chassis GND:
Signal GND:

Housing connection
0-volt lines for all signals

Chassis GND

Transmitted data

TxD

Received data

RxD

Switch on transmission unit

RTS

Transmission readiness

CTS

Operational readiness

DSR

Received signal level

DCD

Terminal unit ready for service DTR

Signal ground

Peripheral

8-12

GND

TNC

TNC 406/TNC 306

2 TNC data interfaces

3/97

2.2.4 Pin layouts


Note the differences between the pin layouts of the logic unit and the adapter block of the TNC. The
corresponding pin layouts are shown below (see the Chapter "Mounting and electrical installation").

V.24-Adapter-Block
RS-232-C Adapter block
Chassis GND
TXD
RXD
RTS
CTS
DSR
Signal GND

DTR

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

ws/br
WH/BN

LE

ge
gn
rs
gr
br
rt

GN
YL
GY
PK
BL
RD

bl

BN

ws/br
WH/BN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

GND Chassis
RXD
TXD
CTS
RTS
DTR
GND Signal

DSR

Note: The LE and adapter block are connected with crossed lines.
A 9-pin plug on a PC should have the following pin layout:
Pin
1
2
3
4
5
6
7
8
9

Allocation
Do not use
RxD
TxD
DTR
GND
DSR
RTS
CTS
Do not use

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-13

2.3 Data interface functions


The data interfaces on the TNC can be used to save data and files and read them back in again, to
output programs to external devices (e.g. printers), to read in programs and simultaneously execute
them and to carry out data transfer (communication) between TNCs.

2.3.1 Saving/reading files


The following table lists all the files which can be saved to external memory units (floppy disk unit,
magnetic tape unit and PC) and read back in from them.
File type
HEIDENHAIN-dialog NC program
Datum shift table
Eroding table
Machine parameters
Correction table
PLC program

Identification code
H
O
E
M
S
P

After the appropriate code numbers for the PLC, the machine parameters and the correction table
have been entered, these files can be written to or read from via the data interfaces.
Data transfer is initiated with the EXT key as usual.
Current values of Q parameters, PLC error messages and dialogs can also be outputted via the two
interfaces (NC program: FN 15: PRINT).
The magnetic tape unit has only limited suitability as an external data medium, because only one file
can be stored per cassette side. However, this file can contain more than one program.
The floppy disk unit can store up to 256 programs (approximately 25,000 program blocks). This
represents a storage capacity of approximately 790 kilobytes.
When transmitting and receiving a file, the appropriate code file is outputted and read in again
complete with a Block Check Character (BCC).
If the file is stored in an external computer using HEIDENHAIN's TNC.EXE data transfer software, a
new file extension is generated. This extension consists of the identification code and the letters
NC.
Example:
If an eroding table is stored, it is given the file extension *.ENC.

8-14

TNC 406/TNC 306

2 TNC data interfaces

3/97

2.3.2 Output to external devices


Any external device, e.g. computers, printers, readers and punches, can be addressed via the
interface. For this purpose the TNC has a freely configurable interface mode (EXT) which, within
certain limits, permits any setting of the data format and control characters of the required data
transmission protocol.
The setting selected at the external devices must of course match the TNC. On printers, this is done
by setting the DIP-switches or adjusting the transmission parameters.
Data transfer to a computer requires appropriate data transfer software. HEIDENHAIN offer their
TNC.EXE data transfer software for this purpose, which permits transfer between TNC and a PC
using a fixed transmission protocol.

2.3.3 Communication between TNCs


For certain applications, it is necessary for TNCs to be able to exchange data or to communicate
with each other. The RS-232-C interface enables this type of communication.
The simplest form of data exchange is the transfer of files (e.g. NC programs) from one TNC to
another. To do this, the same transmission format (ME mode) must be set at both control units and
transfer started. Be sure that the control receiving the data is started first.

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-15

2.4 Data transmission protocols


The TNC enables data and files to be transferred using two different protocols (which can be
selected via the interface setup).
These transmission protocols can be selected in three different operating modes, as follows:
FE1

EXT

Transmission with BCC (Block Check Character) and with


fixed control characters (7 data bits, 1 start bit, 1 stop bit)
Freely configurable baud rate
Standard transmission protocol: data format and control
characters can be freely set via machine
parameters. Freely configurable baud rate.

The following applies to data transmission protocols:


If a file being read in is already present in the TNC memory, the following message is displayed:
ERASE=ENT / OVERREAD=NOENT
In this case the TNC aborts transmission with the appropriate handshake and does not continue
transfer until after acknowledgment.
In the event of an attempt to erase write-protected files, the error message PROTECTED PGM
and the dialog OVERREAD=ENT/END=NOENT are displayed. In this case, either the next file can
be read in or transfer can be aborted.
If a file has been read out and the data transfer menu has been terminated with the END key,
the TNC outputs characters <ETX> and <EOT> (or ASCII characters according to setting in
MP5010 and MP5011 in operating modes EXT).
If a transmission is terminated with the END-key, the error message "PROGRAM INCOMPLETE" is
issued.

2.4.1 Standard transmission protocol (EXT mode)


With this protocol, the TNC first transmits the character <NUL> 50 times. This is followed by the
individual program blocks, which each end with the characters <CR> and <LF>.
These blocks are transmitted in order, but they are not error checked. If the receiver's data buffer is
full, the receiver has two alternatives for stopping and recommencing transmission:
Software handshake - Stopping transfer by sending character <DC3> (XOFF), continuing transfer
by sending character <DC1> (XON).
Hardware handshake - By putting appropriate voltage level on the RTS and CTS control and signal
lines of the RS-232-C/V.24 interface.

8-16

TNC 406/TNC 306

2 TNC data interfaces

3/97

Example: protocol for dialog program:


<NUL><NUL><NUL><NUL><NUL><NUL><NUL>.. 50 times
0 BEGIN PGM 1 MM<CR><LF>
1st program block
1 TOOL DEF 1 L+0 R+3<CR><LF>
2nd program block
.
.
.
26 END PGM 1 MM <CR><LF>
Program end
<ETX><EOT>
Close data transfer menu
Example of software handshake:
Peripheral unit

Transmission path

TNC
.
.
.
12 Z+2 F400 <CR> <LF>

Receiving buffer full


<DC3>

Receiving buffer again


ready to accept data
<DC1>

13 Z10 M36 <CR> <LF>


.
.
.

Hardware handshake (see Section "Freely configurable interfaces").

2.4.2 Data transfer with Block Check Character (FE1 mode)


This protocol, specific to HEIDENHAIN, works with different control characters and with additional
data checking when transmitting.
When a file is transferred, the first block, called the header, is sent. It consists of the following
characters:
<SOH>"H" "Name" "M" <ETB>BCC<DC1>
<SOH> (Start of Header): This character indicates the start of the header.

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-17

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 <ETB>, 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
SOH
H
1
5
E
ETB
BCC

Bit 6
0
1
0
0
1
0
0

Bit 5
0
0
1
1
0
0
0

Bit 4
0
0
1
1
0
1
1

Bit 3
0
1
0
0
0
0
1

Bit 2
0
0
0
1
1
1
1

Bit 1
0
0
0
0
0
1
1

Bit 0
1
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 <DC1> 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
<ACK> (= 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 <NAK>
(= 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 <ACK>, the first data block can be transmitted:
<STX>0 BEGIN PGM 1 MM <ETB> BCC <DC1>.
The start of a data block is always indicated by control character <STX>. The other control
characters in this block are identical to the control characters of the header.
If the block is acknowledged with <ACK>, the next program block is sent. In the event of a <NAK>,
the same block must be repeated, and so on...
If the last program block has been sent successfully (acknowledged with <ACK>), transmission
ends with characters <ETX> (End of Text) and <EOT> (End of Transmission).

8-18

TNC 406/TNC 306

2 TNC data interfaces

3/97

Table of control characters:


Character
SOH

Meaning
Start of Header

Description
Indicates start of transfer of the data
header. The header is a sequence of
characters containing the program
number and information concerning
the type of program and
transmission mode.

STX

Start of Text

Indicates start of program block.

ETB

End of Transmission Block

ETB ends a data transfer block. The


character following ETB is used for
data checking (BCC).

DC1

Start data transfer (XON)

DC1 starts data transfer after a stop.

DC3

Stop data transfer (XOFF)

DC3 stops data transfer.

ETX

End of Text

ETX is sent at the end of the


program.

EOT

End of Transmission

EOT ends data transmission and


produces the quiescent state. This
character is sent by the TNC at the
end of program input, and as an error
to external devices

ACK

ACKnowledged

ACK is sent by receiver when a data


block has transferred without error.

NAK

Not AcKnowledged

NAK is sent by the receiver when a


data block has transferred incorrectly. The transmitter must then
transmit the data block again.

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-19

Example:
An erosion table with the name "8455" is to be sent to a peripheral unit (e.g. FE 401).
FE 401

Transmission path

TNC
<SOH> <E> 8455 <A> <ETB> BCC <DC1>

<ACK>
.
.
.

<STX> "1st line" <ETB> BCC <DC1>

<ACK>
.
.
.

.
.
.

<STX> "10th line" <ETB> BCC <DC1>


<NAK>

<STX> "10th line" <ETB> BCC <DC1>


<ACK>

<STX> "11th line" <ETB> BCC <DC1>


.
.
.

<ACK>
.
.
.

.
.
.

<STX> "last line" <ETB> BCC <DC1>

<ACK>

<ETX> <EOT>

8-20

TNC 406/TNC 306

2 TNC data interfaces

3/97

The software handshake can easily be achieved when transmitting with a BCC. At first the receiver
sends neither a positive (<ACK>) nor a negative acknowledgment (<NAK>), and the transmitter
waits until it receives one of these characters. When the buffer in the receiver is again capable of
accepting data, it again sends an <ACK> and the transmitter continues its data transmission.
It is also possible, however, to conduct the software handshake with control characters <DC1> and
<DC3>.

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-21

2.5 Interface configuration


2.5.1 Selection of the interface
The following settings can be selected with the appropriate data format and the data transmission
protocol.
In addition to the freely configurable operating mode EXT (standard data transfer protocol), there is a
fixed mode FE1. The FE1 mode must be set if the HEIDENHAIN floppy disk unit or an external
computer using the TNC.EXE transmission software is connected. In this mode, the transmission
protocol with Block Check Character is rigidly defined.

2.5.2 Freely configurable interfaces


The operating mode EXT (standard transmission protocol) is freely configurable via machine
parameters.
The data format and the type of handshake are set in the MP 5020.
Data bits
Bit 0 can be set to determine whether transmission is to be with 7 or 8 data bits. Transmission with
7 bits is normally used, but for printer interfacing 8 bits are needed.

8-22

TNC 406/TNC 306

2 TNC data interfaces

3/97

Hardware handshaking
Bit 2 can be set to determine whether the TNC stops transfer from an external device by using RTS.

Data output TNC -> EXT


When the receiving buffer is full, the external device resets the RTS signal. The TNC thereby
detects that the peripheral unit receiving buffer is full because of the CTS input.
TNC

RTS

CTS

TxD

RxD

EXT
+
CTS

Receiving
buffer full
Data

+
RTS

Data

Start

Data

+
RxD

+
TxD

+ Positive voltage level


Negative voltage level

Data input EXT -> TNC


When the receiving buffer is full, the TNC removes the RTS signal, which is detected by the
peripheral device at its CTS input.
TNC

EXT
Receiving
buffer full

RTS

CTS

+
RTS

TxD

+
RxD

RxD

+
TxD

Start

+
CTS

+ Positive voltage level


negative voltage level

The DTR and DSR signals from the TNC indicate the operational status of the TNC and peripheral
(these cannot be set via the machine parameters).
3/97

TNC 406/TNC 306

2 TNC data interfaces

8-23

DTR: Polled by peripheral; it is logical "1" if TNC is ready for service.


DSR: Polled by TNC.
LOW level => ext. data input/output not ready.
HIGH level => ext. data input/output ready.
Software handshaking
Bit 3 determines whether the TNC stops transfer from an external device with control character
<DC3>. Transfer is resumed with character <DC1>.
If transfer is stopped with character <DC3>, up to 12 characters can still be stored. The remaining
incoming characters are lost. Software handshake is normally recommended when interfaces are
connected to an external device.
The following pin layout is possible for the external device:

Peripheriegert
Peripheral unit
GND
TXD
RXD
RTS
CTS
DSR
GND

DTR

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

V.24-Adapter-Block
RS-232-C Adapter block

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

LE

ws/br

WH/BN

ge
gn
rs
gr
br
rt

GN
Yl
GY
PK
BL
RD

bl

BN

ws/br
WH/BN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

GND Chassis
RXD
TXD
CTS
RTS
DTR
GND Signal ground

DSR

A HEIDENHAIN standard cable, ref. 242 869, is recommended.

If the TNC is transmitting data, it reacts both to hardware and software handshakes, regardless of
the setting in MP5020.
If the TNC is receiving data, and no transmission stop is set in the MP5020, the TNC stops the
peripheral unit with the software handshake.
If transmission stop by both RTS and by DC3 is active, the TNC stops transfer with the hardware
handshake.
Character parity
Bits 4 and 5 determine the type of parity check (see Section "Checking data").

8-24

TNC 406/TNC 306

2 TNC data interfaces

3/97

Stop bits
Bit 7 determines the number of stop bits sent at the end of a character.
MP 5020

EXT mode: Data format and transmission stop


Input range: 0 to 189
Bit 07 or 8 data bits
+0 = 7 data bits
+1 = 8 data bits
Bit 1No function
Bit 2Transmission stop by RTS
+0 = not active
+4 = active
Bit 3Transmission stop by DC3
+0 = not active
+8 = active
Bit 4Character parity
+0 = even
+16 = uneven
Bit 5Character parity
+0 = not desired
+ 32 = desired
Bit 6No function
Bit 7Stop bits
+0 =
2 stop bits
+128 = 1 stop bit

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-25

For the control characters (<ETX>, <EOT>), any other ASCII characters can be chosen using the
following machine parameters (for table of ASCII characters, see Appendix). If these machine
parameters are set to 0 (zero), no character will be sent.
MP5010
MP5011

EXT mode: ASCII character for end of data (EXT)


Input range: 0 to 127
EXT mode: ASCII character for end of transmission (EOT)
Input range: 0 to 127

When selecting ASCII characters, it must be ensured that the control characters are not arbitrarily
mixed and that no numbers or letters which occur in the transferred text are used.

2.6 External programming


In the case of external programming and subsequent transfer, attention should be paid to the
following:
<CR> <LF> or <LF> must be programmed at the start of the program and after each program
block
<CR> <LF> and the end-of-text control character must be programmed after the end-of-program
block.
Blank characters between the individual words can be omitted in NC programs (HEIDENHAIN
dialog).
Comments are separated from the NC block by a semicolon
Comments are stored only in PLC programs
Comments located before the program are not stored
Block numbers do not need to be programmed. They are generated automatically by the TNC
(only for dialog programming and MP5990 = 1)

2.7 Interfacing with other equipment


Any other external devices can be interfaced with the TNC by using configurable operating modes
EXT. For this purpose, machine parameters MP5010 to MP5020 permit relatively free adjustment of
the data format and the control characters.
Consider the example of interfacing EXT with a printer using a serial interface (Example: NEC P7
PLUS).
The following settings are made at the printer (see the operating manual of the printer concerned):
Serial interface
8 data bits
Even character parity
XON/XOFF protocol (software handshake)
9600 baud

8-26

TNC 406/TNC 306

2 TNC data interfaces

3/97

The following settings (EXT) are made at the TNC:


MP5020 = 169

8 data bits (+1)


Transfer stop by RTS not active (+0)
Transfer stop by DC3 active (+8)
Character parity even (+0)
Character parity desired (+32)
1 stop bit (+128)

In the TNC, the EXT operating mode must still be assigned to the RS-232 interface and the baud rate
set to 9600 (see the TNC 306 User's Manual).

3/97

TNC 406/TNC 306

2 TNC data interfaces

8-27

3 Standard data transmission protocol


3.1 General
This protocol can be set in operating mode EXT via the machine parameters.
In the following, the control characters which are sent and received with this protocol are listed for
the various transmission alternatives. When outputting a file, the <NUL> character is sent 50 times
at the start of the file. When reading in, however, the control ignores this character. Therefore it
does not matter how often the peripheral device sends the <NUL> character before the file.
In this protocol, if an error is to be signaled to the TNC, the following sequence of instructions must
be sent:
<ESC> <1> 'ERROR NUMBER'
Listed below are the transmission protocols for the various alternatives for data output and input.
EXT mode is set:
Control character for "End of Text" - <ETX>
Control character for "End of Transmission" - <EOT>
Software handshake

3.1.1 Calling the program directory


Using the menu item "Program Directory", the list of file names can be requested from an external
memory and displayed in the TNC.
If the external directory is requested, the TNC sends control character <DC1>.
If the request is immediately interrupted with the END key, the TNC sends characters <ETX><EOT>
and no directory is read in.
If the request is not interrupted, the peripheral unit sends all of the external programs in order. Their
names are then shown in the TNC.

8-28

TNC 406/TNC 306

3 Standard data transmission protocol

3/97

Peripheral unit

Transmission path

TNC
<DC1>

1st file

<NUL> <NUL> <NUL>


1st line of file <CR> <LF>
.
.
.
Last line of file <CR> <LF>

<DC1>

<NUL> <NUL> <NUL>


1st line of file <CR> <LF>
2nd file

.
.
.
Last line of file <CR> <LF>

.
.
.

<DC1>

<NUL> <NUL> <NUL>


Last
file

1st line of file <CR><LF>


.
.
.
Last line of file <CR> <LF>

<ETX>

<EOT>

3/97

TNC 406/TNC 306

3 Standard data transmission protocol

8-29

3.1.2 Outputting a selected program


The TNC outputs all of the program lines in order. The peripheral unit can stop transmission with
character <DC3> and start it again with character <DC1>.
Peripheral unit

Transmission path

.
.
.

TNC
<NUL> <NUL> <NUL>. . .
1st line of file <CR> <LF>

.
.
.

5th line of file <CR> <LF>

<DC3>

<DC1>

6th line of file <CR> <LF>


.
.
.
Last line of file <CR> <LF>

3.1.3 Outputting all programs


The procedure is similar to the protocol described in Section 3.1.2 "Outputting a selected program".
The TNC arranges all the programs in order and transmits them. No control character is sent
between the individual files.

3.1.4 Reading in selected program


If a file is read in from a peripheral unit (e.g. a PC), the corresponding name must be indicated in the
TNC and the TNC be started first, i.e. the TNC outputs the character <DC1>. Transmission of the file
concerned is then initiated at the peripheral unit.
When the entire file has been transferred, the TNC sends character <EOT>.

8-30

TNC 406/TNC 306

3 Standard data transmission protocol

3/97

Peripheral unit

Transmission path

TNC
<DC1>

<NUL> <NUL> <NUL>


1st line of file <CR> <LF>
.
.
.

.
.
.

Last line of file <CR> <LF> <ETX>

<EOT>

In this transfer method, the TNC can stop transmission with <DC3> and continue it with <DC1>.
If the file name in the first line of the file and the name indicated in the TNC are not identical, the
TNC reads each block in and searches for the file name concerned.
If the END PGM-block has been read in, and the selected name is not known, the TNC remains
static without an error message, and transfer must be terminated with the END key.
Example: Reading in program 100.H.
Peripheral unit

Transmission path

TNC
100.H "START"
<DC1>

<NUL> <NUL>
1st line PGM100 <CR> <LF>
.
.
.

.
.
.

Last line PGM 100 <CR> <LF> <ETX>

<EOT>

In this case, if the last PGM block ends without the <ETX> character then transfer is terminated
without an error message but the data is not stored. This means that the program was stored on
the data medium with an incorrect program name (PGM NAME file name).

3/97

TNC 406/TNC 306

3 Standard data transmission protocol

8-31

3.1.5 Reading in all programs


If both the peripheral unit and the TNC have been started, the following protocol is followed:
Peripheral unit

Transmission path

TNC
<DC1>

<NUL> <NUL>
Last line of file 1. <CR> <LF>
..
1st line of file 1 <CR> <LF>

.
.
.

<DC1>

<NUL> <NUL>
1st line of file 2 <CR> <LF>
..
.
Last line of file 2 <CR> <LF>

.
.
.

<DC1>

<NUL> <NUL>
1st line of last file <CR> <LF>
..
.

Last line of last file <CR> <LF> <ETX>

.
.
.

<DC1>

<ETX>
<EOT>

If several programs are gathered together in a file which ends with <ETX> then these programs are
read in without being requested by <DC1>.
Data read-in does not stop until a program has ended with <ETX>.

8-32

TNC 406/TNC 306

3 Standard data transmission protocol

3/97

3.1.6 Reading in an offered program


After commencement of transfer, the peripheral unit sends the first program module until the
receiving buffer of the TNC is full. The TNC then stops transmission with <DC3> and awaits
acknowledgment from the user. If the file is to be transferred, the TNC sends <DC1> and the
program is read in and stored. Otherwise the file is only read in and not stored. If hardware
handshaking is set, transfer by using the RTS signal is stopped and restarted.
Peripheral unit

Transmission path

TNC
<DC1>

<NUL> <NUL>
1st line of file 1 <CR> <LF>
<DC3> Polling:
<DC1> Read in
Yes / No
2nd line of file 1 <CR> <LF>
.
.
.
Last line of file 1 <CR> <LF> <ETX>

.
.
.

.
.
.
<NUL>
.
.
.
Last line of last file <CR> <LF> <ETX>

<DC1>

.
.
.

<DC1>
<ETX>
<EOT>

3/97

TNC 406/TNC 306

3 Standard data transmission protocol

8-33

4 Data transfer with BCC


4.1 General
HEIDENHAIN TNCs, as well as allowing data transfer with the standard data transmission protocol,
also allow data transfer with a Block Check Character (BCC).
This protocol is only set in FE1 mode:
In the following, the transmission protocols are listed for the various file input and output
possibilities. In FE1 mode, a command sequence which requests the directory from the peripheral
device is automatically output at the start if the function "Download selected program" was selected.
If an error occurs at a peripheral device, the following block must be sent to the TNC.

<SOH>"Error text"<ETB>BCC
Peripheral unit

Transmission path

TNC

<SOH> "Error" <ETB> BCC <DC1>

<ACK>

<EOT>

The received error message is displayed in the TNC, but can be acknowledged and erased with the
CE key.

8-34

TNC 406/TNC 306

4 Data transfer with BCC

3/97

4.1.1 Calling a program directory


In FE1 mode, the following ESC sequence is output for the external directory request if the function
"Download selected program" was selected.
<DC3><ESC><DC1><0><SP><D><CR><LF>
After this request the TNC expects the following input:
The first 4 characters which are each concluded with <CR><LF> are not considered. Then in the
following lines which are each concluded with <CR><LF>, only the program name and after any
number of blank spaces the number of sectors is stored.
XXXXXX "Name" "Sectors" XXXXXX <CR><LF>

3/97

TNC 406/TNC 306

4 Data transfer with BCC

8-35

4.1.2 Outputting a selected program


The following protocol is followed:
Peripheral unit

Transmission path

TNC
<SOH> <N> Name <A> <ETB> BCC <DC1>

<ACK>
<STX> 1st line of file <ETB> BCC <DC1>

<ACK>
.
.
.

.
.
.

.
.
.

<STX> Last line of file <ETB> BCC <DC1>

<ACK>

<ETX> <EOT>

The program name may contain up to eight characters.

4.1.3 Outputting all programs


The files are output in order, as in Section 4.1.2 "Outputting a selected program". Control characters
<ETX><EOT> are sent to the peripheral device between files.

8-36

TNC 406/TNC 306

4 Data transfer with BCC

3/97

4.1.4 Reading in a selected program


If a file is to be read in from an external memory, the TNC sends a header with the file name
concerned, whereupon the peripheral sends the file.

Transmission path

Peripheral unit

TNC
<SOH> <N> Name <E> <ETB>
BCC <DC1>

<ACK>
<STX> 1st line of file <ETB> BCC <DC1>
<ACK>
.
.
.

.
.
.

<STX> Last line of file <ETB> BCC <DC1>

<ACK>

<ETX>
<EOT>

3/97

TNC 406/TNC 306

4 Data transfer with BCC

8-37

4.1.5 Reading in all programs


In this case the TNC sends a header without a program name, and the peripheral unit sends the first
file. The TNC then immediately outputs a header again without a program name, and the next
program is sent and so on.
Transmission path

Peripheral unit

TNC
<SOH> <H> <E> <ETB>
BCC <DC1>

<ACK>
<STX> 1st line PGM1 <ETB> BCC <DC1>
.
.
.

<ACK>
.
.
.

<STX> Last line PGM1 <ETB> BCC <DC1>

<ACK>
<SOH> <H> <E> <ETB>
BCC <DC1>

<ACK>
.
.
.

.
.
.

<STX> Last line of last file <ETB>


BCC <DC1>
<ACK>
<SOH> <H> <E> <ETB>
BCC <DC1>
<ETX>

<EOT>

8-38

TNC 406/TNC 306

4 Data transfer with BCC

3/97

5 Data transfer with LSV2-protocol


The LSV2-protocol can be used on the TNC 406.
The LSV2-protocol is a data transfer protocol for the two-way transfer of commands and data
according to DIN 66019.
The commands and data are transferred in so-called telegrams, i.e. the data is split up into blocks
(telegrams) and transmitted via RS232-C.
The following functions are possible:

Data transfer
Delete, copy and rename files in the control
Select a program in mode PROGRAM RUN
NC-Start and NC-Stop in mode PROGRAM RUN
Receive NC status information

NC-Start is enabled by marker M2504. Marker M2504 must be set to make a NC-Start possible.
Otherwise no modifications are necessary in the PLC-program.

HEIDENHAIN offers the software package LSV2 - DLL with detailed documentation for developing a
remote control software.

3/97

TNC 406/TNC 306

5 Data transfer with LSV2-protocol

8-39

6 Error messages
6.1 TNC error messages
Listed below are the error messages for data transfer, which are displayed at the TNC. In most
cases the messages are self-explanatory.
These error messages occur only in ME mode:
WRONG MODE
TRANSFERRED DATA INCORRECT
WRONG PROGRAM DATA
ME: END OF TAPE
DATA CARRIER FULL
DATA CARRIER EMPTY
DATA CARRIER WRITE-PROTECTED
General error messages:
INTERFACE ALREADY ASSIGNED
Transfer is already taking place via interface, or data transfer has not been completed.
PROGRAM INCOMPLETE
Transfer has been interrupted or the file has not ended correctly (no END character or END block).
EXT. OUTPUT/INPUT NOT READY
Interface is not connected; peripheral unit is switched off of faulty.
TRANSFERRED DATA INCORRECT X
can assume the values A to H, K or L (error codes).
The error message TRANSFERRED DATA INCORRECT N is displayed if, in the case of data transfer
with BCC (Block Check Character), a Not Acknowledged control character (<NAK>) has been
received three times.
The remaining error codes (A to H) in this error message indicate that an error has been detected in
the received module. The error can have the following causes, with no assignment to the code
letters:
Same baud rate not set at TNC and peripheral unit
Parity bit wrong
Incorrect data frame (e.g. no stop bit)
Receiving module of interface faulty
Error code K or L is only displayed for transfer with standard data transmission protocol:
K: When an error was transmitted to TNC, character <1> not sent after the <ESC> character.
L: The wrong error number was received after the error sequence <ESC><1>. (Error number
range: 0 to 7).

8-40

TNC 406/TNC 306

6 Error messages

3/97

6.2 Error codes of HEIDENHAIN peripheral devices


These error messages refer to the FE 401 floppy disk unit and to magnetic tape unit ME 101/
ME 102. With the FE 401 floppy disk unit connected, one of the following error codes could be
output by the TNC:

Error code
ERR: 001
ERR: 002
ERR: 003
ERR: 004

Meaning
Wrong instruction code
Illegal program name
Defective data transmission
Program incomplete

ERR: 010
ERR: 011
ERR: 012
ERR: 013
ERR: 014

Program not on floppy disk


Program protected against erasure
Program storage in progress
Program directory full
Floppy disk full

ERR: 100
ERR: 101
ERR: 102
ERR: 103
ERR: 104
ERR: 105
ERR: 106
ERR: 107
ERR: 108

Floppy disk not formatted


Sector number too large
Drive not ready
Floppy disk write-protected
Data on floppy disk defective
Sectors not found
Check sum defective
Disk controller faulty
DMA faulty

If a magnetic tape unit is connected, the following error codes could be sent to the TNC and an
appropriate error message outputted:
Error code
<ESC><1><0>
<ESC><1><1>
<ESC><1><2>
<ESC><1><3>
<ESC><1><4>
<ESC><1><5>
<ESC><1><6>
<ESC><1><7>

Error message
TRANSFERRED DATA INCORRECT
DATA CARRIER MISSING
DATA CARRIER WRITE-PROTECTED
WRONG OPERATING MODE
WRONG PROGRAM DATA
DATA CARRIER EMPTY
PROGRAM INCOMPLETE
ME: END OF TAPE

A detailed description of these peripherals can be found in the appropriate operating manual.

3/97

TNC 406/TNC 306

6 Error messages

8-41

6.3 Data transmission software error messages


The following error messages may come up on the TNC during data transfer with the HEIDENHAIN
TNC.EXE data transmission program:
DATA CARRIER @: IS FULL
This data carrier cannot receive any additional data because it is full.
FILE NAME NOT PROGRAM NAME
The name of the NC program is not the same as the file name.
INSTRUCTION NOT ALLOWED
The request instruction issued by the control is not allowed.
PROGRAM INCOMPLETE
The NC program does not contain an end block.
PROGRAM NOT PRESENT
The file requested by the control does not exist in the currently configured access path.
PROTECTED FILE
An attempt was made to overwrite a write-protected file or a file with hidden attribute.
SEARCH FEATURE NOT ALLOWED
The search feature is not included in the number of permissible characters.
TRANSFERRED DATA INCORRECT
Four unsuccessful attempts have been made to transmit a block to the control.
A detailed description of this software is given in the User's Manual of the transmission software.

8-42

TNC 406/TNC 306

6 Error messages

3/97

User cycles Contents 9


1
1.1

Creating user cycles


Dialog block with DLG-DEF or DLG-CALL

9-2
9-3

1.2

Q parameters and functions in user cycles

9-6

Dialogs for user cycles

9-7

Output in binary code

9-8

"Bolt hole circle" user cycle example

9-9

5
5.1

User cycles in NC programs


Calls in a HEIDENHAIN dialog program

9-10
9-10

3/97

TNC 406/TNC 306

9-1

1 Creating user cycles


User cycles (customized macros) are programmed in the HEIDENHAIN dialog format as NC
programs.
These cycles can be used in machining programs for executing repetitive machining tasks or
machine-specific functions with a single call in part programs written in HEIDENHAIN dialog format.
Execution of user cycles can be influenced by parameter transfer.
Up to 32 different user cycles can be produced, tested and stored in the NC program memory.
In order not to tie up the NC program memory (RAM) with the user cycles and dialogs, this data can
be stored in the PLC EPROM together with a maximum of 100 different customer-specific dialog
texts.
Instructions for creating user cycles
User cycles in the NC program memory can be called for testing by cycle 12: "Program call". It is
thus also possible to test functional capability in the "Program run/single block" mode. (With a
program call, all Q parameters are globally effective.)
Functions permitted in user cycles
Tool call.
M functions apart from M02, M30, M06 without program stop.
Nesting user cycles:
Other user cycles or standard cycles can be called from within a user cycle (nesting depth up to
four levels).
Call of HEIDENHAIN dialog programs from within user cycles. The called programs are not
displayed.
Functions not permitted in user cycles
M functions M02, M30, M06 with program stop.
Programmed STOP block.
Program calls with PGM-CALL.
Program section repeats with CALL LBL ... REP .../...:
User cycles with program section repeats stored in PLC EPROM cannot be executed. However,
program-section repeats can also be programmed via the Q parameter function (IF ... GOTO LBL
...) (see the "Bolt hole circle" example).

9-2

TNC 406/TNC 306

1 Creating user cycles

3/97

1.1 Dialog block with DLG-DEF or DLG-CALL


Programming a user cycle and, by the same token, the dialog block, is only possible if the program
number is in the range 99 9 99 9 68.H to 999 9 99 99.H (TNC 306) and 999 999 30.H to
99 9999
99.H (TNC 406).
Each of these program numbers is permanently assigned to a cycle number (e.g. program number
99 999 968.H represents user cycle 68).
Programming the dialog block is initiated with the key "LBL SET" and then "NO ENT".
DLG-DEF
If a user cycle is to be active in the NC program immediately upon being defined, a "DEF-active" user
cycle is programmed with the "ENT" key, e.g. cycle for coordinate transformation.
DLG-CALL
If a user cycle is to be activated later in the NC program via CYCL CALL or M99, a "CALL-active" user
cycle is programmed with the "NO ENT" key, e.g. for a fixed cycle.
Up to 15 dialog numbers can then be input. The first dialog number is always assigned to the
designation of the user cycle. The remaining numbers are assigned to the Q parameters in
ascending order.
If fewer than 15 dialogs are to be programmed, the dialog block can end with "END". See also
MP7250 in the following description of the relevant machine parameters.

Example:
0 BEGIN PGM 99999968 MM
1 DLG-DEF 0/2/8/99
.
.
.
15 END PGM 99999968 MM

Machine parameter MP7240 can be used to inhibit program input in the case that the program
number is the same as the user cycle number.
If MP7240 = 0, no program with the program number of a user cycle which is stored in EPROM can
be input or read into the NC program memory.
If MP7240 = 1, the program number range of the user cycles can also be used when the user cycles
are stored in the PLC EPROM. If a user cycle is generated in the NC program memory and if at the
same time there is a user cycle with the same number in the PLC EPROM, then the user cycle in
the NC program memory will be executed at a cycle call.

3/97

TNC 406/TNC 306

1 Creating user cycles

9-3

In the NC program, when defining the user cycles created with dialog support, Q parameters are
assigned specified input values. The Q-parameter numbers are automatically generated by the TNC.
In order to prevent the same Q-parameter numbers from being generated for "DLG-DEF" cycles and
"DLG-CALL" cycles, MP7250 can be used to specify the difference between Q-parameter numbers
for "DLG-CALL" and "DLG-DEF" blocks.
In the case of a "DLG-CALL" block, the input values of the user cycles are assigned in ascending
order to the Q parameters Q1 to Q14. For the "DLG-DEF" block, the input values are assigned to Q
parameters Q[1 + MP7250] to Q[14 + MP7250].
Example for MP7250 = 30

Cycle parameter 1
Cycle parameter 2
.
.
.
Cycle parameter 14

Parameter number in user cycle with


DLG-CALL
DLG-DEF
Q1
Q31
Q2
Q32
.
.
.
.
.
.
Q14
Q44

MP7251 determines whether the values of the Q parameters which are changed in the user cycles
by calculation or assignment are transferred globally to the called program (e.g. in the case of
"nesting" of user cycles).
Machine parameter MP7251 defines the range of Q parameters from Q[100 MP7251] to Q99 as
"global".
The effect of global and local Q parameters may be shown by reference to following example:
MP7251 = 40
Q [100 40] = Q60 => Q60 to Q99 are global Q parameters and
Q1 to Q59 are local Q parameters

Q1
BEGIN PGM 100 MM
FN0: Q1 = +1
FN0: Q60 = +5
CYCL DEF 69.0 USERCYCLE 1
CYCL DEF 69.1 Q1 = +2
BEGIN PGM 99999969 MM
DLGDEF 0/32
FN1: Q1 = Q1 + 10
FN1: Q60 = Q60 + 10
END PGM 99999969 MM
STOP
END PGM 100 MM

9-4

TNC 406/TNC 306

MP7251 = 40
MP7251 < 40
Q60 = local
Q60 = global Q1

+1
+1
+1
+2

+0
+5
+5
+5

+1
+1
+1
+2

+0
+5
+5
+5

+12
+12

+5
+15

+12
+12

+5
+15

+2

+15

+2

+5

1 Creating user cycles

3/97

MP7240

Inhibit program input if [program number] = [user cycle number in


EPROM].
Input value: 0 or 1
0 = Inhibit
1 = Do not inhibit

MP7250

Difference between Q-parameter number for "DLG-CALL" and "DLG-DEF" block


in user cycles.
Input range: 0 to 50

MP7251

Number of global Q parameters transferred from user cycle to calling program.


Input range: 0 to 100

User cycles stored in the PLC EPROM can be inhibited in the PLC program via markers M2240 to
M2271. It is then not possible to define inhibited cycles in NC programs.
If programs with definitions of inhibited user cycles are transferred to the control, an error message
"PGM 999999.. UNAVAILABLE=..." is generated in the transferred program and the program cannot
be executed.

Marker

Function

Set

Reset

M2240
M2241
M2242
.
.
.
M2271

Inhibit user cycle 68


Inhibit user cycle 69
Inhibit user cycle 70
.
.
.
Inhibit user cycle 99

PLC
PLC
PLC

PLC
PLC
PLC

PLC

PLC

User cycle 30 to 67 can not be inhibited.

3/97

TNC 406/TNC 306

1 Creating user cycles

9-5

1.2 Q parameters and functions in user cycles


Q-parameter programming can be used to create user cycles with variable program data, such as for
eroding extremely varied hole patterns, curves (e.g. spirals, sinusoidal, ellipse, parabola) and mold
components.
A detailed description of Q parameters and functions is given in the TNC User's Manual.
Q parameters with special significance
Q80
Q81
Q82
Q83
Q84

Number of the datum point in the datum point table


Coordinate of the X-axis
Coordinate of the Y-axis
Coordinate of the Z-axis
Coordinate of the C-axis

Eroding table OFF:


Q90Q99

Eroding parameters

Eroding table ON:


Q96Q98
Q99
Q150
Q151
Q152
Q154
Q155
Q156
Q201Q225
Q231Q255

Additional eroding parameters


Current power stage NR
Maximum power stage
Minimum power stage
Current table number
Minimum undersize (UNS) of min. NR
Two-times gap (2G) of min. NR
Two-times gap (2G) of max. NR
Two-times gap of min. to max. NR
Minimum undersize of min. to max. NR

General Q parameters:
Q100Q107
Q108
Q109
Q110

Q111

9-6

Transfer values from PLC to NC


Electrode radius
Current tool axis
Rotational status of the C axis
Contents Q110
no M3/4/5
-1
M3 active
0
M4 active
1
M5 active
2
Flushing ON/OFF
Contents Q111
no M8/9
M9 active
M8 active

TNC 406/TNC 306

-1
0
1

(after PGM-NR ENT)

(after PGM-NR ENT)

1 Creating user cycles

3/97

Q113

Q114

MM or INCH programming
Contents Q113
-1
main program mm 0
main program inch 1
MM or INCH Eroding table
Contents Q113
-1
Eroding table mm
0
Eroding table inch
1

(after PGM-NR ENT)


(after program START)
(after program START)

(after PGM-NR ENT)


(after executing CYCL GENERATOR)
(after executing CYCL GENERATOR)

Q115Q118 Values from the programmable touch probe function in the machining system
Q120Q124 Values from the programmable touch probe function in the workpiece system
Q153

Return to main program from subprogram or user cycle Q153 = 0


Eroding with time limit finished
Q153 = 1
Eroding with time limit active
Q153 = 2

Q157
Q158
Q159
Q160
Q162

Following electrode (see TNC User's Manual)


Electrode undersize
Length of electrode
Electrode number
Number of actual CYCL DEF

FN functions with special significance


FN14 Output of error messages and dialogs to VDU
FN15 Output of error messages, dialogs and Q-parameter values over RS-232-C data interface

3/97

TNC 406/TNC 306

1 Creating user cycles

9-7

2 Dialogs for user cycles


The dialog numbers defined in the dialog blocks of the user cycles determine the text to be
displayed from PLC EPROM.
The following dialog texts are stored in the standard PLC EPROM for the designation of the user
cycle and the input parameters:
Dialog number in user cycle
0
1
2
.
.
.

Standard dialog in PLC EPROM


USER CYCL
CYCL PARAMETER 01
CYCL PARAMETER 02
.
.
.

Instead of these standard dialogs, up to 200 different customer-specific dialogs can be stored in PLC
EPROM.

9-8

TNC 406/TNC 306

2 Dialogs for user cycles

3/97

3 Output in binary code


When the user cycles have been fully tested they can be output in binary form, together with the
PLC program and the eroding tables, for EPROM programming. It is possible to output the files
located in both the PLC EPROM and the NC program memory in binary code.
An exact description of file output via the data interface is given in the chapter "PLC Programming".

3/97

TNC 406/TNC 306

3 Output in binary code

9-9

4 "Bolt hole circle" user cycle example


The following bolt hole circle program is an example of a user cycle. (This cycle has not been loaded
into the control.)
The Z-axis acts as the tool axis. The first cavity in the circle is at 0. The cycle calculates the angular
positions of the cavities and of the C axis from the number of cavities. The cavities are approached
in succession in counter-clockwise direction and automatically eroded. Before the cycle is called, the
electrode is held at the safety clearance.
Y

Q2
0

Input parameters:
Q1 = Number of cavities
Q2 = Radius of bolt hole circle
Q3 = X coordinate of center of bolt hole circle
Q4 = Y coordinate of center of bolt hole circle
Q5 = Safety clearance for Z axis
(enter as negative)
Q6 = Cavity depth in Z axis (enter as negative)

Q4

Q3

"Bolt hole circle" user cycle


0 BEGIN 99999968 MM
1 DLG-CALL 0/1/2/3/4/5/6
2 FN1: Q6 = +Q6 + +Q5
3 FN4: Q50 = +360 DIV + Q1
4 FN0: Q60 = +0
5 CC X+Q3 Y+Q4
6 LBL 11
7 LP PR +Q2 PA +Q60 C+Q60 R0 FMAX
8 L IZ +Q6 M36
9 L IZ Q6 FMAX M37
10 FN 1: Q60 = +Q60 + +Q50
11 FN12: IF +Q60 LT +360 GOTO LBL 11
12 END PGM 99999968 MM

Dialog block
Distance traversed in Z
Angle increment
Starting angle
Center of bolt hole circle
Jump label
Approach cavity, position C axis
Erode cavity
Retract, generator off
Next angle
Last cavity?

Dialogs for "Bolt hole circle" user cycle


Dialog no.
0
1
2
3
4
5
6

9-10

DIALOGUE
BOLT HOLE CIRCLE
NUMBER OF CAVITIES?
RADIUS?
X COORDINATE CC?
Y COORDINATE CC?
SAFETY CLEARANCE?
TOTAL CAVITY DEPTH?

TNC 406/TNC 306

4 "Bolt hole circle" user cycle example

3/97

5 User cycles in NC programs


User cycles in the NC program memory or PLC EPROM are defined and called in HEIDENHAIN
dialog programs.

5.1 Calls in a HEIDENHAIN dialog program


User cycles are defined as standard cycles in the HEIDENHAIN dialog program (see "Dialog
Programming" in the TNC 306 User's Manual).
The dialog for cycle definition is initiated with the "CYCL DEF" key. Select the desired cycle either by
paging using the vertical arrow keys or by "GOTO" and entering the cycle number (e.g. 68). Confirm
your entry with the "ENT" key.
The individual parameters are input via the numerical keyboard. Confirm your entries with "ENT".
In the case of a "DEF-active" user cycle, the cycle is effective immediately upon being defined. Once
defined, a "CALL-active" user cycle can be called and hence activated either via "CYCL CALL" or
M99.

Example:
0
1
2
3
4
5
6
7
8
9
10
11

BEGIN PGM 1000 MM


TOOL DEF 1 L+0 R+2
TOOL CALL 1 Z U 0.1
CYCL DEF 1.0 GENERATOR
CYCL DEF 1.1 PTAB 1
CYCL DEF 1.2 MAX = 25 MIN = 1
L Z+2 R0 FMAX
CYCL DEF 68.0 BOLT CIRCLE
CYCL DEF 68.1 Q1=+8 Q2=+40 Q3=+60
CYCL DEF 68.2 Q4=+50 Q5=2 Q6=20
CYCL CALL
END PGM 1000 MM

3/97

TNC 406/TNC 306

Tool definition
Tool call
Definition and call of the generator
with corresponding eroding
parameters
Approach safety clearance
Definition of cycle 68 "Bolt hole circle"

Call cycle

5 User cycles in NC programs

9-11

7-Bit ASCII code


Character
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
DLE
DC1 (X-ON)
DC2
DC3 (X-OFF)
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
SP
!
"
#
$
%
&

(
)
*
+
,
.
/

3/97

DEC
000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047

TNC 406/TNC 306

OCT
000
001
002
003
004
005
006
007
010
011
012
013
014
015
016
017
020
021
022
023
024
025
026
027
030
031
032
033
034
035
036
037
040
041
042
043
044
045
046
047
050
051
052
053
054
055
056
057

7-Bit ASCII code

HEX
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F

10-1

Character
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^

10-2

DEC
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095

TNC 406/TNC 306

OCT
060
061
062
063
064
065
066
067
070
071
072
073
074
075
076
077
100
101
102
103
104
105
106
107
110
111
112
113
114
115
116
117
120
121
122
123
124
125
126
127
130
131
132
133
134
135
136
137

7-Bit ASCII code

HEX
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F

3/97

Character
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{

}
~
DEL

3/97

DEC
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

TNC 406/TNC 306

OCT
140
141
142
143
144
145
146
147
150
151
152
153
154
155
156
157
160
161
162
163
164
165
166
167
170
171
172
173
174
175
176
177

7-Bit ASCII code

HEX
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F

10-3

10-4

TNC 406/TNC 306

7-Bit ASCII code

3/97

Subject index

A
Acceleration...................................................................................................4-40
Acceleration, radial ........................................................................................4-45
Active axes ....................................................................................................4-5
Actual/nominal value transfer ........................................................................4-53
ADD (+)........................................................................................................7-102
ADDITION......................................................................................................7-56; 7-73
Address allocation .........................................................................................7-14
Addressing the word memory.......................................................................7-14
alphabetic keyboard.......................................................................................4-101
Ambient temperature ....................................................................................3-8
Amplitude of the measuring system signals .................................................4-8
Analog inputs.................................................................................................4-120
Analog outputs, Assignment .........................................................................4-12
Analog voltage ...............................................................................................4-42
AND ...............................................................................................................7-43; 7-69
AND NOT.......................................................................................................7-45; 7-69
Angular measurement ...................................................................................4-6
Arc recognition ..............................................................................................4-60
Arithmetic commands ...................................................................................7-56
ASSIGN..........................................................................................................7-33
ASSIGN BYTE................................................................................................7-35
ASSIGN DOUBLEWORD ..............................................................................7-35
ASSIGN NOT (=N) .........................................................................................7-36
ASSIGN TWO'S COMPLEMENT (= -) ...........................................................7-36
ASSIGN WORD .............................................................................................7-35
Axes in position .............................................................................................4-52
Axis designation ............................................................................................4-10
Axis enable ....................................................................................................4-51
Axis limit ........................................................................................................4-13
Axis of rotation ..............................................................................................4-10

B
Bar Chart........................................................................................................7-117
Baud rate .......................................................................................................8-9
BCC (Block Check Character) ........................................................................8-20
BIT RESET ....................................................................................................7-85
Bit commands ...............................................................................................7-84
BIT SET..........................................................................................................7-84
BIT TEST........................................................................................................7-86
Buffer battery ................................................................................................3-19
Byte ...............................................................................................................7-14

C
Call Module (CM)..........................................................................................7-95
Call Module if Logic Accumulator = 0 (CMF) ...............................................7-95
Call Module if Logic Accumulator = 1 (CMT) ...............................................7-95
CALL-active user cycle ..................................................................................9-3

3/97

TNC 406/TNC 306

Subject index

11-1

CAN (CANCEL) ............................................................................................7-105


Cancellation of a Submit Program (CAN).....................................................7-105
CASE statement ............................................................................................7-99
Checking data ................................................................................................8-8
Circular feed rates .........................................................................................4-88
Clamped axis .................................................................................................4-53
Code number 105296....................................................................................4-20
Code number 75368......................................................................................4-44
Code numbers ...............................................................................................4-138; 4-89
Color adjustment ...........................................................................................4-91
Command ......................................................................................................7-12
Commands ....................................................................................................7-26
Commissioning..............................................................................................4-138
Comparisons..................................................................................................7-62
Compensation, axis error ..............................................................................4-18
Compensation, linear axis error.....................................................................4-18
Compensation, non-linear axis error..............................................................4-19
Components, hardware TNC 406 ..................................................................3-4
Connection box..............................................................................................3-33
Connections, overview ..................................................................................3-13
Control loop ...................................................................................................4-37
Control loop, open .........................................................................................4-53
Control with lag .............................................................................................4-39
Controlled ......................................................................................................4-50
Cooling...........................................................................................................3-8
Copy in Marker ..............................................................................................7-108
Correction table .............................................................................................4-19
Correction-value difference ...........................................................................4-21
Counters ........................................................................................................7-20
Counting direction .........................................................................................4-7
Counting step ................................................................................................4-6
Cycle inhibit ...................................................................................................4-86
Cycles, OEM..................................................................................................4-86

D
Data bits ........................................................................................................8-24
Data exchange, PLC/generator......................................................................4-68
Data interface ................................................................................................3-41
Data transfer..................................................................................................8-4
Data transfer PLC ..........................................................................................7-15
Data transfer rate ..........................................................................................8-9
Data transfer with Block Check Character ....................................................8-19
Data transmission protocols..........................................................................8-18
Datum correction...........................................................................................4-125
Debug Functions, PLC...................................................................................7-10
Decimal sign ..................................................................................................4-89
DECREMENT (DEC) ......................................................................................7-76
DEF-active user cycle ....................................................................................9-3
Degree of protection .....................................................................................3-12
Dialog language .............................................................................................2-6
Dialog number ...............................................................................................9-3
Dialogs for user cycles ..................................................................................9-8
Direction of traverse ......................................................................................4-7
Display, active power stage number .............................................................4-84
11-2

TNC 406/TNC 306

Subject index

3/97

Display, actual machining time......................................................................4-84


Display, feed rate...........................................................................................4-82
Display, M-functions......................................................................................4-83
Display, position and status...........................................................................4-80
Display, way-to-go (WTG)..............................................................................4-83
DIVISION .......................................................................................................7-59; 7-73
DLG CALL......................................................................................................9-3
DLG DEF........................................................................................................9-3

E
Edge evaluation of the PLC-inputs ................................................................7-21
Edge separation of the measuring system signals........................................4-9
Editing PLC-programs....................................................................................7-6
Electrical noise immunity...............................................................................3-8
Electrode changer..........................................................................................4-127
EMERGENCY STOP routine ..........................................................................4-71
EMERGENCY STOP, connection diagram.....................................................4-72
Encoder inputs, Assignment .........................................................................4-11
Encoder monitoring .......................................................................................4-8
Encoders........................................................................................................4-5
End indexed call module (ENDC)..................................................................7-99
End of Module if Logic Accumulator = 0 (EMF) ............................................7-97
End of Module if Logic Accumulator = 1 (EMT) ............................................7-97
End of Module, Program End (EM)...............................................................7-97
Entry format...................................................................................................5-3
EPROM..........................................................................................................2-8
EPROM creation............................................................................................7-21
EPROM operation..........................................................................................7-22
EPROM slots .................................................................................................3-9
EPROM test ..................................................................................................4-90
EQUAL TO.....................................................................................................7-62; 7-77
Eroding parameters .......................................................................................4-62
Eroding parameters, Transmission to the PLC..............................................4-67
Erosion table from PLC..................................................................................4-64
Error in PLC-program .....................................................................................4-110
Error message ...............................................................................................4-48; 4-85; 4-110; 7-23
ERROR= ........................................................................................................9-5
Errors, PLC ....................................................................................................7-23
EXCLUSIVE OR .............................................................................................7-51; 7-70
EXCLUSIVE OR NOT .....................................................................................7-53; 7-70
External programming ...................................................................................8-28
Extra linear axis .............................................................................................4-11

F
Feed forward control .....................................................................................4-56
Feed rate override .........................................................................................4-54
Feed rate, constant........................................................................................4-45
Flushing the gap ............................................................................................4-61
Free run .........................................................................................................4-61

G
Gap control ....................................................................................................4-56
Gap signal ......................................................................................................4-56
3/97

TNC 406/TNC 306

Subject index

11-3

Generator ON/OFF (M36/M37) .....................................................................4-96


Global Q parameters .....................................................................................9-4
Graduation period} .........................................................................................4-5
Graphics.........................................................................................................4-79
Graphics display ............................................................................................4-79
GREATER THAN............................................................................................7-77
GREATER THAN (>) ....................................................................................7-64
GREATER THAN OR EQUAL TO...................................................................7-66; 7-78
Gross positioning error A...............................................................................4-46
Gross positioning error C...............................................................................4-47
Gross positioning error D...............................................................................4-48
Gross positioning error F ...............................................................................4-47
Grounding plan, TNC 306 ..............................................................................3-22
Grounding plan, TNC 406 ..............................................................................3-21

H
Handshaking ..................................................................................................8-10
Handwheel ....................................................................................................4-117
Handwheel HR 130 .......................................................................................3-45
Handwheel HR 330 .......................................................................................3-43; 3-44
Handwheel HR 410 .......................................................................................4-118
Handwheel input ...........................................................................................3-43
Handwheel, count direction...........................................................................4-117
Hardware handshaking..................................................................................8-10
Hardware version ..........................................................................................0-7
Heat generation .............................................................................................3-8
HR 130...........................................................................................................4-117
HR 330...........................................................................................................4-117
Humidity ........................................................................................................3-9

I
Identifier ........................................................................................................7-104
INCREMENT (INC).........................................................................................7-76
Indexed call module (CASE) .........................................................................7-99
Inhibited key ..................................................................................................4-101
Installation, hardware ....................................................................................3-8
Interface configuration...................................................................................8-24
Interpolation factor ........................................................................................4-117

J
Jog increment positioning .............................................................................4-122
Jump commands...........................................................................................7-93
Jump if Logic Accumulator = 0 (JPF) ...........................................................7-93
Jump if Logic Accumulator = 1 (JPT) ...........................................................7-93
Jump Label (LBL)..........................................................................................7-97

K
Key simulation ...............................................................................................4-101
Key-code........................................................................................................4-101
Kv factor ........................................................................................................4-41; 4-42; 4-145

11-4

TNC 406/TNC 306

Subject index

3/97

L
L (LOAD)......................................................................................................7-101
Lag.................................................................................................................4-41
LESS THAN ...................................................................................................7-63; 7-77
LESS THAN OR EQUAL TO ..........................................................................7-65; 7-77
List of machine parameters...........................................................................5-5
LOAD.............................................................................................................7-26
LOAD (L)......................................................................................................7-101
LOAD BYTE ...................................................................................................7-31
Load command..............................................................................................7-26
Load data onto Data Stack (PS) ....................................................................7-88
LOAD DOUBLEWORD..................................................................................7-31
Load logic accumulator onto Data Stack (PSL).............................................7-89
LOAD NOT ....................................................................................................7-28
LOAD TWO'S COMPLEMENT......................................................................7-30
LOAD WORD ................................................................................................7-31
Load word accumulator onto Data Stack (PSW) ..........................................7-90
Local Q parameters .......................................................................................9-4
Logic gates ....................................................................................................7-43
Logic unit .......................................................................................................3-4; 3-5
LSV/2 Protocol ...............................................................................................8-41
Lubrication pulse ...........................................................................................4-16
Lubrication, path-dependent..........................................................................4-16

M
M06, program-halt on ....................................................................................4-99
M36 off..........................................................................................................4-59
M36 on ..........................................................................................................4-59; 4-96
M37 off..........................................................................................................4-96
M89 ...............................................................................................................4-99
Machine axes ................................................................................................4-5
Machine control panel ...................................................................................3-56; 4-110
Machine datum..............................................................................................4-34; 4-76
Machine parameter, read ..............................................................................7-112
Machine parameters .....................................................................................5-2
Machine parameters, list of...........................................................................5-5
Manual feed...................................................................................................4-43
Measuring system cables .............................................................................3-29
Measuring system, inputs .............................................................................3-28
Measuring systems .......................................................................................3-27; 4-5
Measuring systems, angular .........................................................................3-27
Measuring systems, linear ............................................................................3-27
Mechanical vibration......................................................................................3-9
Memory test..................................................................................................4-90
M functions ...................................................................................................4-93
Module 9051 .................................................................................................7-112
Module 9071 .................................................................................................7-113
Module 9079 .................................................................................................7-114
Module 9000/9001 ........................................................................................7-108
Module 9020/9021/9022 ...............................................................................7-111
Module 9032 .................................................................................................7-112
Module 9080 .................................................................................................7-100; 7-114
Module 9081 .................................................................................................7-114

3/97

TNC 406/TNC 306

Subject index

11-5

Module 9082 .................................................................................................7-100; 7-115


Module 9083 .................................................................................................7-117
Module technique..........................................................................................7-13
Monitoring analog voltage .............................................................................4-47
Monitoring functions .....................................................................................4-46; 4-147
Monitoring, movement..................................................................................4-47
Monitoring, standstill .....................................................................................4-48
Mounting dimensions....................................................................................3-64
Mounting position..........................................................................................3-9
MULTIPLICATION .........................................................................................7-58; 7-73

N
NC software number .....................................................................................2-6
Nesting depth ................................................................................................9-2
Nominal value potential .................................................................................3-31
NOT EQUAL TO ............................................................................................7-78

O
Offset adjustment .........................................................................................4-44; 4-147
Operand directory..........................................................................................7-14
Operating mode.............................................................................................4-101
OR .................................................................................................................7-47; 7-69
OR NOT .........................................................................................................7-49; 7-69
Overflow........................................................................................................7-104
Overwrite Q-parameters ...............................................................................4-91
Overwriting of a STRING (OVWR)...............................................................7-103
OVWR (OVERWRITE)..................................................................................7-103

P
Parentheses...................................................................................................7-69; 7-73
PL 410 B ........................................................................................................3-52
PLC Main menu ..........................................................................................7-6
PLC DIALOG..................................................................................................7-101
PLC ERROR...................................................................................................7-101
PLC functions ................................................................................................7-5
PLC input/output board..................................................................................3-4; 3-6; 3-12
PLC inputs .....................................................................................................3-47
PLC Modules .................................................................................................7-108
PLC operation, selecting................................................................................7-5
PLC outputs...................................................................................................3-47
PLC positioning..............................................................................................4-24
PLC positioning, Feed for ..............................................................................4-24
PLC program, translating ...............................................................................7-8
PLC programs, deleting .................................................................................7-8
PLC programs, editing ...................................................................................7-6
PLC software.................................................................................................0-8
PLC window ..................................................................................................7-100
Position monitoring........................................................................................4-46
Positional deviation........................................................................................4-43
Positioning window .......................................................................................4-48
Power supply.................................................................................................3-16
Power supply, NC..........................................................................................3-16
Power supply, PLC ........................................................................................3-17
11-6

TNC 406/TNC 306

Subject index

3/97

Power supply, VDU .......................................................................................3-20


Probing function ............................................................................................4-112
probing, manual .............................................................................................4-114
probing, successive .......................................................................................4-114
Program creation ...........................................................................................7-12
Program, ........................................................................................................4-90
Programming station .....................................................................................4-89
Programs, transferring from EPROM ............................................................7-8
Pull data from Data Stack (PL)......................................................................7-89
Pull logic accumulator from Data Stack (PLL)...............................................7-90
Pull word accumulator from Data Stack (PLW) ............................................7-90

Q
Q parameters.................................................................................................4-63; 9-4
Q parameters, global .....................................................................................9-4
Q parameters, local .......................................................................................9-4

R
RAM operation ..............................................................................................7-22
RAM test .......................................................................................................4-90
Range (Module 9010/9011/9012 ...................................................................7-110
Rapid traverse................................................................................................4-41; 4-42
Read in Word.................................................................................................7-110
Reference end-position .................................................................................4-28
Reference marks ...........................................................................................4-27; 4-33
Reference marks, direction for traversing .....................................................4-33
Reference marks, distance-coded.................................................................4-27
Reference marks, feed rate for leaving .........................................................4-33
Reference marks, passing over.....................................................................4-28
Reference marks, Sequence for traversing...................................................4-33
Reference point, shift of the..........................................................................4-77
Referencing to machine datum with M92 positioning blocks .......................4-77
REMAINDER .................................................................................................7-60; 7-74
REPLY............................................................................................................7-104
RESET............................................................................................................7-39
RESET NOT ...................................................................................................7-41
Restore position ............................................................................................4-90
Retraction of the electrode............................................................................4-59
Retraction speed ...........................................................................................4-59
Rotary axis, non-controlled ............................................................................4-54
Rotary encoder and ballscrew .......................................................................4-5
RPLY (REPLY)..............................................................................................7-105
RS 422/V.11...................................................................................................3-42; 4-68
RS-232-C interface.........................................................................................8-3; 8-11

S
Scaling factor .................................................................................................4-87
Servo accuracy ..............................................................................................4-43
Servo lag........................................................................................................4-41
Servo lag, optimizing .....................................................................................4-144
Servo positioning ...........................................................................................4-37
Servo sensitivity ............................................................................................4-66
SET ................................................................................................................7-38
3/97

TNC 406/TNC 306

Subject index

11-7

SET NOT........................................................................................................7-40
Set commands ..............................................................................................7-38
Shift commands ............................................................................................7-81
SHIFT LEFT....................................................................................................7-81
SHIFT RIGHT .................................................................................................7-82
Short circuit ...................................................................................................4-59; 4-112
Short-circuit signal .........................................................................................3-37
Signal period ..................................................................................................4-5
soft key..........................................................................................................4-101
Software handshaking ...................................................................................8-10
Software limit switch.....................................................................................4-13; 4-144
Software types ..............................................................................................2-7
Spark-out .......................................................................................................4-61
Stack operations ............................................................................................7-88
Standard data transmission protocol .............................................................8-30
Standard transmission protocol.....................................................................8-18
Status display, canceling ...............................................................................4-84
Status Interrogation (RPLY) ...........................................................................7-105
Status window...............................................................................................4-80
Storing a STRING (=) ...................................................................................7-102
STRING accumulator .....................................................................................7-100
STRING Execution .........................................................................................7-100
STRING memory ...........................................................................................7-100
SUBM (SUBMIT) .........................................................................................7-104
Submit Programs...........................................................................................7-104
Submit Queue ...............................................................................................7-104
Subprograms .................................................................................................7-104
SUBTRACTION..............................................................................................7-57; 7-73

T
TABLE function..............................................................................................7-10
Technical data................................................................................................2-3
Test functions, PLC .......................................................................................7-9
Threshold sensitivity......................................................................................4-117
Timers............................................................................................................7-18
TNC keyboard ................................................................................................3-4; 3-5; 3-59; 4-101
Tool axis.........................................................................................................4-12
Touch probe systems, TS 120.......................................................................3-39
TRACE BUFFER, DISPLAY ............................................................................7-10
TRACE function .............................................................................................7-9
TRACE, END..................................................................................................7-10
TRACE, START ..............................................................................................7-10
Transferring programs from EPROM ............................................................7-8
Transferring the PLC-program .......................................................................7-11
Translating PLC programs .............................................................................7-8

U
Unconditional jump (JP)................................................................................7-93
UNEQUAL .....................................................................................................7-67
User cycles ....................................................................................................9-2
User parameters............................................................................................4-88; 5-2
Utilization .......................................................................................................7-8

11-8

TNC 406/TNC 306

Subject index

3/97

V
VDU display ...................................................................................................4-12
Visual display unit ..........................................................................................3-6; 3-12; 3-35
Voltage step...................................................................................................4-43

W
Workpiece datum ..........................................................................................4-76
Write in word range.......................................................................................7-111

X
X1 ..................................................................................................................3-60

Z
Zero reference mark ......................................................................................4-28

3/97

TNC 406/TNC 306

Subject index

11-9

Update Information No. 15


The following software was released for the TNC 416:
Software 286 18x-02 was released in April 99 (no additional functions)
Software 286 18x-03 was released in April 99 (no additional functions)
Software 286 18x-04 was released in February 2000

The following software was released for the TNC 406:


Software 280 62x-9 was released in March 1999 (no additional functions)
Software 280 62x-10 was released in February 2000.

In the software 286 18x-04 and 280 62x-10 the following additions were made:

New Cycle 14 Contour


Cycle 14 enables you to move continuously in the working plane in a freely programmable,
closed contour with programmed feed rate (not gap-controlled) and simultaneously erode in the
tool axis (gap-controlled), and plunge to a programmable depth.
If this depth is reached when a certain percentage (PRC) of the programmed contour length is
attained, the cycle ends.
Conditions for the contour program:
The erosion axis programmed in Cycle 14 must not appear in the contour program.
The programmed contour must be closed. This means that the contour must end at the point at
which it begins.
The starting point of the contour should be in the contour center so that the contour can be
scaled with Cycle 11.
When the cycle ends, the erosion axis remains at the final depth and does not retract as it does,
for example, in Cycle 17.
Example:
CYCL DEF 14.0 CONTOUR GEOMETRY
CYCL DEF 14.1 IZ-1 M36
(IZ-Qnn)
CYCL DEF 14.2 PGM CONTOUR1
CYCL DEF 14.3 PRC=90
(PRC=Qnn)

During a reference run with the direction keys, traverse continues in manual mode after the
reference mark has been evaluated.

New Q parameter Q164


The minimum undersize UNS of the maximum power stage is loaded after Q164 during
execution of the generator cycle.

If a program was interrupted with ext./int stop and restarted with NC Start, then an incremental
positioning after a GOTO is always started from the current machine position.

3/2000

TNC 416/TNC 406/TNC 306

1-1

In MODE/AXIS LIMIT, limit values can be entered in addition to the software limit switch values
of the machine parameters. The smaller of each two values is used for range checking.
An edited value is saved with the END key. The previous value can be restored through NOENT.
The software limit switch values from the machine parameters can be transferred by soft key
(TRANSFER FROM MP) to the MODE window.

The following structured program commands were added to the PLC syntax:
IFT
IFF
ELSE
ENDI

(IF LOGIC-ACCU TRUE)


(IF LOGIC-ACCU FALSE)
(ELSE)
(END OF IF-STRUCTURE)

Following code only if logic accu=1


Following code only if logic accu=0
Following code only if IF is not fulfilled
End of the IF structure

REPEAT (REPEAT)
UNTILT (UNTIL TRUE)
UNTILF (UNTIL FALSE)

Repeat from here the program sequence


Repeat sequence until logic accu = 1
Repeat sequence until logic accu = 0

WHILET (WHILE TRUE)


WHILEF (WHILE FALSE)
ENDW (END WHILE)

Runs the sequence if logic accu = 1


Runs the sequence if logic accu = 0
End of program sequence, return jump to beginning

To operate the index register, commands were introduced that permit data exchange between
word accumulator and index register or stack and index register:
LX (Load Index to Accu)
Index register
--> Word accu
=X (Store Accu to Index)
Word accu
--> Index register
PSX (Push Index Register)
Index register
--> Stack
PLX (Pull Index Register)
Stack
--> Index register
INCX (Increment Index register)
DECX (Decrement Index register)
BSX (BIT SET)
The bit that was addressed by index is set to 1.
BCX (BIT CLEAR) The bit that was addressed by index is set to 0 .
BTX (BIT TEST)
Status of the bit that was addressed by index is interrogated.
The following address types are possible:
Mn[X]
Operand number = n+X
In[X]
On[X]
Cn[X]
Tn[X]
Bn[X]
Wn[X]
Dn[X]

1-2

Operand number= n+X


Operand number= n+2*X
Operand number= n+4*X

It is now possible to assign label names with up to 8 places instead of the previous label
numbers. The maximum label number is 1000.

TNC 416/TNC 406/TNC 306

3/2000

Handwheel
Besides in the MANUAL and JOG INCREMENT modes, the handwheel is also effective with:
Manual Touch Probe: depth finding, but not in the probe axis;
Manual erosion, but not in the erosion axis;
After an EXT stop and when a PGM is being run (for workpiece inspection).

Tool Def or Cycle 3 Tool Def blocks can now be included in the OEM cycle in the PLC-EPROM.

Read machine parameter 7651 was removed. MP7651 made it possible to switch off the
special short-circuit monitoring in manual mode. The monitor is now always active during
traverse with the handwheel and axis direction keys .
The short circuit monitor can now also be switched on or off with the aid of marker M2622 in
manual and handwheel mode.

Machine parameter MP7412 (behavior during cycle call) has been removed.

Change in machine parameter MP4060.x


The input in MP4060.x (distance for lubrication pulse) is in millimeters.

Marker M2500 (actual-to-nominal value transfer in case of short circuit) and the complement
markers as of M2464 and as of M2528 have been removed.

New marker M2507


The status display M7 can be switched on with marker M2507. This same applies for status
display M8 (M2508). M7 can be used to display a second flushing.

New PLC word W498


W498 is the encoded current handwheel axis (X=bit 0, Y=bit 1, Z=bit 2, ...)

3/2000

TNC 416/TNC 406/TNC 306

1-3

New machine parameter MP4030


Extension of the word marker range up to W1098
With MP 4030 = 1 you can switch to the new axis marker interface of the PLC. Here the new
words W1024 to W1060 are used instead of the previous markers.
If MP 4030 = 0 the markers are active as before and the new words from W1024 to W1060 can
then be used as desired.
The following PLC words are used when MP 4030 = 1 instead of the corresponding bit marker:
Words
W1024 Axis release
W1026 Axes into position
W1028 Reserved
W1030 Traverse direction negative
W1032 Reference marks not yet traversed
W1034 Limit switch plus
W1036 Limit switch minus
W1038 Preparing to open the control loop
W1040 Opening the control loop
W1042 Reserved
W1044 Actual-to-nominal value transfer
W1046 Manual direction key plus
W1048 Direction keys manual minus
W1050 Jog increment plus
W1052 Jog increment minus
W1054 Reference limit switch
W1056 Lubrication pulse
W1058 Acknowledgment of lub. pulse
W1060 Reserved

Markers
(M2000...)
(M2008...)
(M2160...)
(M2136...)
(M2624...)
(M2625...)
(M2492...)
(M2544...)
(M2552...)
(M2456...)
(M2457...)
(M2512...)
(M2513...)
(M2556...)
(M2012...)
(M2548...)

W1062 Axis-specific disabling of handwheel pulse


W1064 ... W1098 Reserved

New PLC Module 9040


Module 9040 Read axis positions
Call:
PS
K/B/W/D Destination address (Dxxxx) for coordinate value of the first axis;
The coordinate values of the further axes are saved in the five following
double words;
PS
K/B/W/D Coordinate type to be read 0..4
0: Actual value
1: Nominal value
2: Reference value
3: Following error
4: Distance-to-go
CM 9040
M3171 = 1 if error occurs during execution of the module

1-4

TNC 416/TNC 406/TNC 306

3/2000

New PLC Module 9221


Module 9221 Start PLC positioning
Call
PS
B/W/D/K
PS
B/W/D/K
PS
B/W/D/K
CM 9221
PL
B/W/D

<axis> 0..4 = X .. 5th axis


<target position in the reference system> (0,001 mm)
<feed rate> (mm/min)
<error code>

Error code :
0: No error, positioning started
1: Error
M3171 = 1 if error occurs during execution of the module

3/2000

TNC 416/TNC 406/TNC 306

1-5

Filing instructions
This Update Information issue includes a set of replacement sheets for your Technical Manual
TNC 416/TNC 406/TNC 306. Please incorporate them into your Manual, following the filing
instructions below.

Change
Title page March 1997
Update Information
Introduction
Page 2-9 Software releases
Chapter 5 Machine parameters
Page 5-7
Page 5-17
Page 5-26
Page 5-28
Chapter 6 Marker and Words
New markers and words
Chapter 7 PLC programming
Contents
Page 7-84 BTX
Page 7-85 BCX
Page 7-86 BSX
Page 7-108 to 7-123 structured
instructions, new PLC Modules

1-6

TNC 416/TNC 406/TNC 306

Remove
Title page

Introduction
Page 2-9, 2-10

Insert
New title page
Update Information No. 15
New chapter Introduction
Page 2-9, 2-10

Page 5-7, 5-8


Page 5-17, 5-18
Page 5-25, 5-26
Page 5-27, 5-28
List of markers and words

Page 5-7, 5-8


Page 5-17, 5-18
Page 5-25, 5-26
Page 5-27, 5-28
New list of markers and
words

Contents
Page 7-83, 7-84 BTX
Page 7-85 BCX
Page 7-86 BSX
Page 7-107 to 7-120

New Contents
Page 7-83, 7-84 BTX
Page 7-85 BCX
Page 7-86 BSX
Page 7-107 to 7-124

3/2000

Update Information No. 14


The new TNC 416 control for electrical discharge machining is being introduced in early 1999. It
supersedes the TNC 406, which will be removed from the product program in the autumn.
The TNC 416 consists of the following components:
LE 416D Logic Unit for BC 120 (CRT)
or as an alternative:
LE 416D Logic Unit for BF 120 (TFT)

Id. Nr. 336 486-3x

TE 420 Keyboard Unit

Id. Nr. 313 038-01

BC 120 Visual Display Unit


(15-inch color monitor)

Id. Nr. 313 037-01

BF 120 Visual Display Unit


(10.4-inch color flat panel display)

Id. Nr. 313 506-01

Id. Nr. 336 487-3x

The hardware design of the LE 416D corresponds to that of the new HEIDENHAIN logic units
LE 4xxM. Please note this when using the LE.
For installation instructions, dimensions, and connector layout for the new components, please refer
to Chapter 3 "Mounting and electrical installation.
Please note that the LE 416D has no TTL position encoder inputs. All position encoder inputs are
1 VPP or 11APP, switchable by machine parameter MP115.0 (see Chapter 5 List of machine
parameters).
The LE 416D is supplied with Id. Nr. 286 180-xx software
The features of the TNC 416 with software version 286 180-01 are the same as those on the
TNC 406 with software version 280 620-08. PLC programs that can run on the TNC 406 (software
280 620-08), can also run on the TNC 416.

Software version 1 for the TNC 416 was released in March 1999.

3/99

TNC 416/TNC 406/TNC 306

1-1

Software version 8 for the TNC 406 was released in March 1999.

New machine parameter MP331


MP331.0-4 Distance per number of signal periods out of MP332
Input: 0.001 to 99 999.999 [mm or ]

New machine parameter MP332


MP332.0-4 Number of signal periods in the distance from MP331
Input: 1 to 16 777 215

New machine parameter MP334


MP334.0-4 Distance between reference marks for encoders with distance-coded reference
marks
Input:
0 to 65535 [grating periods]
0=1000 grating periods (standard setting)

New Restore Position function


After pressing the manual soft key to switch to manual operation, you can now use the
handwheel to move axes in the stopped condition (NC stop, internal stop). With the then
available Restore position soft key and the NC start key you can return to the starting position
in the sequence determined via soft key. Then you can resume machining by pressing the NC
start key.

Cycle 16 has been changed


To reduce the risk of collision, in Cycles 16 when PAT 4 or 5 is entered, the electrode is now
retracted first on the erosion path and then to the starting point.

Key codes are available for RR, RL, CL PGM, and EXT (already in version 07).
RR =
$1BE
RL =
$1BF
EXT =
$1CD
CL PGM = $1CC

New word W586


The analog voltage on analog output 6 (X8 Pin 8) is determined by the value in word W586.
The value is to be entered in mV, i.e., the value range is +/ 10 000 mV, which is +/ 10 volts.

New marker M2187 (already in version 07)


The error messages gross positioning error ... and measuring system defective... are now
no longer shown blinking. The machine is switched off through EMERGENCY STOP, and M2191
(emergency stop) and M2187 (control loop error) are set. Pressing the CE key after the
emergency stop circuit is closed clears the error message. When the "measuring system
defective..." error occurs, the control makes a reference run after the error message is
acknowledged.

1-2

TNC 416/TNC 406/TNC 306

3/99

Filing instructions
This Update Information issue includes a set of replacement sheets for your Technical Manual
TNC 416/TNC 406/TNC 306. Please incorporate them into your Manual, following the filing
instructions below.

Change
Title page March 1997
Update Information
Introduction
Mounting and electrical installation
New machine parameters

Remove
Title page

Introduction
Mounting and electrical
installation
List of machine parameters

New markers and words

List of markers and words

3/99

TNC 416/TNC 406/TNC 306

Insert
New title page
Update Information No. 14
New chapter Introduction
New chapter Mounting and
electrical installation
New list of machine
parameters
New list of markers and
words

1-3

Update Information No. 13


Software version 7 for the TNC 406 was released at the end of December 1998.
The new software version introduces the following new features:

1. New Functions in the PLC


1.1 Note! Changed key codes for the disabling, enabling and simulating of keys!
All PLC programs that use the previous key codes must be changed! The old key codes are no
longer available! The new key codes are the same as those of the TNC 426/TNC 430.
The markers for the disabling, enabling and simulating of keys have been eliminated and the
following modules have been introduced:
Module 9180 key simulation,
Module 9181/9183 disabling of individual keys/groups of keys,
Module 9182/9184 enabling of individual keys/groups of keys.
The module calls must be programmed as follows:
Key simulation
PS B/W/D/K <PLC key code (Word : 0x0000...0xFFFF)>
CM 9180
PL B/W/D <Status/Error code>
0: PLC key code was accepted and the key was simulated
1-16: PLC key(s) have not yet been simulated
-1: Key code > maximum value
-2: Key code invalid
-3: Key queue overrun
M3171 = 0 if module execution was successful, 1 if not
Disabling of individual NC keys by the PLC
PS B/W/D/K <PLC key code (Word : 0x0000...0xFFFF)>
CM 9181
PL B/W/D <Status/Error code>
0: NC key was disabled
-1: Key code > maximum value
-2: Key code invalid
M3171 = 0 if module execution was successful, 1 if not
Enabling of individual NC keys by the PLC
PS B/W/D/K <PLC key code (Word : 0x0000...0xFFFF)>
CM 9182
PL B/W/D <Error code>
0: NC key was enabled
-1: Key code > maximum value
-2: Key code invalid
M3171 = 0 if module execution was successful, 1 if not

1/98

TNC406/TNC 306

1-1

Disabling of a group of NC keys by the PLC


PS B/W/D/K <PLC group code>
0 : All keys
1-7 : 1st to 7th key group
CM 9183
PL B/W/D <Error code>
0: Group of NC keys was disabled
-1: Group code > maximum value
M3171 = 0 if module execution was successful, 1 if not
Enabling of a group of NC keys by the PLC
PS B/W/D/K <PLC group code>
0 : All keys
1-7 : 1st to 7th key group
CM 9184
PL B/W/D <Error code>
0: Group of NC keys was enabled
-1: Group code > Maximum value
M3171 = 0 if module execution was successful, 1 if not
The groups of keys are arranged as follows:
0: All keys
1: ASCII keys
2: Soft keys
3: Cursor keys
4: Numerical keys
5: Operating mode keys
6: Block opening keys
7: Axis keys
Example: Disabling the operating mode keys
PS K+5
;Operating mode group
CM 9183
;Disable group of keys
PLW
= K+0
;If disabling OK
CMT ...
;Output acknowledgment
Example: Key simulation
If an existing PLC program is already using the key simulation, it can be quickly fixed with the
following code:
L M2813
CMT 790
EM

;KEY STROBE LOCAL


;SEND KEY CODE
;END OF MAIN PROGRAM

LBL 790
L M980
JPT 799

;WAIT FOR PROCESSING


;KEY CODE ALREADY FIXED

PS W516
CM 9180
PL W240
L W240
< K+0
JPT 795

;SEND KEY CODE


;RETURN CODE

;ERROR

L W240
1-2

TNC 406/TNC 306

1/98

= K+0
JPT 791

;KEY WAS PROCESSED

SN M980

;SET: WAIT FOR PROCESSING

LBL 791
EM
LBL 795
EM
LBL 799
PS K+0
CM 9180
PLW
= K+0
R M980
R M2813
EM

;ERROR HANDLING KEY SIMULATION

;ASK WHETHER KEY HAS BEEN SIMULATED

;KEY PROCESSED

M980 and W240 can be replaced by any free markers/words. M2813 and W516 no longer evaluate
the PLC.

1.2 New and Changed Markers and Words


M2826 added: Disable handwheel feed rate
M2826 disables the feed rate of the handwheel.
M2552 and following changed: Actual position capture
With markers M2552 and following you can capture an actual value as a nominal value with clamped
axes and at the same time monitor the limit switches. This permits the servo lag to be set to 0 for
an axis that has been taken out of the control loop with the clamping markers 2492 and following,
and 2544 and following. Up to now these markers were active only in manual operation. Now they
are effective for every clamped axis regardless of the control operating mode.
D748 added: Free rotation of a second angular axis
If the 5th axis has also been defined as angle axis (A or B), you can switch on the free rotation of
this axis (behavior is similar to ROT-C) by loading the PLC doubleword D748 with the speed value
(e.g. 10 000 for 10 rpm). By loading a negative value you can reverse the direction of rotation. An M
function as with ROT-C is not required.
W490 added: Control temperature
The PLC word W490 contains the control temperature in degrees Celsius.
PLC functions keys A,B,C on the HR 410
The three PLC function keys on the HR 410 are now effective in all operating modes.

2. New Functions for the Control Loop and for Commissioning


Higher resolution in the position control loop
The previous resolution of 1 m for the internal position values has been increased to 1/16 m. This
enables more exact positioning and gap control. The entire control loop has been redeveloped and
the calculation of the feedforward voltage for gap control has been completely redesigned. Also, a
filter was integrated that is automatically activated for eight control loop cycles if a step in the
feedforward voltage is too large.
1/98

TNC406/TNC 306

1-3

Integrated 4-channel storage oscilloscope


The integrated storage oscilloscope can record various values in the position control loop as well as
all PLC data. The oscilloscope is activated in MOD by a soft key. Machine adjustment has now been
greatly simplified because you no longer need any external devices. You can create oscillograms in a
connected PC by using the screen dump function of TNCremo as of version 3.00.
MP7365 added: Colors of the oscilloscope
MP 7365.0: Background
$000000
MP 7365.1: Channel 1
$003F3F
MP 7365.2: Channel 2
$3F3F00
MP 7365.3: Channel 3
$003F00
MP 7365.4: Channel 4
$3F1230
MP 7365.5: Reserved
$000000
MP 7365.6: Grating
$30200C
MP 7365.7: Cursor and text $3F3F3F
The various functions of the oscilloscope can be selected with the aid of soft keys. With the cursor
keys on the keyboard you can switch channels and move the screen cursor. In the setup menu you
can select the various inputs with ENT/NOENT.
Step output has been expanded
The step response time measured with the integrated oscilloscope can be edited. The control
calculates the associated value for MP1060 (acceleration) and displays it.
One further soft key (INPUT RAMP) has been added. This produces an increasing (+) or decreasing
() ramp on the analog input. If a channel is switched to the analog input and another to the feed
rate, it can be used to graphically display the programmed input characteristic (MPs 2010, ...2070, ...)
during an active erosion process (electrode in the air!).
New code numbers for machine commissioning
For debugging, under the code number 105296 or 415263 (like TNC 410) you will find the following
menu for machine commissioning (setup):
OFFSET COMPENSATION
OUTPUT STEP FUNCTION
PLC FUNCTIONS
MACHINE PARAMETER PROGRAMMING
COMPENSATION VALUE LIST

(Here also you can go into the parameter list)


(Trace: here also you can go into the oscilloscope)

Under the code number 79513 you will find the following menu and the corresponding data outputs
on RS-232-C:
DIALOG CODE NUMBERS OUTPUT
LOGBOOK OUTPUT
PROGRAM RUN DATA OUTPUT
MACHINE PARAMETER OUTPUT

(All control dialogs and numbers)


(Contents of log)
(Data from geometry module to control loop)
(Machine parameters)

Because this is purely data output, the code number 79513 can be given to any end user.
MP1710.x removed: Position monitoring for operation with servo lag (can be deleted)
MP1710.x was removed. The control multiplies the value of the normal servo lag by 1.5 and uses
the product as limit for servo-lag monitoring (erasable error message). A value of 1.8 * servo lag
should therefore be used for MP1720.x.
1-4

TNC 406/TNC 306

1/98

MP1141 removed: Maximum voltage between two control loop cycles


MP1141 was removed because the acceleration monitoring is now automatic.
MP2190 removed: Constant speed for timing
MP1530 added: Overshoot behavior during acceleration with feedforward
MP1530 has been added. It influences the overshoot behavior during acceleration in the gap control
in feedforward mode.
Input: 0 to 0.999
If MP1530 is programmed to equal 0, the standard value 0.25 is used.
Input value 0.999 = steepest characteristic curve
MP1540 added: Braking behavior during feedforward
MP1540 is also new. It influences braking to a target in feedforward mode.
Input: 0 to 0.999
If MP1530 is programmed to equal 0, the standard value 0.5 is used.
Input value 0.999 = steepest characteristic curve
MP 1550 added: Filter for feedforward
1 = Switch off the filter in the feedforward voltages
MP7655 added: Positioning with the handwheel
1 = Positioning with the handwheel is also effective in the PROGRAMMING AND EDITING mode of
operation.
MP7290.0-5 added: Display step
MP 7290 (axis-specific) sets the display step of the position values. The finest resolution is 1/10 m.
Value of MP
0
1
2
3
4
5
6

Resolution of display
m
inch
0.1 m
0.00001
0.5 m
0.00002
1 m
0.0001 (previous resolution)
5 m
0.0002
10 m
0.001
50 m
0.002
100 m 0.01

MP2060 removed: Erosion feed rate for M2620


MP2060 (erosion feed rate if marker 2620 is set) was removed. If the function is needed for special
applications, you can use MP2081=1 to realize a two-position control without characteristic curve.
An other possibility: The threshold for free-run feed rate from MP2141 can be defined with W520
(0..500).
Error handling in the control loop changed
The error messages "gross positioning error ..." and "... measuring system defective" no longer result
in a black screen with blinking error message. Rather they are now shown in the normal error line.
The machine is switched off by an EMERGENCY STOP and the markers M2191 (EMERGENCY
STOP) and M2187 (control loop error) are set. In the event of a "... measuring system defective"
error, after you acknowledge the error message by pressing CE and the EMERGENCY STOP circuit
is reclosed, the control goes into the reference run mode.

1/98

TNC406/TNC 306

1-5

3. New Functions for Programming and Operation


New Cycle 16 ORBIT
Cycle 16 ORBIT was developed from Cycle 17 with additional parameters for more functions. All
input values except the M functions can be transferred by Q parameter. Cycle 17 can therefore
completely replace Cycle 17.
Example:
CYCL DEF 16.0 ORBIT
CYCL DEF 16.1 IZ-5.02 M36
CYCL DEF 16.2 RAD=20.014 DIR=0
CYCL DEF 16.3 PAT=0 SPO=0
Input value and dialogs:
16.1: IZ-5.02
Eroding axis and depth
16.1: M36
Miscellaneous function M
16.2: RAD=20.014 Expansion radius
16.2: DIR=0
Orbit direction (0=CCW, 1=CW)
16.3: PAT=0
Expansion pattern (0...5)
16.3: SPO=0
Sparking out condition (0/1)

(Q-Parameter)
(Q-Parameter)
(Q-Parameter)
(Q-Parameter)
(Q-Parameter)

PAT (=expansion pattern)


0 = Continuous widening on a circular path with simultaneous plunging in the erosion axis, gap
control on revolving oblique vector; retraction with Timing/Cycle Stop on oblique vector to the
starting point
1 = Same as 0, but with quadratic instead of circular expansion
2 = Orbital erosion with constant radius, gap control only in erosion axis, retraction with
Timing/Cycle Stop on oblique vector to the starting point
3 = Same as 2, but with quadratic instead of circular expansion
4 = Execution in 2 phases (new):
1. Erosion in radius to final radius with simultaneous erosion in erosion axis to final depth at 0
degree angle. Gap control on vector.
2. Expansion on circular path with constant final radius, gap control on the circular path, but
retraction with Timing/Cycle Stop on oblique vector to the starting point.
5 = Same as 4, but with quadratic instead of circular expansion
SPO (=sparking out condition)
0 = End sparking out if final radius has been reached and the sparking-out time (MP2110 or Cycle 4)
has expired (fast sparking out)
1 = End sparking out if final radius has been reached and there have been 1 revolutions of
continuous free-running (M2616) (complete sparking out)

1-6

TNC 406/TNC 306

1/98

Change in Cycle 17 DISK, MOD 2 Orbiting


Up to now, with the expansion mode MOD 2, during timing the TNC has retracted the electrode first
in the erosion axis and then in the direction of the center of orbital movement. Now the TNC retracts
the electrode as in MOD 3 in the direction of the starting point. The gap control during orbital sinking
is as before only in the erosion axis.
CYCL DEF 17.0 DISK
CYCL DEF 17.1 IZ-x.xxx M36
CYCL DEF 17.2 RAD=y.yyy MOD=0..7
MOD (0...7)
Bit 1 and bit 0:
00 = Circular expansion together with sinking (corresponds to PAT = 0 in Cycle 16)
01 = Quadratic expansion together with sinking (corresponds to PAT = 1 in Cycle 16)
10 = Orbital sinking with retraction to starting point (corresponds to PAT = 2 in Cycle 16)
11 = Same as 10
Bit 2:
0 = Terminate sparking out if final radius has been reached and the sparking-out duration (MP2110
or Cycle 4) has expired (fast sparking out, corresponds to SPO = 0 in Cycle 16)
1 = Terminate sparking out if final radius has been reached and there have been 11/4 revolutions
of continuous free running (M2616 complete sparking out, corresponds to SPO = 1 in Cycle 16)
Change in Cycle 19: WORKING PLANE: Tilting the working plane
The datum of the tilting motion is now identical with the manually set datum (as in the milling
machine controls TNC 426/TNC 430). The TNC shows the tilting angle in the graphic status after the
soft key STATUS TILT has been pressed. If there is a basic rotation, it is calculated into the tilt in the
basic axis of rotation. The TOUCH PROBE cycle is also possible in the tilted system (through a 3-D
straight line).
Probing with the electronic handwheel
If the short circuit monitor (MP 7651=0) is active, you can probe with the electronic handwheel. If
the electrode makes contact with the workpiece during probing with the electronic handwheel (short
circuit), then the TNC stops the positioning in the direction of the workpiece and permits traverse
only in the opposite direction. It is also impossible to switch axes. The TNC permits normal operation
again if the electrode is retracted by at least 100 m. The short circuit monitoring during handwheel
positioning for a reference run is not active in this form.
Coping files
Now you can copy files in the PROGRAMMING AND EDITING mode of operation.
MP7300 has been expanded and is now bit-coded:
MP 7300 was expanded from 1 bit to 3:
Bit 0:
1= Delete program data and display status with PGM END or M02, which means that PGM END
or M02 function like a program selection or the reset soft key (function unchanged).
new:
Bit 1:
1 = Do not delete Q parameters when program is selected or reset soft key is pressed
Bit 2:
1 = Do not delete tool data and Q parameters when program is selected or reset soft key is
pressed.
The Q parameters are always deleted after power interruption, and the tool data are always retained.
1/98

TNC406/TNC 306

1-7

Update Information No. 12


Software version 6 for the TNC 406 was released at the beginning of December 1997.
The new software version introduces the following new features:

Change in MP1700
The PLC cycle time is now fixed at 40 ms.
The position loop cycle, 2 or 4 ms, remains definable with MP 1700:
0 = 4 ms --> machine with normal acceleration
1 = reserved (same as 0)
2 = 2 ms --> Machine with high acceleration >1 m/s*s

PLC utilization, new marker M2188


The PLC utilization for 100% is fixed, as before, to 5 ms.
The maximum possible utilization was increased from 200 to 240%.
If you exceed the utilization by 240%, which corresponds to a PLC program run time of
12 ms, the control goes into the blinking error condition ERROR IN PLC PROGRAM 53.
If you exceed the utilization by 230% the new PLC marker M2188 is set as warning. If the
utilization falls below 230% the marker is reset.

New machine parameters MP710 and MP 711


MP710 backlash compensation for 4th axis; Input -1.000 to +1.000 mm
MP711 backlash compensation for 5th axis; Input -1.000 to +1.000 mm
(With this amount of play, effective gap control is no longer possible).

Datum tables / Position tables


More than one position table xxxxxxxx.D can now be defined.
MP10 defines whether a table is generated with 4 or 5 axes.
The block CYCL DEF 7.2 NAME has been added to Cycle 7. This makes it possible to select the
desired position table. If you want only a table definition without a shift, you must program a
#0 as datum number.
If NAME is not programmed, the control accesses the table 0.D. If the selected table is
missing, an error message appears.
If a CYCL 7.2 NAME was executed, all further access refers only to this table (M38, M39).
A selected table is displayed in the status window.

Changes in MP410
MP410 defines the identifier of the 4th axis.
A linear axis can also be defined as 4th axis.
Input values:
0/1/2/3/4/5 = A/B/C/U/V/W
A/B/C = angular axes
U/V/W = linear axis
MP410 (4th axis) and MP411 (5th axis) must have different values. For machines with angular
axis and secondary linear axis, the angular axis must be programmed as 4th axis and the linear
axis as 5th axis.

Machine parameter MP2130 has been removed


In order to avoid exceeding permissible machine accelerations resulting from gap control signals,
the acceleration of the input signal (gap value) has been limited to the lowest acceleration of the
axes involved. Machine parameter MP2130 is therefore obsolete and has been removed.

3/98

TNC406/TNC 306

1-1

New possibilities for infeed in free run


If the voltage of the analog input (W392) lies above the value from W520 (if W520 > 0), the
electrode moves into the workpiece at the free-run feed rate from MP2141.

Change in MP2081
With MP2081 = 2 you can transfer the comparison of the actual gap with the nominal gap (from
W524) out of the generator and into the control. This is the same procedure as when MP 2081 =
1 except that, instead of using the subsequent two-point controller, it uses the characteristic
curve. The feed rate for the control is calculated from the characteristic curve.
To transfer the comparison function to the control, make the following change in the PLC
program:
The gap nominal value for good in the PLC must be read from the corresponding parameter
(GV) of the current generator setting, calculated to 0...500, and loaded to W524. The threshold
for the free-run feed rate must be loaded to W520.
e.g.
L B671
X K+5
= W524
L K+450
= W520

;GV nominal Gap Voltage (from erosion parameter)


;5..495 (=nominal Gap)
;for example 4.5
;= threshold for free-run feed rate (0...500)

The complete input curve for MP2081=0 or 2 can now also be changed from the PLC. Before the
PLC run, the PLC words 599 ... 597 are always loaded from the machine parameters MP2010 ...
MP2030. If you change the curve, you must also change the values in W588 ... B597 in the PLC.
After the PLC scan, the control uses these values for the characteristic curve.
The exact assignment is:
Rising characteristic curve before the kink point in thousandths
0.1 ... 10.0 ==> 100 ... 10000 in thousandths
W588 for positive feed rate
(MP2010.0)
W590 for negative feed rate
(MP2010.1)
Characteristic curve after kink point: Multiplication factor
0.1 ... 10.0 ==> 100 ... 10000 in thousandths
W592 positive
(MP2020.0)
W594 negative
(MP2020.1)
Kink as a percentage of the characteristic curve
0 ... 100%
B596 positive
(MP2030.0)
B597 negative
(MP2030.1)

New bytes and words


B396
MOD from Cycle 17 disk (0..7)
B397
Axis from Cycle 17 disk 0/1/2 = X/Y/Z
W398
Actual feed rate

It is now possible to input MOD via Q parameters in Cycle 17 Disk.

The status window also displays the values of feed rate and angular position when running the
disk cycle. If the control is set to inch values, the feed rate is shown in tenths of an inch.

1-2

TNC 406/TNC 306

3/98

Servo Sensitivity SV is no longer read directly out of the corresponding byte of the erosion table,
but rather from the new byte B763. During control with a table, SV is automatically transferred to
B763. During control without a table (MP2199=0), the value of the corresponding SV-Q
parameter in the PLC program can be transferred to B763, and SV can therefore be changed
during erosion.

The step-output function was modified so that the duration of output can be determined by
pressing the key. This also makes it possible to move across larger distances with constant
voltage.

Markers 2688 and following (switching off monitoring functions in the control loop) was removed
to ensure safety.

New machine parameter MP7651


With the new MP 7651 you can select whether the short circuit monitoring during manual
handwheel traversing is switched on or off.
Input:
0 = Switch short-circuit monitoring on
1 = Switch short-circuit monitoring off

New Cycle 4 SPARK OUT TIME


The new Cycle 4 enables you to program the sparking out time during erosion in the range of
1...9999 seconds. This value remains effective until another Cycle 4 is run or the part program is
reselected. After reset or reselection the value from MP2110 becomes effective.

Comment blocks are now also saved if they begin with a semicolon ; are now also saved. The
binary format of an NC block limits the string length of these comment blocks to 22 characters.
As before, comment blocks that begin with an asterisk * are not saved.
A comment block is editable only if it begins with a semicolon. A comment can be
inserted only between the NC blocks. It is not possible to insert a comment at the end of an NC
block.

Change in MP2081
The input range for MP2050 was expanded from 0..2 mm to 0..20 mm.

New Cycle 19 WORKING PLANE for tilting the working plane


Now you can program up to three tilt angles for the axes A, B and C. The tilt angles are shown in
a special status window. The control uses the entered angle to calculate movement in axes X, Y
and Z. Positioning commands are executed in the tilted plane if Cycle 19 has been run and at the
same time an OEM cycle or the disk cycle is being run. Positioning commands outside an OEM
cycle and PLC positioning commands are always executed in an untilted plane.
The tilting point is the disk origin for Cycle 17 Disk, or the starting point of an OEM cycle
(30...99). The OEM cycle can be composed of any linear blocks and disks. Circles are not
possible in a tilted OEM cycle, which is indicated by the error message CIRCLE TILTING NOT
POSSIBLE.

3/98

TNC406/TNC 306

1-3

Filing instructions
This Update Information issue includes a set of replacement sheets for your Technical Manual TNC
406/TNC 306. Please incorporate them into your Manual, following the filing instructions below.

Change
Title page April 1996
Update Information No. 12

1-4

TNC 406/TNC 306

Remove
Title page

Insert
New title page
1-1 to 1-2

3/98

Update Information No. 11


Software version 15 for the TNC 306 was released at the end of November 1996.
Software version 16 for the TNC 306 was released at the end of January 1997.
Software version 5 for the TNC 406 was released at the beginning of February 1997.
The new software version 15 of TNC 306 introduces the following new features:

If M36 is active while the "Touch Probe" cycle is running, M37 is automatically output (erosion
switched off).

The new software version 16 of TNC 306 introduces the following new features:

Functions for HR 410 handwheel are available.

Output of a step function for machine adjustment


Under the code number 105296 it is possible to start the output of a step function (analog
voltage). The step is adjustable in amplitude (voltage or feed rate) and duration through the arrow
keys. The axis is selected through the axis key. With the step function you can optimize the
servo amplifier adjustment and find the values for acceleration and Kv.

Sampling rate of the analog signal for gap control


The digital scanning rate of the analog input is now 1 ms. This means that for each cycle, four
analog values are read and their mean value is accounted for in the following control-loop cycle (4
ms). This makes it possible to read input frequencies up to 250 Hz.

New gap control via gap signal


New MP2081
Input value = 0 analog input = velocity signal (previous type of gap control)
= 1 analog input = gap signal (new type of gap control)
The previous definition of the analog input for gap control requires that the actual sparking gap is
compared with the nominal spark gap (difference formation for velocity signal) in the generator
(MP2081=0, analog input = velocity signal).
Now you can switch MP2081=1 (analog input = gap signal) so that the values are compared in
the control software. The nominal value is read from the PLC word W524; the actual value is
found in W392. A value of 0 to 500 in W392 corresponds to 0 to 5 volts at the analog input. In
the generator a signal must be formed corresponding to the instantaneous status of the sparking
gap (too small / good / too large).
The following commands are needed in the PLC program for control by gap signal:
- The factor for backward feed rate must be loaded in W522.
- The gap nominal value for "good" must be read in the PLC from the corresponding parameter
(GV, B671) of the active generator setting, converted to a value from 0 to 500 and loaded in
W524.
- The threshold must be loaded in W520.

3/97

TNC406/TNC 306

Update Information No. 11

1-1

Example of PLC program:


L
=
L
X
=
L
+
=

K+140
W522
B671
K+5
W524
W524
K+150
W520

;e.g. factor 1.4


;Factor for backward feed rate
;GV Gap Voltage nominal (from erosion parameter)
;5...495 (=nominal Gap)
;nominal Gap
;Calculate threshold for free-run feed rate
;Threshold for free run feed rate

Feed-rate calculation when MP2081 = 1


The voltage at the analog input is compared with the value from W524 and is calculated for
forward motion as follows:
The analog input voltage is greater than the value from W520; the electrode is moved at the freerun feed rate from MP2141.
Otherwise,
F = MP2142 * SV (Servo Sensitivity [%]).
Example: 50 * 20% = 10 mm/min.
The analog input voltage is calculated for backward motion as follows:
F = MP2142 * SV (Servo Sensitivity [%]) * W522;
Example: 50 * 20% * 1.4 = 14 mm/min
If a short circuit is reported through the fast input X12, the electrode is returned at the feed rate
from MP 2133 (input value > 0).
Calculation example of a control-loop cycle (clc) of 4 ms (1 min = 15000 clc):
MP2142 = 50 mm/min and SV=60% results in a forward velocity at the gap of
F = 50 mm/min * 0.6 = 30 mm/min.
F = 30 mm/min = 30 000 m / 15000 clc = 2 m/clc.
Therefore the electrode is moved forward or backward by 2 m per control-loop cycle.
These very small feed rates permit a stable gap control. The optimum setting for GV and SV
must be found for the particular machining application.
According to the formula:
a=V/t
a change in direction where
V = (+30 30*1.4) = 72 mm/min
and
t = 4 ms
results in the acceleration
a = 72 mm / (4 ms * 60 s) = 1.2 m / 4 s * s = 0.300 m/s2.
If the machine can no longer achieve this acceleration, the gap control becomes unstable.
If MP2081=1, the following machine parameters of the input characteristic for conventional gap
control are no longer applicable:
MP2010 to MP2030, MP2060, MP2070, MP2080, MP2131 and MP 2132.

1-2

TNC 406/TNC 306

Update Information No. 11

3/97

The following machine parameters and PLC words are applicable when MP2081=1:
MP 2133 Retraction velocity for short circuit during erosion; short circuit is quickly detected
through X12. (MP 2133 has no function if = 0.)
MP 2141 Free-run feed rate forward if analog voltage has crossed the threshold.
MP 2142 Feed rate for gap control at SV=100%
W520

Threshold for positioning with free-run feed rate from MP2141 value range 0 to 500
(corresponds to the voltages 0 to 5 V).

W522

Factor for gap feed rate backwards


Value range 0 to 1000 (corresponds to factor 0.0 to 10.0).

W524

Nominal value of sparking gap (GV)


Value range 0 to 500 (corresponds to 0 to 5 V

New M function M93, backward positioning


The new M function M93 was introduced to make it simpler to program the OEM cycle
necessary for erosion of vector cavities and star cavities. Erosion blocks (also circle / helix) that
are programmed with this M function are automatically repositioned to the starting point after
execution (as in the disk cycle). M93 is permitted only when M36 is active.

Improvement of the function for erosion with time limit


Cycle 2 (eroding with time limit) is also effective for erosion blocks with M93.

New marker M2189


M2189 is set by the NC if an error message is displayed from the PLC by error markers M2924
to M3123. PLC error messages are deleted by resetting the error marker or by pressing the CE
key.

The input range for MP 1060.x (acceleration) was changed to the values 0.01 to 9.0.

The input range for MP 330.x (resolution of encoder) was changed to the values 1 to 360 ([m or
1/1000 degrees] per encoder period. For square-wave inputs, the encoder must be equipped
with a 5-fold EXE if it has distance-coded reference marks (MP1350). If an angular axis is
connected to a square-wave input, the encoder must output 90 000 pulses per revolution (ppr) or
a divisor thereof.
Example:
For a rotary encoder and 5-fold EXE (square-wave input): (RON 275 C or ROD 270 C)
18 000 ppr * 5 = 90 000 ppr
MP330 = 4 (min. value for square wave)
9 000 ppr * 5 = 45 000 ppr
MP330 = 8
If an angular axis is connected to sinusoidal inputs, the encoder must output a total of 360 000 or
a divisor thereof:
ROD 4xx with 2000 ppr * transmission ratio 180 (no EXE) = 360 000
MP330=1
ROD 4xx with 1000 ppr * transmission ratio 180 (no EXE) = 180 000
MP330=2
ROD 4xx with 1000 ppr * transmission ratio 90 (no EXE)
= 90 000
MP330=4
ROD 4xx with 3000 ppr without transmission ration
=
3 000
MP330=120

3/97

TNC406/TNC 306

Update Information No. 11

1-3

The new software version 5 of TNC 406 introduces the following new features:

Machine parameters MP7470 and MP7274 are axis-specific


The MPs 7470.0 and 7274.0 are assigned to the 4th axis (MP410).
The MPs 7470.1 and 7274.1 are assigned to the 5th axis(MP411).

New machine parameter MP2052 for advanced switch-on distance


Input value = 0...2.0 [mm]
In MP2052 you can enter an advanced switch-on distance. This makes it possible to switch on
the oscillator signal of the generator earlier during workpiece reapproach after timing (marker
M2780). The control then receives a correct analog gap signal during the transition from
positioning to gap control.

New machine parameter MP7241 for the NC blocks EL CALL and WP CALL
(See below for description of EL CALL and WP CALL)
Input value = 0 NC blocks disabled
= 1 NC blocks enabled

New machine parameter MP2081 for gap control


Input value = 0 Analog input corresponds to the velocity signal (previous type of gap control)
= 1 Analog input corresponds to the gap signal (new type of gap control)

New machine parameter MP5200 for the baud rate of the RS-422 interface
Input value = 0 baud rate is 9 600
= 1 baud rate is 38 400

New machine parameter MP7232


Input value = 0
Disable OEM fonts display
= 1 to 9 Enable OEM-Fonts display, the number sets the distance in pixels
between any 2 characters on the screen

Machine parameter MP5030 (baud rate after reset) was canceled. After reset the baud rate is
always 9600.

The input range for MP 1060.x (accelerations) was changed to 0.01 ... 9.0.

The input range for MP 330.x (resolution of encoder) was changed to 1 to 360 [m or 1/1000
degrees] per encoder signal period.
For more information see above description of new features for TNC 306.

New PLC word D400


D400 = angle of rotation (basic rotation)

New marker M2189


If a PLC error message is displayed (one or more error markers 2924 and following is set), then
marker M2189 is set. PLC error messages are erased after the error message is reset or by
pressing the CE key.

1-4

TNC 406/TNC 306

Update Information No. 11

3/97

New soft key under code number 98 148


The new soft key "SETUP COLORS" enables you to adjust the colors red, green, and blue in the
machine parameter for the respective color. You can mix the colors for foreground and
background separately and accept the change with ENT. Pressing END terminates without
changing the color.

Change in reading the analog input for gap control


The digital sampling rate of the analog input is now 1 or 0.5 ms, i.e., each time four analog values
are read and the mean value is used in the following control loop cycle (4/2 ms). This makes it
possible to acquire input frequencies up to max. 250 / 500 Hz.

TOUCH-PROBE functions
If M36 is active when the TOUCH PROBE cycle is executed, M37 is output automatically
(erosion switched off). The selection of the TOUCH PROBE functions was assigned to soft keys.
The datum number can be entered directly in the TOUCH PROBE basic menu. This eliminates
the need to make the datum selection beforehand through Q80.

Output of a step function for machine adjustment


Under the code number 105296 the output of a step function can be activated. The issued step,
activated over the OUTPUT STEP soft key, is adjustable in amplitude (voltage or feed rate) and
pulse duration through the arrow keys. The axis is selected by axis key. The step function makes
it possible to best adjust the servo amplifier and define the values for acceleration and Kv.

Output of dialogs
Under the code number 105 296 it is possible to activate the output of dialogs. The following
control dialogs can be output in the adjusted language with the corresponding dialog number
through the RS-232 port under NAME.CNC (in connection with TNC.EXE):
all NC control dialogs
DIA:
all NC error messages
ERR:
all dialogs of the table editor
TAB:
all PLC dialogs from PLC chip PLC:
all cycle dialogs from PLC chip CYC:
This makes it possible, for example, to proofread the control dialogs and the dialogs on the PLC
chip for correctness of translation and spelling.

Output of analog values


On connector X8, pin 8 you can output the analog values by selecting the code number 79 513
and the function SELECT SOURCE FOR ANALOG OUTPUT.
The following analog values are selectable:
1. Analog value from PLC word 524, value in mV (default setting)
2. Actual velocity of the selected axis (derived from the actual position value)
3. Servo lag of the selected axis
4. Nominal velocity (analog output) of the axis
5. Reference input variable of the axis (derived from the nominal position value)
6. Erosion velocity of the axis
The analog values can also be output during execution.

3/97

TNC406/TNC 306

Update Information No. 11

1-5

Output of a logbook (Menu item LOGBOOK OUTPUT under code number 79 513)
Until now, the contents of the control's internal logbook (keys, error messages, PLC messages,
blinking error register) have been accessible only with TNCDIAG.EXE. Now you can access them
directly via RS-232 by using NAME.LNC (in TNC.EXE). This makes it possible, for example, to log
any data from the PLC during the erosion process (with Module 9079) and output them through
the RS-232 interface during or at the conclusion of erosion. If a blinking error message has
occurred at the control, after a restart you can now determine the sequence of keystrokes prior
to the error.

Upper screen switchover key


With this key you can now switch directly between the normal operating modes and the MOD
functions. By pressing MOD one also accesses this second user interface.
The display and manual editing of Q parameters was also moved to this interface and is
activated with the soft key Q-PAR. During program run all Q parameters can be checked; they
can be changed when the program run is stopped.

Expanded timing function (TIME.W)


In the Program Run mode the pointer can be set to the beginning of the timing table TIME.W by
pressing the PGM NR and ENT or the soft key RESET. If there is no table yet, it will automatically
be generated during program start.
If a new generator setting goes to the PLC during execution of a program, the program
name, block number, tool number, datum table, datum number, power stage, erosion parameter
table, and the current machining time are registered in the table. The time difference from an
earlier generator setting is calculated and saved in the line of the previous power stage (operating time of the previous power stage). If a new program is run, the old entries are overwritten.

Datum tables
Multiple datum tables with the extension ".D" can be created. This serves, for example, to assign
sets of positions of electrodes, i.e. a separate table for each electrode. Depending on MP10 a
structure is generated with 4 or 5 axes. If there are 5 axes, 5 values (Q81...Q85) are used for
Cycle 7 and M38/M39. Cycle 7 has been expanded by one block (CYCL DEF 7.2 NAME), so that
you can give a name to the selected position table. If block 7.2 is not programmed, the control as
before uses table 0.D.

MDI mode
When MDI is selected, an $MDI file is automatically opened in which more than one NC block
can be directly programmed. To run a block, you must select it with the cursor and press NC
START. After execution the cursor jumps to the next NC block.
Special characteristics of MDI mode:
- PGM CALL and LBL CALL are not permitted.
- When TOOL CALL is run, the associated TOOL DEF must be programmed in the $MDI file.
- Incremental positioning movements are always started from the current position of the axes.
- Radius-compensated positioning movements are not possible.

1-6

New gap control via gap signal


New machine parameter MP2081
For more information see above description of new features for TNC 306.

TNC 406/TNC 306

Update Information No. 11

3/97

New M function M93 for repositioning


The M function M93 was introduced to facilitate programming the OEM cycles required for
erosion of vector or star cavities. Erosion blocks (also circles / helixes) that are programmed with
this M function are automatically returned by the control to the starting point after execution (as
in the disk cycle). M93 is permitted only when M36 is active.

Improvement of the eroding-with-time-limit function


Cycle 2 (erosion with time limit) is now effective also for erosion blocks with M93.

The number of retraceable contour elements was doubled from at least 20 to at least 40 (worst
case). The actual number depends on the complexity of the blocks, whereby for example more
simple line segments can be retraced than helical contour elements. For most contours
consisting of circular arcs and line segments, approx. 56 to 60 blocks can be retraced.

CASE branch in the PLC


The maximum number of calls programmable in a CASE branch was increased from 32 to 128.

Improved test functions


In the Test mode, pressing the STOP AT N soft key now calls menu with which you can program
the block number (break point), the program name and a repetition counter. The breakpoint can
therefore also be set in any subprogram with loop counter. The test run up to the breakpoint is
started with the START soft key.

Customized character set


New machine parameter MP7232
Input value: 0 to 9:
0 = disable OEM fonts display
1 9 = enable OEM fonts display, the number sets the distance in pixels between any 2
characters on the screen.
In the PLC chip you can now program your own character sets to be used in the display. You can
activate these so-called OEM fonts with MP7232. This function is limited to the display of
dialogs, operating modes, and NC error messages. PLC error messages and PLC dialogs cannot
be display in OEM fonts. The character set and character sequence for OEM fonts must be
programmed with the PLC compiler (PLCEPROM version V2.44 and later).
Two new code words FONT and OEMTEXT were introduced. They must be programmed
in the EPROM project file (see User's Manual for PLC.EXE).
Example:
Content of OEMTEST.EPJ:
...
FONT
CHINESE.FON
OEMTEXT
CHINESE.TXT
...

3/97

TNC406/TNC 306

; Project file
; Code word in project file
; Code word in project file

Update Information No. 11

1-7

Content of CHINESE.FON:
...
CHR_A:
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX
PIX

......####......
.....##..##.....
....##....##....
....##....##....
....##....##....
....##....##....
....##....##....
....##....##....
....##....##....
....########....
....##....##....
....##....##....
....##....##....
....##....##....
....##....##....

A character matrix must always be 15 lines in height and 16 columns in width. It must be
identified with a symbolic name. A period "." in the matrix definition stands for the background
color and a hatch mark "#" stands for the foreground color. CHINESE.TXT is generated before
programming through a dialog number under the code number 105296.
Example:
Content of CHINESE.TXT:
...
33: CHR_E,CHR_R,CHR_R,CHR_O,CHR_R ;comment optional
...
45: ;comment optional
...
This means that the error message no. 33 is shown with the characters CHR_E, CHR_O and
CHR_R from the customized character set. Error message no 45 is shown as control-internal
message, since no character is defined.

New NC blocks EL CALL (ELECTRODE CALL) and WP CALL (WORKPIECE CALL).


Both NC blocks EL CALL and WP CALL can be activated for editing and execution through MP
7241 (0=disabled, 1=enabled). With EL CALL and WP CALL, an automatic handling system can
be used to load electrodes and workpieces onto the machine and remove them. The changing
process is controlled by the PLC.
EL CALL functions like TOOL DEF with compensation and TOOL CALL
The electrode offset data (D628 ... D640) are always applied in the X/Y plane depending on the
current C position, regardless of a programmed tool axis. A compensation of the C position on
the basis of a C offset must not be included in this matrix rotation.
Example: C offset 10.0
L X 1 Y 0 C +30.0 R F M; positioning of C to 40 Rotation by 30
The tool axis serves also for the determination of the rotational plane for the Cycles 7 and 10 if
the coordinate system is to be rotated.
The effect of WP CALL is to:
- Set the tool axis to Z
- Rotate about the Z axis to 0 (the plane has been rotated)
- Set the datum in X/Y/Z to values from the PLC, followed by a rotation about the Z axis to a
value from the PLC

1-8

TNC 406/TNC 306

Update Information No. 11

3/97

The coordinate system is first shifted in X/Y/Z and then rotated about the Z axis. The rotation
results in an automatic shift in C.
The control takes the data for the two blocks from the PLC. When EL CALL or WP CALL is
executed the programmed name and an identifier are transferred to the PLC. Then the NC sets
the S strobe (M2044). The PLC can then decide which of the two blocks is to be executed in
order to operate an EWIS robot system, for example. After the electrode, workpiece or pallet has
been changed, the data of the electrode or workpiece must be available in the PLC in the word
markers starting with D628. Then the acknowledgment marker M2481 must be set in the PLC
for a PLC scan. The NC takes the EL CALL and WP CALL data from the PLC and resets the
strobe M2044. Now the corresponding calculations are made (compensation/shift/rotation) and
executed. The datum-shift data of the workpiece are always relative to pallet datum, which must
agree with the manual preset.
It is recommended that after an EL CALL/TOOL CALL with a block L X... Y... C... the
electrode be moved to a compensated position for further machining, since the electrode
shifting movements are rotated depending on the C position. This means that for all erosion
processes in which the electrode must move in the proper direction, the compensated C
position must first have been reached.
Marker assignment:
M2044
S strobe (special function EL CALL, WP CALL set/reset NC)
M2481
Reset S strobe (set/reset PLC)
B600 ... B623
B600
B601 ... B603
B604 ... B619
B620
B621 ... B623

Data NC --> PLC


Identifier: 1 = EL CALL, 2 = WP CALL
Free
16-byte ASCII string EL name or WP Name
Number of tilts for identifier 2
Free

B624 ... B655


B624 ... B627
B628 ... B651

Data PLC --> NC


Free
Data for identifier 1 (EL CALL) or identifier 2 (WP CALL)
Identifier 1:
Identifier 2:
Compensation X
Shift X
Compensation Y
Shift Y
Compensation Z
Shift Z
Compensation C
Rotation C
Undersize
Radius
Free

D628
D632
D636
D640
D644
D648
B652 ... B655

FN14
With numbers 300...499, PLC dialogs 0 to 199 are accessed during FN 14 (PLC error messages).
FN14: ERROR = 0..299
Display: "FN14: ERROR CODE 0...299"
FN14: ERROR = 300..499
Display: Text from PLC chip

FN15
With numbers 0...199, PLC dialogs 0...199 are accessed during FN 15 (PLC error messages).
FN15: PRINT 0..199
Output to RS-232: Text from PLC chip
FN15: PRINT 200
Output to RS-232: special character ETX
FN15: PRINT Q1..Q255 Output to RS-232: content of the Q parameter

3/97

TNC406/TNC 306

Update Information No. 11

1-9

FN19
With FN 19 you can sent commands (also with data) to the PLC and receive resulting values. FN
19 is to be considered an expansion of the M functions.
Example:
FN19: PLC= +11 / +Q13 / Q77
11
= 1st parameter after D280
Q13 = 2nd parameter after D284
Q77 = 3rd parameter answer to PLC
During execution of FN19 the first parameter is transferred to D280, and the second parameter
(if programmed) to D284.
The strobe M2149 is set and the control waits for the acknowledgment M2611. After
an acknowledgment is recognized, the strobe M2149 is reset and the value from D512 (if the 3rd
parameter was programmed) is transferred to this Q parameter (result parameter), and the
program run is continued. The result can be evaluated in the subsequent NC stage.

Strobes and data in the PLC:


M2149
Strobe for FN19
M2611
Acknowledgment FN19

Set/reset NC
Set/reset PLC

D280
D284
D512

Must be programmed
Optional
Optional

1st value for FN19


2nd value for FN19
Return value from PLC

Note: Change in the binary block format in an RND block


If an RND block has been used in an OEM cycle, the PLC chip must be remade!

1-10

TNC 406/TNC 306

Update Information No. 11

3/97

Filing instructions
This Update Information issue includes a set of replacement sheets for your Technical Manual
TNC 406/TNC 306 (April 1996 edition). Please incorporate them into your Manual, following the filing
instructions below.

Change

Remove

Insert

Title page April 1996


Update Information No. 11

Title page

New title page


1-1 to 1-11

Contents
Software releases TNC 406/TNC 306;
EPROM sockets LE 406

2-1/22
2-7/2-8

2-1/22
2-7/2-8/2-9

Contents
TS 120 removed
PLC Input I152
RS232C adapter

3-1...3-4
339/340
355/356
379/380

3-1...3-4
339/340
355/356
379/380

Contents
Input range MP330
Temperature compensation removed
Incorrect illustration
M2568 /D752
Description expanded
Color adjustment via soft key
Marker M2503
Adjustment for MP1820/MP1830 removed

4-1...4-4
45/46
421...424
429/430
453/454
457/470
491/492
4113/4114
4145/4146

4-1...4-4
45/46
421...424
429/430
453/454
457/470
491/492
4113/4114
4145/4146

Contents
List of machine parameters

5-1/5-2
55...523

5-1/5-2
55...525

List of markers and words

61...612

61...612

Contents
String processing, module

7-3/7-4
7101...7118

7-3/7-4
7101...7119

Subject index

111...11...9

111...119

3/97

TNC406/TNC 306

Update Information No. 11

1-11

Potrebbero piacerti anche