Sei sulla pagina 1di 510

March 2000 208 829-21 2.

1 3/2000 S Printed in Germany Subject to change without notice


(208 829-E8)
Technical Manual
TNC 416
TNC 406
TNC 306
For the NC software types
286 18x up to version 04 (TNC 416)
280 62x up to version 10 (TNC 406)
260 03x up to version 16 (TNC 306)
260 05x up to version 16 (TNC 306)

3/97 TNC 406/TNC 306
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
1
2
3
4
5
6
7
8
9
10
11
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

3/2000 TNC 416/TNC 406/TNC 306 Hardware concept 2-1
Introduction Contents
1 Hardware concept 2-2
2 Technical data TNC 416/406/TNC 306 2-3
3 Software 2-8
3.1 NC Software 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

2-2 TNC 416/TNC 406/TNC 306 Hardware concept 3/2000
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
Short circuit/
touch probe
Electronic handwheel
Data interfaces
NC PLC
Common
data area
Machine operating panel
PLC outputs
PLC inputs
Analogue input
for gap control
G
G
G
G
G
G
G G G G G G
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.

3/2000 TNC 416/TNC 406/TNC 306 Technical data TNC 416/TNC 406/TNC 306 2-3
2 Technical data TNC 416/TNC 406/TNC 306
TNC 416/TNC 406 TNC 306
Components
LE 406:

LE 406 logic unit

TE 400 keyboard unit

BC 110 14 color CRT


640 x 400 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

LE 360C logic unit

TE 355 keyboard unit

BF 110 mono chrome flat


screen (192 x 120mm)
or

BE 212 12 monochrome
CRT

512 x 256 pixels


Control type

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

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
Program memory
10 000 program blocks 5000 program blocks
for up to 100 files 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

2-4 TNC 416/TNC 406/TNC 306 Technical data TNC 416/TNC 406/TNC 306 3/2000
TNC 416/TNC 406 TNC 306
Operating modes

Manual

Electronic handwheel

Jog positioning

Positioning with MDI

Program run, single block

Program run, full sequence

Programming and editing

Test run (logical and graphical)


Program input

In HEIDENHAIN plain language format

Manually on keyboard

Externally over data interface


Input resolution
1 m
display resolution
0,1 m 1 m
Programmable functions

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)



3/2000 TNC 416/TNC 406/TNC 306 Technical data TNC 416/TNC 406/TNC 306 2-5
TNC 416/TNC 406 TNC 306
Parameter programming

Mathematical functions (=, +, ,

, sin, cos,
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
30000 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
Closed-loop cycle time
PLC cycle time
15 ms
2 / 4 ms (selected with MP)
20 / 40 ms (selected with MP)
60 ms (with 2000 logical PLC
commands)
4 ms
40 ms

2-6 TNC 416/TNC 406/TNC 306 Technical data TNC 416/TNC 406/TNC 306 3/2000
TNC 416/TNC 406 TNC 306
Encoders
HEIDENHAIN incremental linear encoders, optionally with distance-
coded 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)
LE 416:
5 sinusoidal encoder inputs
1 analog input for eroding gap
signal

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)
5 encoder inputs (4 sinusoidal,
1 square-wave input)
1 analog input for eroding gap
signal
1 input for electronic handwheel
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)
Control outputs
5 analog outputs for axes 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

3/2000 TNC 416/TNC 406/TNC 306 Technical data TNC 416/TNC 406/TNC 306 2-7
TNC 416/TNC 406 TNC 306
Power consumption
NC: 6W
PLC: 6W
BC110: 70W
BC120: 80W
BF 120: 15W
PL 410 B: 25W (approx.)
NC: 27W (approx.) with
BE 212
BF 110: 33W
PLC: 24W (approx.)
Ambient temperature
Operation: 0 to 45 C (BF 110: 0 to 40 C)
Storage: 30 to 70 C
Weight
LE 416 6 kg
LE 406 8.5 kg
TE 400 2.4 kg
BC 110 11 kg
BC 120 14 kg
BF 120 3 kg
PL 410 B 1.5 kg
LE 360C 8 kg
TE 355 1.6 kg
BF 110 1.7 kg
BE 212 11 kg
PL 410 B 1.5 kg

2-8 TNC 416/TNC 406/TNC 306 Software 3/2000
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.

3/2000 TNC 416/TNC 406/TNC 306 Software 2-9
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 264 085 96 260 03x
TNC 306 C for BE 212 270 641 25 260 03x
TNC 306 C for BF 110 270 642 25 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

2-10 TNC 416/TNC 406/TNC 306 Software 3/2000
Software version Release date Software version Release date
TNC 306 TNC 306
260 03x-03 2/92 260 05x-03 2/92
260 03x-04 3/93 260 05x-04 3/93
260 03x-05 8/93 260 05x-05 8/93
260 03x-06 11/93 260 05x-06 11/93
260 03x-07 3/94 260 05x-07 3/94
260 03x-08 6/94 260 05x-08 6/94
260 03x-09 6/94 260 05x-09 6/94
260 03x-10 11/94 260 05x-10 11/94
260 03x-11 2/95 260 05x-11 2/95
260 03x-12 6/95 260 05x-12 6/95
260 03x-13 11/95 260 05x-13 11/95
260 03x-14 2/96 260 05x-14 2/96
260 03x-15 11/96 260 05x-15 11/96
260 03x-16 1/97 260 05x-16 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.

3/2000 TNC 416/TNC 406/TNC 306 Software 2-11
3.3 EPROM sockets
EPROM sockets LE 416
EPROM sockets LE 406
EPROM sockets LE 306

2-12 TNC 416/TNC 406/TNC 306 Software 3/2000
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.

3/99 TNC 416/TNC 406/TNC 306 Hardware components 31
Mounting and electrical installation Contents
1 Hardware components 34
1.1 Components of the TNC 416 34
1.2 Components of the TNC 406 34
1.3 Components of the TNC 306 34
1.4 Options 34
2 Installation 36
2.1 Electrical noise immunity 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 39
2.5.2 Visual display unit 312
2.5.3 PLC Input/Output board PL 410 B 312
2.6 Degree of protection 312
3 Overview of connections 313
4 Power supply 317
4.1 Overview 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 329
5.1 Linear measuring systems 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 333
6.1 Connector assignment 334
7 Visual display unit (VDU) 337
7.1 Connector assignment 337

32 TNC 416/TNC 406/TNC 306 Hardware components 3/99
8 Short-circuit signal/Touch probe input 340
8.1 Connection of the short-circuit signals 341
8.2 Connection of the touch probe system 341
9 Data interface 343
9.1 RS-232-C/V.24 data interface 343
9.2 RS 422/V.11 data interface 344
10 Handwheel input 345
10.1 Portable handwheel HR 410 345
10.2 Panel-mounted handwheel HR 130 348
11 PLC inputs/outputs 350
11.1 Technical data 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 PLC inputs/PLC outputs on the PL 410 B 355
12 Machine control panel 358
13 TNC keyboard 360
14 Cable overview 362
14.1 Cable overview TNC 416 362
14.2 Cable overview TNC 406 363
14.3 Cable overview TNC 306 364

3/99 TNC 416/TNC 406/TNC 306 Hardware components 33
15 Mounting dimensions 366
15.1 LE 416 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 LE 360 C 373
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 Cable adapter 384

34 TNC 416/TNC 406/TNC 306 Hardware components 3/99
1 Hardware components
1.1 Components of the TNC 416
LE 416 Logic Unit for BC 120 Id.-Nr. 336 486-3x
for BF 120 Id.-Nr. 336 487-3x
TE 420 Keyboard Unit Id.-Nr. 313 038-01
BC 120 Visual Display Unit Id.-Nr. 313 037-01
(15-inch color monitor)
BF 120 Visual Display Unit Id.-Nr. 313 506-01
(10.4-inch color flat panel display)
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 Id.-Nr. 260 520-01
(14-inch color monitor)
1.3 Components of the TNC 306
LE 306 Logic Unit for BE 212 Id.-Nr. 270 641-2x
for BF 110 Id.-Nr. 270 642-2x
TE 355A Keyboard Unit Id.-Nr. 255 015-06
TE 355 B Keyboard Unit 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 Id.-Nr. 242 370-01
(12-inch monochrome monitor)
1.4 Options
PL 410 B PLC I/O board Id. Nr. 263 371-12
Handwheel HR 410 Id. Nr. 296 469-01
Touch Probe System TS 220 Id. Nr. 293 488-xx

3/99 TNC 416/TNC 406/TNC 306 Hardware components 35


36 TNC 416/TNC 406/TNC 306 Installation 3/99
2 Installation
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.

3/99 TNC 416/TNC 406/TNC 306 Installation 37
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.
Obstructive
elements
Heat generating
elements
Incorrect
LE
LE
Correct

38 TNC 416/TNC 406/TNC 306 Installation 3/99
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/s
2
; 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

3/99 TNC 416/TNC 406/TNC 306 Installation 39
2.5.1 Logic unit
HEIDENHAIN recommends the following mounting position of LE 416
Air outlet
Air inlet
7.87"
>3.54"
>
4
.
7
2
"
5
.
9
1
"
>
3
.
5
4
"

310 TNC 416/TNC 406/TNC 306 Installation 3/99
HEIDENHAIN recommends the following mounting position of LE 406
*
*
Air inlet
C
C
C C
1
4
5
C
Measuring point for
ambient temperature
Free space for air circulation
Free space for servicing
Illustration of
max. swivel range.
The minimum angle of
swivel for exchange
of subassembly should
be at least 90.
>577
80
40
3
0
1
0
0
1
6
0
3
0
1
0
0
C
Air outlet
*
*
*
*
*
*
C
PL
R

3
2
5
4
0
4
0
2
7
0
4
0

40
60
30
83
>110
80
40
Minimum clearance
for servicing!
recommended: =
approx. 250 mm
Maintain clearance
for screwdriver
Connecting cables
must not hinder
swivel movement
of the control
C
246
160

3/99 TNC 416/TNC 406/TNC 306 Installation 311
HEIDENHAIN recommends the following mounting position of LE 306
*
*
Air
inlet
C C
C C
1
4
5
C
Measuring point for
ambient temperature
Free space for air circulation
Free space for servicing
Illustration of
max. swivel range.
The minimum angle of
swivel for exchange
of subassembly should
be at least 90.
>577
80
40
3
0
1
0
0
1
6
0
3
0
1
0
0
C
Air
outlet
*
*
*
*
*
*
C
PL
R

3
2
5
4
0
4
0
2
7
0
4
0

40
60
30
83
>110
80
40
Minimum clearance
for servicing!
recommended:=
approx. 250 mm
Maintain clearance
for screwdriver
Connecting cables
must not hinder
swivel movement
of the control
C
218.5
132.5

312 TNC 416/TNC 406/TNC 306 Installation 3/99
2.5.2 Visual display unit
Permissible ambient temperature:
BC 120/BC 110/BE 212/BF 120: max. 45 C
BF 110: 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 Protection class IP54
Keyboard unit when mounted Protection class IP54
HR 410 handwheel Protection class IP54
IP54 = Protection against dust and splashwater

3/99 TNC 416/TNC 406/TNC 306 Overview of connections 313
3 Overview of connections
LE 416
X1 Measuring system 1 (1Vss/11A)
X2 Measuring system 2 (1Vss/11A)
X3 Measuring system 3 (1Vss/11A)
X4 Measuring system 4 (1Vss/11A)
X6 Measuring system 5 (1Vss/11A)
X8 Nominal value outputs 1,2,3,4,5,
gap signal input
X12 Triggering touch probe for workpiece
measurement
X13 Triggering touch probe for tool
measurement
X21 RS-232-C/V24 data interface
X22 RS-422/V11 data interface
X23 Handwheel interface
X41 PLC output
X42 PLC input
X43 BC 120 VDU (alternative to BF 120)
X44 PLC power supply
X45 TNC keyboard
X46 Machine operating panel
X47 PLC expansion
X48 PLC analog input
X49 BF 120 flat panel (alternative to BC
120)
X31 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.

314 TNC 416/TNC 406/TNC 306 Overview of connections 3/99
LE 406
X1
X2
X3
X4
X5
X6
X12
X8
X21
X22
X23
B
X43
X47
X42 X46
X41 X45
X44
24V
X31
X1 Measuring system 1 (11A)
X2 Measuring system 2 (11A)
X3 Measuring system 3 (11A)
X4 Measuring system 4 (11A)
X5 Measuring system 5 ( )
X6 Measuring system 6 ( )
X8 Nominal value outputs 1,2,3,4,5
gap signal input
X12 Touch probe system;
Short-circuit signal input
X21 Data interface RS-232-C/V.24
X22 Data interface RS-422/V.11
X23 Electronic handwheel HR 130/HR 410
X41 PLC output
X42 PLC input
X43 VDU BC 110
X45 TNC keyboard TE 400
X46 Machine operating panel
X47 PLC I/O board PL 410 B
X31 Power supply 24 V for NC
X44 Power supply 24 V for PLC
B Signal ground
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.

3/99 TNC 416/TNC 406/TNC 306 Overview of connections 315
LE 306

X1
X2
X3
X4
X6
X11
X12
X8
B
X24
24V
X31
X9
X21
X22
X23 X27
X26
X25
X1 Measuring system 1 (11A)
X2 Measuring system 2 (11A)
X3 Measuring system 3 (11A)
X4 Measuring system 4 (11A)
X6 Measuring system ( )
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
Short-circuit signal input
X21 PLC output
X22 PLC input
X23 TNC keyboard TE355
X25 Data interface RS-232-C/V.24
X26 PLC I/O board PL 410 B
X27 Machine operating panel
X31 Power supply 24 V for NC
X24 Power supply 24 V for PLC
B 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.

316 TNC 416/TNC 406/TNC 306 Overview of connections 3/99


3/99 TNC 416/TNC 406/TNC 306 Power supply 317
4 Power supply
4.1 Overview
The supply voltages must meet the following specifications:
Unit Supply
voltage
Voltage range Max. current
consumption
Power
consumption
LE 416 400 Vac 330 Vac 450 Vac 35 W
LE 406
LE 306
NC 24 V DC
(VDE 0551)
lower limit
20.4 V
- - -

LE 406 1.3 A
LE 306 1.5 A
24 W
28.8 to 36 W
(the BE 212 is
also supplied)
upper limit
PLC 24 V DC
Base
insulation acc.
to VDE 0160)
31 V
- - -


1) 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 Approx. 1 A
with full display
24 W typical
32 W max.
BF 120 Approx. 1 A
with full display
24 W typical
BC 110 110 V / 230 V 85 - 132 V/170 -264 V 70 W
BC 120 110 V / 230 V 85 264 V 80 W
BE 212 Powered through the LE 306
1) Voltage surges up to 36 V - - - for t < 100 ms are permissible.

318 TNC 416/TNC 406/TNC 306 Power supply 3/99
4.1.1 NC power supply
LE 416
Terminal
X31
Assignment
Protective ground (YL/GN)
U
1
Phase 1 330 Vac to 450 Vac;
U
2
Phase 2
50 to 60 Hz
U
Z
Do not use
+U
Z
Do not use
LE 406/LE 306
Pin number
X 31
Assignment
1 + 24 V DC
2 0 V
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).
24 V
U
t
1.5 V
pp

3/99 TNC 416/TNC 406/TNC 306 Power supply 319
4.1.2 PLC power supply
Power supply for the PLC on board
LE 416/LE 406 X44
LE 306 X24
Pin number Assignment
1 + 24 V DC, switched off by EMERGENCY STOP
2 + 24 V DC, not switched off by EMERGENCY STOP
3 0 V
Power supply for the PL 410 B
The PLC outputs are powered in groups.
Terminal Assignment PLC output
X9 0V
X10 +24 V power for logic and for "Control is operational"
X11 +24 V power for outputs O32 to O39
X12 +24 V power for outputs O40 to O47
X13 +24 V power for outputs O48 to O55
X14 +24 V power for outputs 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:
32.6 V
31 V
20.4 V
18.5 V
U
t
The 0 V line of the PLC power supply must be grounded with a ground lead ( 6 mm
2
) to the main
signal ground of the machine.

320 TNC 416/TNC 406/TNC 306 Power supply 3/99


3/99 TNC 416/TNC 406/TNC 306 Power supply 321
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.

322 TNC 416/TNC 406/TNC 306 Power supply 3/99
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 Assignment
L1 Live (BK)
N Neutral (BL)
Protective earth (GN/YL)
X4 = DC connections (only for BC 110, Id.-Nr. 254 740 01)
Pin Number Assignment
1 Do not use
2 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.

3/99 TNC 416/TNC 406/TNC 306 Power supply 323
BF 120/BF 110
X1 power supply
Pin number Assignment
1 + 24 V
2 0 V
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 Grounding plans 324
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 325
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 326
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 Power supply 327


328 TNC 416/TNC 406/TNC 306 Power supply 3/99


3/99 TNC 416/TNC 406/TNC 306 Measuring systems 329
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 18000.

330 TNC 416/TNC 406/TNC 306 Measuring systems 3/99
5.3 Measuring system inputs for sinusoidal signals
The LE 406/LE306 can have measuring systems with sinusoidal inputs 11 A
PP
.
The LE 416 can have measuring systems with sinusoidal inputs 11 A
PP
or 1V
PP
switched over via
MP115.0.
MP115.0 Axis-specific encoder setting 11A or 1V
PP
(LE 416)
Input: %xxxxx
0 = 1V
PP
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 1V
PP;
50 kHz for 11A
1 = 350 kHz for 1V
PP;
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
1 I
1
+
2 I
1

5 I
2
+
6 I
2

7 I
0
+
8 I
0

3 + 5 V (U
P
)
4 0 V (U
N
)
9 Inner shield
Housing Outer shield = unit housing

3/99 TNC 416/TNC 406/TNC 306 Measuring systems 331
LE 416
X1, X2, X3, X4 and X6 Encoder (1 V
PP
/11A)
Logic unit Encoder cable
D-sub
terminal
(male) 15-pin
Assignment
1 V
PP
Assignment
11A
D-sub
connector
(female) 15-
pin
1 V
PP
11A
1 + 5 V (U
P
) + 5 V 1 Brown/Green Brown
2 0 V (U
N
) 0 V 2 White/Green White
3 A+ I
1
+ 3 Brown Green
4 A I
1
4 Green Yellow
5 0 V 0 V 5 White/Brown
(internal shield)
6 B+ I
2
+ 6 Gray Blue
7 B I
2
7 Pink Red
8 0 V 0 V 8
9 + 5 V + 5 V 9 Blue
10 R+ I
0
+ 10 Red Gray
11 0 V 0 V 11 White
12 R I
0
12 Black Pink
13 0 V 0 V 13
14 Do not use Do not use 14 Violet
15 Do not use Do not use 15
Housing External
shield
External shield Housing External shield External shield

332 TNC 416/TNC 406/TNC 306 Measuring systems 3/99
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
5 Ua1
6
U
a1

8 Ua2
1
U
a2

3 Ua0
4
U
a0

7
U
aS

2 + 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.

3/99 TNC 416/TNC 406/TNC 306 Nominal value output / Gap signal input 333
6 Nominal value 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.
Pin 2 220
Pin 10
R
a
0 V
100 nF
LE
X8
Time constant:
T = 22 s (220 100 F)
5T= 110 s
Since the output impedance R
a
of the driver stage affects the entire time constant, a low output
impedance is necessary (for example 33 ).

334 TNC 416/TNC 406/TNC 306 Nominal value output / Gap signal input 3/99
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
1 Nominal value output 1 1 BN
2 Analog input, gap signal 2 BN/GN
3 Nominal value output 2 3 YL
4 Nominal value output 5 4 RD/BL
5 Nominal value output 3 5 PK
6 0V Nominal value output 5 6 GY/PK
7 Nominal value output 4 7 RD
8 Nominal value output 6 8 VI
9 0V Nominal value output 1 9 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").

3/99 TNC 416/TNC 406/TNC 306 Nominal value output / Gap signal input 335
Suggested solution for connecting and wiring the shielding in the connection box:
Insulated against housing
Leads are provided
with end sleeves.
Cable screens are led onto 0.14 mm
2
insulated strands via crimp eyelets.
SERVO
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
LE

X Y Z S I V
GAP
Pin number Assignment
1 Analog output X-axis
2 Analog output 0V X-axis
3 Analog output Y-axis
4 Analog output 0V Y-axis
5 Analog output Z-axis
6 Analog output 0V Z-axis
7 Analog output IVth axis
8 Analog output 0V IVth axis
11 Analog input Gap signal
12 Analog input 0V Gap signal
13 Screen connection
14 Screen connection
15 Screen connection
16 Screen connection

336 TNC 416/TNC 406/TNC 306 Nominal value output / Gap signal input 3/99

6 Nominal value output / Gap signal input



3/99 TNC 416/TNC 406/TNC 306 Visual display unit (VDU) 337
7 Visual display 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 BE 212 BF 110 BC 110 BC 120
1 0 V power supply GND
R
2 +12 V power supply Not used G
3 Not used Not used Not used
B
4 +12 V power supply Not used Do not use
5 Not used Not used Not used Do not use
6 Not used Not used Not used GND
7 Video R GND
8 0 V power supply GND GND
9 V SYNC V SYNC V SYNC Do not use
10 H SYNC1 H SYNC1 GND
11 0 V Signal GND GND
12 0 V Signal Not used Do not use
13 Video Not used HSYNC
14 H SYNC 2 G VSYNC
15 CLOCK B Do not use
Housing Outer shield = Unit housing

338 TNC 416/TNC 406/TNC 306 Visual display unit (VDU) 3/99
X49 Visual Display Unit BF 120 (option for LE 416)
Logic unit Connecting cable Id. Nr.312 875../Extension cable
Id. Nr.312 876.. or Connecting cable Id.-Nr.312 874..
BF 120
D-sub terminal
(female) 62-pin
3-row
Assignment D-sub connector
(male) 62-pin
3-row
Assignment D-sub connector
(female) 62-pin
3-row
D-sub connector
(male) 62-pin 3-row
1 0 volt 1 1 1
2 CLK.P 2 2 2
3 HSYNC 3 3 3
4 BLANK 4 4 4
5 VSYNC 5 5 5
6 0 volt 6 6 6
7 R0 7 7 7
8 R1 8 8 8
9 R2 9 9 9
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

3/99 TNC 416/TNC 406/TNC 306 Visual display unit (VDU) 339
D-sub terminal
(female) 62-pin
3-row
Assignment D-sub connector
(male) 62-pin
3-row
Assignment D-sub connector
(female) 62-pin
3-row
D-sub connector
(male) 62-pin 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,
58, 59, 60, 61, 62
Do not use 53, 54, 55, 56, 57,
58, 59, 60, 61, 62
53, 54, 55, 56, 57,
58, 59, 60, 61, 62
53, 54, 55, 56, 57,
58, 59, 60, 61, 62
Housing External shield Housing External shield Housing Housing

340 TNC 416/TNC 406/TNC 306 Short-circuit signal/Touch probe input 3/99
8 Short-circuit 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
1 Inner shield (0 V)
3 Ready/standby
4 Start
5 +15 V 10 % (UP)
6 + 5 V 5 % (UP)
Battery warning
8 0 V (UN)
9 Trigger signal
10
Trigger signal
2, 11 to 15 not used

3/99 TNC 416/TNC 406/TNC 306 Short-circuit signal/Touch probe input 341
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Standby
+15V 10% (UP)
+ 5V 5% (UP)
Battery warning
0V (UN)
Trigger signal
Trigger signal
1)
2.2 k 2.2 k
Short-circuit-signal
1)
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".
Adapter cable Id. Nr.274 543 TS220 Id. Nr. 293 488 ..
(TS120 Id. Nr. 265 348 ..)
D-sub
connector
(male) 15-pin
Coupling on
mounting base
6-pin
Quick
disconnect
6-pin
3 Pink 4 4 Gray
5 Gray
6 Brown/Green 2 2 Brown
7 Gray 3 3 Gray
8 White/Green 1 1 White
9 Green 5 5 Green
10 Yellow 6 6 Yellow
Housing External shield Housing Housing External shield

342 TNC 416/TNC 406/TNC 306 Short-circuit signal/Touch probe input 3/99


3/99 TNC 416/TNC 406/TNC 306 Data interface 343
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 X25
Connecting cable
Id. Nr. 239 760 ..
Adapter block
Id. Nr. 239 758 01
Connecting cable
Id. Nr. 274 545 01
D-sub
terminal
(female)
25-pin
Assignment D-sub
connector
(male)
25-pin
D-sub
connector
(female) 25-
pin
D-sub
terminal
(male)
25-pin
D-sub
terminal
(female)
25-pin
D-sub
connector
(male)
25-pin
D-sub
connector
(female)
25-pin
1 GND 1 WH/BN
External
shield
1 1 1 1 WH/BN
External
shield
1
2 RXD 2 Green 3 3 3 3 Yellow 2
3 TXD 3 Yellow 2 2 2 2 Green 3
4 CTS 4 Gray 5 5 5 5 Pink 4
5 RTS 5 Pink 4 4 4 4 Gray 5
6 DTR 6 Blue 20 20 20 20 Brown 6
7 Signal GND 7 Red 7 7 7 7 Red 7
20 DSR 20 Brown 6 6 6 6 Blue 20
8 to 19,
21 to 25
Do not use 8 8 8 8 8
Housing External
shield
Housing External
shield
Housing Housing Housing Housing 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.

344 TNC 416/TNC 406/TNC 306 Data interface 3/99
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 Connecting Cable
Id. Nr. 289 208 ..
Adapter Block
Id. Nr. 311 086 01
D-sub
terminal
(female)
15-pin
Assignment D-sub
connector
(male)
15-pin
D-sub
connector
(female)
15-pin
D-sub
terminal
(male)
15-pin
D-sub
terminal
(female)
15-pin
1 Chassis GND 1 Black
External
shield
1 1 1
2 RXD 2 Blue 2 2 2
3 CTS 3 Gray 3 3 3
4 TXD 4 White 4 4 4
5 RTS 5 Green 5 5 5
6 DSR 6 White/Green 6 6 6
7 DTR 7 Green/Pink 7 7 7
8 Signal GND 8 Black 8 8 8
9
RXD
9 Red 9 9 9
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
shield
Housing Housing Housing Housing
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

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 345
10 Handwheel 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
1 CTS
2 0 V (U
N
)
3 RTS
4 + 12 V (U
P
)
5
6 DTR
7 TxD
8 RxD
9 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

346 TNC 416/TNC 406/TNC 306 Handwheel input 3/99
Dummy plug for EMERGENCY STOP circuit (option) Id. Nr. 271 958 03
Connecting cable (spiral cable) Id. Nr. 312 879 01
Connecting cable (normal cable) Id. Nr. 296 467 ..
Connecting cable (with metal armor) Id. Nr. 296 687 ..


Extension cable
Id. Nr. 281 429..
Adapter cable
Id. Nr. 296 466..
Connecting cable
Id. Nr. 296 467 05
HR 410
Id. Nr. 296 469 01
D-sub
connec-
tor
(male)
9-pin
D-sub
connec-
tor
(female)
9-pin
D-sub
connec-
tor
(male)
9-pin
Coupling
on mount-
ing base
(female)
18-pin
Connec-
tor
(male)
18-pin
Connec-
tor
(female)
18-pin
Connec-
tor
(male)
18-pin

Housing Shield Housing Housing Shield Housing Housing Shield Housing Housing Shield
2 White 2 2 White E E White E E
4 Brown 4 4 Brown D D Brown D D
6 Yellow 6 6 Yellow B B Yellow B B
7 Gray 7 7 Gray A A Gray A A
8 Green 8 8 Green C C Green C C
6 6 WH/BK 6 6
7 7 YL/BK 7 7
5 5 WH/RD 5 5
4 4 WH/BL 4 4
2 2 WH/GN 2 2
3 3 WH/YL 3 3
1 1 WH/BN 1 1
WH/BN 3 Contact 1 + 2
WH/YL 2 Contact 2 (left) Permissive button
WH/GN 1 Contact 1 (right)
WH/BL 1 Contact 1
WH/RD 2 Contact 1 EMERGENCY STOP
YL/BK 3 Contact 2
WH/BK 4 Contact 2

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).

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 347
Internal wiring of contacts to permissive buttons and EMERGENCY STOP button of the HR 410:



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
Right Left

348 TNC 416/TNC 406/TNC 306 Handwheel input 3/99
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 .. HR 130 Id. Nr. 254 040 ..
D-sub connector
(male) 9-pin
D-sub connector
(female) 9-pin
D-sub connector
(male) 9-pin
Housing Shield Housing Housing Shield
2 White 2 2 White
4 Brown 4 4 Brown
6 Yellow 6 6 Yellow
8 Green 8 8 Green
7 Gray 7

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 349


350 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99
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: U
e
13 V to 30.2 V
0-signal: U
e
20 V to 3.2 V
Current range:
1-signal: I
e
3.8 mA to 8.9 mA
0-signal: I
e
1.0 mA at U
e
= 3.2 V
PLC outputs
Open-collector outputs with current limiting
Logic unit PL 410B
Min. output potential
for 1-signal 3 V below supply voltage
Nominal operating
current per output 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.

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 351
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
1 I0 1 Gray/Red
2 I1 2 Brown/Black
3 I2 3 White/Black
4 I3 acknowledge "control-is-ready"; main processor 4 Green/Black
5 I4 5 Brown/Red
6 I5 6 White/Red
7 I6 7 White/Green
8 I7 8 Red/Blue
9 I8 9 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

352 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99
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
1 O0 1 Gray/Red
2 O1 2 Brown/Black
3 O2 3 White/Black
4 O3 4 Green/Black
5 O4 5 Brown/Red
6 O5 6 White/Red
7 O6 7 White/Green
8 O7 8 Red/Blue
9 O8 9 Yellow/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

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 353


354 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99
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
LE 306 connector X26
Connecting cable Id. Nr. 289 111 .. 1st PL 410 B
X47 D-sub
terminal
(male)
25-pin
Assignment D-sub
connector
(female)
25-pin
D-sub
connector
(male)
25-pin
X1 D-sub
terminal
(female)
25-pin
Assignment
1 0 V 1 Brown, Yellow, Pink, Red,
Violet
1 1 0 V
2 0 V 2 Red/Blue, Brown/Green,
Yellow/Brown, Gray/Brown,
Pink/Brown
2 2 0 V
3 0 V 3 Brown/Blue, Brown/Red,
Brown /Black, Yellow/Gray,
Yellow/Pink
3 3 0 V
4 Do not use 4 Gray/Green 4 4 Serial IN 2
5
Address 6
5 White/Green 5 5
Address 6
6 INTERRUPT 6 Pink/Green 6 6 INTERRUPT
7 RESET 7 Green/Blue 7 7 RESET
8 WRITE EXTERNAL 8 White/Blue 8 8 WRITE
EXTERNAL
9 WRITE EXTERNAL 9 White/Red 9 9 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 Yellow/Blue, Pink/Blue,
Yellow/Black
14 14 + 12 V
15 PCB identifier 3 15 Yellow/Red, Gray/Red,
Pink/Red
15 15 + 12 V
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

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 355
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 Assignment Pin number Assignment
1 I64 1 I80
2 I65 2 I81
3 I66 3 I82
4 I67 4 I83
5 I68 5 I84
6 I69 6 I85
7 I70 7 I86
8 I71 8 I87
9 I72 9 I88
10 I73 10 I89
11 I74 11 I90
12 I75 12 I91
13 I76 13 I92
14 I77 14 I93
15 I78 15 I94
16 I79 16 I95
X5 X6
Pin number Assignment Pin number Assignment
1 I96 1 I112
2 I97 2 I113
3 I98 3 I114
4 I99 4 I115
5 I100 5 I116
6 I101 6 I117
7 I102 7 I118
8 I103 8 I119
9 I104 9 I120
10 I105 10 I121
11 I106 11 I122
12 I107 12 I123
13 I108 13 I124
14 I109 14 I125
15 I110 15 I126
16 I111 16 I127

356 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99
PLC outputs
Assignment of the grouped power supply:
Terminal Assignment
X9 0 V
X10 +24V PL supply and "Control is operational"
X11 +24 V Supply O32 - O39
X12 +24 V Supply O40 - O47
X13 +24 V Supply O48 - O55
X14 +24 V Supply O56 - O62
X7 X8
Pin number Assignment Pin number Assignment
1 O32 1 O48
2 O33 2 O49
3 O34 3 O50
4 O35 4 O51
5 O36 5 O52
6 O37 6 O53
7 O38 7 O54
8 O39 8 O55
9 O40 9 O56
10 O41 10 O57
11 O42 11 O58
12 O43 12 O59
13 O44 13 O60
14 O45 14 O61
15 O46 15 O62
16 O47 16 "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.

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 357


358 TNC 416/TNC 406/TNC 306 Machine control panel 3/99
12 Machine control 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.
LE416/LE 406 connector X46
LE 306 connector X27
Connecting cable Id. Nr. 263 954 ..
D-sub terminal
(female) 37-pin
Assignment D-sub connector
(male) 37-pin
1 I128 1 Gray/Red
2 I129 2 Brown/Black
3 I130 3 White/Black
4 I131 4 Green/Black
5 I132 5 Brown/Red
6 I133 6 White/Red
7 I134 7 White/Green
8 I135 8 Red/Blue
9 I136 9 Yellow/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

3/99 TNC 416/TNC 406/TNC 306 Machine control panel 359


360 TNC 416/TNC 406/TNC 306 TNC keyboard 3/99
13 TNC keyboard
The TNC keyboard TE 420/TE 400 and TE 355 A/B are connected to the logic unit by a connecting
cable.
LE 416/LE 406 connector X45
LE 306 connector X23
Connecting cable Id. Nr. 263 954 .. TE 420/TE 400
TE 355
D-sub terminal
(female) 37-pin
Assignment
X45
Assignment
X23
D-sub
connector
(male) 37-pin
D-sub connector
(female) 37-pin
X2 D-sub terminal
(male) 37-pin
1 RL0
RL0
1 Gray/Red 1 1
2 RL1
RL1
2 Brown/Black 2 2
3 RL2
RL2
3 White/Black 3 3
4 RL3
RL3
4 Green/Black 4 4
5 RL4
RL4
5 Brown/Red 5 5
6 RL5
RL5
6 White/Red 6 6
7 RL6
RL6
7 White/Green 7 7
8 RL7
RL7
8 Red/Blue 8 8
9 RL8
Do not use
9 Yellow/Red 9 9
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

3/99 TNC 416/TNC 406/TNC 306 TNC keyboard 361
X1 on the TNC keyboard TE 420/TE 400 for the connecting the soft keys on the VDU
Pin Number Assignment
1 SL0
2 SL1
3 SL2
4 SL3
5 Do not use
6 RL15
7 RL14
8 RL13
9 RL12

3/99 TNC 416/TNC 406/TNC 306 Cable overview 362
14 Cable overview
14.1 Cable overview TNC 416

3/99 TNC 416/TNC 406/TNC 306 Cable overview 363
14.2 Cable overview TNC 406
60m
50m
20m
263 954-xx
40m
244 005-xx
298 399-xx
290 110-xx
290 109-xx
VL
298 400-xx
20m
VL
309 774-xx
60m
VL
263 955-xx
HR 130
254 040-xx
20m
HR 410
296 469-01
VL
281 429-xx
239 760-xx
289 208-xx
296 466-xx
309 773-xx
VL
309 774-xx
263 954-xx
40m
TNC 406
LE 406
289 111-xx
MB 420
293 757-12
50m
TS 220
293 488-xx
274 543-xx
TS 120
265 348-xx
244 005-xx
310 125-xx
310 130-xx
TTL
TTL
20m
PC
274 545-xx
312 879-01 3 m
BC 120
313 037-01
VL
312 878-xx
1m
TE 420
313 038-01
PL 410 B
263 371-12
4 inputs
2 inputs
Nominal value
output
PLC I / 0
15-pin male connector
243 971-ZY
Terminal box
251 249-01
RS-232-C Adapter
310 085-01
Encoders
Accessories
RS-422-C Adapter
310 086-01
37-pin male connector
243 937-ZY
VL: Extension cable
for separation points with connecting cable
for extending existing connecting cable

23.02.99
11 APP
11 APP
11 APP
11 APP
Included with
visual display unit

3/99 TNC 416/TNC 406/TNC 306 Cable overview 364
14.3 Cable overview TNC 306
60m
VL
263 955-xx
244 005-xx
263 954-xx
VL
309 774-xx
309 773-xx
311 533-xx 263 954-xx
VL
263 955-xx
VL
311 534-xx
BF 110
267 209-01
LE 306
VL
309 774-xx
TE 355 A
255 015-06
VL
311 532-xx
311 531-xx
PL 410 B
263 371-12
289 111-xx
TNC 306
25m
20m
290 110-xx
290 109-xx
20m
25m
VL
298 400-xx
298 399-xx 20m
60m
VL
281 429-xx
HR 130
254 040-xx
50m
HR 410
296 469-01
296 466-xx
239 760-xx
50m
TS 220
293 488-xx
274 543-xx
TS 120
265 348-xx
244 005-xx
263 954-xx
25m
310 125-xx
310 130-xx
TTL
TTL
312 879-01 3m
20m
PC
274 545-01
Machine
operating
panel
1 input
or TE 355 B
255 016 04
or BE 212
or 242 370-03
Nominal value
output
15-pin male connector
243 971-ZY
4 inputs
Terminal box
251 249-01
Encoders
PLC I / 0
RS-232-C Adapter
310 085 01
37-pin male connector
243 937-ZY
VL: Extension cable
for separation points with connecting cable
for extending existing connecting cable

23.02.99
11 APP
11 APP
11 APP
11 APP
Accessories

3/99 TNC 416/TNC 406/TNC 306 Cable overview 365


366 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15 Mounting dimensions
15.1 LE 416


































































































































































3
/
9
9
T
N
C

4
1
6
/
T
N
C

4
0
6
/
T
N
C

3
0
6
M
o
u
n
t
i
n
g

d
i
m
e
n
s
i
o
n
s
3

6
7
1
5
.
2


L
E

4
0
6
392
15.43"
10
.4"
7
.
2
8
"
M3 (Einschraublnge max.3)
M3 (LENGTH OF ENGAGEMENT .12")
476+5
18.7"+.2"
456+2
17.95"+.08"
1
5
.
6
"
1
3
.
5
1
"
2
8
0

0
.
3
1
1
.
0
2
4
"

.
0
1
2
"
3
2
8
1
2
.
9
"
83.5
3.29"
132.5+2
5.2"+.08"
Befestigungsmglichkeit
PL 400
MOUNTING POSSIBILITY
PL 400
2
6
7

0
.
2
1
0
.
5
"

.
0
0
8
"
2
0
.
7
9
"
3
2
6

0
.
5
1
2
.
8
3

.
0
2
"
135.5+2
5.3"+.08"

0
1
2
.
5
.
5
"
1
0
,
5
.
4
1
"
9
.35"
25
1"
427
16.8"

368 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.3 TE 420


































































































































































3
/
9
9
T
N
C

4
1
6
/
T
N
C

4
0
6
/
T
N
C

3
0
6
M
o
u
n
t
i
n
g

d
i
m
e
n
s
i
o
n
s
3

6
9
1
5
.
4


T
E

4
0
0
5.5
.217"
2
5
1
"
3
6
+
5
1
.
4
"
+
.
2
"
10
DIA.4"
2
.
0
8
"
8+1
DIA.3+.04"

M5
47
1.8"
9
.
5
.
3
7
"
2
6
2

0
.
2
1
0
.
3
1
5
"

0
.
2
"
2
4
2
+
0
.
5
9
.
5
3
"
+
.
0
2
"
380+0.5
14.96"+.02"
388+0.2
15.276"+.008"
Montageflche
MOUNTING SURFACE
Frontplattenausschnitt
FRONT PANEL OPENING
2
3
2
9
.
1
"
1
9
6
7
.
7
"
1
0
5
4
.
1
"
1
8
.
7
"
371
14.6"
18
.7"
2
6
2

0
.
2
1
0
.
3
1
5
"

.
0
0
8
"
2
7
4
1
0
.
8
"
400
15.75"
3880.2
15.276".008"
60.2
.236".008"
6

0
.
2
.
2
3
6
"

.
0
0
8
"
0.5
.02"

370 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.5 BC 120

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 371
15.6 BF 120
12
.47"
2
3
8
9
.
3
7
"
M 5
0
1
0
.
3
9
"
400
15.75"
3760.3
14.803.012"
2
4
6

0
.
3
9
.
6
8
5

.
0
1
2
"
2
6
4
1
0
.
3
9
"
5.6
DIA .22"
2
0
.
7
9
"
2
5
.
9
8
"
380+1
14.96+.039"
2
4
8
+
1
9
.
7
6
3
+
.
0
3
9
"
M 5
0.5
.02"
M
F
F
3760.2
14.803.008"
2
4
6

0
.
2
9
.
6
8
5

.
0
0
8
"
34
1.34"
252
9.92"
367
14.45"
5
.
1
8
"
1
1
.
5
.
4
5
"
R

7
0
R

2
.
7
6
"
12x45
.47"x45
8
0
3
.
1
5
"
8
.
3
1
5
"
2
.08"


































































































































































3

7
2
T
N
C

4
1
6
/
T
N
C

4
0
6
/
T
N
C

3
0
6
M
o
u
n
t
i
n
g

d
i
m
e
n
s
i
o
n
s
3
/
9
9
1
5
.
7


B
C

1
1
0

B
1120.2
4.41".008"

2760.2
10.866".008"
3880.2
15.275".008"
60.2
.236".008"
400
15.75"
0
3
2
0
1
2
.
6
"
3
0
8

0
.
2
1
2
.
1
6
2
"

.
0
0
8
"
365
14.37"
16
.63"
19
.75"
m
a
x
.
2
7
5
M
A
X
.

1
0
.
8
3
"
Z
375
14.76"
14
.55"
1
5
.
5
9
"
2
0
.
7
9
"

1
0
D
I
A
.
4
"

8
.
6
D
I
A
.
3
4
"
2-0.5
.08"-.02"
2
.08"
1
.04"
Z
A
6

0
.
2
.
2
3
6
"

.
0
0
8
"
Frontplattenausschnitt
FRONT PANEL OPENING
372+2"
14.65"+.08"
8-1"
.31"-.04"
8
-
1
"
.
3
1
"
-
.
0
4
"
2
9
2
+
2
"
1
1
.
5
0
"
+
.
0
8
"
M5
Ansicht A
VIEW A
X 1
X 2
X 4
X 3


































































































































































3
/
9
9
T
N
C

4
1
6
/
T
N
C

4
0
6
/
T
N
C

3
0
6
M
o
u
n
t
i
n
g

d
i
m
e
n
s
i
o
n
s
3

7
3
1
5
.
7
.
1

L
E

3
6
0

C
Schutzerde M5
PROTECTION EARTH M5
R

3
2
5
R
1
2
.
8
"
140.50.2
5.53".08"
2
7
2
.
5
1
0
.
7
3
"
4
5
1
.
7
7
"
1
4
5
5
.
7
"
Schwenkbereich der Steuerung
FIELD OF SWIVEL FRAME TRAVERSE
83.5
3.3"
Betriebserde M6
SYSTEM EARTH M6
132.50,2
5.2".08"
1
6
0
6
.
3
4
"
2
0
.
7
8
"
8
.31"
Befestigungsmglichkeit PL 400
(Befestigungsschrauben M3x5)
MOUNTING POSSIBILITY PL 400
(FIXING SCREWS M3x5)
100.5
3.95"
311.5
12.26"
411.5
16.2"
0
10
.4"
84
3.3"
476+5
18.8"+.02" 456+2
18"+.08"
560
22"
3
2
6

0
.
5
1
2
.
9
3
"

.
0
2
"
1
3
4
5
.
3
"


8
D
I
A

.
3
2
"
R 40
R 1.58 "

1
0
,
3
D
I
A

.
4
"
R 50
R 2.4"
10
4"
392
15.43"
36
1.42"
800.2
3.15".008"
2100.2
8.26".008"
3400.2
13.39".008"
3
2
8
1
2
.
9
"
2
8
0

o
.
2
9
.
2
5
"

.
0
0
8
"
2
3
5

0
,
2
9
.
2
5
"

.
0
0
8
"
2
6
7

0
,
2
1
0
.
5
"

.
0
0
8
"
1
3
.
5
1
"
1
5
.
6
"
3
6
7
.
2
8
"
M3 (Einschraublnge max. 3)
M3 (LENGTH OF ENGAGEMENT .12")
Anschlukabel drfen Schwenkbereich der
Steuerung nicht beeintrchtigen!
CONNECTION CABELS SHOULD NOT INTERFERE
WITH TILTING RANGE OF CONTROL UNIT!
1
2
.
5
.
5
"
1
0
.
5
.
4
1
"
9
.35"
25
1"
427
16.8"
0
7
.
3

0
.
3
.
2
9

.
0
1
2
"

374 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.8 Keyboards for TNC 306
15.8.1 TE 355 A
5.5
.217"
112
4.409"
55
2.165"
0
60.2
.236".008"
281
11.063" 2690.2
10.591".008"
6

0
.
2
.
2
3
6
"

.
0
0
8
"
2
6
2
1
0
.
3
1
5
"
2
7
4
1
0
.
7
8
7
"
3
1
+
5
1
.
1
6
"
+
.
1
9
"
2
5
.
9
8
"
2
5
.
9
8
"
1
.
0
3
9
"
4
.
1
5
7
"
2
.
0
7
9
"
10
DIA.394"
8+1
DIA.315"+.039"
Frontplattenausschnitt 236+0.5 x 224+0.5
FRONT PANEL OPENING 9.21"+.020" x 8.819"+0.20"
234+2
9.212"+.079"
23.5
0.925"
Massenanschlu M5
GROUND CONNECTION M5
2
2
2
+
2
8
.
7
4
0
"
+
.
0
7
9
"
X2
R60
R2.36
Dichtung 3 dick, im eingebauten Zustand 2 dick
GASKET .118" THICK INCORPORATED .079 THICK
2
2
4
+
0
.
5
8
.
8
1
9
"
+
.
0
2
0
"
236+0.5
9.291"+.020"
Frontplattenausschnitt
FRONT PANEL OPENING
1
8
.
7
0
8
"

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 375
15.8.2 TE 355 B
5
0
+
5
1
.
9
7
"
+
.
2
0
"
10
DIA .394"
8+1
DIA.351"+.04"
3
1
+
5
1
.
1
6
+
.
1
9
"
2
5
.
9
8
"
1
.
4
0
"
4
.
1
5
7
"
2
.
0
7
9
"
Dichtung 3 dick, im eingebauten Zustand 2 dick
GASKET .118" THICK INCORPORATED .079 THICK
Montageflche
MOUNTING SURFACE .02"
19
.748"
1
9
3

0
.
2
7
.
5
9
8
"

.
0
0
8
"
3000.5
11.81".020"
0.5
1
9
1

0
.
5
7
5
2
"

.
0
2
0
"
3380.2
13.307".008"
248+1
9.76"+.040"
750.4
2.95".016"
8
.
5

0
.
4
.
3
3
5
"

.
0
1
6
"
1
8
7
.
5
+
1
7
.
3
8
"
+
.
0
4
"
R60
R2.36"
X2
X1
1
.
0
4
0
"
51
2.01"
6
6
.
5
2
.
6
2
"
350
13.78"
3380.2
13.307".008"
60.2
.236".008"
9
6
.
5
3
.
8
0
"
5
.
5
.
2
1
7
"
6

0
.
2
.
2
3
6
"

.
0
0
8
"
1
9
3

0
.
2
7
.
5
9
8
"

.
0
0
8
"
2
0
5
8
.
0
7
"
Frontplattenausschnitt
FRONT PANEL OPENING

376 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.9 Visual display units for TNC 306
15.9.1 BE 212
3
0
1
.
1
8
"
26
1.02"
m
i
n
.

2
0
M
I
N
.

.
7
9
"
max. 303
MAX. 11.93"
m
a
x
.

1
6
0
M
A
X
.

6
.
3
0
"
m
a
x
.

2
4
2
M
A
X
.

9
.
5
3
"
94
3.20"
m
i
n
.

1
2
M
I
N
.

.
4
7
"
3
0
1
.
1
8
"
20.5
.08".02"
1
.040"
5
.197"

1
0
D
I
A

.
3
9
4
"

7
.
8
D
I
A

.
3
0
7
"
+
.
0
0
8
"
Dichtung 3 dick
im eingebauten Zustand 2 dick
GASKET .118" THICK
INCORPORATED CONDITION .079" THICK
max. 326
MAX. 12.83"
4
7
.
5
1
.
8
7
"
Z
Z
Freiraum fr Belftung
FREESPACE FOR AIR VENTILATION
20
.79"
20
.79"
max. 300
MAX. 11.80"
40
1.58"
2
8
0
1
1
.
0
2
"
Freiraum fr Belftung
FREESPACE FOR AIR VENTILATION
350
13.78" 60.2
.236".008"
3380.2
13.307".008"
6

0
.
2
.
2
3
6
"

.
0
0
8
"
2
7
4
1
0
.
7
9
"
2
6
2

0
.
2
1
0
.
3
1
5
"

.
0
0
8
"
1
9
6
7
.
7
2
"
322.5
12.70"
5.5
.217"
2
4
4

0
.
5
9
.
6
1
"

.
0
2
0
"
6
.
2
3
6
"
5
.197"
328+0.5
12.91"+.020"
Montageflche
MOUNTING SURFACE .02"
0.5 Frontplattenausschnitt
FRONT PANEL OPENING

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 377
15.9.2 BF 110
8 + 1
. 3 2 " + . 0 4 "
2 0 1
. 7 9 " . 0 4 "
5
5
+
5
2
.
2
"
+
.
2
"
1 6 5 1
6 . 5 " . 0 4 "
1 0
4
.
1
6
"
1
.
0
4
"
D
i
c
h
t
u
n
g

3

d
i
c
k
G
A
S
K
E
T

.
1
2
"

T
H
I
C
K
1
4

1
.
5
5
"

.
0
4
"
2
5
3

1
9
.
9
6
"

.
0
4
"
R
4
0
R

1
.
6
"

8
D
I
A

.
3
2
"
M
a
s
s
e
a
n
s
c
h
l
u


M
5
G
R
O
U
N
D

C
O
N
N
E
C
T
I
O
N

M
5
2
8
1
1
1
.
0
6
"
2
6
9

0
.
2
1
0
.
5
9
"

.
0
0
8
"
2 0 5
8 . 0 7 "
6

0
.
2
.
2
3
6
"

.
0
0
8
"
5
.
5
.
2
2
"
6 0 . 2
. 2 3 6 " . 0 0 8 "
1 9 3 0 . 2
7 . 5 9 8 " . 0 0 8 "
M
o
n
t
a
g
e
f
l

c
h
e
M
O
U
N
T
I
N
G

S
U
R
F
A
C
E
.
0
2
"
0
,
5
1 1 , 5 0 . 5
. 4 5 " . 0 2 "
1 7 0 + 1
6 . 7 " + . 0 4 "
M
5
2
5
6
+
1
1
0
.
0
3
"
+
.
0
4
"
6
.
5

0
.
5
.
2
6
"

.
0
2
"
F
r
o
n
t
p
l
a
t
t
e
n
a
u
s
s
c
h
n
i
t
t
F
R
O
N
T

P
A
N
E
L

O
P
E
N
I
N
G

378 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.10 Input/Output boards PL 410B
47.5
1.87"
23.5
.93"
180.5
.7.02"
3.6
.14"
Masseanschlu M5
GROUND CONNECTION M5
2350.2
9.252.008"
282
11.1"
10.5
.04+.02"
52.5
2.07"
33+2
1.3"+.08"
9
.
3
5
"
2
2
8
8
.
9
8
"
2
1
0

0
.
2
8
.
2
6
8

.
0
0
8
"
9.3
DIA.37"
PL-Eingnge
PL INPUTS
PL-Ausgnge
PL OUTPUTS
8
.315"

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 379
15.11 Handwheel HR
15.11.1 Panel-mounted handwheel HR 130
D
I
A

.
3
9
3
7

.
0
0
0
4
"
D
I
A

.
3
9
3
7

.
0
0
0
8
"

1
0

0
.
0
1

1
0

0
.
0
2

3
6

f
8
D
I
A

1
.
4
1
7
3

.
0
0
1
0
"
D
I
A

1
.
4
1
7
3

.
0
0
2
5
"
D
I
A

2
.
2
8
3
"

5
8
1.417.06"
361.5
.551"
14
.492"
12.5
DIA .173
4.4
1
2
0

3

x

1
2
0

3
0

4
8
1
.8
9
0
"
1
6
.
6
3
0
"
FIXING HOLE M3 x .197"
Befestigungsgewinde M3 x 5
0.2
DIA .008"
3x
19.5+1
.768+.04"
10
.394"

380 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
Handwheel knobs
Knob, small
1
.0394"
10
DIA .394"

6
1
D
I
A

2
.
4
0
2
"
18
.709"
(18)
(.709")
Frontplatte (2)
FRONT PANEL (.079")
max. 10
MAX .394"
3x
HR ...
SW 14
7
M
3
6
.236" .276"
M
3
18
.709"
S
W

5
.
5

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 381
Knob, large
7
M
3
6
.236" .276"
M
3
12
.472"
S
W

5
.
5
HR ...
27
1.063"
(12)
(.472")
Frontplatte (2)
FRONT PANEL (.079")
48
1.89"
90
3.543"
max. 15.5
MAX .610"
SW 1.5
10 F7
DIA .3937 +.0011"
DIA .3937 +.0005"
3x

382 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
Knob, ergonomic
7
M
3
6
.236" .276"
M
3
12
.472"
S
W

5
.
5
HR ...
10 H7
(12)
(.472")
Frontplatte (2)
FRONT PANEL (.079")
70
2.756"
4
.158"
10
.394"
SW 2
17.7
.697"
22
.866"
.236"
6
DIA .3937 +.0006"
3x

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 383
15.11.2 Portable handwheels HR 410

Z Y X
+ V I
V
F
C
T
C
F
C
T
B
F
C
T
A
331
13.031"
7
0
2
.
7
5
6
"
311
12.244"
8
3
3
.
2
7
"
5
0
1
.
9
6
9
"
2
.
5
.
9
8
4
"
15.11.3 Touchprobe system TS 220

384 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99
15.12 Cable adapter
Cable adapter TS 220
Cable adapter HR 410
Mounting detail, wall thickness S<4 Mounting detail, wall thickness S>4

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 385
Adapter RS232C and RS-422
780.2
3.071.008"
60+1
2.36+.04"
5
.2"
2
1
+
0
.
5
.
8
3
"
+
.
0
2
"
780.2
3.071.008"
7
.28"
M4
3
8
1
.
5
"
92
3.62"
5
7
2
.
2
4
"
M 5
3
.
1
2
"
R

4
0
R

1
.
5
7
"

3/97 TNC 406/TNC 306 4-1
Machine integration Contents 4
1 Machine axes 4-5
1.1 Measuring systems 4-5
1.1.1 Signal period 4-5
1.1.2 Direction of traverse 4-7
1.1.3 Encoder monitoring 4-8
1.2 Axis designation 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 Reference marks 4-27
2.1 Passing over the reference marks 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 Servo positioning of the NC-axes 4-37
3.1 The position control loop of an NC-machine 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 Contouring behavior in corners 4-45
3.4.1 Radial acceleration 4-45
3.4.2 Constant feed rate in corners 4-45
3.5 Monitoring functions 4-46
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 Controlled axes 4-50
3.6.1 Axes as programmable position displays 4-50

4-2 TNC 406/TNC 306 3/97
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 Gap control 4-56
4.1 Input characteristics of the gap signal 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 EMERGENCY STOP routine 4-71
5.1 Connection diagram 4-72
5.2 Flow diagram 4-73
6 Display and operation 4-76
6.1 Setting the machine datum point 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

3/97 TNC 406/TNC 306 4-3
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 M-functions 4-93
7.1 Generator ON/OFF (M36/M37) 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 Key simulation 4-101
8.1 TNC-keyboard 4-101
8.2 Machine control panel 4-110
9 Short circuit/probing 4-112
9.1 Interfacing the probing function 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 Electrode changer 4-127
14.1 Controlling an electrode changer 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

4-4 TNC 406/TNC 306 3/97
15 Commissioning and start-up procedure 4-138
15.1 Code numbers for commissioning 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

3/97 TNC 406/TNC 306 1 Machine axes 4-5
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 +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 Axis 4 +0 = not active
+8 = active
Bit 4
*
Axis 5 +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:
Signal period (~) =
spindle pitch[mm] 1000 [m/mm]
line count
Up to 3 decimal places can be entered in MP330.x.
*
only TNC 406

4-6 TNC 406/TNC 306 1 Machine axes 3/97
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 ( ) must not be greater
than 4 m or 0.004.
Angular measurement : the signal period of angle encoders is calculated as follows:
Signal period (~) =
360
line count


1000
or
Signal period ( ) =
360
line count


1
interpolation factor


1000
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
[
1
1000
]
MP330.0 X axis
MP330.1 Y axis
MP330.2 Z axis
MP330.3 Axis 4
MP330.4
*
Axis 5
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-7
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 +0 = positive
+1 = negative
Bit 1 Y axis +0 = positive
+2 = negative
Bit 2 Z axis +0 = positive
+4 = negative
Bit 3 Axis 4 +0 = positive
+8 = negative
Bit 4
*
Axis 5 +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 +0 = positive
+1 = negative
Bit 1 Y axis +0 = positive
+2 = negative
Bit 2 Z axis +0 = positive
+4 = negative
Bit 3 Axis 4 +0 = positive
+8 = negative
Bit 4
*
Axis 5 +0 = positive
+16 = negative
* only TNC 406

4-8 TNC 406/TNC 306 1 Machine axes 3/97
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
Set Reset
M2160 Direction of traverse
X axis
NC NC
M2161 Y axis
M2162 Z axis
M2163 Axis 4
M2164
*
Axis 5
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 A
The edge separation of the encoder signals 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 +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 Axis 4 +0 = not active
+8 = active
Bit 4
*
Axis 5 +0 = positive
+16 = negative
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-9
MP32 Checking the edge separation of the encoder signals
Entry range: 0 to 31
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 Axis 4 +0 = not active
+8 = active
Bit 4
*
Axis 5 +0 = positive
+16 = negative
*
only TNC 406

4-10 TNC 406/TNC 306 1 Machine axes 3/97
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
+X
+A
+B
+C

3/97 TNC 406/TNC 306 1 Machine axes 4-11
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.
+Y
+X
+U
+V
+W
+Z
MP410 Designation of axis 4
Entry: 0 = A
1 = B
2 = C
MP411
*
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: 0 = encoder input X1
1 = encoder input X2
2 = encoder input X3
3 = encoder input X4
4 = encoder input X5
*
5 = encoder input X6
MP110.0 X axis
MP110.1 Y axis
MP110.2 Z axis
MP110.3 Axis 4
MP110.4
*
Axis 5
*
only TNC 406

4-12 TNC 406/TNC 306 1 Machine axes 3/97
MP120 Assignment of the analog outputs
Entry: 0 = output 1
1 = output 2
2 = output 3
3 = output 4
4 = output 5
*
MP120.0 X axis
MP120.1 Y axis
MP120.2 Z axis
MP120.3 Axis 4
MP110.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.
Set Reset
M2100 X-axis is tool axis NC NC
M2101 Y-axis is tool axis
M2102 Z-axis is tool axis
M2103 Axis 4 is tool axis
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 +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 Axis 4 +0 = not active
+8 = active
Bit 4
*
Axis 5 +0 = positive
+16 = negative
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-13
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 30 000.000 to +30 000.000 [mm]
Axis of rotation 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 Software limit switch X+
MP910.1 Software limit switch Y+
MP910.2 Software limit switch Z+
MP910.3 Software limit switch 4+
MP910.4
*
Software limit switch 5+
MP920.0 Software limit switch X
MP920.1 Software limit switch Y
MP920.2 Software limit switch Z
MP920.3 Software limit switch 4
MP920.4
*
Software limit switch 5
Software limit switch range 2
Activated by PLC M2817 = 0, M2816 = 1
MP911.0 Software limit switch X+
MP911.1 Software limit switch Y+
MP911.2 Software limit switch Z+
MP911.3 Software limit switch 4+
MP911.4
*
Software limit switch 5+
MP921.0 Software limit switch X
MP921.1 Software limit switch Y
MP921.2 Software limit switch Z
MP921.3 Software limit switch 4
MP921.4
*
Software limit switch 5
*
0nly TNC 406

4-14 TNC 406/TNC 306 1 Machine axes 3/97
Software limit switch range 3
Activated by PLC: M2817 = 1, M2816 = 0
MP912.0 Software limit switch X+
MP912.1 Software limit switch Y+
MP912.2 Software limit switch Z+
MP912.3 Software limit switch 4+
MP912.4
*
Software limit switch 5+
MP922.0 Software limit switch X
MP922.1 Software limit switch Y
MP922.2 Software limit switch Z
MP922.3 Software limit switch 4
MP922.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
0 0 Range 1 (MP910.X; MP920.X)
1 0 Range 2 (MP911.X; MP921.X)
0 1 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.
Set Reset
M2824 Activation of the software limit switch ranges PLC 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 Limit switch X+ NC NC
M2625 Limit switch X
M2626 Limit switch Y+
M2627 Limit switch Y
M2628 Limit switch Z+
M2629 Limit switch Z
M2630 Limit switch 4+
M2631 Limit switch 4
M2632
*
Limit switch 5+
M2633
*
Limit switch 5
*
0nly TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-15
Example:
PLC program example for changing the software limit switch ranges. PLC-input I10 is used as a
condition for change.
I10 = 0 Software limit switch range 1
I10 = 1 Software limit switch range 2
.
127 LN I10 ;Range 1
128 AN M555 ;already done?
129 R M2816 ;select range 1
130 R M2817 ;select range 1
131 S M2824 ;activate change
132 S M555 ;edge recognition range 1
133 R M556 ;reset edge recognition range 2
134 L I10 ;Range 2
135 AN M556 ;already done?
136 S M2816 ;select range 2
137 R M2817 ;select range 2
138 S M2824 ;activate change
139 S M556 ;edge recognition range 2
140 R M555 ;reset edge recognition range 1
M555
M556
I10
M2816
M2817
M2824

4-16 TNC 406/TNC 306 1 Machine axes 3/97
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
65 536 m

= 1526
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 X axis
MP4060.1 Y axis
MP4060.2 Z axis
MP4060.3 Axis 4
MP4060.4
*
Axis 5
Set Reset
M2012 Lubrication pulse X axis, since value of MP4060.0 NC NC
was exceeded
M2013 Lubrication pulse Y axis, since value of MP4060.1
was exceeded
M2014 Lubrication pulse Z axis, since value of MP4060.2
was exceeded
M2015 Lubrication pulse axis 4, since value of MP4060.3
was exceeded
M2016
*
Lubrication pulse axis 5, since value of MP4060.4
was exceeded
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-17
M2548 Reset of accumulated distance for PLC NC
lubrication X axis
M2549 Reset of accumulated distance for
lubrication Y axis
M2550 Reset of accumulated distance for
lubrication Z axis
M2551 Reset of accumulated distance for
lubrication axis 4
M2576
*
Reset of accumulated distance for
lubrication axis 5
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 L M2012 ;lubrication pulse X axis
46 = T0 ;start timer for duration of lubrication
47 = M2548 ;reset accumulated distance
48 L T48 ;duration of lubrication for X axis
49 = O24 ;set output for lubrication
.
024
M2012
M2548
T0
T48
*
only TNC 406

4-18 TNC 406/TNC 306 1 Machine axes 3/97
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.
Ref. mark 500 1000 Measuring system
[mm]
0.02
0.01
-0.01
-0.02
0
Error
[mm]
MP720 Linear axis error compensation
Entry range: 1.000 to +1.000 in [mm/m] or [1/1000]
MP720.0 X axis
MP720.1 Y axis
MP720.2 Z axis
MP720.3 Axis 4
MP720.4
*
Axis 5
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-19
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 error-
related 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: Correction as a function of which axis?
(X=F(X); X=F(Y) etc.)
Datum point: Distance to the reference mark of the encoder.
The error curve must always start with
correction value = 0 at the datum point.
Distance: Distance between the correction points (grid).
entry of the exponent to base 2
(e.g. entry 11 = 2
11

= 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.

4-20 TNC 406/TNC 306 1 Machine axes 3/97
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) = 2
14
= 16.384 mm
Datum point: 990
957.232 891.696
908.08
Error in Y
[mm]
Z
[mm]
0.1
0.08
0.06
0.04
0.02
-0.1
-0.08
-0.06
-0.04
-0.02
990
973.616 940.848
924.464
875.312
-0.12
56.112
39.728
23.344
6,96
+9.424
+25.808
Machine
datum
Datum
0
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.

3/97 TNC 406/TNC 306 1 Machine axes 4-21
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
64
= 0.256 mm
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 990
SETUP 14
0 Z990 Y+0
1 Z973.616 Y0.06
2 Z957.232 Y0.09
3 Z940.848
4 Z924.464
5 Z908.08 Y0.12
6 Z891.696 Y0.12
7 Z875.312 Y0.1
8 Z858.928 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.

4-22 TNC 406/TNC 306 1 Machine axes 3/97
MP730 Non-linear axis error compensation
Entry range: 0 to 31
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 Axis 4 + 0 = not active
+ 8 = active
Bit 4
*
Axis 5 + 0 = not active
+ 16 = active
*
only TNC 406

3/97 TNC 406/TNC 306 1 Machine axes 4-23


4-24 TNC 406/TNC 306 1 Machine axes 3/97
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 Position X axis [1/ 1000 mm]
D532 Position Y axis
D536 Position Z axis
D540 Position axis 4
D544
*
Position axis 5
Feed for PLC positioning
W560 Feed X axis [mm/min]
W562 Feed Y axis
W564 Feed Z axis
W566 Feed axis 4
W568
*
Feed axis 5
Set Reset
M2704 Activate PLC-positioning X axis PLC NC
M2705 Activate PLC-positioning Y axis
M2706 Activate PLC-positioning Z axis
M2707 Activate PLC-positioning axis 4
M2708
*
Activate PLC-positioning axis 5
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

3/97 TNC 406/TNC 306 1 Machine axes 4-25
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

4-26 TNC 406/TNC 306 1 Machine axes 3/97


3/97 TNC 406/TNC 306 2 Reference marks 4-27
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.
Measuring system
Machine table
REF Value
0
10 20 30 40
Machine datum
+Z
+X 0
Workpiece
datum
Workpiece
Reference mark
REF Value
44.985
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 distance-coded reference marks
Scale with one reference mark

4-28 TNC 406/TNC 306 2 Reference marks 3/97
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).

3/97 TNC 406/TNC 306 2 Reference marks 4-29
2.1.1 Encoders with distance-coded reference marks
Machine parameter MP1350.x = 0
Reference marks
Closed
Open
Trip dog
"Reference end position"
Traverse direction MP1320.x

4-30 TNC 406/TNC 306 2 Reference marks 3/97
Sequence "Automatic passing over reference marks" (press the external START key).
MP1350.x = 0
Press external START key
Trip dog
"Reference end position"
closed?
Traverse direction from
MP1320.x
Invert traverse direction
from MP1320.x
Pass over two consecutive
reference marks
Machine moves to
software limit switch range
Machine stops
No Yes
Yes
No
Is the machine
outside the software
limit switch range?

3/97 TNC 406/TNC 306 2 Reference marks 4-31
2.1.2 Encoders with one reference mark
Machine parameter MP1350.x=1
Reference marks
Closed
Open
Trip dog
"Reference end position"
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."
Reference pulse
Closed
Open
Trip dog
"Reference end position"
Traverse direction MP1320
Measuring length
Desired reference pulse

4-32 TNC 406/TNC 306 2 Reference marks 3/97
Sequence "Automatic passing over reference marks" (Press the external START key).
MP 1350.x = 1
Press the external START key
Trip dog
"Reference end position"
closed?
Machine traverse in direction from
MP1320 with velocity from
MP1330.x to the trip dog
"Reference end positon"
Is the
machine outside
the software limit
switch range?
Machine moves to
software limit switch
Machine stops
No Yes
Yes
No
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

3/97 TNC 406/TNC 306 2 Reference marks 4-33
MP1320 Direction for traversing the reference marks
Entry range: 0 to 31
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 Axis 4: + 0 = positive
+ 8 = negative
Bit 4
*
Axis 5: + 0 = positive
+ 16 = negative
MP1330 Feed rate for traversing the reference marks
Entry range: 80 to 30 000 [mm/min]
MP1330.0 X axis
MP1330.1 Y axis
MP1330.2 Z axis
MP1330.3 Axis 4
MP1330.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 X axis
MP1331.1 Y axis
MP1331.2 Z axis
MP1331.3 Axis 4
MP1331.4
*
Axis 5
MP1340 Sequence for traversing reference marks
Entry: 0 = no evaluation of the reference mark
1 = X axis
2 = Y axis
3 = Z axis
4 = Axis 4
5 = Axis 5
MP1340.0 1st axis
MP1340.1 2nd axis
MP1340.2 3rd axis
MP1340.3 4th axis
MP1340.4
*
5th axis
*
only TNC 406

4-34 TNC 406/TNC 306 2 Reference marks 3/97
MP1350 Type of reference mark approach
Entry: 0 = encoder with distance-coded reference marks
1 = encoder with one reference mark
MP1350.0 X axis
MP1550.1 Y axis
MP1350.2 Z axis
MP1350.3 Axis 4
MP1350.4
*
Axis 5
Set Reset
M2556 Reference end position for X axis PLC PLC
M2557 Reference end position for Y axis
M2558 Reference end position for Z axis
M2559 Reference end position for axis 4
M2560 Reference end position for axis 5
W272 Operating mode NC
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
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

3/97 TNC 406/TNC 306 2 Reference marks 4-35


4-36 TNC 406/TNC 306 2 Reference marks 3/97


3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-37
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.


































































































































































4
-
3
8
T
N
C

4
0
6
/
T
N
C

3
0
6
3


S
e
r
v
o

p
o
s
i
t
i
o
n
i
n
g

o
f

t
h
e

N
C
-
a
x
e
s
3
/
9
7
A
c
t
u
a
l
r
p
m
A
c
t
u
a
l
p
o
s
i
t
i
o
n
Motor Tacho
Nominal
current
Nominal
position
Trailing
error
(lag)
Nominal
rpm
A
c
t
u
a
l
c
u
r
r
e
n
t
A
c
t
u
a
l

p
o
s
i
t
i
o
n
A
c
t
u
a
l
r
p
m
CNC Control Servo amplifier Machine
Block diagram of the position control loop, here cascade control.
Position
regulator
rpm
regulator
Current
regulator
Linear/
Rotary
encoder

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-39
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.
Y
S
v
t

X
S
V
x
s
ax
s
ax
+

v
x
Noml+
Servo
amplifier
+
-
v
x

A
c
t
l
Acceleration:
MP1060
k
v
factor: MP1810
s=s
0
+vt
X

A
c
t
l
X
Noml
-
v
=
a

t
v

=

k
v

s
a
x

4-40 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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 = s
o
+ v t s = nominal path value
s
o
= previous nominal path value
v = nominal velocity value
t = 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 s
a
is calculated.
s
ax
= x
Noml

- x
Actl
s
ax

= lag for X-axis
x
Noml
= nominal path value for X-axis
x
Act l
= actual path value for X-axis
I The lag is multiplied by the k
v
factor MP1810 and passed on to the drive amplifier as a nominal
velocity value (analog voltage).
v
x
= k
v
s
ax
v
x
= nominal velocity-value for X-axis
The k
v
factor (position loop gain) determines the control loop response of the machine, and it must
be matched to the machine.
If a very high k
v
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 k
v
factor is too small then the new position will
be reached too slowly.
The optimal k
v
factor must be determined by trial and error (see the section "Commissioning and
start-up procedure").
The following diagram shows the response for various k
v
factors:
U [V]
t [s]
MP1060
MP1810
MP1810
k
v
correct
k
v
too large
k
v
too small
The acceleration can be programmed with machine parameter MP1060. The acceleration
determines the slope of the ramp on the rising and falling edges.

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-41
For axes which are mutually interpolated the k
v
factor must be the same, in order to avoid contour
distortion.
MP1060 Acceleration
Entry value 0.001 to 3.0 [m/s
2
]
MP1060.0 Acceleration X axis
MP1060.1 Acceleration Y axis
MP1060.2 Acceleration Z axis
MP1060.3 Acceleration axis 4
MP1060.4
*
Acceleration axis 5
The K
v
factor in MP1810 is, in general, determined by the rapid traverse (MP1010) of the machine
and the lag, using the following formula:
k
v

=

Ve
s
a
[
m/min
mm
] k
v
= position loop gain

v
e
= rapid traverse
s
a
= lag
or
s
a

=

Ve
k
v
[mm]

Rapid traverse
[m/min]
s
a
[mm]
2
4
6
8
10
2 4 6 8 10
k
v
= 2
k
v
= 1
k
v
= 0.5
12
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 axis-
specific rapid traverse there is an analog voltage which is stored in machine parameter MP1050.

4-42 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
The resulting lag error s
a
thus depends on the analog voltage.
U[V]
s
a
[mm]
2
4
6
8
10
2 4 6 8 10
k
v
= 1, Rapid traverse 10 m/min
12
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 K
v
factor for operation with lag
Entry range 0.1 to 10 [
m/min
mm
]
MP1810.0 k
v
factor X axis
MP1810.1 k
v
factor Y axis
MP1810.2 k
v
factor Z axis
MP1810.3 k
v
factor axis 4
MP1810.4
*
k
v
factor axis 5
MP1010 Rapid traverse
Entry range 80 to 30 000 [mm/min]
MP1010.0 Rapid traverse X axis
MP1010.1 Rapid traverse Y axis
MP1010.2 Rapid traverse Z axis
MP1010.3 Rapid traverse axis 4
MP1010.4
*
Rapid traverse axis 5
MP1050 Analog voltage for rapid traverse
Entry range 4.5 to 9 [V]
MP1050.0 Analog voltage X axis
MP1050.1 Analog voltage Y axis
MP1050.2 Analog voltage Z axis
MP1050.3 Analog voltage axis 4
MP1050.4
*
Analog voltage axis 5
*
only TNC 406

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-43
MP1020 Manual feed
Entry range 80 to 30 000 [mm/min]
MP1020.0 Manual feed X axis
MP1020.1 Manual feed Y axis
MP1020.2 Manual feed Z axis
MP1020.3 Manual feed axis 4
MP1020.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 16384 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 s
a
. 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] / s
a
[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:
k
v
= 2 rapid traverse 5 000 [mm/min], U = 9 [V]
s
a
=
5 000 [m]
2
= 2 500 [m]
U =
9 000 [mV]
2 500 [m]
= 3.6 [mV/m]
n =
3.6 [mV/m]
0.6 [mV]
= 6 steps/m position deviation
*
only TNC 406

4-44 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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 65535 [s]
0 = no automatic adjustment

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-45
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/s
2
] 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/s
2
]
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:

= Change of axis movement direction


s
a
= Servo lag
Axis standstill
Path when MP7460 <
Path when MP7460 >
s
a
MP7460 Constant feed rate in corners
Entry value: 0.001 to 179.999

4-46 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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:
Set Reset
M2688 No monitoring X axis PLC PLC
M2689 No monitoring Y axis
M2690 No monitoring Z axis
M2691 No monitoring axis 4
M2692
*
No monitoring axis 5
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

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-47
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 Movement monitoring
Entry value 0.03 to 10 [V]

4-48 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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
MP1030.0
Positioning window
Entry value: 0.001 to 2 [mm] or []
X axis
MP1030.1 Y axis
MP1030.2 Z axis
MP1030.3 Axis 4
MP1030.4
*
Axis 5
*
only TNC 406

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-49


4-50 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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 +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 Axis 4 +0 = not controlled
+8 = controlled
Bit 4
*
Axis 5 +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 +0 no POSITIP function
+1 with POSITIP function
Bit 1 Y axis +0 no POSITIP function
+2 with POSITIP function
Bit 2 Z axis +0 no POSITIP function
+4 with POSITIP function
Bit 3 Axis 4 +0 no POSITIP function
+8 with POSITIP function
Bit 4
*
Axis 5 +0 no POSITIP function
+16 with POSITIP function
*
only TNC 406

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-51
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").
Set Reset
M2000 Axis enable X NC NC
M2001 Axis enable Y
M2002 Axis enable Z
M2003 Axis enable 4
M2004
*
Axis enable 5
*
only TNC 406

4-52 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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.
Set Reset
M2008 X axis in position NC NC
M2009 Y axis in position
M2010 Z axis in position
M2011 Axis 4 in position
M2032
*
Axis 5 in position
*
only TNC 406

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-53
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.
Set Reset
M2544 Open control loop X axis PLC PLC
M2545 Open control loop Y axis
M2546 Open control loop Z axis
M2547 Open control loop axis 4
M2572
*
Open control loop axis 5
M2492 Await open control loop X axis PLC PLC
M2493 Await open control loop Y axis
M2494 Await open control loop Z axis
M2495 Await open control loop axis 4
M2568
*
Await open control loop axis 5
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-S-
T-strobe, but not in the "Full sequence" operating mode.
Set Reset
M2552
Actual-nominal value transfer X axis PLC PLC
M2553
Actual-nominal value transfer Y axis
M2554
Actual-nominal value transfer Z axis
M2555
Actual-nominal value transfer axis 4
M2564
* Actual-nominal value transfer axis 5
*
only TNC 406

4-54 TNC 406/TNC 306 3 Servo positioning of the NC-axes 3/97
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 Speed for non-controllable rotary axis (M03/ M04)
Entry range 1 to 83 (RPM)
Set Reset
M2485
Status display and sign of analog voltage for C-axis
(M03)
PLC PLC
M2486
Status display and sign of analog voltage for C-axis
(M04)
PLC PLC
M2487
Status display for C-axis (M05) PLC PLC
D752 Speed for non-controlled rotary axis (M03/M04)
W492 Position of the spindle override in percent
(NC -> PLC)
W764 Percentage factor for spindle override
Entry range 0 to 150

3/97 TNC 406/TNC 306 3 Servo positioning of the NC-axes 4-55


4-56 TNC 406/TNC 306 4 Gap control 3/97
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)
Set Reset
M2785 Eroding process is active NC 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 Characteristic gradient
Entry range: 0.1 to 10.000
MP2010.0 Input characteristic range 2.5 to 5V
MP2010.1 Input characteristic range 0 to 2.5V
MP2020 Multiplication factor
Entry range: 1,000 to 10,000
MP2020.0 Input characteristic range 2.5 to 5V
MP2020.1 Input characteristic range 0 to 2.5V

3/97 TNC 406/TNC 306 4 Gap control 4-57
MP2030 Characteristic kink
Entry range: 0 to 100 (%)
MP2030.0 Input characteristic range 2.5 to 5V (100% = 5V)
(0% = 2.5V)
MP2030.1 Input characteristic range 0 to 2.5V (100% = 0V)
(0% = 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)

4-58 TNC 406/TNC 306 4 Gap control 3/97
Example:
0
0
10
20
30
40
10
20
30
40
U
gap
[V]
F
[mm/min]
Short circuit
0V
Electrode
retracts
Electrode
moves towards
workpiece
Standstill
2.5 V
Freerun
5 V
2.5
50
60
50
70
5 V
1
Range for typical
process run
60
80
90
(MP 2080 = 0)
2
3
4
5
6
7
8
9
10
MP2030.0 = 30 Characteristic kink (characteristic range 2.5 to 5V)
MP2030.1 = 30 Characteristic kink (characteristic range 0 to 2.5V)
MP2010.0 = 1 Characteristic gradient (characteristic range 2.5 to 5V)
MP2010.1 = 1 Characteristic gradient (characteristic range 0 to 2.5V)
I MP2020.0 = 2 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)
I MP2070 = 20 Feed rate at maximum gap voltage (= scaling)
I 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
T MP2133 = 100 Retracting speed during short circuit (signal at X12)

3/97 TNC 406/TNC 306 4 Gap control 4-59
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.

4-60 TNC 406/TNC 306 4 Gap control 3/97
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

3/97 TNC 406/TNC 306 4 Gap control 4-61
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
Feed rate for infeed when eroding (M2620 is set)
Entry range: 1 to 500 [mm/min]
MP2110
Delay of signal for "spark-out is completed" (marker M2616)
Entry range: 0.1 to 99.9 [s]
Set Reset
M2616
Free run during erosion or spark-out is completed PLC 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]
Set Reset
M2621 Strobe marker for gap flushing PLC PLC
D756 Auto jump distance during flushing

4-62 TNC 406/TNC 306 4 Gap control 3/97
The following examples for TNC 306 show how the flushing timer may be written in the PLC
program:
L W676 ; Auto Jump Distance (AJD)
X K + 100
= D730
L W678 ; Eroding time (ER)
X K + 100
= D734
L M2621 ; Request flushing
R M2621
L M910 ; Flushing on buffer marker
A[
L D734 ; Eroding time
> K + 0
]
CMT 31
EM
LBL 31 ;Timer Module
L D212 ; Timer Buffer
> K + 0
JPT 32
L D734 ; Eroding Timer
= D212
LBL 32
L D212
- K + 40 :PLC Cycle Time
= D212
<= K + 0
S M2621 ; Request Flushing
EM
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 Q-
parameters in the NC program or in the form of erosion tables.
MP2199 Enable erosion tables
0 = Tables not active
2 = Tables active

3/97 TNC 406/TNC 306 4 Gap control 4-63
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 Q-parameter Q90 (NC PLC)
D672 Q-parameter Q91
D676 Q-parameter Q92
D680 Q-parameter Q93
D684 Q-parameter Q94
D688 Q-parameter Q95
D692 Q-parameter Q96
D696 Q-parameter Q97
D700 Q-parameter Q98
D704 Q-parameter 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, Q-
parameters (Q96Q98) are also used for NC to PLC transfers.
D412 Q-parameter Q96 (NC PLC)
D416 Q-parameter Q97
D420 Q-parameter Q98
B666 Maximum power stage
B667 Minimum power stage
B668 Power stage number NR
1)
(.E - table PLC) can be changed during
machining via Q-parameter Q99
B669 Low voltage current LV
2)
B670 High voltage current HV
2)
B671 Nominal gap voltage GV
2)
2)
These eroding parameters can be
W672 Pulse on duration TON
2)
temporarily changed during machining
B674 Pulse off duration TOF
2)
via the screen status display
B675 Servo sensitivity SV
2)
(.E - table NC)
W676 Auto Jump Distance AJD
2)
(.E - table PLC)
W678 Erosion Time ET
2)
B680 Arc sensitivity AR
B681 Polarity electrode P
W682 High voltage selector HS
W684 Wear rate WR
W686 Surface finishing RA
D688 Stock removal SR
W692 Two-times gap 2G
W694 Minimum undersize UNS
B696 Auxiliary parameter 1 AUX1
B697 Auxiliary parameter 2 AUX2
B698 Auxiliary parameter 3 AUX3
B699 Auxiliary parameter 4 AUX4

4-64 TNC 406/TNC 306 4 Gap control 3/97
W700 Auxiliary parameter 5 AUX5
W702 Auxiliary parameter 6 AUX6
For further calculations various eroding parameters are also assigned to extra Q-parameters:
Q96 to Q98 Additional eroding parameters
Q99 Current power stage number NR
Q150 Maximum NR
Q151 Minimum NR
Q152 Current eroding table number
Q154 Minimum undersize UNS of minimum NR
Q155 Two-times gap 2G of minimum NR
Q156 Two-times gap 2G of maximum NR
Q157 Value of MP2040
Q161 Eroding time
Q201 to Q225 Two-times gap 2G of minimum to maximum NR
Q231 to Q255 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 Dialog (4 languages) shown when the column in the erosion parameter
table is selected (depending on MP7230)
NAME Column designation
ELEM 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

3/97 TNC 406/TNC 306 4 Gap control 4-65
SENS Element servo sensitivity (used directly by the TNC)
LAST Last element on-line
Q154 Element of min-nr. = Q154
Q155 Element of min-nr. = Q155, element of max-nr. = Q156
Q201 Elements transferred to Q201 ... Q225 from min to max
Q231 Elements transferred to Q231 ... Q255 from min to max
Type of number
Integer (I)
I1-9999 1...9999 W
I1-2000 1...2000 W
I1-255 1...255 B
I1-150 1...150 B
I1-99 1...99 B
I1-31 1...31 B
I1-25 1...25 B
I1-20 1...20 B
I1-15 1...15 B
I1-9 1...9 B
I1-3 1...3 B
Integer (I)
I9999 0...9999 W
I999 0...999 W
I255 0...255 B
I180 0...180 B
I150 0...150 B
I120 0...120 B
I100 0...100 B
I99 0...99 B
I90 0...90 B
I60 0...60 B
I31 0...31 B
I30 0...30 B
I25 0...25 B
I21 0...21 B
I20 0...20 B
I15 0...15 B
I9 0...9 B
I3 0...3 B
I2 0/1/2 B
I1 0/1 B
Real (R)
R1D200 0.0 ... 200.0 W
R1D200I W
R1D99 0.0 ... 99.0 W
R1D99I W
R3D9999 0.000 ... 9999.999 D
R3D9999I
R3D1000 0.000 ... 1000.000 D
R3D1000I
R3D999 0.000 ... 999.999 D
R3D999I
R3D9 0.000 ... 9.999 W
R3D9I
R3D1 0.000 ... 1.000 W
R3D1I
(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

4-66 TNC 406/TNC 306 4 Gap control 3/97
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.
0
U
gap
[V]
F
[mm/min]
5 2.5
SV = 99
SV = 60

3/97 TNC 406/TNC 306 4 Gap control 4-67
4.8 Transmission of eroding parameters to the PLC
The following PLC markers define the transmission of eroding parameters to the PLC:
Set Reset
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.
NC PLC
M2795 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

4-68 TNC 406/TNC 306 4 Gap control 3/97
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> = Synchronization character (= CA)
<Number n> = Number of following data bytes including <ID character> without
<BCC>. Maximum 100 data bytes are allowed (01H to 64H)
<ID character> = 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)
<Hi-byte no.> = Start address High Byte
<Low-byte no.> = Start address Low Byte
<Byte 1>
<......>
<Byte n> = Number of data bytes or data bytes (1 to n), or none of either (depending of
the function)
<BCC> = 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.

3/97 TNC 406/TNC 306 4 Gap control 4-69
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 protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<BCC>
Generator transmits: CA 03 00 07 08 0C
PLC transmits: ACK or NAK
PLC protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<00..FF> <BCC>
PLC transmits: CA 04 00 07 08 1E 14
Generator transmits: ACK or NAK
Example: Reset a Marker
Marker 1800 is to be reset.
Generator protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<00..FF> <BCC>
Generator transmits: CA 04 02 07 08 00 09
PLC transmits: ACK or NAK
Example: Read Bytes
Five bytes are to be read starting with Byte 22 (B22=1F, B23=07, B24= 2A, B25=11, B26=00).
Generator protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<Number of data bytes> <BCC>
Generator transmits: CA 04 04 00 16 05 13
PLC transmits: ACK or NAK
PLC protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<Byte 1> < > <....> <Byte 5> <BCC>
PLC transmits: CA 08 04 00 16 1F 07 2A 11 00 3B
Generator transmits: ACK or NAK
Example: Load Bytes
Three bytes (B100, B101 and B102) are to be loaded into the 3 bytes starting with B22.
Generator protocol: <SYNC> <Number n> <ID character> <Hi-byte no.> <Low-byte no.>
<Byte 1> < > <Byte 3> <BCC>
Generator transmits: CA 06 06 00 16 64 65 66 71
PLC transmits: ACK or NAK

4-70 TNC 406/TNC 306 4 Gap control 3/97
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 Transmission error (after three NAKs ) NC NC
M2925 False marker numbers NC NC
M2926 Address exceeds memory area NC NC
M2927 Generator setting missing NC NC
M2928 External unit is not ready NC NC
W760 No. of the first byte to be transmitted PLC PLC
W762 Number of bytes to be transmitted PLC PLC

3/97 TNC 406/TNC 306 5 EMERGENCY STOP routine 4-71
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

4-72 TNC 406/TNC 306 5 EMERGENCY STOP routine 3/97
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
X41/34 X44/2 X44/1 X42/4
X21/34 X24/2 X24/1 X22/4

"Control is
ready"
24V not
interruptible
24V
interruptible
"Control ready"
feedback
EMERGENCY
STOP
buttons
Control
voltage
on
k1
k1
K1
24 V
PLC
LE406
LE360

3/97 TNC 406/TNC 306 5 EMERGENCY STOP routine 4-73
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 2 3 4 5 6 7 8 9

VDU-display
1. Wait for control voltage. EXTERNAL DC VOLTAGE MISSING
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,
EMERGENCY STOP DEFECTIVE
4. Recognize the acknowledgment and set output X21/34
or X41/34 (t < 24 ms).
5. Wait for control voltage. EXTERNAL DC VOLTAGE MISSING
6. Normal control operation. Output and acknowledgment
"Control operational" are high.
7. Control voltage switched off externally. External EMERGENCY STOP
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.
Flashing Error Message

4-74 TNC 406/TNC 306 5 EMERGENCY STOP routine 3/97


3/97 TNC 406/TNC 306 5 EMERGENCY STOP routine 4-75


4-76 TNC 406/TNC 306 6 Display and operation 4 3/97
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
RM
Workpiece datum
Scale datum RM = Reference mark
Machine datum

3/97 TNC 406/TNC 306 6 Display and operation 4 4-77
MP950 Datum point for positioning blocks with M92
Entry range: 30000.000 to +30000.000 [mm] or []
Values referenced to the machine datum
MP950.0 X axis
MP950.1 Y axis
MP950.2 Z axis
MP950.3 Axis 4
MP950.4
1)
Axis 5
MP960 Shift of the reference point
Entry range: 30000.000 to +30000.000 [mm] or []
MP960.0 X axis
MP960.1 Y axis
MP960.2 Z axis
MP960.3 Axis 4
MP960.4
1)
Axis 5
1)
only TNC 406

4-78 TNC 406/TNC 306 6 Display and operation 4 3/97


3/97 TNC 406/TNC 306 6 Display and operation 4 4-79
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.
X
Z
No rotation Rotation by +90
Z
X
MP 7310 Graphics display
Entry range: 0 to 3
Bit 0 Changeover of + 0 = European convention
view in 3 planes + 1 = American convention
Bit 1 Rotation of the coordinate system + 0 = no rotation
in the machining plane by +90 + 2 = coordinate system rotated by +90

4-80 TNC 406/TNC 306 6 Display and operation 4 3/97
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 hand-
control equipment.
Set Reset
M2096 X Key last pressed NC NC
M2097 Y Key last pressed
M2098 Z Key last pressed
M2099 IV Key last pressed
M2095
1)
V Key last pressed
1)
only TNC 406

3/97 TNC 406/TNC 306 6 Display and operation 4 4-81


4-82 TNC 406/TNC 306 6 Display and operation 4 3/97
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

3/97 TNC 406/TNC 306 6 Display and operation 4 4-83
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 PLC-
program. The markers M2485 and M2486 change the polarity of the analog voltage for the rotary
axis.
Set Reset
M2485 Status-display and sign of S-analog for M03 PLC PLC
M2486 Status-display and sign of S-analog for M04
M2487 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
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.

4-84 TNC 406/TNC 306 6 Display and operation 4 3/97
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 M-
functions 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

3/97 TNC 406/TNC 306 6 Display and operation 4 4-85
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 CE-
key. 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 PLC-
markers 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
is displayed
M2924
PLC error message 0 (reserved to RS-422
1)
) PLC PLC
M2925
PLC error message 1 (reserved to RS-422
1)
)
M2926
PLC error message 2 (reserved to RS-422
1)
)
M2927
PLC error message 3 (reserved to RS-422
1)
)
M2928
PLC error message 4 (reserved to RS-422
1)
)
.
.
.
.
M3122
PLC error message 198
M3123
PLC error message 199
1)
only TNC 406

4-86 TNC 406/TNC 306 6 Display and operation 4 3/97
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
Cycle 2 + 0 = enable
+ 4 = inhibit
Cycle 3 + 0 = enable
+ 8 = inhibit
Cycle 4 + 0 = enable
+ 16 = inhibit
Cycle 5 + 0 = enable
+ 32 = inhibit
Cycle 6 + 0 = enable
+ 64 = inhibit
Cycle 7 + 0 = enable
+ 128 = inhibit
Cycle 8 + 0 = enable
+ 256 = inhibit
Cycle 9 + 0 = enable
+ 512 = inhibit
Cycle 10 + 0 = enable
+ 1024 = inhibit
Cycle 11 + 0 = enable
+ 2048 = inhibit
Cycle 12 + 0 = enable
+ 4096 = inhibit
Cycle 13 + 0 = enable
+ 8192 = inhibit
Cycle 14 + 0 = enable
+ 16 384 = inhibit
Cycle 15 + 0 = enable
+ 32 768 = inhibit
Cycle 16 + 0 = enable
+ 2 = inhibit
Cycle 17 + 0 = enable
+ 4 = inhibit
Cycle 18 + 0 = enable
+ 8 = inhibit
Cycle 19 + 0 = enable
+ 16 = inhibit
Cycle 20 + 0 = enable
+ 32 = inhibit
Cycle 21 + 0 = enable
+ 64 = inhibit
Cycle 22 + 0 = enable
+ 128 = inhibit
Cycle 23 + 0 = enable
+ 256 = inhibit
Cycle 24 + 0 = enable
+ 512 = inhibit
Cycle 25 + 0 = enable
+ 1024 = inhibit
Cycle 26 + 0 = enable
+ 2048 = inhibit
Cycle 27 + 0 = enable
+ 4096 = inhibit
Cycle 28 + 0 = enable
+ 8192 = inhibit
Cycle 29 + 0 = enable
+ 16 384 = inhibit
Cycle 30 + 0 = enable
+ 32 768 = inhibit

3/97 TNC 406/TNC 306 6 Display and operation 4 4-87
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.

4-88 TNC 406/TNC 306 6 Display and operation 4 3/97
MP1092
to
MP1097
Circular feed rates in the disk cycle
(if marker M2640 is set)
Entry range: 0 to 30 000 [mm/min]
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)
Set Reset
M2616
Free run during erosion or spark-out is completed PLC 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 User-parameter 0
MP7330.1 User-parameter 1
. .
. .
MP7330.14 User-parameter 14
MP7330.15 User-parameter 15

3/97 TNC 406/TNC 306 6 Display and operation 4 4-89
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 Select machine parameter list
807 667 Select PLC mode
105 296 Correction tables for the non-linear axis-error compensation
86 357 Remove program protection
75 368 Automatic offset adjustment
123 Select the user-available list of machine parameters
531 210 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 Decimal sign
Entry: 0 or 1
0 = Decimal comma
1 = Decimal point

4-90 TNC 406/TNC 306 6 Display and operation 4 3/97
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 + 0 = Memory test at switch-on
+ 1 = No memory test at switch-on
Bit 1 EPROM-test + 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.
Set Reset
M2060 A new program is started NC PLC
M2061 END PGM, M02 or M30 has been executed NC 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.
Set Reset
M2019 Reapproach activated with NC-START NC NC
M2059 TNC in Test Run mode NC NC

3/97 TNC 406/TNC 306 6 Display and operation 4 4-91
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."
Set Reset
M2713 Activate the transfer of the value from D528 to the PLC NC
Q-Parameter defined in W516
W516 Number of the Q-parameter to be overwritten
(Q100 to Q107)
D528 Value to be transferred to the Q-Parameter
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 Red Green Blue
HEX Ranges 0 to 3 0 to F 0 to 3 0 to F 0 to 3 0 to F
Adjustment Coarse Fine Coarse Fine Coarse Fine
Entry for yellow:
$0.... 3 9 3 9 0 0
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 Color for ... Standard color adjustment
parameter
MP7350 Window frame $30200C
MP7351 Error messages $3F0000

4-92 TNC 406/TNC 306 6 Display and operation 4 3/97
MP 7352 Operating-mode "Machine"
MP7352.0 Window Background $000000
MP7352.1 Operating mode display $342008
MP7352.2 Dialog $3F3828
MP7353 Operating-mode "Programming"
MP7353.0 Window Background $000000
MP7353.1 Operating mode display $342008
MP7353.2 Dialog $3F3828
MP7354 Program-text display "Machine"
MP7354.0 Background $080400
MP7354.1 General program-text $38240C
MP7354.2 Current block $38341C
MP7354.3 Background of active window $302410
MP7355 Program-Text display "Programming"
MP7355.0 Background $080400
MP7355.1 General program-text $38240C
MP7355.2 Current block $38341C
MP7355.3 Background of active window $302410
MP7356 Status- and PLC-window
MP7356.0 Background $0C0800
MP7356.1 Axis positions in the status-display $3F2C18
MP7356.2 Status-display, except axis positions $3F280C
MP7357 Soft key display "Machine"
MP7357.0 Background $000000
MP7357.1 Symbols $3F3828
MP7358 Soft key display "Programming"
MP7358.0 Background $000000
MP7358.1 Symbols $3F3828
MP7360 Graphics: 3D-depiction
MP7360.0 Background $000000
MP7360.1 Surface $203038
MP7360.2 Front face $0C1820
MP7360.3 Text-display in graphics window $3F3F3F
MP7360.4 Side face $102028
MP7361 Graphics: view in three planes
MP7361.0 Background $000000
MP7361.1 Plan (Grid) $203038
MP7361.2 Front and side view $203038
MP7361.3 Axes cross and text $3F3F3F
MP7361.4 Cursor $3F0000
MP7362 Additional status-display in graphics window
MP7362.0 Background graphics window $080400
MP7362.1 Background status display $0C0800
MP7362.2 Status symbols $38240C
MP7362.3 Status values $3F2C18

3/97 TNC 406/TNC 306 7 M-functions 4-93
7 M-functions
Up to 100 miscellaneous functions (M-functions) can be programmed. The code for these M-
functions 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.
M- Effective at:
Function Start of
block
End of
block
* 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
O
M- Effective at:
Function Start of
block
End of
block
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
O
M- Effective at:
Function Start of
block
End of
block
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
O
*M-function with fixed meaning for the NC

4-94 TNC 406/TNC 306 7 M-functions 2/97
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 Strobe signal for M-function NC NC
M2482 Acknowledgment of M-functionPLC NC
W260 Code for M-function (NC PLC)

2/97 TNC 406/TNC 306 7 M-functions 4-95
Example:
Evaluation of the miscellaneous function M03 in the PLC.
PLC-output: O10 = C-axis enable/disable
PLC-input: I10 = Acknowledgment of M-function
199 L M2045 ;Change signal for M-function
200 RN M2482 ;Reset acknowledgment of M-function
201 CMT 77 ;Evaluation of M-function
.
.
.
901 EM ;End of main program
902 LBL 77
903 CASE W260 ;M-code
904 CM0
905 CM1
906 CM2
907 CM3
908 CM4
.
.
.
930 ENDC
931 EM ;End of module
.
.
.
1170 LBL 3 M-function M03
1171 L M1
1172 S M2485 Status display M03, sign of C-axis analog
1173 R M2486 Reset M04
1174 R M2487 Reset M05
1175 S O10 C-axis enable/disable
1176 L I10 Acknowledgment of M-function?
1177 S M2482 Acknowledgment of M-function
1178 EM
M2482
M2045
M2485
O10
I10

4-96 TNC 406/TNC 306 7 M-functions 2/97
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).
Set Reset
M2618 = 1
M2619 = 0
Gap control on, M36 displayed PLC PLC
M2618 = 0
M2619 = 1
Gap control off, M37 displayed PLC PLC
M2785 Eroding process active NC NC

2/97 TNC 406/TNC 306 7 M-functions 4-97
PLC example:
400 CASE W260 ;M-code
.
.
436 CM 36 ;Generator ON
437 CM 37 ;Generator OFF
.
.
500 ENDC
501 EM
.
.
1020 LBL36 ;Generator ON
1021 CM361 ;M36
1022 CM101 ;Acknowledgment for M-function
1023 EM
.
.
1050 LBL37 ;Generator OFF
1051 CM371 ;M37
1052 CM101 ;Acknowledgment for M-function
1053 EM
.
.
1211 LBL101 ;Acknowledgment for M-function
1212 LN M2482 :If no feedback signal available
1213 S M2482 ;Acknowledgment for M-function
1214 EM
.
.
1412 LBL361 ;M36
1413 LN M2618 ;If gap control is off
1414 S M2618 ;Switch on gap control
1415 R M2619 ;Complementary marker for switch on gap control
1416 S O10 ;Generator ON
1417 EM
.
.
1476 LBL371 ;M37
1477 L M0 ;Set Accu to "1"
1478 ON M0 ;Set Accu to "1"
1479 R M2618 ;Switch off gap control
1480 S M2619 ;Complementary marker for switch off gap control
1481 R O10 ;Generator OFF
1482 EM

4-98 TNC 406/TNC 306 7 M-functions 2/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.

2/97 TNC 406/TNC 306 7 M-functions 4-99
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 + 0 = Program-halt on M06
+ 1 = No program-halt on M06
Bit 1 modal cycle-call M89 + 0 = Normal code-transfer of
M89 at beginning of block
+ 2 = Modal cycle-call M89 at end of block
Bit 2 Program-halt on + 0 = Program-halt until acknowledgment
M-functions of M-function
+ 4 = No program-halt,
do not wait for acknowledgment

4-100 TNC 406/TNC 306 7 M-functions 2/97


2/97 TNC 406/TNC 306 8 Key simulation 4-101
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
NC NC
W274 Key-code for the operated, inhibited key or
not inhibited key
NC NC
W516 Word with multiple-function
Key-code for simulating TNC-key
activated by M2813
PLC PLC
M2181 not inhibited key was operated NC PLC
M2182 Inhibited key was operated NC PLC
M2187 Soft key function not executed NC NC
M2813 Activate the key from W516 PLC NC
M2876 Inhibit the alpha keyboard PLC PLC
M2877 Inhibit the soft-key row below the screen PLC PLC
M2878 Inhibit the changeover keys at right of screen PLC PLC

4-102 TNC 406/TNC 306 8 Key simulation 2/97
Marker Function
inhibit
Key-
code
Marker Function
inhibit
Key-
code
Set Reset
M2854

CHF
58 M2871 75 PLC PLC
M2855
PGM
NAME
59 M2872 76 PLC PLC
M2856
L
60 M2873
CT
77 PLC PLC
M2857
RND
61 M2874
TOUCH
PROBE
78 PLC PLC
M2858
CC
62 M2880
TOOL
DEF
84 PLC PLC
M2859
C
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
P
67 M2885 89 PLC PLC
M2864 68 M2886 90 PLC PLC
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

2/97 TNC 406/TNC 306 8 Key simulation 4-103
Marker Function
inhibit
Key-
code
Marker Function
inhibit
Key-
code
Set Reset
M2891
NO
ENT
95 M2907
0
111 PLC PLC
M2892 STOP 96 M2908
1
112 PLC PLC
M2893 EXT 97 M2909
4
113 PLC PLC
M2894
CL
PGM
98 M2910
7
114 PLC PLC
M2895
DEL
99 M2911 115 PLC PLC
M2896 100 M2912
2
116 PLC PLC
M2897
ENT
101 M2913
5
117 PLC PLC
M2898
GOTO
102 M2914
8
118 PLC PLC
M2899 103 M2915
END
119 PLC PLC
M2901
CE
105 M2920
+
/
124 PLC PLC
M2902
IV
106 M2921
3
125 PLC PLC
M2903
Z
107 M2922
6
126 PLC PLC
M2904
Y
108 M2923
9
127 PLC PLC
M2905
X
109 PLC PLC
M2906
Q
110 PLC PLC

4-104 TNC 406/TNC 306 8 Key simulation 2/97
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 09 01 02 03 04 05 06 07
Key code for changeover keys at right of screen:
xx52 (Hex)
xx results as follows:
GRAPHICS
TEXT
SPLIT
SCREEN
01
00
Special codes:
0080 (Hex): NC-Start
0081 (Hex): NC-Stop
The HEX-Code must be calculate to the Decimal-Code before entered in W516!

2/97 TNC 406/TNC 306 8 Key simulation 4-105
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 CASE W272 ;Interrogate - operating mode
. . .
70 CM 3 ;Positioning with manual entry
. . .
75 ENDC
. . .
1102 EM ;End main program
1103 LBL 3 ;Operating mode: Positioning with manual entry
1104 L M10 ;Key simulation active?
1105 SN M2896 ;No, then disable "Position-transfer" key
1106 L M2182 ;Disabled key pressed?
1107 CMT 31 ;Yes, then call key simulation
1108 EM
1109 LBL 31 ;Key simulation
1110 L M10 ;Key simulation active?
1111 R M2896 ;Yes, then enable "Position-transfer" key
1112 SN M10 ;Otherwise set key simulation active
1113 CASE B200 ;Perform single-step
1114 CM 130 ;Key L(line)
1115 CM 131 ;Key X
1116 CM 132 ;Key "Position-transfer"
1117 CM 133 ;Key Y
1118 CM 132 ;Key "Position-transfer"
1119 CM 134 ;Key Z
1120 CM 132 ;Key "Position-transfer"
1121 CM 135 ;Key "END-BLOCK"
1122 CM 141 ;Reset key simulation
1123 ENDC
1124 EM
1125 LBL 130 ;L(ine)
1126 L K60 ;Key-code for L(ine)
1127 = W102
1128 CM 136 ;Simulate key
1129 EM
1130 LBL 131 ;X
1131 L K109 ;Key-code for X
1132 = W102
1133 CM 136 ;Simulate key
1134 EM
1135 LBL 132 ;"Position-transfer"
1136 L K100 ;Key-code for "Position-transfer"
1137 = W102
1138 CM 136 ;Simulate key
1139 EM

4-106 TNC 406/TNC 306 8 Key simulation 2/97
1140 LBL 133 ;Y
1141 L K108 ;Key-code for Y
1142 = W 102
1143 CM 136 ;Simulate key
1144 EM
1145 LBL 134 ;Z
1146 L K107 ;Key-code for Z
1147 = W102
1148 CM 136 ;Simulate key
1149 EM
1150 LBL 135 ;"END BLOCK"
1151 L K119 ;Key-code for "END BLOCK"
1152 = W102
1153 CM 136 ;Simulate key
1154 EM
1155 LBL 136 ;Key simulation
1156 L M2813 ;Strobe - key transfer from W516
1157 JPT 137 ;Still set, then wait
1158 L B200 ;Case byte
1159 + K+1
1160 = B200 ;Increment case byte
1161 L W102 ;Buffered key-code
1162 = W516 ;To NC
1163 LN M2813
1164 S M2813 ;Set strobe (activate simulation)
1165 EM
1166 LBL 137 ;Return marker
1167 EM
1168 LBL 141 ;End key simulation
1169 L M2813 ;Simulation performed?
1170 JPT 137 ;No, then wait
1171 L K+0
1172 = B200 ;Reset step counter
1173 L M10
1174 R M10 ;Reset marker "Key simulation active"
1175 R M2182 ;Reset marker "Disabled key pressed"
1176 EM

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


4-110 TNC 406/TNC 306 8 Key simulation 2/97
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 NC-start (edge evaluation) 1A PLC PLC
M2464 Complement NC-start
M2449 Rapid traverse 1B
M2465 Complement rapid traverse
M2488 NC-stop ("0" signifies stop)
M2450 Memory function for axis-direction keys 1C
M2466 Complement memory function for axis-
direction keys
M2451 Feed enable 1D
M2467 Complement feed enable
M2456 Manual traverse X+ 1I
M2472 Complement manual traverse X+
M2457 Manual traverse X 1J
M2473 Complement manual traverse X
M2458 Manual traverse Y+ 1K
M2474 Complement manual traverse Y+
M2459 Manual traverse Y 1L
M2475 Complement manual traverse Y

2/97 TNC 406/TNC 306 8 Key simulation 4-111
Marker Function Error
message
Set Reset
M2460 Manual traverse Z+ 1M PLC PLC
M2476 Complement manual traverse Z+
M2461 Manual traverse Z 1N
M2477 Complement - manual traverse Z
M2462 Manual traverse 4+ 1O
M2478 Complement manual traverse 4+
M2463 Manual traverse 4 1P
M2479 Complement manual traverse 4
M2452 Manual traverse 5+ 2M
M2468 Complement manual traverse 5+
M2453 Manual traverse 5 2N
M2469 Complement manual traverse 5
Example:
NC-start key with two contacts I128 and I129
axis-direction key X+ with one contact I130
.
71 L I128 ;First contact NC-start key
72 = M2448 ;NC-start
73 LN I129 ;Second contact NC-start key
74 = M2464 ;Complement NC-start
.
100 L I130 ;Axis-direction key X+
101 = M2456 ;Manual traverse X+
102 LN I130
103 = M2472 ;Complement - manual traverse X+

4-112 TNC 406/TNC 306 9 Short circuit/probing 2/97
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.
Max. measuring range
(MP6130)
F
2
F2 = Probing feed rate (MP6120)

2/97 TNC 406/TNC 306 9 Short circuit/probing 4-113
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]
Set Reset
M2502 NC STOP with deflected stylus in all modes PLC 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

4-114 TNC 406/TNC 306 9 Short circuit/probing 2/97
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
Set Reset
M2617 Probing stop in TOUCH PROBE MANUAL PLC PLC

2/97 TNC 406/TNC 306 9 Short circuit/probing 4-115


4-116 TNC 406/TNC 306 9 Short circuit/probing 2/97


2/97 TNC 406/TNC 306 10 Handwheel 4-117
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] Effective from rapid traverse rate:
MP1010.x [mm/min]
0 20 12000
1 10 6000
2 5 3000
3 2.5 1500
4 1.25 750
5 0.625 80
6 0.312 80
7 0.156 80
8 0.078 80
9 0.039 80
10 0.019 80

4-118 TNC 406/TNC 306 10 Handwheel 2/97
MP7670.0 Minimum subdivision factor for handwheel HR 330 and HR 130
Entry range: 0 to 10
Set Reset
M2789 Operating mode "Handwheel" PLC PLC
0=highlight display on "Increment"
1= highlight display on "Interpolation factor"
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 I173 O109
Function key B I174 O110
Function key C I175 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

2/97 TNC 406/TNC 306 10 Handwheel 4-119
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%

4-120 TNC 406/TNC 306 11 Analog inputs 2/97
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."

2/97 TNC 406/TNC 306 11 Analog inputs 4-121


4-122 TNC 406/TNC 306 12 Jog increment positioning 2/97
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 Error Message Set Reset
M2052 Operating mode "Electronic Handwheel"
also W272
NC NC
M2497 Enable edge evaluation of PLC Inputs PLC PLC
M2498 Enable increment positioning PLC PLC
M2512 Increment positioning X+ 2A PLC PLC
M2528 Complement increment positioning X+
M2513 Increment positioning X 2B PLC PLC
M2529 Complement increment positioning X
M2514 Increment positioning Y+ 2C PLC PLC
M2530 Complement increment positioning Y+
M2515 Increment positioning Y 2D PLC PLC
M2531 Complement increment positioning Y
M2516 Increment positioning Z+ 2E PLC PLC
M2532 Complement increment positioning Z+
M2517 Increment positioning Z 2F PLC PLC
M2533 Complement increment positioning Z
M2518 Increment positioning IV+ 2G PLC PLC
M2534 Complement increment positioning IV+
M2519 Increment positioning IV 2H PLC PLC
M2535 Complement increment positioning IV
M2520 Increment positioning V+
2I
PLC PLC
M2536 Complement increment positioning V+
M2521 Increment positioning V 2J PLC PLC
M2537 Complement increment positioning V

2/97 TNC 406/TNC 306 12 Jog increment positioning 4-123
Example:
Axis direction button X+ (I138)
Axis direction button X (I133)
L M2052 Electronic handwheel mode
L M2052 Operating mode
L M2052 Electronic handwheel mode
CMT 10 Electronic handwheel
.
.
EM End of main program
.
.
LBL 10
L M2052
S M2498 Enable increment positioning
R M2512 Reset increment positioning
markers for X axis
R M2513
S M2528
S M2529
L M1638 Increment positioning X+
AN I133
S M2512
R M2528
L M1633 Increment positioning X
AN I138
S M2513
R M2529
EM
.
.
.

4-124 TNC 406/TNC 306 12 Jog increment positioning 2/97


2/97 TNC 406/TNC 306 13 Datum correction 4-125
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 Datum correction for X axis
D532 Datum correction for Y axis
D536 Datum correction for Z axis
D540 Datum correction for axis 4
D544 Datum correction for axis 5
1)
1)
only TNC 406

4-126 TNC 406/TNC 306 13 Datum correction 2/97
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 ;activate module for datum correction
L D896 ;value from MP4210.32
= D536
... ;for the other axis the correction value 0 must be entered
...
L M10
S M2716
EM
LBL 201 ;deactivate module for datum correction
L D900 ;value from MP4210.33
= D536
L M10
S M2716
EM
.
.

2/97 TNC 406/TNC 306 14 Electrode changer 4-127
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 DEF 1 L+2.73 R+5
CYCL DEF 3.0 TOOL DEFINITION
CYCL DEF 3.1 T2 R+2.7
CYCL DEF 3.2 X+10.3 Y15.02
CYCL DEF 3.3 Z+18.15 C+1.23
.
.
.
TOOL CALL 1 Z U+0.42
.
.
.
TOOL CALL 2 Z U+2.24
.
.
.

4-128 TNC 406/TNC 306 14 Electrode changer 2/97
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 Tool Number (if MP7480.0 = 1 or 2)

2/97 TNC 406/TNC 306 14 Electrode changer 4-129
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
MP4210.24
X-axis rack positions for electrode 1 to 5
(D848 to D864)
MP4210.30
to
MP4210.34
Y axis rack position for electrode 1 to 5
(D888 to D904)
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)

4-130 TNC 406/TNC 306 14 Electrode changer 2/97
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"
2 0 < T-code < = Tmax and SPIREG = 0
=> No current tool, select new tool only
3 T-code = 0 and 0 < SPIREG <= Tmax
=>Replace old tool, no new tool
4 0 < T - code <= Tmax and 0 < SPIREG <= Tmax
=> Replace old tool, select new tool
5 T-code = SPIREG
=> No T-code is sent from the NC to the PLC or direct acknowledgment sent from
the PLC
Note: T-code = New tool number transmitted to W262
Tmax = Maximum tool number (i.e. 5)
SPIREG = Current tool number

2/97 TNC 406/TNC 306 14 Electrode changer 4-131
14.2.1 PLC module "TOOL CALL"
T-code
<=
Tmax
T-code
=
SPIREG
Module:
PLC POS.
NEUTRAL
SPIREG
=
0
Replace Old
Tool
T code
=
0
Module
PLC POS.
NEUTRAL
YES
YES
YES
NO
YES
NEW TOOL
SELECT
Module
Module:
Update necessary
operands &
TOOL CALL
Return to
NC program
ERROR
"INCORRECT
TOOL
NUMBER"
NO
Automatic Electrode Change
acknowledge
T-code > Tmax
T-code = SPIREG
NO
SPIREG = 0
NO
Axis X and 4
in Position
?
NO
YES

4-132 TNC 406/TNC 306 14 Electrode changer 2/97
14.2.2 PLC module "REPLACE OLD TOOL"
Push
SPIREG - 1
To Stack
Module:
POC. REG.
TOOL RACK
POS. REACHED
Module:
PLC. POS.
Z DOWN
Tool Unclamped
and set
SPRIEG to 0
Module:
Z UP
PLC. POS.
TOOL CLAMP TOOL CLAMP
END
Return Current Electrode to Original Rack Position
Yes
No
?

2/97 TNC 406/TNC 306 14 Electrode changer 4-133
14.2.3 PLC Module "PLC POS. NEUTRAL"
PLC position
To Z UP
position
Achse Z
in position
Move to Clearance position in X, Y, & Z axes
PLC pos. in X and Y
to neutral pos.
X and Y
END
No
No
Yes
Yes
Axes X und Y
in position

4-134 TNC 406/TNC 306 14 Electrode changer 2/97
14.2.4 PLC module "SELECT NEW TOOL"
Gather New Electrode from Defined Rack Position
Push
T-code -1
to Stack
Module:
POC. REG.
UNCLAMP
TOOL
Module:
PLC. POS.
Z DOWN
Clamp tool &
load SPIREG
with T-code
Module:
PLC. POS.
NEUTRAL
END
No
Yes
RACK
POSITION
REACHED
?

2/97 TNC 406/TNC 306 14 Electrode changer 4-135
14.2.5 PLC module "POC. REG."
LOAD
"POSREG"
with stack
contents
= 0
Module:
PLC. POS. RACK
POSITION 1
POSREG
POSREG
= 1
Module:
PLC. POS. RACK
POSITION 2
Module:
PLC POS. RACK
POSITION 3
POSREG
= 2
POSREG
= 3
Module:
PLC. POS. RACK
POSITION 4
NO
NO
POSREG
= 4
Module:
PLC. POS. RACK
POSITION 5
YES
(DEPENDENT ON Tmax)
END
Determine Electrode Rack Position
NO
NO
NO
YES
YES
YES
YES
POSREG = 0
POSREG = 1
POSREG = 2
POSREG = 3
POSREG = 4

4-136 TNC 406/TNC 306 14 Electrode changer 2/97
14.2.6 PLC Module "PLC POS. POC. 1/2/3/4/5"
Move to Corresponding Rack Position
Assign Xp, Yp to the
addresses (D528, D532)
Assign PLC positioning
feed rate to the addres-
Set marker Mpocpos
for PLC pos. is active
Set start marker to
activate PLC pos.
Marker
Mpocpos
no set
Yes
Mpocpos = 0
in pos.
Axes X
and Y not
No Mpocpos = 1
ses (W560, W562)
in X, Y (M2704, M2705)
Set marker Mxpyp rack
pos. reached
END
Yes
No
Axes X and Y
in position

2/97 TNC 406/TNC 306 14 Electrode changer 4-137
14.2.7 PLC module "PLC POS. Z DOWN"
Move to Z Axis Position for Electrode Change
PLC Position
to Z DOWN
Position
END
Yes
No
Axis Z
in Position
14.2.8 PLC module "PLC. POS. Z UP"
Move to Z Axis Clearance Position
PLC Position
to Z UP
Position
Axis Z
in Position
END
No
Yes

4-138 TNC 406/TNC 306 15 Commissioning and start-up procedure 2/97
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 Function
95148 List of machine parameters (see "Machine parameters")
807667 PLC-operation (see "PLC-programming")
531210 Erasing the entire physical RAM memory (not NC-programs, erosion tables
and datum shift table)
75368 Automatic offset adjustment (see section "Servo positioning")
105296 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.

2/97 TNC 406/TNC 306 15 Commissioning and start-up procedure 4-139
The following curve represents the ideal response of the tachometer signal:
U [V]
t [ms]
U
max
T
Tacho-signal
1 Overshoot
Given step
function
The following curves show incorrectly adjusted tachosignals:
U [V]
t [ms]
U
max
Several overshoots
Incorrect!
P-component of the subordinate control loop too
high or I-component too low
U [V]
t [ms]
U
max
Incorrect!
Too flat
P-component of the subordinate control loop too
low or I-component too high

4-140 TNC 406/TNC 306 15 Commissioning and start-up procedure 2/97
Determining the acceleration
The maximum acceleration time T can be deduced from the step response.
U [V]
t [ms]
U
max
T
To calculate the acceleration, increase T by 10%.
From this it follows that:
a = v
max
v
max
= velocity at U
max
----------
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.

2/97 TNC 406/TNC 306 15 Commissioning and start-up procedure 4-141


4-142 TNC 406/TNC 306 15 Commissioning and start-up procedure 2/97
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).

2/97 TNC 406/TNC 306 15 Commissioning and start-up procedure 4-143
No
No
Yes
No
Yes
No
No
Yes
Yes
Start reference
traverse with
axis direction keys
?
(Both types of
referencing must
be performed!)
Axis traverse
direction correct?
(defined in MP1040
and MP210)
"Cross positioning error"
or incorrect
traverse direction
after passing over
ref. marks?
Line voltage on
START
Erase POWER INTERRUPTED error message with CE
Control voltage on;
axes are in the control loop
Gross
positioning error
(MP1040 or
MP210 incorrect)
?
Traverse
direction correct?
(as defined
in MP1320)
Line
voltage
off
Change
MP210
MP1040
MP1320
Reference traverse with
machine START button
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!

4-144 TNC 406/TNC 306 15 Commissioning and start-up procedure 2/97
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 REF-
display 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 Analog voltage for rapid
traverse
9 V
MP1060 Acceleration As measured on the machine
(see "Preparation of the machine")
MP1810 k
v
factor 1
These values can usually be further optimized.

2/97 TNC 406/TNC 306 15 Commissioning and start-up procedure 4-145
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)
MP1810: Increase entry value until position loop oscillates or
until an overshoot occurs after the acceleration ramp.
Machining feed
MP1810 (k
v
factor): Reduce entry value until no oscillations are detectable.
U [V]
t [s]
U [V]
t [s]

Connect storage oscilloscope to tachometer


of the servo-amplifier of X axis.
Enter following program in
"PROGRAMMING AND EDITING"
operating mode:
LBL 1
X 100
1)
R0 F
2)
...
X 0 R0 F
2)
...
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%.
Repeat adjustment for axes Y, Z, IV and V.
1)
Program the traverse paths for the axis concerned as large as possible.
2)
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.

4-146 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-147
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 Position monitoring 1.2 lag in rapid traverse
MP1720 Position monitoring (EMERGENCY
STOP)
1.4 lag in rapid traverse
MP1140 Movement monitoring 0.5 [V]
MP1030 Positioning window 0.005 [mm]
MP1110 Standstill monitoring 0.1 [mm]
If the drives of the machine permit narrower limits, these may be entered.

4-148 TNC 406/TNC 306 15 Commissioning and start-up procedure 2/97


3/2000 TNC 416/TNC 406/TNC 306 5-1
Machine parameters Contents
1 What are machine parameters?
52
1.1 User parameters
52
2 Input/output of machine parameters
53
2.1 Entry format
53
2.2 Activating the machine parameter settings
54
2.3 Changing input values
54
3 List of machine parameters
55
3.1 Measuring systems and machines
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

5-2 TNC 416/TNC 406/TNC 306 What are machine parameters? 3/2000
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 to 999 Measuring systems and machines
1000 to 1399 Positioning
1700 to 1999 Operation with servo lag
2000 to 2999 Eroding
4000 to 4999 Integrate PLC
5000 to 5999 Setting the data interface
6000 to 6199 Probing
7200 to 7399 Display and programming
7400 to 7599 Machining and program run
7600 to 7699 Hardware
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").

3/2000 TNC 416/TNC 406/TNC 306 Input/output of machine parameters 5-3
2 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/s
2
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 + 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
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.

5-4 TNC 416/TNC 406/TNC 306 Input/output of machine parameters 3/2000
2.2 Activating the machine parameter settings
When the values for the machine have been entered, exit the machine parameter list by pressing
END

. Missing or incorrect entries result in error messages from the control that prompt you to
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.

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-5
3 List of machine parameters
3.1 Measuring systems and machines
Machine
parameter
Function and input Change
via
Reaction Page
MP10 Active axes
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-5
MP31 Amplitude monitoring of the measuring
system signals
Entry range: 1 to 15 (TNC 306)
% xxxxx(TNC 416/406)
X +0 = Monitoring not active
+1 = Monitoring active
Y +0 = Monitoring not active
+2 = Monitoring active
Z +0 = Monitoring not active
+4 = Monitoring active
IV +0 = Monitoring not active
+8 = Monitoring active
V
*
+0 = Monitoring not active
+16 = Monitoring active
RESET 4-8
MP32 Frequency monitoring
Entry range: 1 to 15 (TNC 306)
% xxxxx(TNC 416/406)
X +0 = Monitoring not active
+1 = Monitoring active
Y +0 = Monitoring not active
+2 = Monitoring active
Z +0 = Monitoring not active
+4 = Monitoring active
IV +0 = Monitoring not active
+8 = Monitoring active
V
*
+0 = Monitoring not active
+16 = Monitoring active
RESET 4-9
*

only TNC 416/406

5-6 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
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
*
only TNC 416/406

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-7
Machine
parameter
Function and input Change
via
Reaction Page
MP115.0 Position encoder inputs 1V
PP
or 11A
Input: %xxxxx
0 = 1 V
PP
1 = 11A
New MP in TNC 416 software 286 180-01
RESET -
MP115.1 Reserved
Input: %00000
New MP in TNC 416 software 286 180-01
MP115.2 Input frequency of position encoders
Input: %xxxxx
0 = 50kHz for 1V
PP
; 50kHz for 11A
1 = 350kHz for 1V
PP
; 150kHz for 11A
New MP in TNC 416 software 286 180-01
RESET -
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
*
RESET 4-12
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
RESET 4-7
MP330.0-4 Grating period
Entry range: 1 to 360 [m] or [1/1000 ]
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
4-6

5-8 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
MP331.0-4 Distance per number of signal periods out of
MP332
Input: 0.001 to 99 999.999 [mm or ]
New MP in TNC 416 software 286 180-01
New MP in TNC 406 software 280 620-08
Reset
MP332.0-4 Number of signal periods in the distance from
MP331
Input: 1 to 16 777 215
New MP in TNC 416 software 286 180-01
New MP in TNC 406 software 280 620-08
Reset
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 MP in TNC 416 software 286 180-01
New MP in TNC 406 software 280 620-08
Reset
MP410 Designation of axis 4
Entry value: 0 to 2
0 = A
1 = B
2 = C
RESET 4-11
MP411
*
Designation of axis 5
Entry value: 0 to 5
0 = A
1 = B
2 = C
3 = U
4 = V
5 = W
4-11
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 []
-

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-9
Machine
parameter
Function and input Change
via
Reaction Page
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)
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
4-22
MP910
MP920
MP910.0
MP910.1
MP910.2
MP910.3
MP910.4
*
MP920.0
MP920.1
MP920.2
MP920.3
MP920.4
*
Software limit switch range 1
Entry range linear axis:
30000.000 to +30000.000 [mm]
Entry range rotary axis:
30000.000 to +30000.000 []
X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V
4-13
MP911
MP921
MP911.0
MP911.1
MP911.2
MP911.3
MP911.4
*
MP921.0
MP921.1
MP921.2
MP921.3
MP921.4
*
Software limit switch range 2
Entry range, linear axis:
30000.000 to +30000.000 [mm]
Entry range, rotary axis:
30000.000 to +30000.000 []
X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V
4-13

5-10 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
MP912
MP922
MP912.0
MP912.1
MP912.2
MP912.3
MP912.4
*
MP922.0
MP922.1
MP922.2
MP922.3
MP922.4
*
Software limit switch range 3
Entry range, linear axis:
30000.000 to +30000.000 [mm]
Entry range, rotary axis:
30000.000 to +30000.000 []
X+
Y+
Z+
IV+
V+
X
Y
Z
IV
V
414
MP950.04 Datum for positioning blocks with M92
Entry range, linear axis:
30000.000 to +30000.000 [mm]
Entry range, rotary axis:
30000.000 to +30000.000 []
Values referenced to machine datum (see
MP960.x)
477
MP960.04 Machine datum
Entry range:
30000.000 to +30000.000 [mm] or []
Values referenced to scale datum
477
*only TNC 416/406

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-11
3.2 Positioning
Machine
parameter
Function and input Change
via
Reaction Page
MP1010.04 Rapid traverse
Entry range, linear axis:
80 to 30000 [mm/min]
Entry range, rotary axis:
80 to 30000 [/min]
442
MP1020.04 Manual feed
Entry range, linear axis:
80 to 30000 [mm/min]
Entry range, rotary axis:
80 to 30000 [/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 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 4
th
axis +0 = Positive
+8 = Negative
Bit 4
*
5
th
axis +0 = Positive
+16 = Negative
47
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/s
2
]
441
MP1070 Radial acceleration
Entry range: 0.001 to 3.0 [m/s
2
]
445
MP1090 Default feed rate during positioning
Entry range: 0 to 30000 [mm/min]
123 460
MP1092
MP1093
MP1094
MP1095
MP1096
MP1097
Circular feed rates in the disk cycle (marker M2640)
Entry range: 0 to 30000 [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

5-12 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
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]
Removed in TNC 406 as of software version
280 620-07, because the acceleration monitoring
is now automatic.
447
MP 1220 Automatic drive offset adjustment
Entry range: 0 to 65535 [s]
0 = No automatic adjustment
444
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 4
th
axis +0 = Positive
+8 = Negative
Bit 4
*
5
th
axis +0 = Positive
+16 = Negative
433
MP1330.04 Feed rate for crossing the reference marks
Entry range: 80 to 30000 [mm/min]
433
MP1331.04 Feed rate when leaving reference end position
(only for encoders with one reference mark,
MP1350 = 1)
Entry range: 80 to 500 [mm/min]
433
MP1340.04 Axis sequence for crossing the reference marks
Entry range: 0 to 5
0 = No reference mark evaluation
1 = X axis first
2 = Y axis first
3 = Z axis first
4 = 4
th
axis first
5 = 5
th
axis first
*
433
only TNC 416/406

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-13
Machine
parameter
Function and input Change
via
Reaction Page
MP1350.04 Type of reference mark approach
Entry values: 0 or 1
+0 = Encoder with distancecoded
reference marks (for square-wave inputs
the encoder must have a 5-fold EXE if
distance-coded reference marks are used.)
+1 = Encoder without distancecoded reference
marks
434
3.3 Operation with servo lag
Machine
parameter
Function and input Change
via
Reaction Page
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


5-14 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
MP1710.04 Position monitoring for operation with lag
(erasable)
Entry range: 0 to 100,000 [mm]
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.
446
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 Change
via
Reaction Page
MP2010
MP2010.0
MP2010.1
Characteristic gradient
Entry range: 0.001 to 60. 000
Input characteristic range 2.5 to 5 V
Input characteristic range 0 to 2.5 V
456
MP2020
MP2020.0
MP2020.1
Multiplication factor
Entry range: 1.000 to 10. 000
Input characteristic range 2.5 to 5 V
Input characteristic range 0 to 2.5 V
456
MP2030
MP2030.0
MP2030.1
Characteristic kink
Entry range: 0 to 100 [%]
Input characteristic range 2.5 to 5 V
Input characteristic range 0 to 2.5 V
457
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

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-15
Machine
parameter
Function and input Change
via
Reaction Page
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]
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).
123 460
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]
123 4-54
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]
123 4-61

5-16 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
MP2120 Arc detection
(electrode retraction time)
Entry range: 1 to 99.9 [s]
123 4-60
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 = Electrode braked between each block
1 = If the path is geometrically continuous,
the electrode moves at constant speed
2 = Electrode moves at constant speed even
if the path is non-continuous
Removed in TNC 406 as of software 280 620-07
123
MP2199 Erosion table on/off
Entry values: 0 or 2
0 = Tables not active
2 = Tables active
4-62

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-17
3.5 Integral PLC
Machine
parameter
Function and input Change
via
Reaction Page
MP4010 PLC program from RAM or from EPROM
Entry value: 0 or 1
0 = EPROM
1 = RAM
7-21
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 65535 (in units of 65536 m)
4-16
MP4110.0-47 PLC: programmed duration for timers 047
Entry range: 0 to 65535 (in units of
40 ms)20/40 ms, depending of MP1700)
7-17
MP4120.0-31 PLC: counter preset value for counters 031
Entry range: 0 to 65535 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 65535
7-16
MP4310.0-15 Setting a number in the PLC (W976 ... W1006)
Entry range: 0 to 65535
7-16
MP4320.0-7 Setting a number in the PLC (W1008 ... W1022)
Entry range: 0 to 65535
7-16

5-18 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
3.6 Adaptation of the data interface
Machine
parameter
Function and input Change
via
Reaction Page
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 Seven or eight data bits
+0 = 7 data bits
+1 = 8 data bits
Bit 1 No function
Bit 2 Transmission stop via RTS
+0 = inactive
+4 = active
Bit 3 Transmission stop via DC3
+0 = inactive
+8 = active
Bit 4 Character parity even or odd
+0 = even
+16 = odd
Bit 5 Character parity required
+0 = not required
+32 = required
Bit 6 No function
Bit 7 Number of stop bits
+0 = 2 stop bits
+128 = 1 stop bit
123 8-27
MP5100 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
0 = Check block number sequence
1 = No check
123 8-26

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-19
3.7 Probing
Machine
parameter
Function and input Change
via
Reaction Page
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]
4-114
MP6150 Retraction feed rate in probing cycle
Entry range: 1 to 30000 [mm/min]
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/ 286 182/
280 620 280 621 280 622
0 = English English English
1 = German German German
2 = French Swedish Czech
3 = Italian Finnish Reserved
123
MP7231 OEM label
Entry values: 0 to 99
0 = standard label
1 to 99 = number of PLC error message,
displayed as OEM label


5-20 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
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
123 9-3
MP7241 Inhibit the blocks ELCALL and WPCALL
Entry value: 0 or 1
0 = Soft keys inhibited
1 = Soft keys not inhibited

MP7245.0
MP7245.1
Inhibit the HEIDENHAIN standard cycles 1 to 15
Entry range: 0 to 65535
0 = No cycle inhibited
Inhibit HEIDENHAIN cycles 16 to 31
Entry range: 0 to 65535
0 = No cycle inhibited
4-86
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

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-21
Machine
parameter
Function and input Change
via
Reaction Page
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
0 = Comma
1 = Point
123 4-89
*)
only TNC 306

5-22 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
MP7290.0-5 Display step The finest resolution is 1/10 m.
Entry values: 0 to 6
Value of MP Resolution of display
m inch
0 0.1 m 0.00001
1 0.5 m 0.00002
2 1 m 0.0001
3 5 m 0.0002
4 10 m 0.001
5 50 m 0.002
6 100 m 0.01
3.9 Status display and graphics depiction
Machine
parameter
Function and input Change
via
Reaction Page
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.
The Q parameters are always deleted after power
interruption, and the tool data are always retained.
123 4-84
MP7305 GOTO to a CYCL CALL in mode program run
is permitted
Entry values: 0 or 1
0 = GOTO permitted
1 = GOTO not permitted


3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-23
Machine
parameter
Function and input Change
via
Reaction Page
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 4-79
MP7315 Tool radius for graphic simulation without
TOOL CALL
Entry range: 0.000 to 30 000.000 [mm]

MP7316 Tool penetration depth


Entry range: 0.000 to 30 000.000 [mm]

MP7330.0-
15
Determination of user parameters accessible via
MOD function
Entry range: 0 to 9999.99 (number of desired
machine parameter)
4-88

5-24 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
3.10 Color adjustment
Machine
parameter
Function and input Change
via
Reaction Page
MP7350
*
MP7351
*
MP7352
*
MP7352.0
MP7352.1
MP7352.2
MP7353
*
MP7353.0
MP7353.1
MP7353.2
MP7354
*
MP7354.0
MP7354.1
MP7354.2
MP7354.3
MP7355
*
MP7355.0
MP7355.1
MP7355.2
MP7355.3
MP7356
*
MP7356.0
MP7356.1
MP7356.2
MP7357
*
MP7357.0
MP7357.1
MP7358
*
MP7358.0
MP7358.1
MP7360
*
MP7360.0
MP7360.1
MP7360.2
MP7360.3
MP7360.4
Window frame $30200C
Error messages $3F0000
Operating mode "Machine"
Window background $000000
Operating-mode display $342008
Dialog $3F3828
Operating-mode Programming
Window background $000000
Operating-mode display $342008
Dialog $3F3828
Program-text display Machine
Background $080400
General program text $38240C
Current block $38341C
Background of active window $302410
Program-text-display Programming
Background $080400
General program text $38240C
Current block $38341C
Background of active window $302410
Status-window
Background $0C0800
Axis positions in the status-display $3F2C18
Status-display, except axis position $3F280C
Soft-key display Machine
Background $000000
Symbols $3F3828
Soft-key display Programming
Background $000000
Symbols $3F3828
Graphics: 3-D view
Background $000000
Surface $203038
Front face $0C1820
Text-display in graphics window $3F3F3F
Side face $102028
4-91
*
) only TNC 416/406

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-25
Machine
parameter
Function and input Change
via
Reaction Page
4-92 MP7361
*
MP7361.0
MP7361.1
MP7361.2
MP7361.3
MP7361.4
MP7362
*
MP7362.0
MP7362.1
MP7362.2
MP7362.3
MP7365 *
MP7365.0
MP7365.1
MP7365.2
MP7365.3
MP7365.4
MP7365.5
MP7365.6
MP7365.7
Graphics: view in three planes
Background $000000
Plan (Grating) $203038
Front and side view $203038
Axis cross and text $3F3F3F
Cursor $3F0000
Additional status-display in graphics window
Background graphics window $080400
Background status display $0C0800
Status symbols $38240C
Status values $3F2C18
Colors of the oscilloscope
Background $000000
Channel 1 $003F3F
Channel 2 $3F3F00
Channel 3 $003F00
Channel 4 $3F1230
Reserved $000000
Grating $30200C
Cursor and text $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
0 = Effective in three axes
1 = Effective in working plane
123 4-87
MP7411 Rotation of coordinate system during datum shift
from datum table
Entry values: 0 or 1
0 = Rotate coordinate system
1 = No rotation
123

5-26 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
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
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
123 4-99
MP7460 Constant feed rate in corners
Entry range: 0 to 179.999 []
123 4-45
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)
MP7480 Output of tool numbers with TOOL CALL block
Entry values: 0 to 2
0 = No output
1 = Output of tool number only when tool
number changes
2 = Output of tool number with every TOOL
CALL block
4-128

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-27
Machine
parameter
Function and input Change
via
Reaction Page
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

MP7491 Activating software limit switch in test graphic


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
Reaction Page
MP7620 Feed rate override
Entry range: 0 to 7
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
123
MP7640 Handwheel definition
Entry values: 0 or 1
0 = No handwheel is active
1 = HR 330
2 = HR 130
3 = HR 410
4-117

5-28 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000
Machine
parameter
Function and input Change
via
Reaction Page
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
0 = Positive counting direction
1 = Negative counting direction
4-117
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 65535 [increments]
4-117
MP7670.0
MP7670.0
MP7670.1
MP7670.2
Smallest interpolation factor for electronic
handwheel (HR 410/HR 130)
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
4-118
MP7671
MP 7671.0
MP 7671.1
MP 7671.2
% Factor from MP1020.x for feed rate for HR410
% Factor for HR 410 at smallest feed rate
% Factor for HR 410 at medium feed rate
% Factor for HR 410 at greatest feed rate
Input range: 0 to 1000%
4-119
MP7680 Memory function for direction buttons
Entry values: 0 or 1
0 = Not stored
1 = stored
4-110

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-29
Machine
parameter
Function and input Change
via
Reaction Page
MP7690 Memory test at switch-on
Entry range: 0 to 3
RAM test
Bit 0 + 0 = Test performed
+ 1 = Test not performed
EPROM test
Bit 1 + 0 = Test performed
+ 2 = Test not performed
4-90

3/2000 TNC416/TNC 406/TNC 306 List of Markers 61
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

62 TNC416/TNC 406/TNC 306 List of Markers 3/2000
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

3/2000 TNC416/TNC 406/TNC 306 List of Markers 63
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

64 TNC416/TNC 406/TNC 306 List of Markers 3/2000
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

3/2000 TNC416/TNC 406/TNC 306 List of Markers 65
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

66 TNC416/TNC 406/TNC 306 List of Markers 3/2000
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

3/2000 TNC416/TNC 406/TNC 306 List of Markers 67
Marker Function Set Reset Page
M2794 Changed values in eroding parameters Q96 to Q98
(without erosion tables: Q90 to Q99)
NC PLC 4-67
M2795
1)
Changed values in current table during program run
(M2796)
NC PLC 4-67
M2796
1)
Transfer changed values in current table to the PLC
(M2795)
PLC NC 4-67
M2797 Manual generator setting
M2798
1)
Changed values in the status line and Q99 during erosion NC PLC 4-67
M2799
2)
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

68 TNC416/TNC 406/TNC 306 List of Markers 3/2000
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

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 69
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 NC

PLC
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 4-101
W274 Code number for the pressed disabled key, signal via M2182 NC

PLC 4-101
D276 Code number which is not evaluate from the NC NC

PLC
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

610 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 3/2000
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) PLC

NC 4-24
W564 Feed, axis Z (strobe M2706) PLC

NC 4-24
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 PLC

NC 4-22
W580 Axis error compensation, axis Z PLC

NC 4-22
W582 Axis error compensation, axis 4 PLC

NC 4-22

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 611
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....
.B603
Vacant NC

PLC
B604...
B619
16-byte ASCII string EL name or WP name NC

PLC
B620....
B623
Vacant NC

PLC
B624....
B627
Vacant PLC

NC
D628
D632
D636
D640
D644
D648
Identifier 1, EL CALL
Compensation in X
Compensation in Y
Compensation in Z
Compensation in C
Undersize
Radius
Identifier 2, WP CALL
Shift in X
Shift in Y
Shift in Z
Rotation in C
PLC

NC
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

612 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 3/2000
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) NC PLC

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words
613
Word Function Transmission Page
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 TNC 416/TNC 406/TNC 306 PLC-functions 7-1
PLC Programming Contents
7
1 PLC-functions 7-5
1.1 Selecting PLC-operation 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 Test functions for the PLC-program 7-9
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 Program creation 7-12
2.1 Program structure 7-12
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 7-15
2.4 Timers and counters 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 Commands 7-26
3.1 Load and Assign Commands 7-26
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

7-2 TNC 416/TNC 406/TNC 306 PLC-functions 3/2000
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 N 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 Arithmetic commands 7-56
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 (<>)< > 7-67
3.6 Parentheses with logical gating 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 Parentheses with arithmetic commands 7-73
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

3/2000 TNC 416/TNC 406/TNC 306 PLC-functions 7-3
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) 7-93
3.12.3 Jump if Logic Accumulator = 0 (JPF) J PF 7-93
3.12.4 Call Module (CM) CM 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 7-99
3.14 Commands for STRING Execution 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 Submit Programs 7-104
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

7-4 TNC 416/TNC 406/TNC 306 PLC-functions 3/2000
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 PLC Modules for TNC 416/406 7-111
4.1 Copy in Marker or Word Range (Module 9000/9001) 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

3/2000 TNC 416/TNC 406/TNC 306 PLC-functions 7-5
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 .

7-6 TNC 416/TNC 406/TNC 306 PLC-functions 3/2000
1.2
PLC Main menu
TNC 406
PROCESSING TIME MAXIMUM: XXX%
CURRENT: XXX%
TOTAL MEMORY : XX KBYTE
VACANT MEMORY : 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
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.

3/2000 TNC 416/TNC 406/TNC 306 PLC-functions 7-7
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
X 7 8 9
Y 4 5 6
Z 1 2 3
$ 0

+
/
CE ;
END
+
*
[ <
_
/ ] >
$
EXT
DEL
MOD ENT
$
GOTO
=
A B C D E
F G H I
T U V W K L M N J
P Q R S O
NO
ENT
TE 355A
X 7 8 9
Y 4 5 6
Z 1 2 3
$ 0

+
/
CE ;
END
K L M
N
J
P Q R S O
T U V W
+
*
[ <
_
/ ] > =
$
EXT
DEL
MOD ENT
$
GOTO
A B C D E
F G H I
NO
ENT
TE 355B

7-8 TNC 416/TNC 406/TNC 306 PLC-functions 3/2000
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.

3/2000 TNC 416/TNC 406/TNC 306 PLC-functions 7-9
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.

7-10 TNC 416/TNC 406/TNC 306 PLC-functions 3/2000
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.

3/2000 TNC 416/TNC 406/TNC 306 PLC-functions 7-11
Base addresses of the individual areas:
Bit Marker M: -37888 ($FFFF6C00)
Input I: -34608
Output O: -34224
Counter C: -34032
Timer T: -33888
Word Marker B/W/D: -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").

7-12 TNC 416/TNC 406/TNC 306 Program creation 3/2000
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 I 28 ;Comment
Operation
(A, AN...)
Operand
designation
(I, O, M, T, C,
B, W, D, K)
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 PLC-
commands.
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").

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-13
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 L M2719
1 SN M2719 ;Activate the strobes for word processing
2 L M2497
3 SN M2497 ;Activate the edge evaluation
4 L M2496
5 SN M2496 ;Activate transfer of decoded M-codes
;(M1900 to M1999)
. . .
. . .
20 L M1936 ;M-Function M36
21 A M2045 ;Change-signal for M-function
22 AN M2618 ;Gap control already active?
23 CMT 36 ;Gap control
. . .
. . .
. . .
95 EM ;End main program
122 LBL 101 ;Acknowledgment for M function
. . .
. . .
125 EM
. . .
. . .
. . .
151 LBL 36 ;Gap control
152 CM 361 ;Eroding ON
153 CM 101 Acknowledgment for M functions
154 EM .
. . .
. . .
. . .
220 LBL 361 ;Eroding ON
. . .
. . .
.225 EM
. . .
. . .
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".

7-14 TNC 416/TNC 406/TNC 306 Program creation 3/2000
2.2
Address allocation
2.2.1

Operand directory
Operand Abbreviation Address range
Marker M (Marker) 0 to 3263
Input I (Input) I0 to I31; I128 to I151;
I64 to I126 (PL 400) or up to I127 (PL 410)
Output O (Output) O0 to O30;
O32 to O62(PL 400/PL 410)
Counter C (Counter) Set counter : C0 to C31
Counter-contents: C48 to C79
Release count pulse: C96 to C127
Timer T (Timer) Timer-start: T0 to T47
Timer running: T48 to T95
Byte B (Byte) 0 to 1023 (8 Bit)
Word W (Word) 0 to 1022 (16 Bit)
Double word D (Double word) 0 to 1020 (32 Bit)
Constant K 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
0 7 B0
B1023
B1022
B1021
B1020 D1020 W1020
B1
B2
B3
B4
B5
W0 D0
W2
W4 D4
W1022
.
.
.
.
.
.
.
.
.
.
.
.
High-Byte for W; Highest-Byte for D
Lowest-Byte for D
Low-Byte for W
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.

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-15
B0 to B127 Freely available, not deleted with RESET
B128 to B255 Freely available, deleted with RESET
B256 to B511 Data transfer NC

PLC
B512 to B767 Data transfer PLC

NC
B768 to B1023 Machine parameters

PLC
2.3
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
D 528
Double word with multiple function, here data for transfer from the
PLC to the NC
W516 Q-Parameter No. for numerical transfer from PLC to NC
(0 7 = Q100 Q107)
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 Function
D768 Value from MP4210.0
D772 Value from MP4210.1
D776 Value from MP4210.2
D780 Value from MP4210.3
D784 Value from MP4210.4
D788 Value from MP4210.5

7-16 TNC 416/TNC 406/TNC 306 Program creation 3/2000
Address Function
D792 Value from MP4210.6
D796 Value from MP4210.7
D800 Value from MP4210.8
D804 Value from MP4210.9
D808 Value from MP4210.10
D812 Value from MP4210.11
D816 Value from MP4210.12
D820 Value from MP4210.13
D824 Value from MP4210.14
D828 Value from MP4210.15
D832 Value from MP4210.16
D836 Value from MP4210.17
D840 Value from MP4210.18
D844 Value from MP4210.19
D848 Value from MP4210.20
D852 Value from MP4210.21
D856 Value from MP4210.22
D860 Value from MP4210.23
D864 Value from MP4210.24
D868 Value from MP4210.25
D872 Value from MP4210.26
D876 Value from MP4210.27
D880 Value from MP4210.28
D884 Value from MP4210.29
D888 Value from MP4210.30
D892 Value from MP4210.31
D896 Value from MP4210.32
D900 Value from MP4210.33
D904 Value from MP4210.34
D908 Value from MP4210.35
D912 Value from MP4210.36
D916 Value from MP4210.37
D920 Value from MP4210.38
D924 Value from MP4210.39
D928 Value from MP4210.40
D932 Value from MP4210.41
D936 Value from MP4210.42
D940 Value from MP4210.43
D944 Value from MP4210.44
D948 Value from MP4210.45
D952 Value from MP4210.46
D956 Value from MP4210.47

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-17
Address Function
W960 Value from MP 4220.0
W962 Value from MP 4220.1
W964 Value from MP 4220.2
W966 Value from MP 4220.3
W968 Value from MP 4220.4
W970 Value from MP 4220.5
W972 Value from MP 4220.6
W974 Value from MP 4220.7
W976 Value from MP 4310.0
W978 Value from MP 4310.1
W980 Value from MP 4310.2
W982 Value from MP 4310.3
W984 Value from MP 4310.4
W986 Value from MP 4310.5
W988 Value from MP 4310.6
W990 Value from MP 4310.7
W992 Value from MP 4310.8
W994 Value from MP 4310.9
W996 Value from MP 4310.10
W998 Value from MP 4310.11
W1000 Value from MP 4310.12
W1002 Value from MP 4310.13
W1004 Value from MP 4310.14
W1006 Value from MP 4310.15
W1008 Value from MP 4320.0
W1010 Value from MP 4320.1
W1012 Value from MP 4320.2
W1014 Value from MP 4320.3
W1016 Value from MP 4320.4
W1018 Value from MP 4320.5
W1020 Value from MP 4320.6
W1022 Value from MP 4320.7
MP4210.0 Set a number in the PLC
to MP4210.47 Input range: 99 999.999 to +99 999.999
MP4220 Set a number in the PLC: In the Word range W960 to W974
to MP4220.7 Input range: 80 to 30 000
MP4310.0 Set a number in the PLC: in the Word range W976 to W1022
to MP4310.15 Input range: 0 to 65 535
and
MP4320.0
to
MP4320.7

7-18 TNC 416/TNC 406/TNC 306 Program creation 3/2000
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

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-19
Timer start Timer running Machine parameter
T0 T48 MP4110.0
T1 T49 MP4110.1
T2 T50 MP4110.2
T3 T51 MP4110.3
T4 T52 MP4110.4
T5 T53 MP4110.5
T6 T54 MP4110.6
T7 T55 MP4110.7
T8 T56 MP4110.8
T9 T57 MP4110.9
T10 T58 MP4110.10
T11 T59 MP4110.11
T12 T60 MP4110.12
T13 T61 MP4110.13
T14 T62 MP4110.14
T15 T63 MP4110.15
T16 T64 MP4110.16
T17 T65 MP4110.17
T18 T66 MP4110.18
T19 T67 MP4110.19
T20 T68 MP4110.20
T21 T69 MP4110.21
T22 T70 MP4110.22
T23 T71 MP4110.23
T24 T72 MP4110.24
T25 T73 MP4110.25
T26 T74 MP4110.26
T27 T75 MP4110.27
T28 T76 MP4110.28
T29 T77 MP4110.29
T30 T78 MP4110.30
T31 T79 MP4110.31
T32 T80 MP4110.32
T33 T81 MP4110.33
T34 T82 MP4110.34
T35 T83 MP4110.35
T36 T84 MP4110.36
T37 T85 MP4110.37
T38 T86 MP4110.38
T39 T87 MP4110.39
T40 T88 MP4110.40
T41 T89 MP4110.41
T42 T90 MP4110.42
T43 T91 MP4110.43
T44 T92 MP4110.44
T45 T93 MP4110.45
T46 T94 MP4110.46
T47 T95 MP4110.47
MP4110.x Time for timers
Input range: 0 to 65 535 [PLC cycles] (= 20/40 ms depending on MP1700)

7-20 TNC 416/TNC 406/TNC 306 Program creation 3/2000
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 C48 C96 MP4120.0
C1 C49 C97 MP4120.1
C2 C50 C98 MP4120.2
C3 C51 C99 MP4120.3
C4 C52 C100 MP4120.4
C5 C53 C101 MP4120.5
C6 C54 C102 MP4120.6
C7 C55 C103 MP4120.7
C8 C56 C104 MP4120.8
C9 C57 C105 MP4120.9
C10 C58 C106 MP4120.10
C11 C59 C107 MP4120.11
C12 C60 C108 MP4120.12
C13 C61 C109 MP4120.13
C14 C62 C110 MP4120.14
C15 C63 C111 MP4120.15
C16 C64 C112 MP4120.16
C17 C65 C113 MP4120.17
C18 C66 C114 MP4120.18
C19 C67 C115 MP4120.19
C20 C68 C116 MP4120.20
C21 C69 C117 MP4120.21
C22 C70 C118 MP4120.22
C23 C71 C119 MP4120.23
C24 C72 C120 MP4120.24
C25 C73 C121 MP4120.25
C26 C74 C122 MP4120.26
C27 C75 C123 MP4120.27
C28 C76 C124 MP4120.28
C29 C77 C125 MP4120.29
C30 C78 C126 MP4120.30
C31 C79 C127 MP4120.31

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-21
MP4120.x Pre-set value for counters C0 to C31
Input range: 0 to 65 535 [PLC cycles]
2.5
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 PLC-
run. If marker M2497 is set, the following markers will be set if the signals change at the PLC-
inputs.
Marker for rising edges at the PLC-inputs:
Marker PLC-inputs
M1500 to M1531 I0 to I31
M1564 to M1626 I64 to I126 (PL 400) or I127 (PL410)
M1628 to M1651 I128 to I151
Marker for falling edges at the PLC-inputs:
Marker PLC-inputs
M1700 to M1731 I0 to I31
M1764 to M1826 I64 to I126 (PL 400) or I127 (PL410)
M1828 to M1851 I128 to I151
Marker Function Set Reset
M2497 Activate the edge evaluation for PLC-inputs
Rising-edge marker M1500 to M1651
Falling-edge marker M1700 to M1851
PLC PLC
2.6
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.

7-22 TNC 416/TNC 406/TNC 306 Program creation 3/2000
During commissioning of the control the machine parameters and the compensation table can be
transferred to the RAM memory with the COPY ROM

RAM 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 ROM

RAM 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.

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-23
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 No valid command.
1 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).
2 Invalid Operand-type (the command cannot be combined with this Operand).
4 Operand outside the permissible range (the stated number is too high, or odd address for
Word or Double word).
5 No limiter after command. (Can only happen when reading in via the interface. The comment
after the command was not designated by ";" or "*").
6 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 Called Label has not been defined.
8 No End-program condition found (the program does not contain an EM instruction, or it
contains a JP-instruction without a following LBL-instruction).
9 Program is too long (RAM-overflow) (insufficient memory for the program code which is to be
generated).
10 Assign within parentheses (an =, S, SN, R, RN, or PS-instruction or a Jump-command has
been programmed, although arithmetic parentheses are open).
11 Excessive nesting of parentheses (more than 16 parentheses successively opened).
12 Jump within a gating sequence (an unconditional jump has been programmed, although the
gating sequence was not closed with an Assign ).
13 "Close-parentheses" without "open-parentheses" (a "close-parentheses" command was
programmed, although no parentheses were open).
14 Label within parentheses (a LBL-instruction has been programmed, although parentheses are
open).
15 Label within a gating sequence (a LBL-instruction has been programmed, although the
previous gating was not closed with an Assign).
16 Jump within parentheses (a jump instruction has been programmed, although parentheses
are open).
17 Parentheses open at end of block (an EM-instruction has been programmed, although
parentheses are open).
18 Label defined twice.
19 Word Assign missing (a Logic-instruction has been programmed, although the previous Word-
gating was not closed with an Assign).

7-24 TNC 416/TNC 406/TNC 306 Program creation 3/2000
20 Logic Assign missing (a Word-instruction has been programmed, although the previous Logic-
gating was not closed with an Assign)
21 Word Accumulator not loaded (a Word Assign or gating has been programmed, although the
Word Accumulator does not contain a definite value).
22 Logic-Accumulator not loaded (a Logic Assign has been programmed, although the Logic
Accumulator does not contain a definite value).
23 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).
24 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).
25 Conditional jump with incorrect Logic Accumulator (a conditional jump has been programmed,
although the Logic Accumulator does not contain a definite value).
26 Empty CASE-instruction.
27 "END-CASE" missing.
28 Too many table entries in CASE
A CASE table with more than 128 entries has been programmed
29 Blank CASE instruction
A CASE instruction has been programmed followed immediately by an ENDC label
30 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.
31 String instruction within parentheses
A string instruction has been programmed within parentheses even though string gates
cannot be nested with parentheses
32 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 Excessive nesting (too many modules nested inside one another).
51 STACK underflow (an attempt was made to acquire data from the STACK, although it was
empty).
52 STACK overflow (an attempt was made to load too much data onto the STACK).
53 Time-out (the permissible program run-time has been exceeded by more than twice. Check
the subprogram structure).
54 CASE arguments are larger than the number of entries in the table.

3/2000 TNC 416/TNC 406/TNC 306 Program creation 7-25


7-26 TNC 416/TNC 406/TNC 306 Commands 3/2000
3
Commands
3.1
Load and Assign Commands
3.1.1

LOAD (L) L
Abbreviation for the PLC-Editor: L (LOAD)
Logic Byte/Word Double Constant
Execution time [s] 1.2 2.0/1.6 1.6 1.2
Number of bytes 4 6 4 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 I4 = 1
Input I5 = 0
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 A I5 ... x x x x x x 0 x x x x x x x 0
3 = O2 ... x x x x x x 0 x x x x x x x 0
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-27
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 B5 = 2A(hex)
Constant: 54 = 36 (hex)
Byte B8 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 7 0
... x x x x x x x x x x x x x x x x x x
1 L K+54 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0
2 A B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 00101010
3 = 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.

7-28 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.1.2

LOAD NOT (LN) LN
Abbreviation for the PLC-Editor: LN (LOAD NOT)
Logic Byte/Word Double Constant
Execution time [s] 1.6 2.4/2.0 2.2 1.8
Number of bytes 6 8 6 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 I4 = 0
Input I5 = 1
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 LN I4 ... x x x x x x 1 x x x x x x x 0
2 A I5 ... x x x x x x 1 x x x x x x x 1
3 = O2 ... x x x x x x 1 x x x x x x x 1
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-29
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 Operand contents
Bit 31 . . . 15 7 0 7 0
... x x x x x x x x x x x x x x x x x x
1 LN B6 ... 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 10110110
2 A B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 00101010
3 = 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.

7-30 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.1.3

LOAD TWO'S COMPLEMENT (L) L
Abbreviation for the PLC-Editor: L (LOAD MINUS)
Logic Byte/Word Double Constant
Execution time [s] ---- 2.4/2.0 2.2 1.8
Number of bytes ---- 8 6 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 Operand contents
Bit 31 . . . 15 7 0 7 0
... x x x x x x x x x x x x x x x x x x
1 L B5 ... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 (15) (+15) 00001111
2 + B6 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 (+ 5) (+20) 00010100
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-31
3.1.4

LOAD BYTE (LB) LB
Abbreviation for the PLC-Editor: LB (LOAD BYTE)
Execution time [s] 30.0
Number of bytes 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) LW
Abbreviation for the PLC-Editor: LW (LOAD WORD)
Execution time [s] 57.2
Number of bytes 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) LD
Abbreviation for the PLC-Editor: LD (LOAD DOUBLE WORD)
Execution time [s] 117.2
Number of bytes 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.

7-32 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 I3 = 1 Input I7 = 0
Input I4 = 1 Input I8 = 1
Input I5 = 1 Input I9 = 1
Input I6 = 0 Input I10 = 0
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 I10 I3
... x x x x x x x x x x x x x x x x x x
1 LB I3 ... 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 01100111
7 0
2 = B8 ... 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-33
3.1.7

ASSIGN (=) =
Abbreviation for the PLC-Editor: = (ASSIGN)
Logic Byte/Word Double Constant
Execution time [s] 1.2 1.2/1.2 1.6 ----
Number of bytes 4 4 4
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 I4 = 1
Input I5 = 0
Output O2 = ?
Output O5 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 A I5 ... x x x x x x 0 x x x x x x x 0
3 = O2 ... x x x x x x 0 x x x x x x x 0
4 = O5 ... x x x x x x 0 x x x x x x x 0
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.
Line 4: The gating result is assigned to output O5.

7-34 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 B5 = 2A (hex)
Constant 54 = 36 (hex)
Byte B8 = ?
Byte B10 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 7 0
... x x x x x x x x x x x x x x x x x x
1 L K+54 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0
2 A B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 00101010
3 = B8 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 00100010
4 = B10 ... 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.
Line 4: The gating result is assigned to Byte B10.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-35
3.1.8

ASSIGN BYTE (B=) B=
Abbreviation for the PLC-Editor: B= (ASSIGN BYTE)
Execution time [s] 26.0
Number of bytes 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=) W=
Abbreviation for the PLC-Editor: W= (ASSIGN WORD)
Execution time [s] 50
Number of bytes 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: D= (ASSIGN DOUBLE)
Execution time [s] 104.4
Number of bytes 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.

7-36 TNC 416/TNC 406/TNC 306 Commands 3/2000
Example:
A bit pattern, as defined in Word W8 , is to be assigned to Outputs O5 to O20.
Initial state: Word W8: 36 FF (hex)
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L W8 ... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1 00110110 11111111
O20 ... ... O5
2 W= O5 ... 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1 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 (=).

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-37


7-38 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.2
Set-commands
3.2.1

SET (S) S
Abbreviation for the PLC Editor: S (SET)
Operand changed Operand unchanged
Execution time [s] 2.0 to 2.40 1.0 to 1.4
Number of bytes 8 (6)
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 I4 = 1
Input I5 = 0
Output O2 = ?
Marker M500 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 O I5 ... x x x x x x 1 x x x x x x x 0
3 S O2 ... x x x x x x 1 x x x x x x x 1
4 S M500 ... x x x x x x 1 x x x x x x x 1
Line 1: The contents of the operand 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 = 1: output O2 is set.
Line 4: The gating result = 1: marker M500 is set.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-39
3.2.2

RESET (R) R
Abbreviation for the PLC-Editor: R (RESET)
Operand changed Operand unchanged
Execution time [s] 2.0 to 2.4 1.0 to 1.4
Number of bytes 8 ( 6 )
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 I4 = 1
Input I5 = 0
Output O2 = ?
Marker M500 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 O I5 ... x x x x x x 1 x x x x x x x 0
3 R O2 ... x x x x x x 1 x x x x x x x 0
4 R M500 ... x x x x x x 1 x x x x x x x 0
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 = 1: Output O2 is reset.
Line 4: The gating result = 1: Marker 500 is reset.

7-40 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.2.3

SET NOT (SN) SN
Abbreviation for the PLC-Editor: SN (SET NOT)
Operand changed Operand unchanged
Execution time [s] 2.0 to 2.4 1.0 to 1.4
Number of bytes 8 ( 6 )
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 I4 = 0
Input I5 = 0
Output O2 = ?
Marker M500 = ?
Line Instruction Accumulator Contents Operand Contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 0 x x x x x x x 0
2 O I5 ... x x x x x x 0 x x x x x x x 0
3 SN O2 ... x x x x x x 0 x x x x x x x 1
4 SN M500 ... x x x x x x 0 x x x x x x x 1
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 = 0: Output O2 is set.
Line 4: The gating result = 0: Marker 500 is set.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-41
3.2.4

RESET NOT (RN) RN
Abbreviation for the PLC-Editor: RN (RESET NOT)
Operand changed Operand unchanged
Execution time [s] 2.0 to 2.4 1.0 to 1.4
Number of bytes 8 ( 6 )
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 I4 = 0
Input I5 = 0
Output O2 = ?
Marker M500 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 0 x x x x x x x 0
2 O I5 ... x x x x x x 0 x x x x x x x 0
3 RN O2 ... x x x x x x 0 x x x x x x x 0
4 RN M500 ... x x x x x x 0 x x x x x x x 0
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 = 0: Output O2 is reset.
Line 4: The gating result = 0: Marker M500 is reset.

7-42 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-43
3.3
Logic Gates
3.3.1

AND (A) A
Abbreviation for the PLC-Editor: A (AND)
Logic Byte/Word Double Constant
Execution time [s] 1.2 1.2/1.2 1.8 1.6
Number of bytes 4 4 4 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 I4 = 1
Input I5 = 0
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x x x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 A I5 ... x x x x x x 0 x x x x x x x 0
3 = O2 ... x x x x x x 0 x x x x x x x 0
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.

7-44 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 (hex)
Byte B6 = 36 (hex)
Byte B8 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L B6 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 00110110
2 A B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 00101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-45
3.3.2

AND NOT (AN) AN
Abbreviation for the PLC-Editor: AN (AND NOT)
Logic Byte/Word Double Constant
Execution time [s] 2.0 2.0/2.0 3.0 2.6
Number of bytes 8 8 8 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 = 1
Input I5 = 1
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x x x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 AN I5 ... x x x x x x 0 x x x x x x x 1
3 = O2 ... x x x x x x 0 x x x x x x x 0
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.

7-46 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L W6 ... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 00111100 00110110
2 AN W4 ... 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 00110110 10101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-47
3.3.3

OR (O)
Abbreviation for the PLC-Editor: O (OR)
Logic Byte/Word Double Constant
Execution time [s] 1.2 1.2/1.2 1.8 1.6
Number of bytes 4 4 4 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 I4 = 0
Input I5 = 1
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x x x x x x x x x
1 L I4 ... x x x x x x 0 x x x x x x x 0
2 O I5 ... x x x x x x 1 x x x x x x x 1
3 = O2 ... x x x x x x 1 x x x x x x x 1
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.

7-48 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L B6 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 00110110
2 O B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 00101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-49
3.3.4

OR NOT (ON)
Abbreviation for the PLC-Editor: ON (OR NOT)
Logic Byte/Word Double Constant
Execution time [s] 2.0 2.0/2.0 3.0 2.6
Number of bytes 8 8 8 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 I4 = 0
Input I5 = 0
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x x x x x x x x x
1 L I4 ... x x x x x x 0 x x x x x x x 0
2 ON I5 ... x x x x x x 1 x x x x x x x 0
3 = O2 ... x x x x x x 1 x x x x x x x 1
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.

7-50 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L W6 ... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 00111100 00110110
2 ON W4 ... 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 00110110 10101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-51
3.3.5

EXCLUSIVE OR (XO)
Abbreviation for the PLC-Editor: XO (EXCLUSIVE OR)
Logic Byte/Word Double Constant
Execution time [s] 1.6 1.6/1.6 2.4 2.0
Number of bytes 6 6 6 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 I4 = 1
Input I5 = 1
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I4 ... x x x x x x 1 x x x x x x x 1
2 XO I5 ... x x x x x x 0 x x x x x x x 1
3 = O2 ... x x x x x x 0 x x x x x x x 0
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.

7-52 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 B5 = 2A (hex)
Byte B6 = 36 (hex)
Word W8 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L B6 ... 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 00110110
2 XO B5 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 00101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-53
3.3.6

EXCLUSIVE OR NOT (XON) XON
Abbreviation for the PLC-Editor: XON (EXCLUSIVE OR NOT)
Logic Byte/Word Double Constant
Execution time [s] 2.0 2.0 3.0 2.6
Number of bytes 8 8 8 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 I4 = 0
Marker M500 = 0
Output O2 = ?
Line Instruction Accumulator contents Operand contents
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L M500 ... x x x x x x 0 x x x x x x x 0
2 XON I4 ... x x x x x x 1 x x x x x x x 0
3 = O2 ... x x x x x x 1 x x x x x x x 1
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.

7-54 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand contents
Bit 31 . . . 15 7 0 15 8 7 0
... x x x x x x x x x x x x x x x x x x
1 L W6 ... 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 00111100 00110110
2 XON W4 ... 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 00110110 10101010
3 = 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-55


7-56 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.4
Arithmetic commands
3.4.1

ADDITION (+) +
Abbreviation for the PLC-Editor: + (PLUS)
Logic Byte/Word Double Constant
Execution time [s] ---- 2.8/2.4 1.8 1.6
Number of bytes ---- 8 4 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 Operand contents
x x x x x x x x x x
1 L K100000 1 0 0 0 0 0
2 + W6 1 0 0 2 0 0 2 0 0
3 = D8 1 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-57
3.4.2

SUBTRACTION ()
Abbreviation for the PLC-Editor: (MINUS)
Logic Byte/Word Double Constant
Execution time [s] ---- 2.8/2.4 1.8 1.6
Number of bytes ---- 8 4 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 Operand contents
x x x x x x x x x x
1 L K100000 1 0 0 0 0 0
2 W6 9 9 8 0 0 2 0 0
3 = D8 9 9 8 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.

7-58 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.4.3

MULTIPLICATION (x) x
Abbreviation for the PLC-Editor: x (MULTIPLY)
Logic Byte/Word Double Constant
Execution time [s]* ---- 10.2/9.4 --- 9.8
Number of bytes ---- 14 10 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 (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 Operand contents
x x x x x x x x x x
1 L K100 1 0 0
2 x W6 2 0 0 0 2 0
3 = D8 2 0 0 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-59
3.4.4

DIVISION (/) /
Abbreviation for the PLC-Editor: / (DIVIDE)
Logic Byte/Word Double Constant
Execution time [s] *) **) ---- 20.2/19.8 --- 19.8
Number of bytes ---- 16 14 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 Operand contents
x x x x x x x x x x
1 L K100 1 0 0
2 / W6 5 2 0
3 = D8 5 5
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.

7-60 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.4.5

REMAINDER (MOD) MOD
Abbreviation for the PLC-Editor: MOD (MODULO)
Logic Byte/Word Double Constant
Execution time [s] ---- 20.6 to 20.2 20.2
Number of bytes ---- 18 16 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 (dec)
Constant K = 15 (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 Operand contents
x x x x x x x x x x
1 L W6 5 0
2 MOD K15 5 5 0
3 = D8 5 5
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-61


7-62 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.5
Comparisons
3.5.1

EQUAL TO (==) ==
Abbreviation for the PLC-Editor: == (EQUAL)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 2.0
Number of bytes 6 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 Operand contents
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
2 == D8 ... x x x x x x 0 x x x x x x x 1 5 0 0 0
3 = M500 ... x x x x x x 0 x x x x x x x 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-63
3.5.2

LESS THAN (<) <
Abbreviation for the PLC-Editor: < (LESS THAN)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 2.0
Number of bytes 6 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 Operand contents
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
1 < D8 ... x x x x x x 0 x x x x x x x 1 5 0 0 0
2 = M500 ... x x x x x x 0 x x x x x x x 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.

7-64 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.5.3

GREATER THAN (>) >
Abbreviation for the PLC-Editor: > (GREATER THAN)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 2.0
Number of bytes 6 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 Operand contents
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
1 > D8 ... x x x x x x 1 x x x x x x x 1 5 0 0 0
2 = M500 ... x x x x x x 1 x x x x x x x 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-65
3.5.4

LESS THAN OR EQUAL TO (<=) <=
Abbreviation for the PLC-Editor: <= (LESS EQUAL)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 1.8 to 2.0
Number of bytes 6 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 Operand contents
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
1 <= D8 ... x x x x x x 0 x x x x x x x 1 5 0 0 0
2 = M500 ... x x x x x x 0 x x x x x x x 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.

7-66 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.5.5

GREATER THAN OR EQUAL TO (>=)
Abbreviation for PLC Editor: >= (GREATER EQUAL)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 1.8 to 2.0
Number of bytes 6 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 Operand content
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
1 >= D8 ... x x x x x x 1 x x x x x x x 1 5 0 0 0
2 = M500 ... x x x x x x 1 x x x x x x x 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-67
3.5.6

UNEQUAL (<>)<>
Abbreviation for PLC Editor: <> (NOT EQUAL)
Byte/Word/Double Constant
Execution time [s] 1.8 to 2.4 1.8 to 2.0
Number of bytes 6 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 Operand content
x x x x x x x x x x
1 L K16000 1 6 0 0 0
Bit 31 . . . 7 0
1 <> D8 ... x x x x x x 1 x x x x x x x 1 5 0 0 0
2 = M500 ... x x x x x x 1 x x x x x x x 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.

7-68 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-69
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 [ ])
Logic Byte/Word/Double
Execution time [s] 1.6 2.6
Number of bytes 6 6
Operands: none
3.6.2

AND NOT [ ] (AN[ ]) AN[ ]
Abbreviation for PLC Editor: AN[ ] (AND NOT [ ])
Logic Byte/Word/Double
Execution time [s] 2.0 3.2
Number of bytes 6 6
Operands: none
3.6.3

OR [ ] (O[ ]) O[ ]
Abbreviation for PLC Editor: O[ ] (OR [ ])
Logic Byte/Word/Double
Execution time [s] 1.6 2.6
Number of bytes 6 6
Operands: none
3.6.4

OR NOT [ ] (ON[ ]) ON[ ]
Abbreviation for PLC Editor: ON[ ] (OR NOT [ ])
Logic Byte/Word/Double
Execution time [s] 2.0 3.2
Number of bytes 6 6
Operands: none

7-70 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.6.5

EXCLUSIVE OR [ ] (XO[ ]) XO[ ]
Abbreviation for PLC Editor: XO[ ] (EXCL: OR [ ])
Logic Byte/Word/Double
Execution time [s] 2.0 3.2
Number of bytes 6 6
Operands: none
3.6.6

EXCLUSIVE OR NOT [ ] (XON[ ]) XON[ ]
Abbreviation for PLC Editor: XON[ ] (EXCL: OR NOT [ ])
Logic Byte/Word/Double
Execution time [s] 2.4 3.8
Number of bytes 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 "open-
parentheses" 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-71
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: Marker M500 = 0Input I0 = 0 Output O12 = ?
Marker M501 = 1Input I1 = 1
Line Instruction Accumulator Contents Operand Contents
bit 31 7 0
... x x x x x x x x x x x x x x
Program-stack:
1 L M500
2 O M501
3 A [
4 L I0
5 O I1
6 ]
7 = O12
xxxxxxxx 1 xxxxxxx
bit 7 0 15
... x x x x x x 0 x x x x x x x
... 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
... x x x x x x 0 x x x x x x x
... 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
... x x x x x x 1 x x x x x x x
0
1
0
1
1
Line 1: Marker state M500 is loaded into the Logic Accumulator.
Line 2: The Logic Accumulator is gated with Marker M501.
Line 3: Open parentheses: the Accumulator contents are buffered on the Program Stack.
Line 4: Input state I0 is loaded into the Logic Accumulator.
Line 5: The Logic Accumulator is gated with Input I1.
Line 6: 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.

7-72 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-73
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: + [ ] (PLUS [ ])
Logic Byte/Word/Double
Execution time [s] ----- 2.6
Number of bytes ----- 6
Operands: none
3.7.2

SUBTRACTION [ ] ([ ]) [ ]
Abbreviation for PLC Editor: [ ] (MINUS [ ])
Logic Byte/Word/Double
Execution time [s] ----- 3.2
Number of bytes ----- 6
Operands: none
3.7.3

MULTIPLICATION [ ] (x[ ]) X [ ]
Abbreviation for PLC Editor: x [ ] (MULTIPLY [ ])
Logic Byte/Word/Double
Execution time [s] *) ----- 11.0
Number of bytes ----- 12
Operands: none
3.7.4

DIVISION [ ] (/[ ]) / [ ]
Abbreviation for PLC Editor: / [ ] (DIVIDE [ ])
Logic Byte/Word/Double
Execution time [s] *) **) ----- 20.2
Number of bytes ----- 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

7-74 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.7.5

REMAINDER [ ] (MOD[ ]) MOD [ ]
Abbreviation for PLC Editor: MOD [ ] (MODULO [ ])
Logic Byte/Word/Double
Execution time [s] *) **) ----- 20.6
Number of bytes ----- 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 = 1000 (decimal)
Double word D12 = 15000 (decimal)
Double word D36 = 100 (decimal)
Double word D100 = ?
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).

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-75
Command sequence without parentheses:
Line Instruction Accumulator content Operand content
x x x x x x x x x x
1 L D12 1 5 0 0 0 1 5 0 0 0
2 + K1000 1 6 0 0 0
3 / D36 1 6 0 1 0 0
4 = D100 1 6 0 1 0 0
Commend sequence with parentheses:
Line Instruction Accumulator Contents Operand Contents
1 L D12
x x x x x x x x x x
1 5 0 0 0 1 5 0 0 0
1 5 0 0 0
1 0 0 0
1 0
1 5 0 1 0
Program-stack:
1 5 0 0 0
2 + [
3 L K1000
4 / D36
5 ]
6 = D100 1 5 0 1 0 1 5 0 1 0
1 0 0
Line 1: The content of Double word D12 is loaded into the Word Accumulator.
Line 2: Open parentheses: buffer the Accumulator content in the Program Stack.
Line 3: A constant is loaded into the Word Accumulator.
Line 4: The content of the Word Accumulator is divided by the content of Double word D12.
Line 5: 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.

7-76 TNC 416/TNC 406/TNC 306 Commands 3/2000
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-77
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: == [ ] (EQUAL [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none
3.8.2

LESS THAN [ ] (<[ ]) < [ ]
Abbreviation for PLC Editor: < [ ] (LESS THAN [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none
3.8.3

GREATER THAN [ ] (>[ ])> [ ]
Abbreviation for PLC Editor: > [ ] (GREATER THAN [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none
3.8.4

LESS THAN OR EQUAL TO [ ] (<=[ ]) <= [ ]
Abbreviation for PLC Editor: <= [ ] (LESS EQUAL [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none

7-78 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.8.5

GREATER THAN OR EQUAL TOL[ ] (>=[ ]) >= [ ]
Abbreviation for PLC Editor: >= [ ] (GREATER EQUAL [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none
3.8.6

NOT EQUAL TO [ ] (<>[ ]) <> [ ]
Abbreviation for PLC Editor: <> [ ] (NOT EQUAL [ ])
Logic Byte/Word/Double
Execution time [s] ---- 3.0 to 3.2
Number of bytes ---- 6
Operands: none
Function of parentheses with comparison commands:
The execution sequence in a ladder may be altered by the use of parentheses. The "open-
parentheses" 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".

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-79
Example:
Initial state: Constant = 1000 (decimal)
Double word D12= 15000 (decimal)
Double word D36= 10 (decimal)
Output O15 = ?
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 Operand Contents
1 L D12
x x x x x x x x x x
1 5 0 0 0
1 5 0 0 0
1 0 0 0
Program-stack:
1 5 0 0 0
2 >= [
3 L K1000
4 x D36
5 ]
6 = O15 1
1 0 1 0 0 0 0
1 5 0 0 0
bit 31 . . . 7 0
x x x x 1 x x x x x x x
x x x x 1 x x x x x x x
Line 1: The content of Double word D12 is loaded into the Word Accumulator.
Line 2: Open parentheses: buffering of the Accumulator content in the Program Stack.
Line 3: Loading of a Constant into the Word Accumulator.
Line 4: The content of the Word Accumulator is multiplied by the content of Double word D12.
Line 5: 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.

7-80 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-81
3.9
Shift Commands
3.9.1

SHIFT LEFT (<<) <<
Abbreviation for PLC Editor: << (SHIFT LEFT)
Byte/Word/Double Constant
Execution time [s] 2.0 + 0.2 x n 2.0 + 0.2 x n
Number of bytes 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
1 L D8 00000000 00000000 00111110 10000000 00 00 3E 80
2 << K+1 00000000 00000000 01111101 00000000
3 << K+1 00000000 00000000 11111010 00000000
4 << K+1 00000000 00000001 11110100 00000000
5 << K+1 00000000 00000011 11101000 00000000
6 = D12 00000000 00000011 11101000 00000000 00 03 E8 00
Line 1: Load Double word D8 into the Accumulator.
Line 2 to 5: 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.
Line 6: The result is stored in the Double word D12.

7-82 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.9.2

SHIFT RIGHT (>>) >>
Abbreviation for PLC Editor: >> (SHIFT RIGHT)
Byte/Word/Double Constant
Execution time [s] 2.0 + 0.2 x n 2.0 + 0.2 x n
Number of bytes 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
1 L D8 00000000 00000000 00111110 10000000 00 00 3E 80
2 >> K1 00000000 00000000 00011111 01000000
3 >> K1 00000000 00000000 00001111 10100000
4 >> K1 00000000 00000000 00000111 11010000
5 >> K1 00000000 00000000 00000011 11101000
6 = D12 00000000 00000000 00000011 11101000 00 00 03 E8
Line 1: Load Double word D8 into the Accumulator.
Line 2 to 5: 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.
Line 6: The result is stored in Double word D12.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-83


7-84 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.10
Bit commands
3.10.1

BIT SET (BS, BSX) BS
Abbreviation for PLC Editor: BS (BIT SET)
Byte/Word/Double Constant
Execution time [s] 2.0 to 2.4 2.0
Number of bytes 6 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 (hex)
Double word D12 = ?
Accumulator and operand contents are shown here in hexadecimal notation.
Line Instruction Accumulator content Operand content
xx xx xx xx
1 L D8 00 00 3E 80 00 00 3E 80
2 BS K+0 00 00 3E 81
3 = D12 00 00 3E 81 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-85
3.10.2

BIT RESET (BC, BCX) BC
Abbreviation for PLC Editor: BC (BIT CLEAR)
Byte/Word/Double Constant
Execution time [s] 2.2 to 2.6 2.2
Number of bytes 6 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 81 (hex)
Double word D12 = ?
Accumulator and operand contents are shown here in hexadecimal notation.
Line Instruction Accumulator content Operand content
xx xx xx xx
1 L D8 00 00 3E 81 00 00 3E 81
2 BC K+0 00 00 3E 80
3 = D12 00 00 3E 80 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.

7-86 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.10.3

BIT TEST (BT, BTX) BT
Abbreviation for PLC Editor: BT (BIT TEST)
Byte/Word/Double Constant
Execution time [s] 2.2 to 2.8 2.2 to 2.4
Number of bytes 8 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 (hex)
Output O12 = ?
Word Accumulator and operand contents are shown here in hexadecimal notation, the Logic
Accumulator in binary representation.
Line Instruction Accumulator content Operand content
xx xx xx xx
1 L D8 00 00 3E 81 00 00 3E 81
2 BT K+0 00 00 3E 81
3 = O12 x x x x x x 1 x x x x x x x 1
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-87


7-88 TNC 416/TNC 406/TNC 306 Commands 3/2000
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: PS (PUSH)
Logic Byte/Word Double Constant
Execution time [s] 4.2 5.4/5.0 5.5 4.2
Number of bytes 24 26 22 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:
Bit 31 15 7 0
Byte X X X X X X X X X X X X X X X X 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 WWWWWWWWWWWWWWWW
Double word D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D
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

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-89
3.11.2

Pull data from Data Stack (PL)
Abbreviation for PLC Editor: PL (PULL)
Logic Byte/Word Double Constant
Execution time [s] 3.4 3.8 4.2 ----
Number of bytes 20 20 18 ----
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: PSL (PUSH LOGICACCU)
Execution time [s] 3.0
Number of bytes 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

7-90 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.11.4

Load word accumulator onto Data Stack (PSW) PSW
Abbreviation for PLC Editor: PSW (PUSH WORDACCU)
Execution time [s] 3.4
Number of bytes 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) PLL
Abbreviation for PLC Editor: PLL (PULL LOGICACCU)
Execution time [s] 2.2
Number of bytes 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: PLW (PULL WORDACCU)
Execution time [s] 2.6
Number of bytes 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-91
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: 1A 44 3E 18
Line Instruction Accumulator Contents
50 PSW
1 A 4 4 3 E 1 8 49
1 A 4 4 3 E 1 8
52 CM 15
54 PLW
55 .
.
.
1 A 4 4 3 E 1 8
1 A 4 4 3 E 1 8
.
.
.
1 A 4 4
3 E 1 8
Data stack:
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.

7-92 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-93
3.12
Jump commands
3.12.1

Unconditional jump (JP) JP
Abbreviation for PLC Editor: JP (JUMP)
Jump processed Jump not processed
Execution time [s] 2.2 ----
Number of bytes 8
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) JPF
Abbreviation for PLC Editor: 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.

7-94 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand content
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I5 ... x x x x x x 1 x x x x x x x 1
2 JPT 10 ... x x x x x x 1 x x x x x x x
3 L I3
4 O M500
5 = O20
6 LBL 10
7 L M100 ... x x x x x x 0 x x x x x x x 0

Line 1: Load the operand contents in the Accumulator.


Line 2: Dependent on Input I5, a program jump is processed.
Line 3: Skipped in this example.
Line 4: Skipped in this example.
Line 5: Skipped in this example.
Line 6: Jump address: The program run is continued from here.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-95
3.12.4

Call Module (CM) CM
Abbreviation for PLC Editor: CM (CALL MODULE)
Jump processed Jump not processed
Execution time [s] 5.0 ----
Number of bytes 22
Special Library Call:
Execution time [s] 6.2 ----
Number of bytes 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) CMT
Abbreviation for PLC Editor: CMT (CALL MODULE IF TRUE)
Jump processed Jump not processed
Execution time [s] 6.8 to 7.2 1.0 to 1.4
Number of bytes 26 (24)
Special Library Call:
Execution time [s] 7.4 1.4
Number of bytes 28
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) CMF
Abbreviation for PLC Editor: CMF (CALL MODULE IF FALSE)
Jump processed Jump not processed
Execution time [s] 6.8 to 7.2 1.0 to 1.4
Number of bytes 26 (24)
Special Library Call:
Execution time [s] 7.4 1.4
Number of bytes 28

7-96 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 Operand content
Bit 31 . . . 7 0
... x x x x x x X x x x x x x x
1 L I5 ... x x x x x x 0 x x x x x x x 0
2 CMF 10 ... x x x x x x 0 x x x x x x x
3 L M100 ... x x x x x x 1 x x x x x x x 1

499 EM
500 LBL 10
501 L I3 ... x x x x x x 0 x x x x x x x 0
502 OM 500 ... x x x x x x 1 x x x x x x x 1
503 = O20 ... x x x x x x 1 x x x x x x x 1
504 EM
Line 1: Load the operand contents in the Accumulator.
Line 2: Dependent on input I5, the Call Module is processed.
Line 499: End Module of the main program.
Line 500: Start of the Module, identified by LBL.
Line 501: Instruction in the subprogram.
Line 502: Instruction in the subprogram.
Line 503: Instruction in the subprogram.
Line 504: End Module: Effects the return to the main program.
Line 3: The main program continues at this point once the Module is processed.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-97
3.12.7

End of Module, Program End (EM) EM
Abbreviation for PLC Editor: EM (END OF MODULE)
Execution time [s] 2.0
Number of bytes 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] 0
Number of bytes 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".

7-98 TNC 416/TNC 406/TNC 306 Commands 3/2000


3/2000 TNC 416/TNC 406/TNC 306 Commands 7-99
3.13
CASE statement
3.13.1

Indexed call module (CASE) CASE
Abbreviation for PLC Editor: CASE (CASE OF)
Byte Word
Execution time [s] 12.0 12.0
Number of bytes 46 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) ENDC
Abbreviation for PLC Editor: ENDC (ENDCASE)
Byte Word
Execution time [s] 0 0
Number of bytes 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.

7-100 TNC 416/TNC 406/TNC 306 Commands 3/2000
Structure of a CASE statement:
Internal Addressing (0 to max. 127)
1 CASE B 150
2 CM 100 <------- (0)
3 CM 200 <------- (1)
4 CM 201 <------- (2)
5 CM 202 <------- (3)
6 CM 203 <------- (4)
7 CM 204 <------- (5)
8 CM 300 <------- (6)
9 ENDC
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
1 128
STRING memory: 128 Characters
1 128
S 0
S 1
S 2
S 3
Example:
1 128
C O O L A N T 1 O N

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-101
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: S#Exx xx: Number from the PLC-Error Messages (0 to 199)
PLC-DIALOG: S#Dxx 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: L (LOAD)
Execution time [s] < 80
Number of bytes STRING memory: 10
Immediate STRING: 18 + n
STRING from error message or dialog files 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.

7-102 TNC 416/TNC 406/TNC 306 Commands 3/2000
3.14.2

ADD (+)
Abbreviation for PLC Editor: +
Execution time [s] < 80
Number of bytes STRING memory: 10
Immediate STRING: 18 + n
STRING from error message or dialog files 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] < 80
Number of bytes STRING memory 10
Immediate STRING
STRING from error message or dialog files
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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-103
3.14.4

Overwriting of a STRING (OVWR)
Abbreviation for PLC Editor: OVWR (OVERWRITE)
Execution time [s] < 80
Number of bytes STRING memory 10
Immediate STRING
STRING from error message or dialog files
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:
1
S0
S1
128
S2
S3
Initial condition: PLC ERROR MESSAGE (Line 10):HYDRAULIC OIL
2 = S0
1 L S#E10
Line Instruction STRING Accumulator
H Y D R A U L I C O I L
1 128
Final condition:
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
128
S0
S1
S2
S3
H Y D R A U L I C O I L
H Y D R A U L I C O I L
Instructions

7-104 TNC 416/TNC 406/TNC 306 Commands 3/2000
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: Overflow during Multiplication
M3169: Division by 0
M3170: MODULO incorrectly executed
M3171: Error status for PLC module
M3172: 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: SUBM (SUBMIT)
Execution time [s] < 30
Number of bytes 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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-105
3.15.2

Status Interrogation of a Submit Program (RPLY)
Abbreviation for PLC Editor: RPLY (REPLY)
Execution time [s] < 5
Number of bytes 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: CAN (CANCEL)
Execution time [s] < 40
Number of bytes 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.

7-106 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 L I10 ;Interrogate state of Input I10
2 JPF 100 ;Dependent on Input I10 skip
;Call Module
3 RPLY B 128 ;Interrogate status of the Submit program
4 <> K+0 ;Submit program already transferred to
;the NC for processing ?
5 JPT 100 ;If program already transferred to the NC,
;renewed program call skipped
6 SUBM 300 ;Call up Submit program
7 = B 128 ;Store Identifier in Byte 128
8 LBL 100 ;Jump address
9 L I 11 ;Interrogate state of Input I11
10 JPF 110 ;Dependent on Input I11, skip the deletion
;of the Submit program
11 CAN B 128 ;Interrupt execution of the Submit program
;or remove program from the queue
12 LBL 110 ;Jump address
;Continuation
;Main program
;
XX EM ;End main program
XX LBL 300 ;Begin Submit program (is added as with Modules
XX ;at the end of the main program)
XX ;
XX ;
XX EM ;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.

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-107


7-108 TNC 416/TNC 406/TNC 306 Commands 3/2000
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] Operand number = n+X
Wn[X] Operand number = n+2
*
X
Dn[X] Operand number = n+4
*
X
BTX Contents of index register = operand
BCX Contents of index register = operand
BSX 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 (Load Index to Accu) Index Register --> Word Accumulator
=X (Store Accu to Index) Word Accumulator --> Index Register
PSX (Push Index Register) Index Register --> Stack
PLX (Pull Index Register) Stack --> Index Register
INCX (Increment Index Register)
DECX (Decrement Index Register)

3/2000 TNC 416/TNC 406/TNC 306 Commands 7-109
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 Wrong: IFT
... ...
WHILEF WHILEF
... ...
ENDW END
... ...
ENDI 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 (If Logic Accu True) Following code only if Logic Accumulator=1
IFF (If Logic Accu False) Following code only if Logic Accumulator=0
ELSE (else) Following code only if IF not fulfilled
ENDI (End of IF-Structure) End of IF Structure
Example:
L I0
IFT ;If Logic Accu=1
.... ;Program code for I0 = 1
ELSE ; can be omitted
.... ;Program code for I0 = 0 can be omitted
ENDI ;end of conditional processing

7-110 TNC 416/TNC 406/TNC 306 Commands 3/2000
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 (Repeat) Repeat program sequence from here
UNTILT (Until True) Repeat sequence until Logic Accumulator=1
UNTILF (Until False) Repeat sequence until Logic Accumulator=0
A REPEAT ... UNTIL loop is always run at least once!
Example:
= M100 ;end of previous chain
REPEAT ;repeat following code
..... ;code to be executed
LX ;load Index Register
>= K100 ;check Index Register
UNTILT ;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 (While True) Execute sequence if Logic Accumulator=1
WHILEF (While False) Execute sequence if Logic Accumulator=0
ENDW (End While) 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 M100 ;create condition for 1st WHILE scan
WHILET ;execute following code if Logic Accumulator = 1
..... ;code to be executed
L M101 ;create condition for repeat processing
A M102 ;next condition
ENDW ;return to WHILE scan
Two internal jump labels are generated for the WHILE ... ENDW structure.

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-111
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 B/W/D/K <Number 1st marker source block>
PS B/W/D/K <Number 1st marker destination block>
PS B/W/D/K <Length of block in markers>
CM 9000 Transfer in marker range
or
PS B/W/D/K <Number 1st byte source block>
PS B/W/D/K <Number 1st byte destination block>
PS B/W/D/K <Length of block in bytes>
CM 9001 Transfer in word range
Error status after call: M3171 = 0: Block was transferred
1: Error conditions see above

7-112 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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 B/W/D/K <Number 1st PLC input>
PS B/W/D/K <Number 1st edge marker or 1st edge byte>
PS B/W/D/K <Number of PLC inputs>
PS B/W/D/K <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
CM 9004
Error status after call: M3171 =0: Edge markers have been set
=1: See above for error conditions

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-113
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 B/W/D/K <Number of byte to be read> (Address)
CM 9010 read byte
PL B <byte read> (Value)
or
PS B/W/D/K <Number of word to be read> (Address)
CM 9011 read word
PL W <word read> (Value)
or
PS B/W/D/K <Number of double word to be read> (Address)
CM 9012 read double word
PL D <double word read> (Value)
Example of Module 9010
STACK
Wortspeicher
35 (80)
35
80
80
B10
B35
B100
.
.
.
PS B10
CM9010
PL B100
.
.
.
Error status after call: M3171 = 0: Byte/word/double word was read
1: Error condition see above

7-114 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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 B/W/D/K <Number of byte to be written> (Address)
PS B/W/D/K <byte to be written>
CM 9020 write byte (Value)
or
PS B/W/D/K <Number of word to be written> (Address)
PS B/W/D/K <byte to be written>
CM 9021 write word (Value)
or
PS B/W/D/K <Number of double word to be written> (Address)
PS B/W/D/K <byte to be written>
CM 9022 write double word (Value)
Example of Module 9020
STACK
Wortspeicher
120
35
120
120
B10
B35
B100
.
.
.
PS B10
PS B100
CM9020
.
.
.
35
Error status after call: M3171 = 0: Byte/word/double word was written
1: Error condition see above

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-115
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 B/W/D/K <MP Number>
PS B/W/D/K <MP Index>
CM 9032
PL B/W/D <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 = 0: MP was read
1: Error condition see above
4.6
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).

7-116 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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 K/B/W/D <numerical value to be converted>
PS K/B/W/D <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 K/B/W/D <Number of places after the decimal point>
PS K/B/W/D <Number of places before the decimal point>
PS K/B/W/D <Target address in string buffer>
CM 9051
Error status after call: M3171 = 0: Number was converted
1: Error condition see above
4.7
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 K/B/W/D <Number of source string>
CM 9071
PL PL <Length of string>
Error status after call: M3171 = 0: String length was computed
1: Error conditions see above

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-117
4.8
Transmit String buffer to Log buffer (Module 9079)
Transmits the String buffer (0 to 3) to the log buffer.
Call:
PS K ; string 0...3
CM 9079
Error status after call: M3171 = 0: String was transferred
1: String was not transferred
4.9
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 = 0: Screen window was deleted
1: Error condition see above
4.10
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 9081
PL B/W/D <Status of screen window>
Marker M3171 is not affected.

7-118 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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 0 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:
Operating mode Machine Operating mode Edit
Color 0: MP736x.0 MP736x.0
Color 1: MP7354.0 MP7355.0
Color 2: MP7356.0 MP7356.0
Color 3: MP7352.0 MP7353.0
Color 4: MP7353.0 MP7352.0
Color 5: MP7357.0 MP7358.0
Color 6: MP7352.1 MP7353.1
Color 7: MP7354.3 MP7355.3
Color 8: MP7350 MP7358.1
Color 9: MP7357.1 MP7355.1
Color 10: MP7354.1 MP7356.2
Color 11: MP7356.2 MP7356.1
Color 12: MP7356.1 MP7355.2
Color 13: MP7354.2 MP7356.2
Color 14: MP7352.2 MP7353.2
Color 15: MP7351 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

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-119
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 K/B/W/D Line number (0...1)
PS K/B/W/D Column number (0...37)
PS K/B/W/D Color number (0...15)
PS K/B/W/D String number (0...3)
CM 9082
Error status after call: M3171 = 0: String displayed (when screen window for
PLC status is displayed)
1: No display, error condition see above

7-120 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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 0 150 0 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:
Operating mode Machine Operating mode Edit
Color 0: MP736x.0 MP736x.0
Color 1: MP7354.0 MP7355.0
Color 2: MP7356.0 MP7356.0
Color 3: MP7352.0 MP7353.0
Color 4: MP7353.0 MP7352.0
Color 5: MP7357.0 MP7358.0
Color 6: MP7352.1 MP7353.1
Color 7: MP7354.3 MP7355.3
Color 8: MP7350 MP7358.1
Color 9: MP7357.1 MP7355.1
Color 10: MP7354.1 MP7356.2
Color 11: MP7356.2 MP7356.1
Color 12: MP7356.1 MP7355.2
Color 13: MP7354.2 MP7356.2
Color 14: MP7352.2 MP7353.2
Color 15: MP7351 MP7351

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-121
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 K/B/W/D Line number (0...1)
PS K/B/W/D Color for bar (0...15)
PS K/B/W/D Color for frame and scale graduation (0...15)
PS K/B/W/D Current length of bar (0...150)
PS K/B/W/D Maximum length of bar (0...150)
CM 9083
Error status after call: M3171 = 0: String displayed (when screen window for PLC status is
displayed)
1: No display, error condition see above
4.13
Reading the axis coordinates (Module 9040)
With Modules 9040 you can read the axis coordinates. The values are stored in five
double word
s,
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 K/B/W/D <Target address Dxxxx>
PS K/B/W/D <Coordinate type>
0 = actual values
1 = nominal values
2 = actual values in the reference system
3 = servo lag
4 = distance-to-go
CM 9040 or CM 9041

7-122 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 3/2000
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

3/2000 TNC 416/TNC 406/TNC 306 PLC Modules for TNC 416/406 7-123


3/97 TNC 406/TNC 306 8-1
Data Interface Contents 8
1 Introduction 8-3
1.1 Principles of data transfer 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 TNC data interfaces 8-10
2.1 General 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 Data interface functions 8-14
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 Data transmission protocols 8-16
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 Interface configuration 8-22
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 Standard data transmission protocol 8-28
3.1 General 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

8-2 TNC 406/TNC 306 3/97
4 Data transfer with BCC 8-34
4.1 General 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
5 Data transfer with LSV2-protocol 8-39
6 Error messages 8-40
6.1 TNC error messages 8-40
6.2 Error codes of HEIDENHAIN peripheral devices 8-41
6.3 Data transmission software error messages 8-42

3/97 TNC 406/TNC 306 1 Introduction 8-3
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 inter-
face, is illustrated in the following diagram:
Computer Software Hardware Software Peripheral
e.g. PC,
Controller
e.g. Printer,
external memory
Interface
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.

8-4 TNC 406/TNC 306 1 Introduction 3/97
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.
0 1 1 0 1 0 1 1
Sender
Transmitter
Speicher
Memory
bertragungsstrecke
Transmission path
Empfnger
Receiver
Schnittstellen-Puffer
Interface buffer
MSB
LSB
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
MSB
LSB
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
Speicher
Memory
Schnittstellen-Puffer
Interface buffer
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.

3/97 TNC 406/TNC 306 1 Introduction 8-5
Sender
Transmitter
Speicher
Memory
MSB
LSB
bertragungsstrecke
Transmission path
Empfnger
Receiver
Schnittstellen-Puffer
Interface buffer
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
MSB
LSB
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
Speicher
Memory
Schnittstellen-Puffer
Interface buffer
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 2
7
= 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 = 10 dec = 0A hex
MSB LSB

8-6 TNC 406/TNC 306 1 Introduction 3/97
The letter z is represented by the following combination of bits:
1 1 1 1 0 1 0 = 122 dec = 7A hex
MSB 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.
1st Bit 2nd Bit 3rd Bit 4th Bit 5th Bit
7th Bit 6th Bit
Start Parity
bit LSB MSB
bit
1 or 2
stop bits
Character frame
Data bits
Quiescent state Quiescent state

3/97 TNC 406/TNC 306 1 Introduction 8-7
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:
Letter: "z" 1111010
1 Even parity
0 Odd parity
Parity bit

8-8 TNC 406/TNC 306 1 Introduction 3/97
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.
1 baud = [1
Bit
s
]
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 (t
B
) can be calculated from the baud rate:
t
B
t
"1"
"0"
t
B
=
1
Baud rate[
bits
s
]
For example, a baud rate of 19,200 baud will have a bit duration of t
B
= 52.083 s.
The number of characters transmitted per second can be calculated from the baud rate and the
transmission format:
Characters per second =
Baud rate[
bits
s
]
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
10 bits
= 30 characters per second

3/97 TNC 406/TNC 306 1 Introduction 8-9
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.

8-10 TNC 406/TNC 306 2 TNC data interfaces 3/97
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
bertragungsstrecke
Transmission path
Empfnger
Receiver
RxD TxD
RxD TxD

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-11
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.
13
U [V]
+ 15
15
+ 13
Datensignale
Data signals
Steuer- und Meldesignal
Control and message signal
"0"
SPACE
HIGH
ON
"1"
MARK
LOW
OFF
0
2.2.3 Signal designation
The RS-232-C interface distinguishes between data lines, control/signal lines and the earth
conductor.
Data lines:
TxD Transmitted data
RxD Received data

8-12 TNC 406/TNC 306 2 TNC data interfaces 3/97
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: Housing connection
Signal GND: 0-volt lines for all signals
Chassis GND
Transmitted data TxD
Received data RxD
Switch on transmission unit RTS
Operational readiness DSR
Transmission readiness CTS
Received signal level DCD
Signal ground GND
Terminal unit ready for service DTR
Peripheral TNC

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-13
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").
ws/br
WH/BN
ws/br
WH/BN GND Chassis
RXD
TXD
CTS
RTS
DTR
GND Signal
DSR
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
ge
gn
rs
gr
br
rt
bl
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
V.24-Adapter-Block
RS-232-C Adapter block


LE
Chassis GND
TXD
RXD
RTS
CTS
DSR
Signal GND
DTR
GN
YL
GY
PK
BL
RD
BN
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 Allocation
1 Do not use
2 RxD
3 TxD
4 DTR
5 GND
6 DSR
7 RTS
8 CTS
9 Do not use

8-14 TNC 406/TNC 306 2 TNC data interfaces 3/97
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 Identification code
HEIDENHAIN-dialog NC program H
Datum shift table O
Eroding table E
Machine parameters M
Correction table S
PLC program 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.

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-15
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.

8-16 TNC 406/TNC 306 2 TNC data interfaces 3/97
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 Transmission with BCC (Block Check Character) and with
fixed control characters (7 data bits, 1 start bit, 1 stop bit)
Freely configurable baud rate
EXT 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.

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-17
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
Receiving buffer full
<DC3>
Receiving buffer again
ready to accept data
<DC1>
12 Z+2 F400 <CR> <LF>
13 Z10 M36 <CR> <LF>
TNC
.
.
.
.
.
.
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.

8-18 TNC 406/TNC 306 2 TNC data interfaces 3/97
The header contains 'H' - the identification code for the program (see Section "Saving/reading files"),
'Name' - the program name and 'M' - the transmission mode(E=input/A=output).
This header ends with character <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 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SOH 0 0 0 0 0 0 1
H 1 0 0 1 0 0 0
1 0 1 1 0 0 0 1
5 0 1 1 0 1 0 1
E 1 0 0 0 1 0 1
ETB 0 0 1 0 1 1 1
BCC 0 0 1 1 1 1 1
In this example, the HEIDENHAIN dialog (identification code 'H') has been used to write program
'15' which is read in via the data interface ('E'). A parity bit is also formed for the BCC (with even
parity, the parity bit of the BCC in this example is given a value '1').
The character <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).

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-19
Table of control characters:
Character Meaning Description
SOH Start of Header 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 incor-
rectly. The transmitter must then
transmit the data block again.

8-20 TNC 406/TNC 306 2 TNC data interfaces 3/97
Example:
An erosion table with the name "8455" is to be sent to a peripheral unit (e.g. FE 401).
FE 401 Transmission path
<ACK>
<ACK>
<SOH> <E> 8455 <A> <ETB> BCC <DC1>
<STX> "1st line" <ETB> BCC <DC1>
TNC
.
.
.
.
.
.
.
.
.
.
.
.
<STX> "last line" <ETB> BCC <DC1>
<STX> "10th line" <ETB> BCC <DC1>
<STX> "11th line" <ETB> BCC <DC1>
<ETX> <EOT>
<NAK>
<ACK>
<ACK>
<ACK>
.
.
.
.
.
.
<STX> "10th line" <ETB> BCC <DC1>

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-21
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>.

8-22 TNC 406/TNC 306 2 TNC data interfaces 3/97
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.

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-23
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 EXT

RTS
+

CTS
+

TxD
+

RxD
+

CTS
+

RTS
+

RxD
+

TxD
+
Receiving
buffer full
Data Data Data
Start
+ 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
+ Positive voltage level
negative voltage level

CTS
+

RTS
+

RTS
+

CTS
+
Receiving
buffer full

RxD
+

TxD
+
Start

TxD
+

RxD
+
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).

8-24 TNC 406/TNC 306 2 TNC data interfaces 3/97
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:
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
ge
gn
rs
gr
br
rt
bl
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

ws/br
WH/BN GND Chassis
RXD
TXD
CTS
RTS
DTR
GND Signal ground
DSR
GND
TXD
RXD
RTS
CTS
DSR
GND
DTR
V.24-Adapter-Block
RS-232-C Adapter block



Peripheriegert
Peripheral unit
LE
ws/br
WH/BN
GN
Yl
GY
PK
BL
RD
BN
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").

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-25
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

8-26 TNC 406/TNC 306 2 TNC data interfaces 3/97
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 EXT mode: ASCII character for end of data (EXT)
Input range: 0 to 127
MP5011 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

3/97 TNC 406/TNC 306 2 TNC data interfaces 8-27
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).

8-28 TNC 406/TNC 306 3 Standard data transmission protocol 3/97
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.

3/97 TNC 406/TNC 306 3 Standard data transmission protocol 8-29
Peripheral unit
<NUL> <NUL> <NUL>
1st line of file <CR> <LF>
Last line of file <CR> <LF>
<NUL> <NUL> <NUL>
1st line of file <CR> <LF>
Last line of file <CR> <LF>
.
.
.
.
.
.
Transmission path
<DC1>
TNC
<EOT>
.
.
.
1st line of file <CR><LF>
<NUL> <NUL> <NUL>
.
.
.
Last line of file <CR> <LF>
1st file
2nd file
Last
file
.
.
.
<ETX>
<DC1>
<DC1>

8-30 TNC 406/TNC 306 3 Standard data transmission protocol 3/97
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
<DC1>
<DC3>
<NUL> <NUL> <NUL>. . .
1st line of file <CR> <LF>
TNC
.
.
.
.
.
.
Last line of file <CR> <LF>
.
.
.
6th line of file <CR> <LF>
5th 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>.

3/97 TNC 406/TNC 306 3 Standard data transmission protocol 8-31
Peripheral unit Transmission path
<EOT>
<DC1>
<NUL> <NUL> <NUL>
1st line of file <CR> <LF>
TNC
.
.
.
Last line of file <CR> <LF> <ETX>
.
.
.
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
1st line PGM100 <CR> <LF>
Last line PGM 100 <CR> <LF> <ETX>
Transmission path
<EOT>
<DC1>
TNC
.
.
.
.
.
.
100.H "START"
<NUL> <NUL>
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).

8-32 TNC 406/TNC 306 3 Standard data transmission protocol 3/97
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
<NUL> <NUL>
1st line of file 1 <CR> <LF>
Last line of file 1 <CR> <LF>
<NUL> <NUL>
1st line of file 2 <CR> <LF>
Last line of file 2 <CR> <LF>
1st line of last file <CR> <LF>
<NUL> <NUL>
Last line of last file <CR> <LF> <ETX>
Transmission path
<DC1>
TNC
<EOT>
<DC1>
<DC1>
<DC1>
.
.
.
.
.
.
.
.
.
<ETX>
.
.
.
.
.
.
.
.
.
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>.

3/97 TNC 406/TNC 306 3 Standard data transmission protocol 8-33
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
<NUL> <NUL>
1st line of file 1 <CR> <LF>
2nd line of file 1 <CR> <LF>
Last line of file 1 <CR> <LF> <ETX>
.
.
.
.
.
.
<NUL>
.
.
.
Last line of last file <CR> <LF> <ETX>
Transmission path
<DC1>
TNC
<EOT>
<DC1>
<DC1>
<DC1>
.
.
.
.
.
.
<ETX>
<DC3> Polling:
Read in
Yes / No

8-34 TNC 406/TNC 306 4 Data transfer with BCC 3/97
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
<SOH> "Error" <ETB> BCC <DC1>
Transmission path
<EOT> <ACK>
TNC
The received error message is displayed in the TNC, but can be acknowledged and erased with the
CE key.

3/97 TNC 406/TNC 306 4 Data transfer with BCC 8-35
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>

8-36 TNC 406/TNC 306 4 Data transfer with BCC 3/97
4.1.2 Outputting a selected program
The following protocol is followed:
Peripheral unit
<ACK>
<ACK>
.
.
.
<ACK>
Transmission path TNC
<STX> 1st line of file <ETB> BCC <DC1>
<ETX> <EOT>
<STX> Last line of file <ETB> BCC <DC1>
.
.
.
<SOH> <N> Name <A> <ETB> BCC <DC1>
.
.
.
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.

3/97 TNC 406/TNC 306 4 Data transfer with BCC 8-37
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.
Peripheral unit
<ACK>
.
.
.
<ETX>
<SOH> <N> Name <E> <ETB>
Transmission path TNC
<ACK>
<EOT>
<ACK>
.
.
.
<STX> 1st line of file <ETB> BCC <DC1>
<STX> Last line of file <ETB> BCC <DC1>
BCC <DC1>

8-38 TNC 406/TNC 306 4 Data transfer with BCC 3/97
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.
Peripheral unit
<ACK>
.
.
.
<ETX>
<SOH> <H> <E> <ETB>
Transmission path TNC
<ACK>
<EOT>
<ACK>
.
.
.
<STX> 1st line PGM1 <ETB> BCC <DC1>
<STX> Last line of last file <ETB>
<SOH> <H> <E> <ETB>
<SOH> <H> <E> <ETB>
<ACK>
.
.
.
<STX> Last line PGM1 <ETB> BCC <DC1>
<ACK>
.
.
.
BCC <DC1>
BCC <DC1>
BCC <DC1>
BCC <DC1>

3/97 TNC 406/TNC 306 5 Data transfer with LSV2-protocol 8-39
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.

8-40 TNC 406/TNC 306 6 Error messages 3/97
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).

3/97 TNC 406/TNC 306 6 Error messages 8-41
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 Meaning
ERR: 001 Wrong instruction code
ERR: 002 Illegal program name
ERR: 003 Defective data transmission
ERR: 004 Program incomplete
ERR: 010 Program not on floppy disk
ERR: 011 Program protected against erasure
ERR: 012 Program storage in progress
ERR: 013 Program directory full
ERR: 014 Floppy disk full
ERR: 100 Floppy disk not formatted
ERR: 101 Sector number too large
ERR: 102 Drive not ready
ERR: 103 Floppy disk write-protected
ERR: 104 Data on floppy disk defective
ERR: 105 Sectors not found
ERR: 106 Check sum defective
ERR: 107 Disk controller faulty
ERR: 108 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 Error message
<ESC><1><0> TRANSFERRED DATA INCORRECT
<ESC><1><1> DATA CARRIER MISSING
<ESC><1><2> DATA CARRIER WRITE-PROTECTED
<ESC><1><3> WRONG OPERATING MODE
<ESC><1><4> WRONG PROGRAM DATA
<ESC><1><5> DATA CARRIER EMPTY
<ESC><1><6> PROGRAM INCOMPLETE
<ESC><1><7> ME: END OF TAPE
A detailed description of these peripherals can be found in the appropriate operating manual.

8-42 TNC 406/TNC 306 6 Error messages 3/97
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.

3/97 TNC 406/TNC 306 9-1
User cycles Contents 9
1 Creating user cycles 9-2
1.1 Dialog block with DLG-DEF or DLG-CALL 9-3
1.2 Q parameters and functions in user cycles 9-6
2 Dialogs for user cycles 9-7
3 Output in binary code 9-8
4 "Bolt hole circle" user cycle example 9-9
5 User cycles in NC programs 9-10
5.1 Calls in a HEIDENHAIN dialog program 9-10

9-2 TNC 406/TNC 306 1 Creating user cycles 3/97
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).

3/97 TNC 406/TNC 306 1 Creating user cycles 9-3
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 999 999 68.H to 999 999 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
99999968.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.

9-4 TNC 406/TNC 306 1 Creating user cycles 3/97
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
Parameter number in user cycle with
DLG-CALL DLG-DEF
Cycle parameter 1 Q1 Q31
Cycle parameter 2 Q2 Q32
. . .
. . .
. . .
Cycle parameter 14 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
MP7251 = 40 MP7251 < 40
Q1 Q60=global Q1 Q60=local
BEGIN PGM 100 MM
FN0: Q1 = +1 +1 +0 +1 +0
FN0: Q60 = +5 +1 +5 +1 +5
CYCL DEF 69.0 USERCYCLE 1 +1 +5 +1 +5
CYCL DEF 69.1 Q1 = +2 +2 +5 +2 +5
BEGIN PGM 99999969 MM
DLGDEF 0/32
FN1: Q1 = Q1 + 10 +12 +5 +12 +5
FN1: Q60 = Q60 + 10 +12 +15 +12 +15
END PGM 99999969 MM
STOP +2 +15 +2 +5
END PGM 100 MM

3/97 TNC 406/TNC 306 1 Creating user cycles 9-5
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 Inhibit user cycle 68 PLC PLC
M2241 Inhibit user cycle 69 PLC PLC
M2242 Inhibit user cycle 70 PLC PLC
. .
. .
. .
M2271 Inhibit user cycle 99 PLC PLC
User cycle 30 to 67 can not be inhibited.

9-6 TNC 406/TNC 306 1 Creating user cycles 3/97
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 Number of the datum point in the datum point table
Q81 Coordinate of the X-axis
Q82 Coordinate of the Y-axis
Q83 Coordinate of the Z-axis
Q84 Coordinate of the C-axis
Eroding table OFF:
Q90Q99 Eroding parameters
Eroding table ON:
Q96Q98 Additional eroding parameters
Q99 Current power stage NR
Q150 Maximum power stage
Q151 Minimum power stage
Q152 Current table number
Q154 Minimum undersize (UNS) of min. NR
Q155 Two-times gap (2G) of min. NR
Q156 Two-times gap (2G) of max. NR
Q201Q225 Two-times gap of min. to max. NR
Q231Q255 Minimum undersize of min. to max. NR
General Q parameters:
Q100Q107 Transfer values from PLC to NC
Q108 Electrode radius
Q109 Current tool axis
Q110 Rotational status of the C axis
Contents Q110
no M3/4/5 -1 (after PGM-NR ENT)
M3 active 0
M4 active 1
M5 active 2
Q111 Flushing ON/OFF
Contents Q111
no M8/9 -1 (after PGM-NR ENT)
M9 active 0
M8 active 1

3/97 TNC 406/TNC 306 1 Creating user cycles 9-7
Q113 MM or INCH programming
Contents Q113
-1 (after PGM-NR ENT)
main program mm 0 (after program START)
main program inch 1 (after program START)
Q114 MM or INCH Eroding table
Contents Q113
-1 (after PGM-NR ENT)
Eroding table mm 0 (after executing CYCL GENERATOR)
Eroding table inch 1 (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 Following electrode (see TNC User's Manual)
Q158 Electrode undersize
Q159 Length of electrode
Q160 Electrode number
Q162 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

9-8 TNC 406/TNC 306 2 Dialogs for user cycles 3/97
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 Standard dialog in PLC EPROM
0 USER CYCL
1 CYCL PARAMETER 01
2 CYCL PARAMETER 02
. .
. .
. .
Instead of these standard dialogs, up to 200 different customer-specific dialogs can be stored in PLC
EPROM.

3/97 TNC 406/TNC 306 3 Output in binary code 9-9
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".

9-10 TNC 406/TNC 306 4 "Bolt hole circle" user cycle example 3/97
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
X
Q4
Q3
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)
"Bolt hole circle" user cycle
0 BEGIN 99999968 MM
1 DLG-CALL 0/1/2/3/4/5/6 Dialog block
2 FN1: Q6 = +Q6 + +Q5 Distance traversed in Z
3 FN4: Q50 = +360 DIV + Q1 Angle increment
4 FN0: Q60 = +0 Starting angle
5 CC X+Q3 Y+Q4 Center of bolt hole circle
6 LBL 11 Jump label
7 LP PR +Q2 PA +Q60 C+Q60 R0 FMAX Approach cavity, position C axis
8 L IZ +Q6 M36 Erode cavity
9 L IZ Q6 FMAX M37 Retract, generator off
10 FN 1: Q60 = +Q60 + +Q50 Next angle
11 FN12: IF +Q60 LT +360 GOTO LBL 11 Last cavity?
12 END PGM 99999968 MM
Dialogs for "Bolt hole circle" user cycle
Dialog no. DIALOGUE
0 BOLT HOLE CIRCLE
1 NUMBER OF CAVITIES?
2 RADIUS?
3 X COORDINATE CC?
4 Y COORDINATE CC?
5 SAFETY CLEARANCE?
6 TOTAL CAVITY DEPTH?

3/97 TNC 406/TNC 306 5 User cycles in NC programs 9-11
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 BEGIN PGM 1000 MM
1 TOOL DEF 1 L+0 R+2 Tool definition
2 TOOL CALL 1 Z U 0.1 Tool call
3 CYCL DEF 1.0 GENERATOR Definition and call of the generator
4 CYCL DEF 1.1 PTAB 1 with corresponding eroding
5 CYCL DEF 1.2 MAX = 25 MIN = 1 parameters
6 L Z+2 R0 FMAX Approach safety clearance
7 CYCL DEF 68.0 BOLT CIRCLE Definition of cycle 68 "Bolt hole circle"
8 CYCL DEF 68.1 Q1=+8 Q2=+40 Q3=+60
9 CYCL DEF 68.2 Q4=+50 Q5=2 Q6=20
10 CYCL CALL Call cycle
11 END PGM 1000 MM

3/97 TNC 406/TNC 306 7-Bit ASCII code 10-1
7-Bit ASCII code
Character DEC OCT HEX
NUL 000 000 00
SOH 001 001 01
STX 002 002 02
ETX 003 003 03
EOT 004 004 04
ENQ 005 005 05
ACK 006 006 06
BEL 007 007 07
BS 008 010 08
HT 009 011 09
LF 010 012 0A
VT 011 013 0B
FF 012 014 0C
CR 013 015 0D
SO 014 016 0E
SI 015 017 0F
DLE 016 020 10
DC1 (X-ON) 017 021 11
DC2 018 022 12
DC3 (X-OFF) 019 023 13
DC4 020 024 14
NAK 021 025 15
SYN 022 026 16
ETB 023 027 17
CAN 024 030 18
EM 025 031 19
SUB 026 032 1A
ESC 027 033 1B
FS 028 034 1C
GS 029 035 1D
RS 030 036 1E
US 031 037 1F
SP 032 040 20
! 033 041 21
" 034 042 22
# 035 043 23
$ 036 044 24
% 037 045 25
& 038 046 26
039 047 27
( 040 050 28
) 041 051 29
* 042 052 2A
+ 043 053 2B
, 044 054 2C
- 045 055 2D
. 046 056 2E
/ 047 057 2F

10-2 TNC 406/TNC 306 7-Bit ASCII code 3/97
Character DEC OCT HEX
0 048 060 30
1 049 061 31
2 050 062 32
3 051 063 33
4 052 064 34
5 053 065 35
6 054 066 36
7 055 067 37
8 056 070 38
9 057 071 39
: 058 072 3A
; 059 073 3B
< 060 074 3C
= 061 075 3D
> 062 076 3E
? 063 077 3F
@ 064 100 40
A 065 101 41
B 066 102 42
C 067 103 43
D 068 104 44
E 069 105 45
F 070 106 46
G 071 107 47
H 072 110 48
I 073 111 49
J 074 112 4A
K 075 113 4B
L 076 114 4C
M 077 115 4D
N 078 116 4E
O 079 117 4F
P 080 120 50
Q 081 121 51
R 082 122 52
S 083 123 53
T 084 124 54
U 085 125 55
V 086 126 56
W 087 127 57
X 088 130 58
Y 089 131 59
Z 090 132 5A
[ 091 133 5B
\ 092 134 5C
] 093 135 5D
^ 094 136 5E
095 137 5F

3/97 TNC 406/TNC 306 7-Bit ASCII code 10-3
Character DEC OCT HEX
` 096 140 60
a 097 141 61
b 098 142 62
c 099 143 63
d 100 144 64
e 101 145 65
f 102 146 66
g 103 147 67
h 104 150 68
i 105 151 69
j 106 152 6A
k 107 153 6B
l 108 154 6C
m 109 155 6D
n 110 156 6E
o 111 157 6F
p 112 160 70
q 113 161 71
r 114 162 72
s 115 163 73
t 116 164 74
u 117 165 75
v 118 166 76
w 119 167 77
x 120 170 78
y 121 171 79
z 122 172 7A
{ 123 173 7B
124 174 7C
} 125 175 7D
~ 126 176 7E
DEL 127 177 7F

10-4 TNC 406/TNC 306 7-Bit ASCII code 3/97


3/97 TNC 406/TNC 306 Subject index 11-1
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

11-2 TNC 406/TNC 306 Subject index 3/97
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

3/97 TNC 406/TNC 306 Subject index 11-3
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

11-4 TNC 406/TNC 306 Subject index 3/97
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

3/97 TNC 406/TNC 306 Subject index 11-5
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

11-6 TNC 406/TNC 306 Subject index 3/97
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

3/97 TNC 406/TNC 306 Subject index 11-7
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

11-8 TNC 406/TNC 306 Subject index 3/97
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

3/97 TNC 406/TNC 306 Subject index 11-9
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/2000
TNC 416/TNC 406/TNC 306
1-1
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.
1-2
TNC 416/TNC 406/TNC 306
3/2000
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 (IF LOGIC-ACCU TRUE) Following code only if logic accu=1
IFF (IF LOGIC-ACCU FALSE) Following code only if logic accu=0
ELSE (ELSE) Following code only if IF is not fulfilled
ENDI (END OF IF-STRUCTURE) End of the IF structure
REPEAT (REPEAT) Repeat from here the program sequence
UNTILT (UNTIL TRUE) Repeat sequence until logic accu = 1
UNTILF (UNTIL FALSE) Repeat sequence until logic accu = 0
WHILET (WHILE TRUE) Runs the sequence if logic accu = 1
WHILEF (WHILE FALSE) Runs the sequence if logic accu = 0
ENDW(END WHILE) 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] Operand number= n+X
Wn[X] Operand number= n+2*X
Dn[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.

3/2000
TNC 416/TNC 406/TNC 306
1-3
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, ...)
1-4
TNC 416/TNC 406/TNC 306
3/2000
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 Markers
W1024 Axis release (M2000...)
W1026 Axes into position (M2008...)
W1028 Reserved
W1030 Traverse direction negative (M2160...)
W1032 Reference marks not yet traversed (M2136...)
W1034 Limit switch plus (M2624...)
W1036 Limit switch minus (M2625...)
W1038 Preparing to open the control loop (M2492...)
W1040 Opening the control loop (M2544...)
W1042 Reserved
W1044 Actual-to-nominal value transfer (M2552...)
W1046 Manual direction key plus (M2456...)
W1048 Direction keys manual minus (M2457...)
W1050 Jog increment plus (M2512...)
W1052 Jog increment minus (M2513...)
W1054 Reference limit switch (M2556...)
W1056 Lubrication pulse (M2012...)
W1058 Acknowledgment of lub. pulse (M2548...)
W1060 Reserved
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

3/2000
TNC 416/TNC 406/TNC 306
1-5
New PLC Module 9221
Module 9221 Start PLC positioning
Call
PS B/W/D/K <axis> 0..4 = X .. 5th axis
PS B/W/D/K <target position in the reference system> (0,001 mm)
PS B/W/D/K <feed rate> (mm/min)
CM 9221
PL B/W/D <error code>
Error code :
0: No error, positioning started
1: Error
M3171 = 1 if error occurs during execution of the module
1-6
TNC 416/TNC 406/TNC 306
3/2000
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 Remove Insert
Title page March 1997 Title page New title page
Update Information Update Information No. 15
Introduction
Page 2-9 Software releases
Introduction
Page 2-9, 2-10
New chapter Introduction
Page 2-9, 2-10
Chapter 5 Machine parameters
Page 5-7
Page 5-17
Page 5-26
Page 5-28
Page 5-7, 5-8
Page 5-17, 5-18
Page 5-25, 5-26
Page 5-27, 5-28
Page 5-7, 5-8
Page 5-17, 5-18
Page 5-25, 5-26
Page 5-27, 5-28
Chapter 6 Marker and Words
New markers and words
List of markers and words New list of 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
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/99
TNC 416/TNC 406/TNC 306
1-1
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) Id. Nr. 336 486-3x
or as an alternative:
LE 416D Logic Unit for BF 120 (TFT) Id. Nr. 336 487-3x
TE 420 Keyboard Unit Id. Nr. 313 038-01
BC 120 Visual Display Unit Id. Nr. 313 037-01
(15-inch color monitor)
BF 120 Visual Display Unit Id. Nr. 313 506-01
(10.4-inch color flat panel display)
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 V
PP
or 11A
PP
, 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.
1-2
TNC 416/TNC 406/TNC 306
3/99
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.

3/99
TNC 416/TNC 406/TNC 306
1-3
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 Remove Insert
Title page March 1997 Title page New title page
Update Information Update Information No. 14
Introduction Introduction New chapter Introduction
Mounting and electrical installation Mounting and electrical
installation
New chapter Mounting and
electrical installation
New machine parameters List of machine parameters New list of machine
parameters
New markers and words List of markers and words New list of markers and
words

1/98 TNC406/TNC 306 1-1
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-2 TNC 406/TNC 306 1/98
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 ;KEY STROBE LOCAL
CMT 790 ;SEND KEY CODE
EM ;END OF MAIN PROGRAM
LBL 790
L M980 ;WAIT FOR PROCESSING
JPT 799 ;KEY CODE ALREADY FIXED
PS W516 ;SEND KEY CODE
CM 9180
PL W240 ;RETURN CODE
L W240
< K+0
JPT 795 ;ERROR
L W240

1/98 TNC406/TNC 306 1-3
= K+0
JPT 791 ;KEY WAS PROCESSED
SN M980 ;SET: WAIT FOR PROCESSING
LBL 791
EM
LBL 795 ;ERROR HANDLING KEY SIMULATION
EM
LBL 799
PS K+0 ;ASK WHETHER KEY HAS BEEN SIMULATED
CM 9180
PLW
= K+0
R M980 ;KEY PROCESSED
R M2813
EM
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-4 TNC 406/TNC 306 1/98
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 (Here also you can go into the parameter list)
PLC FUNCTIONS (Trace: here also you can go into the oscilloscope)
MACHINE PARAMETER PROGRAMMING
COMPENSATION VALUE LIST
Under the code number 79513 you will find the following menu and the corresponding data outputs
on RS-232-C:
DIALOG CODE NUMBERS OUTPUT (All control dialogs and numbers)
LOGBOOK OUTPUT (Contents of log)
PROGRAM RUN DATA OUTPUT (Data from geometry module to control loop)
MACHINE PARAMETER OUTPUT (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/98 TNC406/TNC 306 1-5
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 Resolution of display
m inch
0 0.1 m 0.00001
1 0.5 m 0.00002
2 1 m 0.0001 (previous resolution)
3 5 m 0.0002
4 10 m 0.001
5 50 m 0.002
6 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-6 TNC 406/TNC 306 1/98
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 (Q-Parameter)
16.1: M36 Miscellaneous function M
16.2: RAD=20.014 Expansion radius (Q-Parameter)
16.2: DIR=0 Orbit direction (0=CCW, 1=CW) (Q-Parameter)
16.3: PAT=0 Expansion pattern (0...5) (Q-Parameter)
16.3: SPO=0 Sparking out condition (0/1) (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/98 TNC406/TNC 306 1-7
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 1
1
/
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.

3/98 TNC406/TNC 306 1-1
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.

1-2 TNC 406/TNC 306 3/98

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 ;GV nominal Gap Voltage (from erosion parameter)
X K+5
= W524 ;5..495 (=nominal Gap)
L K+450 ;for example 4.5
= W520 ;= 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.

3/98 TNC406/TNC 306 1-3

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.
1-4 TNC 406/TNC 306 3/98
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 Remove Insert
Title page April 1996 Title page New title page
Update Information No. 12 1-1 to 1-2

3/97 TNC406/TNC 306 Update Information No. 11 1-1
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.
1-2 TNC 406/TNC 306 Update Information No. 11 3/97
Example of PLC program:
L K+140 ;e.g. factor 1.4
= W522 ;Factor for backward feed rate
L B671 ;GV Gap Voltage nominal (from erosion parameter)
X K+5
= W524 ;5...495 (=nominal Gap)
L W524 ;nominal Gap
+ K+150 ;Calculate threshold for free-run feed rate
= W520 ;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 free-
run 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/s
2
.
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.

3/97 TNC406/TNC 306 Update Information No. 11
1-3
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
1-4
TNC 406/TNC 306 Update Information No. 11 3/97
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.

3/97 TNC406/TNC 306 Update Information No. 11
1-5
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.
1-6
TNC 406/TNC 306 Update Information No. 11 3/97

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 (operat-
ing 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.
New gap control via gap signal
New machine parameter MP2081
For more information see above description of new features for TNC 306.

3/97 TNC406/TNC 306 Update Information No. 11
1-7
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: ; Project file
...
FONT CHINESE.FON ; Code word in project file
OEMTEXT CHINESE.TXT ; Code word in project file
...
1-8
TNC 406/TNC 306 Update Information No. 11 3/97
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


3/97 TNC406/TNC 306 Update Information No. 11
1-9
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 Data NC --> PLC
B600 Identifier: 1 = EL CALL, 2 = WP CALL
B601 ... B603 Free
B604 ... B619 16-byte ASCII string EL name or WP Name
B620 Number of tilts for identifier 2
B621 ... B623 Free
B624 ... B655 Data PLC --> NC
B624 ... B627 Free
B628 ... B651 Data for identifier 1 (EL CALL) or identifier 2 (WP CALL)
Identifier 1: Identifier 2:
D628 Compensation X Shift X
D632 Compensation Y Shift Y
D636 Compensation Z Shift Z
D640 Compensation C Rotation C
D644 Undersize
D648 Radius
B652 ... B655 Free
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
1-10
TNC 406/TNC 306 Update Information No. 11 3/97
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 Set/reset NC
M2611 Acknowledgment FN19 Set/reset PLC
D280 1st value for FN19 Must be programmed
D284 2nd value for FN19 Optional
D512 Return value from PLC Optional
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!

3/97 TNC406/TNC 306 Update Information No. 11
1-11
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 Title page New title page
Update Information No. 11 1-1 to 1-11
Contents 2-1/22 2-1/22
Software releases TNC 406/TNC 306;
EPROM sockets LE 406
2-7/2-8 2-7/2-8/2-9
Contents 3-1...3-4 3-1...3-4
TS 120 removed 339/340 339/340
PLC Input I152 355/356 355/356
RS232C adapter 379/380 379/380
Contents 4-1...4-4 4-1...4-4
Input range MP330 45/46 45/46
Temperature compensation removed 421...424 421...424
Incorrect illustration 429/430 429/430
M2568 /D752 453/454 453/454
Description expanded 457/470 457/470
Color adjustment via soft key 491/492 491/492
Marker M2503 4113/4114 4113/4114
Adjustment for MP1820/MP1830 removed 4145/4146 4145/4146
Contents 5-1/5-2 5-1/5-2
List of machine parameters 55...523 55...525
List of markers and words 61...612 61...612
Contents 7-3/7-4 7-3/7-4
String processing, module 7101...7118 7101...7119
Subject index 111...11...9 111...119

Potrebbero piacerti anche