thb416

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)

Upload: vladimir-ageev

Post on 12-Oct-2014

178 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: thb416

March 2000 208 829-21 · 2.1 · 3/2000 · S · Printed in Germany · Subject to change without notice

(208 829-E8)

Technical ManualTNC 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)

Page 2: thb416

3/97 TNC 406/TNC 306

Preface

This Technical Manual is intended for manufacturers and distributors of machine tools. It contains allnecessary information for assembly, electrical installation, commissioning and PLC-programming forthe HEIDENHAIN TNC 406 and TNC 306 contouring controls.

Whenever HEIDENHAIN improves the hardware or software in these controls you will receive a freedelivery of updated information. Please insert this updated information into your manual withoutdelay. 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 manualformat (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 fromyour impulses and suggestions for improvement. Please help us by letting us know your ideas.

DR. JOHANNES HEIDENHAIN GmbHDepartment PEPO Box 1260D-83292 TraunreutGermany

Page 3: thb416

123456789

1011

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

Page 4: thb416

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

Page 5: thb416

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 electricaldischarge 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 ofconnecting cables.

Encoders

Nominal valueoutputs

PLC I/0 unit

Visual display unit

TNC keyboard unit

Short circuit/touch probe

Electronic handwheel

Data interfaces

NC PLCCommon data area

Machine operating panel

PLC outputs

PLC inputs

Analogue input for gap control

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

Page 6: thb416

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

ComponentsLE 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“ monochromeCRT⋅512 x 256 pixels

Control type• Contouring control for 5 axes

with eroding gap control

• Linear interpolation in 3 out of5 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 of4 axes

• Helical interpolation with simultaneous C-axis motion

Program memory 10 000 program blocks 5000 program blocksfor 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 parametertables, dialogs for user cycles, PLC error messages

Page 7: thb416

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)

Page 8: thb416

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 ± 30 000 mm (1181 in.)

Maximum traverse speed 30 m/min (1181 ipm)

Data interface RS-232-C./.V.24Baud 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 PLCcommands)

4 ms

40 ms

Page 9: thb416

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

Control inputs LE 406:

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

LE 416:

5 sinusoidal encoder inputs

1 analog input for eroding gapsignal⋅

1 input for electronic handwheel

1 input for short circuitdetection

56 PLC inputs + 1 input forEMERGENCY STOP signal

Additional 64 PLC inputs onPLC board PL 410 B (optional)

5 encoder inputs (4 sinusoidal,1 square-wave input)

1 analog input for eroding gapsignal

1 input for electronic handwheel

1 input for short circuit detection

55 PLC inputs + 1 input forEMERGENCY STOP signal

Additional 64 PLC inputs on PLCboard 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

Page 10: thb416

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: 6WPLC: 6WBC110: 70WBC120: 80WBF 120: 15WPL 410 B: 25 W (approx.)

NC: 27 W (approx.) withBE 212

BF 110: 33 W

P L C : 2 4 W (approx.)

Ambient temperature Operation: 0 to 45° C (BF 110: 0 to 40° C)

Storage: –30 to 70° C

Weight LE 416 6 kgLE 406 8.5 kgTE 400 2.4 kgBC 110 11 kgBC 120 14 kgBF 120 3 kgPL 410 B 1.5 kg

LE 360C 8 kgTE 355 1.6 kgBF 110 1.7 kgBE 212 11 kgPL 410 B 1.5 kg

Page 11: thb416

2-8 TNC 416/TNC 406/TNC 306 Software 3/2000

3 SoftwareThe 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 andPLC software numbers are displayed on the screen. The software number can also be directly requestedwith 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 -01Software typeTNC 416National language0= English 1= English 2= English

German German GermanFrench Swedish Czechtalian Finnish res.

Software version

2 8 0 6 2 x -01Software typeTNC 406National language0= English 1= English 2= English

German German GermanFrench Swedish CzechItalian Finnish res.

Software version

2 6 0 0 3 x -01Software typeTNC 306National language0= English1= Czech2= French3= ItalianSoftware version

In addition to the above languages the TNC 306 can always use German, which may beselected via machine parameter MP7230.

Page 12: thb416

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 unitsand a new LE 406. The following table shows which software type will run on which hardwareversion. Since the TNC 306 and TNC 406 are not subject to export restrictions, special exportversions 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 03xTNC 306 C for BE 212 270 641 25 260 03xTNC 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 416286 18x-01286 18x-02286 18x-03286 18x-04

3/994/994/99

2/2000

Software version Release date

TNC 406280 62x-01280 62x-02280 62x-03280 62x-04280 62x-05280 62x-06280 62x-07280 62x-08280 62x-09280 62x-10

3/9410/9411/9511/962/9710/9812/983/9912/992/2000

Page 13: thb416

2-10 TNC 416/TNC 406/TNC 306 Software 3/2000

Software version Release date Software version Release date

TNC 306 TNC 306260 03x-03 2/92 260 05x-03 2/92260 03x-04 3/93 260 05x-04 3/93260 03x-05 8/93 260 05x-05 8/93260 03x-06 11/93 260 05x-06 11/93260 03x-07 3/94 260 05x-07 3/94260 03x-08 6/94 260 05x-08 6/94260 03x-09 6/94 260 05x-09 6/94260 03x-10 11/94 260 05x-10 11/94260 03x-11 2/95 260 05x-11 2/95260 03x-12 6/95 260 05x-12 6/95260 03x-13 11/95 260 05x-13 11/95260 03x-14 2/96 260 05x-14 2/96260 03x-15 11/96 260 05x-15 11/96260 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 machinemanufacturer can store this software in EPROMs. HEIDENHAIN assigns PLC software numbers tothe machine manufacturers on request. HEIDENHAIN can archive the specific PLC programs in adatabase, so that the installation of the correct PLC program is assured if a control has to beexchanged.

Page 14: thb416

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

Page 15: thb416

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 antistaticpackaging material. Be sure that the work station and the technician are properlygrounded during installation.

Page 16: thb416

3/99 TNC 416/TNC 406/TNC 306 Hardware components 3–1

Mounting and electrical installation — Contents

1 Hardware components 3–41.1 Components of the TNC 416 3–4

1.2 Components of the TNC 406 3–4

1.3 Components of the TNC 306 3–4

1.4 Options 3–4

2 Installation 3–62.1 Electrical noise immunity 3–6

2.2 Heat generation and cooling 3–7

2.3 Humidity 3–8

2.4 Mechanical vibration 3–8

2.5 Mounting position 3–8

2.5.1 Logic unit 3–9

2.5.2 Visual display unit 3–12

2.5.3 PLC Input/Output board PL 410 B 3–12

2.6 Degree of protection 3–12

3 Overview of connections 3–13

4 Power supply 3–174.1 Overview 3–17

4.1.1 NC power supply 3–18

4.1.2 PLC power supply 3–19

4.1.3 Buffer battery 3–21

4.2 Power supply for the visual display unit 3–22

4.3 Grounding plans 3–24

4.3.1 Grounding plan TNC 416 3–24

4.3.2 Grounding plan TNC 406 3–254.3.3 Grounding plan TNC 306 3–26

5 Measuring systems 3–295.1 Linear measuring systems 3–29

5.2 Angular measuring systems 3–29

5.3 Measuring system inputs for sinusoidal signals 3–30

5.3.1 Connector assignments 3–30

5.4 Measuring system input for square-wave signals 3–32

5.4.1 Connector assignments 3–32

6 Nominal value output / Gap signal input 3–336.1 Connector assignment 3–34

7 Visual display unit (VDU) 3–377.1 Connector assignment 3–37

Page 17: thb416

3–2 TNC 416/TNC 406/TNC 306 Hardware components 3/99

8 Short-circuit signal/Touch probe input 3–408.1 Connection of the short-circuit signals 3–41

8.2 Connection of the touch probe system 3–41

9 Data interface 3–439.1 RS-232-C/V.24 data interface 3–43

9.2 RS 422/V.11 data interface 3–44

10 Handwheel input 3–4510.1 Portable handwheel HR 410 3–45

10.2 Panel-mounted handwheel HR 130 3–48

11 PLC inputs/outputs 3–5011.1 Technical data 3–50

11.2 Connector assignment 3–51

11.2.1 PLC output 3–52

11.3 PLC I/O expansion board PL 410 B 3–54

11.3.1 PLC inputs/PLC outputs on the PL 410 B 3–55

12 Machine control panel 3–58

13 TNC keyboard 3–60

14 Cable overview 3–6214.1 Cable overview TNC 416 3–62

14.2 Cable overview TNC 406 3–63

14.3 Cable overview TNC 306 3–64

Page 18: thb416

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

15 Mounting dimensions 3–6615.1 LE 416 3–66

15.2 LE 406 3–67

15.3 TE 420 3–68

15.4 TE 400 3–69

15.5 BC 120 3–70

15.6 BF 120 3–71

15.7 BC 110 B 3–72

15.7.1 LE 360 C 3–73

15.8 Keyboards for TNC 306 3–74

15.8.1 TE 355 A 3–74

15.8.2 TE 355 B 3–75

15.9 Visual display units for TNC 306 3–76

15.9.1 BE 212 3–76

15.9.2 BF 110 3–77

15.10 Input/Output boards PL 410B 3–78

15.11 Handwheel HR 3–79

15.11.1 Panel-mounted handwheel HR 130 3–79

15.11.2 Portable handwheels HR 410 3–83

15.11.3 Touchprobe system TS 220 3–83

15.12 Cable adapter 3–84

Page 19: thb416

3–4 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-3xfor 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-2xfor BF 110 Id.-Nr. 270 642-2x

TE 355A Keyboard Unit Id.-Nr. 255 015-06TE 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-12Handwheel HR 410 Id. Nr. 296 469-01Touch Probe System TS 220 Id. Nr. 293 488-xx

Page 20: thb416

3/99 TNC 416/TNC 406/TNC 306 Hardware components 3–5

Page 21: thb416

3–6 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 signalprocessing rates and higher sensitivity. Please protect your equipment by observing the followingrules and recommendations.

Noise voltages are mainly produced and transmitted by capacitive and inductive coupling. Electricalnoise 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 metallicducting, 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.

Page 22: thb416

3/99 TNC 416/TNC 406/TNC 306 Installation 3–7

2.2 Heat generation and cooling

Please note that the reliability of electronic equipment is greatly reduced by continuous operation atelevated temperatures. Please take the necessary measures to maintain the permissible ambienttemperature 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 unitand no pre-warmed air is blown into the unit. The warm air should flow over surfacesthat 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. Inthis case the ventilator fan must be mounted so that the warm air is extracted from the controlcabinet and only filtered air can be drawn in. HEIDENHAIN advises against this method ofcooling, since the functioning and reliability of electronic assemblies are adversely affected bycontaminated air (fine dust, vapors, etc.). In addition to these disadvantages, an inadequatelyserviced filter can lead to a loss in cooling efficiency. Regular servicing is therefore essential.

Obstructiveelements

Heat generatingelements

Incorrect

LE

LE

Correct

Page 23: thb416

3–8 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 preventcondensation on the circuit boards.

2.4 Mechanical vibration

Permissible vibration: < 5 m/s2; 0-500 Hz

2.5 Mounting position

Note the following fundamental points on mounting:

– Mechanical accessibility– Permissible environmental conditions– Electrical noise immunity– The electrical regulations which are in force in your country

Page 24: thb416

3/99 TNC 416/TNC 406/TNC 306 Installation 3–9

2.5.1 Logic unit

HEIDENHAIN recommends the following mounting position of LE 416

Page 25: thb416

3–10 TNC 416/TNC 406/TNC 306 Installation 3/99

HEIDENHAIN recommends the following mounting position of LE 406

*

*

Air inlet

°C°C

°C °C

145

°C Measuring point forambient temperature

Free space for air circulation

Free space for servicing

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

>577

80

40

30

100

160

30 100

°C

Air outlet

*

*

*

*

*

*

°C

PL

R 325

4040

270

40°40

60

30

83

>110

80

40

Minimum clearancefor servicing!recommended: =approx. 250 mm

Maintain clearancefor screwdriver

Connecting cablesmust not hinderswivel movement of the control

°C

246

160

Page 26: thb416

3/99 TNC 416/TNC 406/TNC 306 Installation 3–11

HEIDENHAIN recommends the following mounting position of LE 306

*

*

Air inlet

°C °C

°C °C

145

°C Measuring point forambient temperature

Free space for air circulation

Free space for servicing

Illustration ofmax. swivel range.The minimum angle ofswivel for exchangeof subassembly should be at least 90°.

>577

80

40

30

100

160

30 100

°C

Air outlet

*

*

*

*

*

*

°C

PL

R 325

4040

270

40°40

60

30

83

>110

80

40

Minimum clearancefor servicing!recommended:=approx. 250 mm

Maintain clearancefor screwdriver

Connecting cablesmust not hinderswivel movementof the control

°C

218.5

132.5

Page 27: thb416

3–12 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° CBF 110: max. 40° C

The VDU must be installed with a minimum clearance of 25 mm to the housing. It is particularlyrecommended 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 mentionedtemperatures must not be exceeded.

When installing the BC 120/BC 110/BE 212, remember that this VDU is very sensitiveto magnetic interference. The image position and geometry can be disturbed by straymagnetic 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 ofinterference (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 preferredmounting position for heat removal.

2.6 Degree of protection

Visual display unit when mounted Protection class IP54Keyboard unit when mounted Protection class IP54HR 410 handwheel Protection class IP54

IP54 = Protection against dust and splashwater

Page 28: thb416

3/99 TNC 416/TNC 406/TNC 306 Overview of connections 3–13

3 Overview of connections

LE 416

X1 Measuring system 1 (1Vss/11µA)X2 Measuring system 2 (1Vss/11µA)X3 Measuring system 3 (1Vss/11µA)X4 Measuring system 4 (1Vss/11µA)X6 Measuring system 5 (1Vss/11µA)

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 interfaceX22 RS-422/V11 data interface

X23 Handwheel interface

X41 PLC outputX42 PLC inputX43 BC 120 VDU (alternative to BF 120)X44 PLC power supplyX45 TNC keyboardX46 Machine operating panelX47 PLC expansionX48 PLC analog inputX49 BF 120 flat panel (alternative to BC120)X31 NC power supply

X13, X30 Do not useX65 not installedB Signal ground

Protective ground (YL/GN)

Interfaces X1, X2, X3, X4, X6, X8, X12, X21, X22, X23, X41, X42, X43, X45, X46, X47, X49comply 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 isolatedfrom the device electronics by means of optocouplers.

Page 29: thb416

3–14 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

X43X47

X42 X46

X41 X45

X44

24V

X31

X1 Measuring system 1 (11µA)X2 Measuring system 2 (11µA)X3 Measuring system 3 (11µA)X4 Measuring system 4 (11µA)X5 Measuring system 5 ( )X6 Measuring system 6 ( )

X8 Nominal value outputs 1,2,3,4,5gap signal input

X12 Touch probe system;Short-circuit signal input

X21 Data interface RS-232-C/V.24X22 Data interface RS-422/V.11

X23 Electronic handwheel HR 130/HR 410

X41 PLC outputX42 PLC inputX43 VDU BC 110X45 TNC keyboard TE 400X46 Machine operating panelX47 PLC I/O board PL 410 B

X31 Power supply 24 V for NCX44 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 X47comply 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 isolatedfrom the device electronics by means of optocouplers.

Page 30: thb416

3/99 TNC 416/TNC 406/TNC 306 Overview of connections 3–15

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 (11µA)X2 Measuring system 2 (11µA)X3 Measuring system 3 (11µA)X4 Measuring system 4 (11µA)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 outputX22 PLC inputX23 TNC keyboard TE355X25 Data interface RS-232-C/V.24X26 PLC I/O board PL 410 BX27 Machine operating panel

X31 Power supply 24 V for NCX24 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 complywith 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 isolatedfrom the device electronics by means of optocouplers.

Page 31: thb416

3–16 TNC 416/TNC 406/TNC 306 Overview of connections 3/99

Page 32: thb416

3/99 TNC 416/TNC 406/TNC 306 Power supply 3–17

4 Power supply

4.1 Overview

The supply voltages must meet the following specifications:

Unit Supplyvoltage

Voltage range Max. currentconsumption

Powerconsumption

LE 416 400 Vac 330 Vac –450 Vac 35 WLE 406

LE 306

NC 24 V DC(VDE 0551)

lower limit

20.4 V - - - LE 406 1.3 ALE 306 1.5 A

24 W28.8 to 36 W(the BE 212 isalso supplied)

upper limit

PLC 24 V DCBaseinsulation acc.to VDE 0160)

31 V - - - 1) 1.8 Awhen half of theinputs/ outputsare switched onsimultaneously

Approx. 6 Wwhen approx. 1/3 ofinputs/ outputs areswitched onsimultaneously

PL 410 B 21 Awhen half of theinputs/ outputsare switched onsimultaneously

Approx. 25 Wwhen approx. 1/3 ofinputs/ outputs areswitched onsimultaneously

BF 110 Approx. 1 Awith full display

24 W typical32 W max.

BF 120 Approx. 1 Awith full display

24 W typical

BC 110 110 V / 230 V 85 - 132 V/170 -264 V 70 WBC 120 110 V / 230 V 85 – 264 V 80 WBE 212 Powered through the LE 306

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

Page 33: thb416

3–18 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)

U1 Phase 1 330 Vac to 450 Vac;

U2 Phase 2 50 to 60 Hz

–UZ Do not use

+UZ Do not use

LE 406/LE 306

Pin number

X 31

Assignment

1 + 24 V DC2 0 V

The NC section of the LE must not be suppliedfrom the control voltage of the machine. Itrequires its individual, external and separatelygenerated supply voltage according toVDE 0551. Use 24 V DC with a permissible ACcomponent of 1.5 Vpp (recommended filtercapacitor 10 000 µF/40 V DC).

24 V

U

t

1.5 Vpp

Page 34: thb416

3/99 TNC 416/TNC 406/TNC 306 Power supply 3–19

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 STOP2 + 24 V DC, not switched off by EMERGENCY STOP3 0 V

Power supply for the PL 410 B

The PLC outputs are powered in groups.

Terminal Assignment PLC output

X9 0VX10 +24 V power for logic and for "Control is operational"X11 +24 V power for outputs O32 to O39X12 +24 V power for outputs O40 to O47X13 +24 V power for outputs O48 to O55X14 +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 voltagesupply.

Danger to internal components!

Voltage sources for external circuitry must conform to the recommendations in VDE0160, 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 absoluteupper voltage limit of 32.6 V and an absolute lower voltage limit of 18.5 V:

32.6 V31 V

20.4 V18.5 V

U

t

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

Page 35: thb416

3–20 TNC 416/TNC 406/TNC 306 Power supply 3/99

Page 36: thb416

3/99 TNC 416/TNC 406/TNC 306 Power supply 3–21

4.1.3 Buffer battery

The buffer battery is the voltage source for the RAM memory for NC-programs, PLC-programsand 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 theprocessor board, for buffering the memory contents.

This means that the mains can be switched off when replacing the batteries. The energystore will ensure that the memory is retained while the batteries are exchanged.

LE 416

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

LE 406/LE306

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

Danger of electrical shock!

Power of before opening the housing.

Page 37: thb416

3–22 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 AssignmentL1 Live (BK)N Neutral (BL)

Protective earth (GN/YL)

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

Pin Number Assignment1 Do not use2 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.

Page 38: thb416

3/99 TNC 416/TNC 406/TNC 306 Power supply 3–23

BF 120/BF 110

X1 power supply

Pin number Assignment1 + 24 V2 0 V

Danger to internal components!

Voltage sources of external circuitry must conform to the recommendations in VDE0160, 5.88 for low-voltage electrical separation.

Page 39: thb416

3/99 TNC 416/TNC 406/TNC 306 Grounding plans 3–24

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.

Page 40: thb416

3/99 TNC 416/TNC 406/TNC 306 Grounding plans 3–25

4.3.2 Grounding plan TNC 406

Danger of electrical shock!Connect a protective ground. This connection must never be interrupted.

Page 41: thb416

3/99 TNC 416/TNC 406/TNC 306 Grounding plans 3–26

4.3.3 Grounding plan TNC 306

Danger of electrical shock!Connect a protective ground. This connection must never be interrupted.

Page 42: thb416

3/99 TNC 416/TNC 406/TNC 306 Power supply 3–27

Page 43: thb416

3–28 TNC 416/TNC 406/TNC 306 Power supply 3/99

Page 44: thb416

3/99 TNC 416/TNC 406/TNC 306 Measuring systems 3–29

5 Measuring systems

HEIDENHAIN contouring controls are designed for the installation of incremental linear and angularmeasuring systems.

The control measures the actual position with a measuring step of 0.001 mm or 0.001°. Measuringsystems 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 thisreduces 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 compatiblewith the accuracy requirements, linear measurement can also be made using a rotary encoder onthe 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, forexample, the ROD 450.

5.2 Angular measuring systems

For direct angular measurement in the A, B or C axes the following incremental angular measuringsystems are available: ROD 250 C, ROD 700 C, RON 255 C, and RON 705 C.

To meet accuracy requirements HEIDENHAIN recommends line counts of at least 18 000.

Page 45: thb416

3–30 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 µAPP.The LE 416 can have measuring systems with sinusoidal inputs 11 µAPP or 1VPP switched over viaMP115.0.MP115.0 Axis-specific encoder setting 11µA or 1VPP (LE 416)

Input: %xxxxx0 = 1VPP1 = 11µA

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: %xxxxx0 = 50 kHz for 1VPP; 50 kHz for 11µA

1 = 350 kHz for 1VPP; 150 kHz for 11µA

(recommended input value for linear encoders 50 kHz)

Maximum input frequency LE 406 50 kHzMaximum 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 I1+

2 I1–

5 I2+

6 I2–

7 I0+

8 I0–

3 + 5 V (UP)

4 0 V (UN)

9 Inner shield

Housing Outer shield = unit housing

Page 46: thb416

3/99 TNC 416/TNC 406/TNC 306 Measuring systems 3–31

LE 416

X1, X2, X3, X4 and X6 Encoder (1 VPP/11µA)

Logic unit Encoder cable

D-sub

terminal

(male) 15-pin

Assignment

1 VPP

Assignment

11µA

D-sub

connector

(female) 15-

pin

1 VPP 11µA

1 + 5 V (UP) + 5 V 1 Brown/Green Brown

2 0 V (UN) 0 V 2 White/Green White

3 A+ I1+ 3 Brown Green

4 A– I1– 4 Green Yellow

5 0 V 0 V 5 White/Brown(internal shield)

6 B+ I2+ 6 Gray Blue

7 B– I2– 7 Pink Red

8 0 V 0 V 8

9 + 5 V + 5 V 9 Blue

10 R+ I0+ 10 Red Gray

11 0 V 0 V 11 White

12 R– I0– 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 Externalshield

External shield Housing External shield External shield

Page 47: thb416

3–32 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, twosuch systems can be connected to the LE 406 at input X5 and X6.

The maximum input frequency:LE 406 300 kHzLE 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

6Ua1

––—–

8 Ua2

1Ua2

––—–

3 Ua0

4Ua0

––—–

7UaS

––—–

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.

Page 48: thb416

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

6 Nominal value output / Gap signal input

Nominal value output

The HEIDENHAIN contouring controls regulate the position loop servo with a nominal value potentialof • 10 volts.

Maximum loading of the nominal value outputs: 2 mAMaximum load capacitance: 2 nF

Gap signal input

The gap signal (voltage) is connected to analog input X8 of the logic unit. The gap signal voltagemust be between 0V and + 5V. The TNC uses the gap signal to calculate new nominal values for theanalog 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 pulsesand for storing the analog signal.

Pin 2 220ý

Pin 10

Ra

0 V100 nF

LE

X8

Time constant:

T = 22 µs (220 Ω ⋅ 100 µF)5T = 110 µs

Since the output impedance Ra of the driver stage affects the entire time constant, a low outputimpedance is necessary (for example 33 Ω).

Page 49: thb416

3–34 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 nominalvalue outputs. The clamp must be made in a grounded connection box. This is necessary when thecable must branch to physically separate servo inputs. It is only possible to ground the shielding ofthe servo leads in this way. If required, suitable connection boxes are available from HEIDENHAINwith 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").

Page 50: thb416

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

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

Insulated against housing

Leads are providedwith end sleeves.

Cable screens are led onto 0.14 mm2

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 SIV

GAP

Pin number Assignment

1 Analog output X-axis2 Analog output 0V X-axis3 Analog output Y-axis4 Analog output 0V Y-axis5 Analog output Z-axis6 Analog output 0V Z-axis7 Analog output IVth axis8 Analog output 0V IVth axis11 Analog input Gap signal12 Analog input 0V Gap signal13 Screen connection14 Screen connection15 Screen connection16 Screen connection

Page 51: thb416

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

6 Nominal value output / Gap signal input

Page 52: thb416

3/99 TNC 416/TNC 406/TNC 306 Visual display unit (VDU) 3–37

7 Visual disp lay unit (VDU)

The LE 406 is prepared for connecting the BC 110 CRT screen, the LE 306C for connecting the BE212 CRT screen or BF 110 flat luminescent screen. The status is indicated by the Id.-Nr. on the IDlabel (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 use5 Not used Not used Not used Do not use6 Not used Not used Not used GND7 – Video R GND8 0 V power supply GND GND9 V SYNC V SYNC V SYNC Do not use10 H SYNC1 – H SYNC1 GND11 – 0 V Signal GND GND12 0 V Signal – Not used Do not use13 Video – Not used HSYNC14 H SYNC 2 G VSYNC15 CLOCK B Do not useHousing Outer shield = Unit housing

Page 53: thb416

3–38 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

Page 54: thb416

3/99 TNC 416/TNC 406/TNC 306 Visual display unit (VDU) 3–39

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

Page 55: thb416

3–40 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 "Machineintegration", section "Gap control with feed forward control"). In addition, workpieces can bemeasured or set up electronically with the manual or programmable probing functions (see theUser'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)

8 0 V (UN)

9 Trigger signal

10

2, 11 to 15 not used

Page 56: thb416

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

8.1 Connection of the short-circuit signals

The short-circuit signal line must be connected according to the diagram, otherwise a short-circuitmessage 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 ").

123456789

101112131415

123456789

101112131415

Standby

+15V ±10% (UP)+ 5V ± 5% (UP)Battery warning0V (UN)Trigger signalTrigger signal

1)

2.2 kΩ2.2 kΩShort-circuit-signal1)

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

Page 57: thb416

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

Page 58: thb416

3/99 TNC 416/TNC 406/TNC 306 Data interface 3–43

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 willtransmit 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 theoperating 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 Externalshield

Housing Externalshield

Housing Housing Housing Housing Externalshield

Housing

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

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

Page 59: thb416

3–44 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 isdesignated to control the generator.If used correctly, the RS-422/V.11 serial data interface will ensure error-free data transmission up toa 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 theoperating 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 HEIDENHAINconnecting 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 separationfrom line power.

The following cable type must be used for the connection to the peripheral unit:LIYCY 7 x 2 x 0.14 Cu

Page 60: thb416

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 3–45

10 Handwhee l input

The HR 130, HR 410 handwheels can be connected to the TNC 416/TNC 406 andTNC 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 (UN)

3 RTS

4 + 12 V (UP)

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

Page 61: thb416

3–46 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 andpermissive button (maximum load 1.2 A, 24 V).

Page 62: thb416

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 3–47

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 immediateneed for these terminal strips before the adapter cable, they can be ordered separately:Plug-in terminal strip, 3-pin Id. Nr. 266 364 06Plug-in terminal strip, 4-pin Id. Nr. 266 364 12

Right Left

Page 63: thb416

3–48 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. Itis 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

Page 64: thb416

3/99 TNC 416/TNC 406/TNC 306 Handwheel input 3–49

Page 65: thb416

3–50 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99

11 PLC inputs/outputs

The HEIDENHAIN contouring control TNC 416/TNC 406 has a capacity of max. 56 PLC inputs and 31PLC 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 connectedto the logic unit.

11.1 Technical data

PLC inputs

PL 410B/logic unit

Potential range:

”1”-signal: Ue 13 V to 30.2 V”0”-signal: Ue –20 V to 3.2 VCurrent range:

”1”-signal: Ie 3.8 mA to 8.9 mA”0”-signal: Ie 1.0 mA at Ue = 3.2 V

PLC outputs

Open-collector outputs with current limiting

Logic unit PL 410B

Min. output potentialfor ”1”-signal 3 V below supply voltageNominal operatingcurrent 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.

Page 66: thb416

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3–51

11.2 Connector assignment

The PLC inputs I128 to I151 are on connector X46 (LE 416/LE 406) or X27 (LE 306) for the machinecontrol 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

Page 67: thb416

3–52 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

Page 68: thb416

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3–53

Page 69: thb416

3–54 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 canbe 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

Page 70: thb416

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3–55

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 connectorsare arranged in vertical pairs.

PLC inputs

X3 X4

Pin number Assignment Pin number Assignment

1 I64 1 I802 I65 2 I813 I66 3 I824 I67 4 I835 I68 5 I846 I69 6 I857 I70 7 I868 I71 8 I879 I72 9 I8810 I73 10 I8911 I74 11 I9012 I75 12 I9113 I76 13 I9214 I77 14 I9315 I78 15 I9416 I79 16 I95

X5 X6

Pin number Assignment Pin number Assignment

1 I96 1 I1122 I97 2 I1133 I98 3 I1144 I99 4 I1155 I100 5 I1166 I101 6 I1177 I102 7 I1188 I103 8 I1199 I104 9 I12010 I105 10 I12111 I106 11 I12212 I107 12 I12313 I108 13 I12414 I109 14 I12515 I110 15 I12616 I111 16 I127

Page 71: thb416

3–56 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3/99

PLC outputs

Assignment of the grouped power supply:

Terminal Assignment

X9 0 VX10 +24V PL supply and "Control is operational"X11 +24 V Supply O32 - O39X12 +24 V Supply O40 - O47X13 +24 V Supply O48 - O55X14 +24 V Supply O56 - O62

X7 X8

Pin number Assignment Pin number Assignment

1 O32 1 O482 O33 2 O493 O34 3 O504 O35 4 O515 O36 5 O526 O37 6 O537 O38 7 O548 O39 8 O559 O40 9 O5610 O41 10 O5711 O42 11 O5812 O43 12 O5913 O44 13 O6014 O45 14 O6115 O46 15 O6216 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 outputsare 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.

Page 72: thb416

3/99 TNC 416/TNC 406/TNC 306 PLC inputs/outputs 3–57

Page 73: thb416

3–58 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 themanufacturer's proprietary machine control panel. This connector includes the 0 V and +24 V of thePLC power supply. The PLC inputs I128 to I151 may be connected only with the power supply frompins 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

Page 74: thb416

3/99 TNC 416/TNC 406/TNC 306 Machine control panel 3–59

Page 75: thb416

3–60 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 connectingcable.

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

Page 76: thb416

3/99 TNC 416/TNC 406/TNC 306 TNC keyboard 3–61

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

Pin Number Assignment

1 SL02 SL13 SL24 SL35 Do not use6 RL157 RL148 RL139 RL12

Page 77: thb416

3/99 TNC 416/TNC 406/TNC 306 Cable overview 3–62

14 Cable overview

14.1 Cable overview TNC 416

Page 78: thb416

3/99 TNC 416/TNC 406/TNC 306 Cable overview 3–63

14.2 Cable overview TNC 406

!"#$"#%!

&

"#%'!%'!( )*

%("#+!

,-"%(

,-"%(

"#%'!%'!()*

.%!'"+#%/0!(%"("!!12'!%'3'"+#%/0!(%%-3%3'!%'3'"+#%

44

5,

5,

5,

5,

6'#-%-12$"#-#"7

Page 79: thb416

3/99 TNC 416/TNC 406/TNC 306 Cable overview 3–64

14.3 Cable overview TNC 306

8

,

"'2%!%("3"%#

!(

!( !(

!"#$"#%!

"#%'!%'!( )*

%("#+!

&

,-"%(

"#%'!%'!()*

.%!'"+#%/0!(%"("!!12'!%'3'"+#%/0!(%%-3%3'!%'3'"+#%

44

5,

5,

5,

5,

Page 80: thb416

3/99 TNC 416/TNC 406/TNC 306 Cable overview 3–65

Page 81: thb416

3–66 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

15 Mounting dimensions

15.1 LE 416

Page 82: thb416

3/99

TNC

416/TNC

406/TNC

306M

ounting dimensions

3–67

15

.2 LE

40

6

39215.43"

10.4"

7 .28"

M3 (Einschraublänge max.3)M3 (LENGTH OF ENGAGEMENT .12")

476+5

18.7"+.2" 456+2

17.95"+.08"

15 .6"

13 .51"

280±

0.3

11.0

24"±

.012

"

328

12.9

"

83.53.29"

132.5+2

5.2"+.08"

BefestigungsmöglichkeitPL 400MOUNTING POSSIBILITYPL 400

267±

0.2

10.5

"±.0

08"

20 .79"

326±

0.5

12.8

3±.0

2"

135.5+2

5.3"+.08"

0

12.5

.5"

10,5

.41"

9.35"

251"

42716.8"

Page 83: thb416

3–68 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

15.3 TE 420

Page 84: thb416

3/99

TNC

416/TNC

406/TNC

306M

ounting dimensions

3–69

15

.4 TE

400

5.5.217"

25 1"

36+

5

1.4"

+.2

"ø10

DIA.4"

2 .08"

ø8+1

DIA.3+.04"

M5

471.8"

9.5

.37"

262±

0.2

10.3

15"±

0.2"

242+

0.5

9.53

"+.0

2"

380+0.5

14.96"+.02" 388+0.2

15.276"+.008"

MontageflächeMOUNTING SURFACE

Frontplattenausschnitt FRONT PANEL OPENING

232

9.1"

196

7.7"

105

4.1"

18 .7"371

14.6"18.7"

262±

0.2

10.3

15"±

.008

"

274

10.8

"

40015.75" 388±0.2

15.276"±.008"

6±0.2

.236"±.008"

6±0.

2

.236

"±.0

08"

0.5.02"

Page 85: thb416

3–70 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

15.5 BC 120

Page 86: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–71

15.6 BF 120

12.47"

238

9.37

"

M 5

0

10 .39"

40015.75"

376±0.314.803±.012"

246±

0.3

9.68

5±.0

12"

264

10.3

9"

∅ 5.6DIA .22"

20 .79"

25 .98"

380+114.96+.039"

248+

19.

763+

.039

"

M 50.5.02"

M

F

F

376±0.214.803±.008"

246±

0.2

9.68

5±.0

08"

341.34"

2529.92"

36714.45"

5 .18"

11.5

.45"

R 70

R 2.76

"

12x45°.47"x45°

80 3.15

"

8.3

15"

2.08"

Page 87: thb416

3–72

TNC

416/TNC

406/TNC

306M

ounting dimensions

3/99

15

.7 BC

110 B

112±0.24.41"±.008"

• 276±0.210.866"±.008"

388±0.215.275"±.008"

6±0.2.236"±.008"

40015.75"0

320

12.6

"30

8±0.

212

.162

"±.0

08"

36514.37"16

.63"19.75"

max

.275

MA

X. 1

0.83

"

Z

37514.76"

14.55"

15 .59"

20 .79"

ø10

DIA

.4"

ø8.6

DIA

.34"

2-0.5.08"-.02"

2.08"

1.04"

Z

A

6±0.

2.2

36"±

.008

"

FrontplattenausschnittFRONT PANEL OPENING

372+2"

14.65"+.08"

8-1".31"-.04"

8-1"

.31"

-.04"

292+

2"11

.50"

+.0

8"

M5

Ansicht AVIEW A

X 1X 2

X 4X 3

Page 88: thb416

3/99

TNC

416/TNC

406/TNC

306M

ounting dimensions

3–73

15

.7.1 L

E 3

60

C

Schutzerde M5PROTECTION EARTH M5

R 3

25R

12.8

"

140.5±0.25.53"±.08"

272.

510

.73"

45 1.77

"14

55.

7"

Schwenkbereich der SteuerungFIELD OF SWIVEL FRAME TRAVERSE

83.53.3"

Betriebserde M6SYSTEM EARTH M6

132.5±0,25.2"±.08"

160

6.34

"

20 .78"

8.31"

Befestigungsmöglichkeit PL 400 (Befestigungsschrauben M3x5)MOUNTING POSSIBILITY PL 400 (FIXING SCREWS M3x5)

100.53.95"

311.512.26"

411.516.2"

010.4"

843.3"

476+5

18.8"+.02" 456+2

18"+.08"

56022"

326±

0.5

12.9

3"±.

02"

134

5.3"

Ø 8

DIA .32"

R 40R 1.58 "

Ø10,3DIA .4"

R 50R 2.4"

104"

39215.43"

361.42"

80±0.2

3.15"±.008"

210±0.2

8.26"±.008"

340±0.2

13.39"±.008"

328

12.9

"28

0±o.

2

9.25

"±.0

08"

235±

0,2

9.25

"±.0

08"

267±

0,2

10.5

"±.0

08"

13 .51"

15 .6"

36

7 .28"

M3 (Einschraublänge max. 3)

M3 (LENGTH OF ENGAGEMENT .12")

Anschlußkabel dürfen Schwenkbereich der Steuerung nicht beeinträchtigen!CONNECTION CABELS SHOULD NOT INTERFERE WITH TILTING RANGE OF CONTROL UNIT!

12.5

.5"

10.5

.41"

9.35"

251"

42716.8"

0

7.3±

0.3

.29±

.012

"

Page 89: thb416

3–74 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"

1124.409"

552.165"

0

6±0.2

.236"±.008"

28111.063"269±0.2

10.591"±.008"6±0.

2

.236

"±.0

08"

262

10.3

15"

274

10.7

87"

31+

5

1.16

"+.1

9"

25 .98"

25 .98"

1.0

39"

4.1

57"

2.0

79"

10DIA.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.50.925"

Massenanschluß M5GROUND CONNECTION M5

222+

2

8.74

0"+

.079

"

X2

R60R2.36

Dichtung 3 dick, im eingebauten Zustand 2 dickGASKET .118" THICK INCORPORATED .079 THICK

224+

0.5

8.81

9"+

.020

"

236+0.5

9.291"+.020"

FrontplattenausschnittFRONT PANEL OPENING

18.708"

Page 90: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–75

15.8.2 TE 355 B

50+

5

1.97

"+.2

0"

Ø10DIA .394"

Ø8+1

DIA.351"+.04"

31+

5

1.16

+.1

9"

25 .98"

1 .40"

4.1

57"

2.0

79"

Dichtung 3 dick, im eingebauten Zustand 2 dickGASKET .118" THICK INCORPORATED .079 THICK

MontageflächeMOUNTING SURFACE .02"

19.748"

193±

0.2

7.59

8"±.

008"

300±0.5

11.81"±.020"

0.5

191±

0.5

752"

±.02

0"

338±0.2

13.307"±.008"

248+1

9.76"+.040"

75±0.4

2.95"±.016"

8.5±

0.4

.335

"±.0

16"

187.

5+1

7.38

"+.0

4"

R60R2.36"

X2

X1

1.0

40"

512.01"

66.5

2.62

"350

13.78" 338±0.2

13.307"±.008"

6±0.2

.236"±.008"

96.5

3.80

"

5.5

.217

"

6±0.

2

.236

"±.0

08"

193±

0.2

7.59

8"±.

008"

205

8.07

"

FrontplattenausschnittFRONT PANEL OPENING

Page 91: thb416

3–76 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

15.9 Visual display units for TNC 306

15.9.1 BE 212

30 1.18

"

26

1.02"

min

. 20

MIN

. .79

"

max. 303MAX. 11.93"

max

. 160

MA

X. 6

.30"m

ax. 2

42M

AX

. 9.5

3"

943.20"

min

. 12

MIN

. .47

"

30 1.18

"

2–0.5

.08"–.02"

1.040"

5.197"

Ø10

DIA

.394

"

Ø7.

8D

IA .3

07" +

.008

"

Dichtung 3 dickim eingebauten Zustand 2 dick

GASKET .118" THICKINCORPORATED CONDITION .079" THICK

max. 326MAX. 12.83"

47.5

1.87

"

Z

Z

Freiraum für BelüftungFREESPACE FOR AIR VENTILATION

20.79"

20.79"

max. 300MAX. 11.80"

401.58"

280

11.0

2"

Freiraum für BelüftungFREESPACE FOR AIR VENTILATION

35013.78"6±0.2

.236"±.008" 338±0.2

13.307"±.008"

6±0.

2

.236

"±.0

08"

274

10.7

9"

262±

0.2

10.3

15"±

.008

"

196

7.72

"322.512.70"

5.5.217"

244±

0.5

9.61

"±.0

20"

6

.236

"

5.197"

328+0.5

12.91"+.020"

Montagefläche

MOUNTING SURFACE .02"

0.5 FrontplattenausschnittFRONT PANEL OPENING

Page 92: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–77

15.9.2 BF 110

8+1

.32"+.04"

20±1

.79"±.04"

55+

5

2.2"

+.2

"

165±1

6.5"±.04"

Ø10

4 .16"

1 .04" D

icht

ung

3 di

ckG

AS

KE

T .1

2" T

HIC

K

14±1

.55"

±.04

"

253±

1

9.96

"±.0

4"

R40

R 1

.6"

Ø8

DIA

.32"

Mas

sean

schl

uß M

5G

RO

UN

D C

ON

NE

CTI

ON

M5

281

11.0

6"26

9±0.

2

10.5

9"±.

008"

2058.07"

6±0.

2

.236

"±.0

08"

5.5

.22"

6±0.2

.236"±.008"

193±0.27.598"±.008"

Mon

tage

fläch

e

MO

UN

TIN

G S

UR

FAC

E.0

2"0,

5

11,5–0.5

.45"–.02"

170+1

6.7"+.04"

M5

256+

1

10.0

3"+

.04"

6.5–

0.5

.26"

–.02

"

Fron

tpla

tten

auss

chni

ttFR

ON

T PA

NE

L O

PE

NIN

G

Page 93: thb416

3–78 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

15.10 Input/Output boards PL 410B

47.51.87"

23.5.93"

18±0.5.7±.02"

3.6.14"

Masseanschluß M5GROUND CONNECTION M5

235±0.29.252±.008"

28211.1"

1±0.5.04+.02"

52.52.07"

33+21.3"+.08"

9 .35"

228

8.98

"

210±

0.2

8.26

8±.0

08"

ø9.3DIA.37"

PL-EingängePL INPUTS

PL-AusgängePL OUTPUTS

8.315"

Page 94: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–79

15.11 Handwheel HR

15.11.1 Panel-mounted handwheel HR 130

DIA

.393

7–.0

004"

DIA

.393

7–.0

008"

Ø10

–0.0

10–0

.02

Ø36

f8

DIA

1.4

173–

.001

0"D

IA 1

.417

3–.0

025"

DIA

2.2

83"

Ø58

1.417–.06"36–1.5

.551"14

.492"12.5

DIA .173“Ø4.4

120°

3 x

120°

30°

48

1.890"

16 .630

"

FIXING HOLE M3 x .197"

Befestigungsgewinde M3 x 5Ø0.2DIA .008"3x

19.5+1.768+.04"

10.394"

Page 95: thb416

3–80 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

Handwheel knobsKnob, small

1

.0394"

Ø10DIA .394"

Ø61

DIA

2.4

02"

18.709" (18)

(.709")

Frontplatte (2)

FRONT PANEL (.079")

max. 10

MAX .394"

3x

HR ...

SW 14

7

M3

6.236".276"

M3

18.709"

SW

5.5

Page 96: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–81

Knob, large

7

M3

6.236".276"

M3

12.472"

SW

5.5

HR ...

271.063" (12)

(.472")

Frontplatte (2)FRONT PANEL (.079")

481.89"

903.543"

max. 15.5MAX .610"

SW 1.5

Ø10 F7DIA .3937 +.0011"DIA .3937 +.0005"

3x

Page 97: thb416

3–82 TNC 416/TNC 406/TNC 306 Mounting dimensions 3/99

Knob, ergonomic

7

M3

6.236".276"

M3

12.472"

SW

5.5

HR ...

Ø10 H7

(12)

(.472")

Frontplatte (2)FRONT PANEL (.079")

702.756"

4.158"

10.394"

SW 2

17.7.697"

22.866"

.236"6

DIA .3937 +.0006"

3x

Page 98: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–83

15.11.2 Portable handwheels HR 410

ZYX

+VIV FCT

CFC

TB

FCT

A

33113.031"

702.

756"

31112.244"

83 3.27

"

501.

969"

2.5

.984

"

15.11.3 Touchprobe system TS 220

Page 99: thb416

3–84 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

Page 100: thb416

3/99 TNC 416/TNC 406/TNC 306 Mounting dimensions 3–85

Adapter RS–232–C and RS-422

78±0.23.071±.008" 60+12.36+.04"

5.2"

21+

0.5

.83"

+.0

2" 78±0.23.071±.008"

7.28"

M4

38 1.5"

923.62"

57 2.24

"

M 5

3 .12"

R 40

R 1.57

"

Page 101: thb416

3/97 TNC 406/TNC 306 4-1

Machine integration — Contents 4

1 Machine axes 4-51.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-272.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-373.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

Page 102: thb416

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-564.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-715.1 Connection diagram 4-72

5.2 Flow diagram 4-73

6 Display and operation 4-766.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

Page 103: thb416

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-937.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-1018.1 TNC-keyboard 4-101

8.2 Machine control panel 4-110

9 Short circuit/probing 4-1129.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-12714.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

Page 104: thb416

4-4 TNC 406/TNC 306 3/97

15 Commissioning and start-up procedure 4-13815.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

Page 105: thb416

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 fourmachine axes.The 5th axis cannot interpolate with other axes. This axis can only be started in manual mode or inthe 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 overreference 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 parameterMP330.x .

Linear measurement

For linear encoders with sinusoidal output signals the signal period is the same as the graduationperiod:

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 rotaryencoder (see encoder technical data) as well as the ballscrew pitch must be considered whencalculating 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

Page 106: thb416

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 greaterthan 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 ·

1interpolation factor

· 1000

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

MP330 Signal period

Entry range 1 to 360 in [µm] or [ 1°1000]

MP330.0 X axisMP330.1 Y axisMP330.2 Z axisMP330.3 Axis 4MP330.4 * Axis 5

* only TNC 406

Page 107: thb416

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 onthe 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 positivedirection 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

Page 108: thb416

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 theoperating mode "Manual"):

0 = positive1 = negative

Set ResetM2160 Direction of traverse

X axisNC NC

M2161 Y axisM2162 Z axisM2163 Axis 4M2164 * Axis 5

1.1.3 Encoder monitoring

HEIDENHAIN contouring controls can monitor the signals from the encoders. This function must beactivated by a machine parameter.

Two different conditions can be checked:Error

message

The amplitude of the encoder signals AThe 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

Page 109: thb416

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

Page 110: thb416

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

If it is the workpiece that moves rather than the tool, then the direction of motion and the directionof the axis are opposite to each other. The positive relative directions of movement are thendesignated +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 fourthaxis 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 anddetermination of the direction of rotation is standardized in ISO 841.

+Z

+Y

+X+A

+B+C

Page 111: thb416

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 axesand the direction of travel are also standardized in ISO 841.

+Y

+X+U

+V

+W

+Z

MP410 Designation of axis 4

Entry: 0 = A1 = B2 = C

MP411 * Designation of axis 5

Entry: 0 = A1 = B2 = C3 = U4 = V5 = W

1.2.1 Assignment

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

MP110 Assignment of the encoder inputs to the axes

Entry: 0 = encoder input X11 = encoder input X22 = encoder input X33 = encoder input X44 = encoder input X5 *5 = encoder input X6

MP110.0 X axisMP110.1 Y axisMP110.2 Z axisMP110.3 Axis 4MP110.4 * Axis 5

* only TNC 406

Page 112: thb416

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

MP120 Assignment of the analog outputs

Entry: 0 = output 11 = output 22 = output 33 = output 44 = output 5 *

MP120.0 X axisMP120.1 Y axisMP120.2 Z axisMP120.3 Axis 4MP110.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 principleaxes X, Y, Z or to the fourth axis. The markers M2100 to M2103 are used to show which of the fouraxes is currently defined as the tool axis. The appropriate marker is then set.

Set ResetM2100 X-axis is tool axis NC NCM2101 Y-axis is tool axisM2102 Z-axis is tool axisM2103 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 inthe 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

Page 113: thb416

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 machineparameters (e.g. for pendulum machining).

The input values for the software limit switch are related to the reference point of the encoder. Themomentary software limit switch range is selected by the markers (M2817, M2816) and activatedby the strobe marker (M2824).

The MOD function "Axis-limit" can be used to enter an additional limitation for the actual softwarelimit switch range within the range of traverse.

MP910/MP920 Software limit switch range 1MP911/MP921 Software limit switch range 2MP912/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 1Initial 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 2Activated 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

Page 114: thb416

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

Software limit switch range 3Activated 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-markerM2824 by the PLC. This strobe-marker is reset by the NC after the change-over has been carriedout.

Set ResetM2824 Activation of the software limit switch ranges PLC NC

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

Marker Function Set Reset

M2624 Limit switch X+ NC NCM2625 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

Page 115: thb416

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 acondition for change.

I10 = 0 Software limit switch range 1I10 = 1 Software limit switch range 2.

127 LN I10 ;Range 1128 AN M555 ;already done?129 R M2816 ;select range 1130 R M2817 ;select range 1131 S M2824 ;activate change132 S M555 ;edge recognition range 1133 R M556 ;reset edge recognition range 2134 L I10 ;Range 2135 AN M556 ;already done?136 S M2816 ;select range 2137 R M2817 ;select range 2138 S M2824 ;activate change139 S M556 ;edge recognition range 2140 R M555 ;reset edge recognition range 1

M555

M556

I10

M2816

M2817

M2824

Page 116: thb416

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

MP4060 Path-dependent lubrication

Entry range: 0 to 65 535 (units of 65 536 µm)

MP4060.0 X axisMP4060.1 Y axisMP4060.2 Z axisMP4060.3 Axis 4MP4060.4 * Axis 5

Set ResetM2012 Lubrication pulse X axis, since value of MP4060.0 NC NC

was exceededM2013 Lubrication pulse Y axis, since value of MP4060.1

was exceededM2014 Lubrication pulse Z axis, since value of MP4060.2

was exceededM2015 Lubrication pulse axis 4, since value of MP4060.3

was exceededM2016 * Lubrication pulse axis 5, since value of MP4060.4

was exceeded

* only TNC 406

Page 117: thb416

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

M2548 Reset of accumulated distance for PLC NClubrication X axis

M2549 Reset of accumulated distance forlubrication Y axis

M2550 Reset of accumulated distance forlubrication Z axis

M2551 Reset of accumulated distance forlubrication axis 4

M2576* Reset of accumulated distance forlubrication 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 parameterMP4060.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 onlyto 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 axis46 = T0 ;start timer for duration of lubrication47 = M2548 ;reset accumulated distance48 L T48 ;duration of lubrication for X axis49 = O24 ;set output for lubrication.

024

M2012

M2548

T0

T48

* only TNC 406

Page 118: thb416

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, inmachine parameter MP720. The error is positive if the table travel is too long, and negative if thetravel 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 axisMP720.1 Y axisMP720.2 Z axisMP720.3 Axis 4MP720.4 * Axis 5

* only TNC 406

Page 119: thb416

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 errorcan occur.

Such an axis error is usually determined by a comparator measuring instrument (such as HEIDENHAINVM 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 eachof the four axes one table of corrections with 64 correction values per table can be entered. Thefollowing 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 withcorrection value = 0 at the datum point.

Distance: Distance between the correction points (grid).entry of the exponent to base 2(e.g. entry 11 = 211

= 2,048 mm).

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

Page 120: thb416

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

Example: Y = F(Z)Measurement length on Z axis = 1 000 mmDesired distance between correction points = 1 000 mm : 64 = 15.62 mm

Possible exponent (base 2) = 214 = 16.384 mmDatum 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

Machinedatum

Datum

0

The errors which have thus been determined can be entered in the form of a table directly into thecontrol unit. However, axis error compensation is only effective when it is enabled for a specific axisby 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 tablefor the X axis, whereby "SETUP" is the interval between correction points:

X = F(X)DATUM POINT +0.000SETUP 10 X+0.000 X+0.0001 X+0.001 X+0.0002 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 pressingthe GOTO key, the axis keys can be used to select a correction table for one of the other axes. Thecorrection value which is entered may not exceed the maximum correction-value difference.

Page 121: thb416

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

64In our example, the result is

16.384 mm64 = 0.256 mm

Only the compensation points of the error curve should be entered. The control will automaticallymake a linear interpolation between the compensation points. In the example above the correctiontable is thus:

Y = F(Z)DATUM POINT –990SETUP 140 Z–990 Y+01 Z–973.616 Y–0.062 Z–957.232 Y–0.093 Z–940.8484 Z–924.4645 Z–908.08 Y–0.126 Z–891.696 Y–0.127 Z–875.312 Y–0.18 Z–858.928 Y–0.09...

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

Special case: Axis of rotation

In a correction table for a rotary axis, the entered distance between correction points must be largeenough that the 64 correction points will cover a complete revolution of 360°. An angular separationof at least 5.625° is therefore necessary. For an axis of rotation, correction values will only berecognized 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.

Page 122: thb416

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

Page 123: thb416

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

Page 124: thb416

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 axesmust 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-parametersor 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 thePLC positioning:

Address Function

D528 Position X axis [1/ 1000 mm]D532 Position Y axisD536 Position Z axisD540 Position axis 4D544 * Position axis 5

Feed for PLC positioning

W560 Feed X axis [mm/min]W562 Feed Y axisW564 Feed Z axisW566 Feed axis 4W568 * Feed axis 5

Set ResetM2704 Activate PLC-positioning X axis PLC NCM2705 Activate PLC-positioning Y axisM2706 Activate PLC-positioning Z axisM2707 Activate PLC-positioning axis 4M2708 * 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

Page 125: thb416

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 isstored in the machine parameter MP4210.2. The feed for the PLC positioning is defined in machineparameter MP4220.2

.

.L M0ON M0S M2719 ;word processing.CASE B260 ;M-code.CM 70.ENDCLBL 70CM 110S M2706 ;activate PLC positioning Z axisLN 2706 ;PLC positioning Z axis doneS M2482 ;acknowledgment M-function doneLN M2045 ;no M-function?R M2482 ;acknowledgment resetEMLBL 110 ;load Z position and feed rateL D776 ;load target position from MP4210.2= D536 ;target position PLC positioning Z axisL W964 ;load feed from MP4220.2= W564;feed PLC positioning Z axisEM

M1970

M2045

M4

M2706

M2482

Page 126: thb416

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

Page 127: thb416

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 forworkpiece 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 powerinterruption.

HEIDENHAIN linear encoders are therefore equipped with one or more reference marks. When thescanning head of the encoder passes over a reference mark, a signal is generated which identifiesthat particular position as a reference point. Passing over the reference marks after a powerinterruption re-establishes the relationship between axis positions and display values (and, at thesame time, the fixed machine relationships) last defined by datum setting.

Measuring system

Machine table

REF Value0

10 20 30 40

Machine datum

+Z

+X0

Workpiecedatum

Workpiece

Reference mark

REF Value–44.985

Since it is often inconvenient to re-establish the reference points by traversing large distances afterswitch-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 theabsolute position of the machine slide can be determined from this distance.

Scale with distance-coded reference marks

Scale with one reference mark

Page 128: thb416

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 beachieved by

– pressing the external START key. The axis sequence is determined by machine parameterMP1340.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 andpositioning by M91 and M92 are referenced to the Zero reference mark. In linear encoders the Zeroreference mark is the first reference mark after the start of the measuring length; in angularencoders the Zero reference mark is marked.

The direction of traverse and the velocity on passing the reference marks is defined by machineparameters (MP1320, MP1330.X).

The functional sequence for passing the reference marks can be fixed specifically for the axes bymachine parameters (MP1350.X).

The operating condition "PASS OVER REFERENCE MARKS" is sent to the PLC by the NC (M2057 orW272).

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 bythe machine manufacturer. The trigger signal from the trip dog is connected to an available PLCinput. In the PLC program this PLC input is combined with the markers for "Reference end position"(M2556 to M2560).

Page 129: thb416

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

ClosedOpen

Trip dog"Reference end position"

Traverse direction MP1320.x

Page 130: thb416

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 fromMP1320.x

Invert traverse directionfrom MP1320.x

Pass over two consecutivereference marks

Machine moves to software limit switch range

Machine stops

No Yes

Yes

No

Is the machine outside the software limit switch range?

Page 131: thb416

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

ClosedOpen

Trip dog"Reference end position"

Traverse direction MP1320

For linear measurement using a rotary encoder a reference pulse is produced on each revolution ofthe encoder. It must be ensured that, after switching on the machine, always the same referencepulse 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

Page 132: thb416

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 fromMP1320 with velocity from MP1330.x to the trip dog"Reference end positon"

Is the machine outsidethe software limit

switch range?

Machine moves tosoftware limit switch

Machine stops

No Yes

Yes

No

Machine traverse in inverted directionfrom MP1320 and with reduced velocity from MP1331.x

The first reference pulse after opening of the trip dog"Reference end position" is evaluated

Page 133: thb416

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 axisMP1330.1 Y axisMP1330.2 Z axisMP1330.3 Axis 4MP1330.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 axisMP1331.1 Y axisMP1331.2 Z axisMP1331.3 Axis 4MP1331.4 * Axis 5

MP1340 Sequence for traversing reference marks

Entry: 0 = no evaluation of the reference mark1 = X axis2 = Y axis3 = Z axis4 = Axis 45 = Axis 5

MP1340.0 1st axisMP1340.1 2nd axisMP1340.2 3rd axisMP1340.3 4th axisMP1340.4 * 5th axis

* only TNC 406

Page 134: thb416

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

MP1350 Type of reference mark approach

Entry: 0 = encoder with distance-coded reference marks1 = encoder with one reference mark

MP1350.0 X axisMP1550.1 Y axisMP1350.2 Z axisMP1350.3 Axis 4MP1350.4* Axis 5

Set ResetM2556 Reference end position for X axis PLC PLCM2557 Reference end position for Y axisM2558 Reference end position for Z axisM2559 Reference end position for axis 4M2560 Reference end position for axis 5

W272 Operating mode NC0 = Edit1 = Manual operation2 = Handwheel3 = Positioning with manual entry4 = Program run/single block5 = Program run/full sequence6 = Program test7 = 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 scaledatum. MP960.x contains the distance from the scale datum to the machine datum. All REF-baseddisplays and positioning movements refer to the machine datum (see also Section "Display andoperation").

* only TNC 406

Page 135: thb416

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

Page 136: thb416

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

Page 137: thb416

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

The motor speed control and the current control (both in the drive amplifier) are integrated into theservo position control (NC-control). The servo controlled system consists of the motor and machineslide.

Page 138: thb416

4-3

8TN

C 406/TN

C 306

3 Servo positioning of the N

C-axes

3/97

Act

ual

rpm

Act

ual

posi

tion

Motor TachoNominalcurrent

Nominalposition

Trailingerror(lag)

Nominalrpm

Act

ual

curr

ent

Act

ual p

ositi

on

Act

ual

rpm

CNC Control Servo amplifier Machine

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

Positionregulator

rpmregulator

Currentregulator

Linear/Rotaryencoder

Page 139: thb416

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 lag2. Control with feed forward control only during erosion (see "Gap control with feed forwardcontrol")

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 asdefined 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 "Programrun/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 apart of the cascade control mentioned previously.

All machine parameters which influence the control characteristic are shown here.

YS

v

t

➀ ➁

XS

Vx

sax

sax+ ➃

vx Noml+

Servoamplifier

+-

v x A

ctl

Acceleration:MP1060

kv factor: MP1810

s=s0+v·∆t

X A

ctl

XNoml

-

v=a·t

v = k v·

s ax

Page 140: thb416

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 NCprogram and the final position (X-, Y-, Z-, C-axis), allowing for the acceleration which has beenstored (MP1060). The stored acceleration is valid for the rising as well as the falling slope. If twoor more axes are traversed simultaneously, the smallest value for acceleration will be effective.

Every 4 ms a nominal path value is calculated from the velocity nominal value.

s = so + v ·∆t s = nominal path valueso = previous nominal path valuev = nominal velocity valuet = cycle time 4 ms

The nominal path value is resolved into the individual axis components, depending on which axeshave been programmed.

The axis-dependent nominal path value is compared with the actual value of the positions andthe lag sa is calculated.

sax = xNoml - xActl sax = lag for X-axisxNoml = nominal path value for X-axisxAct l = actual path value for X-axis

The lag is multiplied by the kv factor MP1810 and passed on to the drive amplifier as a nominalvelocity value (analog voltage).

vx= kv · sax vx = nominal velocity-value for X-axis

The kv factor (position loop gain) determines the control loop response of the machine, and it mustbe matched to the machine.

If a very high kv factor is chosen, the lag is very small; however, this can lead to an overshoot whenapproaching a new position. On the other hand, if the kv factor is too small then the new position willbe reached too slowly.

The optimal kv factor must be determined by trial and error (see the section "Commissioning andstart-up procedure").

The following diagram shows the response for various kv factors:

U [V]

t [s]

MP1060 MP1810

MP1810

kv correctkv too largekv too small

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

Page 141: thb416

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

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

MP1060 Acceleration

Entry value 0.001 to 3.0 [m/s2]

MP1060.0 Acceleration X axisMP1060.1 Acceleration Y axisMP1060.2 Acceleration Z axisMP1060.3 Acceleration axis 4MP1060.4 * Acceleration axis 5

The Kv factor in MP1810 is, in general, determined by the rapid traverse (MP1010) of the machineand the lag, using the following formula:

kv = Ve sa

[m/minmm ] kv = position loop gain

ve = rapid traversesa = lag

or

sa = Ve kv

[mm]

Rapid traverse[m/min]

sa [mm]

2

4

6

8

10

2 4 6 8 10

kv = 2

kv = 1

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

Page 142: thb416

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

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

U[V]

sa [mm]

2

4

6

8

10

2 4 6 8 10

kv = 1, Rapid traverse 10 m/min

12

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

MP1810 Kv factor for operation with lag

Entry range 0.1 to 10 [m/minmm ]

MP1810.0 kv factor X axisMP1810.1 kv factor Y axisMP1810.2 kv factor Z axisMP1810.3 kv factor axis 4MP1810.4 * kv factor axis 5

MP1010 Rapid traverse

Entry range 80 to 30 000 [mm/min]

MP1010.0 Rapid traverse X axisMP1010.1 Rapid traverse Y axisMP1010.2 Rapid traverse Z axisMP1010.3 Rapid traverse axis 4MP1010.4 * Rapid traverse axis 5

MP1050 Analog voltage for rapid traverse

Entry range 4.5 to 9 [V]

MP1050.0 Analog voltage X axisMP1050.1 Analog voltage Y axisMP1050.2 Analog voltage Z axisMP1050.3 Analog voltage axis 4MP1050.4 * Analog voltage axis 5

* only TNC 406

Page 143: thb416

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 axisMP1020.1 Manual feed Y axisMP1020.2 Manual feed Z axisMP1020.3 Manual feed axis 4MP1020.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 isproduced 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 sa. The rapid traverse rate is reached at a definite voltage (MP1050).So it is possible to calculate a definite potential ∆U per µm of position deviation (lag).

∆U = MP1050 [mV] / sa [µm]

If ∆U is divided by the smallest voltage step which can be produced (0.6 mV), the result is thenumber of voltage steps which are produced per µm position deviation.

for the TNC 306:n = ∆U [mV]/0.6 [mV]

Example:

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

sa =5 000 [µm]

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

Page 144: thb416

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 theaxes to drift.

The maximum permissible offset voltage in the control is 100 mV. If this voltage is reached orexceeded, 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 thecode number the control shows the offset values for the axes X, Y, Z, 4, in the dialog line. Thevalues indicate the voltage in 0.15 mV (LE406) and 0.6 mV (LE360) units. Thus a display of 10 means10 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 automaticallycompensated. The control puts out a compensating voltage. The compensation only takes place ifthe 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 offsetadjustment will be performed cyclically. An automatic adjustment will be carried out when thepredetermined 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. Ifthe 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

Page 145: thb416

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 radialacceleration (MP1070).

The machine parameter limits the feed for circular movements according to the following formula:

v = r [m] · MP1070 [m/s2] v = feed rate for circular movements [m/s]r = radius [m] (cutter mid-point contour)

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

MP1070 Radial acceleration

Entry value: 0.001 to 3.0 [m/s2]

3.4.2 Constant feed rate in corners

Machine parameter MP7460 defines the angle which can still be traversed with constant feed rate.This machine parameter is effective for corners without a radius compensation, for internal cornersit 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 directionsa = 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°

Page 146: thb416

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 inthe 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 ResetM2688 No monitoring X axis PLC PLCM2689 No monitoring Y axisM2690 No monitoring Z axisM2691 No monitoring axis 4M2692 * 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 positionmonitoring in the machine (lag monitoring). The monitoring is active as soon as the axes are underthe 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 timeslag 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

Page 147: thb416

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 errormessage

"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 calculatedby the NC at short intervals (several servo cycles). If during this period the actual path traveleddiffers 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 becomesinactive. It is not possible to operate the machine safely without movementmonitoring.

MP1140 Movement monitoring

Entry value 0.03 to 10 [V]

Page 148: thb416

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 whichthe axes may move is defined in MP1110.

As soon as position deviation is greater than the value which is stored in MP1110, the flashing errormessage

"Gross positioning error D"

is displayed. The message also appears if, on running-in to a position, an overshoot occurs which islarger than the value in MP1110 or the axis moves in the opposite direction on beginning apositioning 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 hasbeen 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 oneprogram block and the next will be lengthened.

If the axes have reached the positioning window after a movement, the markers M2008 to M2011are set (see section "Axis in position").

MP1030

MP1030.0

Positioning window

Entry value: 0.001 to 2 [mm] or [°]

X axisMP1030.1 Y axisMP1030.2 Z axisMP1030.3 Axis 4MP1030.4 * Axis 5

* only TNC 406

Page 149: thb416

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

Page 150: thb416

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

3.6.1 Axes as programmable position displays

Machine parameter MP60 defines individual axes as programmable position displays (POSITIPfunction).

For example: If MP60 = 3, the X and Y axes are considered to be programmable position displaysand only Z and 4th axes would be in closed loop control. X- and Y-axis positioning can still appear inthe 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

Page 151: thb416

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, sothat 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 (seesection "Open control loop").

Set ResetM2000 Axis enable X NC NCM2001 Axis enable YM2002 Axis enable ZM2003 Axis enable 4M2004* Axis enable 5

* only TNC 406

Page 152: thb416

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 "Positioningwindow") after a movement, the "axis in position" markers are set by the NC. This also happens afterthe control voltage is switched on.

The markers will only be reset by the NC if the axes leave the positioning window when beingtraversed in manual operation or automatic operation. This is also valid when passing over thereference marks.

The "Axis in position" markers are not set for contours which can be machined at constant feed rate.

Set ResetM2008 X axis in position NC NCM2009 Y axis in positionM2010 Z axis in positionM2011 Axis 4 in positionM2032 * Axis 5 in position

* only TNC 406

Page 153: thb416

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 themarkers M2544 to M2547 are set, the control loops for the relevant axes will be opened and theappropriate 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 isclamped, then it is necessary to delay this opening to give the clamp sufficient time to operate. Themarkers M2492 to M2495 and M2572 were introduced for this purpose. If one of these markers isset, and the appropriate axis is in position, then the next NC block will only then be processed whenthe "Open control loop" marker (M2544 to M2547 and M2572) has been set.

Set ResetM2544 Open control loop X axis PLC PLCM2545 Open control loop Y axisM2546 Open control loop Z axisM2547 Open control loop axis 4M2572 * Open control loop axis 5

M2492 Await open control loop X axis PLC PLCM2493 Await open control loop Y axisM2494 Await open control loop Z axisM2495 Await open control loop axis 4M2568 * 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 thenominal 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

Page 154: thb416

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 avalue is loaded into W766 the potentiometer becomes inactive. The actual position of the overridepotentiometer 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 theM-functions M03, M04 and M05.

The speed for the rotary axis is taken from machine parameter MP2090 if the PLC doubleword D726does 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 ofthe 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 overrideEntry range 0 to 150

Page 155: thb416

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

Page 156: thb416

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 describedin the following, by sending an analog voltage to the nominal value outputs. If the gap is too smalland there is a tendency towards short-circuiting or arcing, the electrode is retracted along theprogrammed contour. If the gap is too large—or at the start of the eroding process—the electrodeadvances along the programmed contour. When the eroding process is stable, the gap is onlycontrolled to within a few µm.Feed forward control allows the control to react extremely quickly to the gap signal, resulting in verylow servo lag at low speeds. In particular this improves the gap control behavior when eroding withgraphite.Machine parameter MP2130 defines the maximum speed at which feed forward control is to bemaintained during the eroding process. If the value is exceeded, the control switches to servo lagmode. During an active eroding process marker M2785 is set.

MP2130 Maximum speed for feed forward control during erodingInput range: 0 to 500 (mm/min)

Set ResetM2785 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. Theinput characteristic is defined with machine parameters MP2010, MP2020 and MP2030 (see alsoChapter 13.2.1 "Servo sensitivity").Machine parameter MP2070 defines the speed at maximum gap voltage (5V) if MP2010 = 1 andMP2020 = 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 andMP2132 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.000MP2010.0 Input characteristic range 2.5 to 5VMP2010.1 Input characteristic range 0 to 2.5V

MP2020 Multiplication factor

Entry range: 1,000 to 10,000MP2020.0 Input characteristic range 2.5 to 5VMP2020.1 Input characteristic range 0 to 2.5V

Page 157: thb416

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 = 1Entry range: 1 to 100 (mm/min)

MP2080 Gap signal

Entry range: 0 to 20 = not inverted1 = inverted2 = 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)

Page 158: thb416

4-58 TNC 406/TNC 306 4 Gap control 3/97

Example:

00

10

20

30

40

–10

–20

–30

–40

Ugap [V]

F[mm/min]

Short circuit0V

Electroderetracts

Electrodemoves towards

workpiece

Standstill2.5 V

Freerun5 V

2.5

–50

–60

50

–70

5 V

1

Range for typicalprocess 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) 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) MP2070 = 20 Feed rate at maximum gap voltage (= scaling)

MP2131 = 30 Feed rate limited for a new eroding feed rate from MP2132

(MP2132 = 30) MP2132 = 0 New eroding feed rate when value from MP2131 is exceeded

MP2133 = 100 Retracting speed during short circuit (signal at X12)

Page 159: thb416

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 duringnormal 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 tothe characteristic (see Chapter 4.1), the control reacts by retracting the electrode along theprogrammed path. The control retracts the electrode until the short circuit is eliminated, or until 20blocks have been retraced, or back to the NC block in which M36 was programmed. The retractionvelocity is determined by the characteristic or by the machine parameter MP2133, if a value hasbeen entered there.

M36 off

Marker M2623 causes a special short-circuit behavior during normal positioning (M36 off). As longas this marker is set, the electrode retracts until the short circuit stops, then returns to theworkpiece at the programmed feed rate.

With Marker M2622, the PLC can suppress the short-circuit input X12. This may be required for atool 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 thenhighlighted in the status display.

MP2133 Retraction speed during short circuitEntry 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 isset or for up to 20 NC blocks, or back to the NC block in which M37 was last programmed. If themarker is reset, the electrode returns along its previous path at the last programmed feed rate or, ifno feed rate was programmed, at the feed rate entered in Machine Parameter MP1090; or if MarkerM2620 is set, at the feed rate entered in MP2060. Marker M2780 is set during electrode retractionand reapproach. Marker M2784 is also set during reapproach. Marker M2781 is set if the maximumretraction point is reached.

Page 160: thb416

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 feedrate from MP1090 or MP2060, or from the NC program. From this point on the characteristic curveis active again.

MP1090 Feed rate for reapproachEntry 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 theduration entered in machine parameter MP2120, the control positions the electrode to the beginningof 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 bythe PLC. Marker M2788 is then reset by the NC, the error message is cleared and the reapproachpoint is sought. If it is found, the control resumes program execution at the reapproach point. If thereapproach point is not found, the NC program is at the program beginning, since the search isaborted at the END PGM block of the main program.

MP2120 Time for arc recognitionEntry value: 1 to 99.9 [s]

Set Reset

M2642 Start marker after faulty erosion process PLC PLC

M2788 Error message is displayed NC NC

Page 161: thb416

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 hasreached 5 V, the generator can transmit a free run signal through a PLC input to the control. This canbe 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 setby the NC. The electrode remains in this position until Marker M2616 is set, and the time in machineparameter 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 liftedaway from the workpiece and returned again. This "auto jump" distance must be entered in theDoubleword D730 and the erosion time in Doubleword D734. The cyclic movement for flushing isstarted by Strobe Marker M2621. Marker M2780 is set during the up-and-down motion, MarkerM2784 is set only during downward motion, and Marker M2781 is set when the return point hasbeen reached. Machine Parameter MP2051 defines a distance to the last eroded position up towhich 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 reapproachEntry value: 1 to 500 [µm]

Set Reset

M2621 Strobe marker for gap flushing PLC PLC

D756 Auto jump distance during flushing

Page 162: thb416

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 PLCprogram:

L W676 ; Auto Jump Distance (AJD)X K + 100= D730L W678 ; Eroding time (ER)X K + 100= D734L M2621 ; Request flushingR M2621L M910 ; Flushing on buffer markerA[L D734 ; Eroding time> K + 0]CMT 31EMLBL 31 ;Timer ModuleL D212 ; Timer Buffer> K + 0JPT 32L D734 ; Eroding Timer= D212LBL 32L D212- K + 40 :PLC Cycle Time= D212<= K + 0S M2621 ; Request FlushingEM

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 tables0 = Tables not active2 = Tables active

Page 163: thb416

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 arereserved for the storage of eroding parameters and are transferred to the PLC doublewords D668 toD704 accordingly.

D668 Q-parameter Q90 (NC → PLC)D672 Q-parameter Q91D676 Q-parameter Q92D680 Q-parameter Q93D684 Q-parameter Q94D688 Q-parameter Q95D692 Q-parameter Q96D696 Q-parameter Q97D700 Q-parameter Q98D704 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 theform of erosion tables and transferred to the PLC addresses as defined below. Furthermore, Q-parameters (Q96–Q98) are also used for NC to PLC transfers.

D412 Q-parameter Q96 (NC → PLC)D416 Q-parameter Q97D420 Q-parameter Q98

B666 Maximum power stageB667 Minimum power stageB668 Power stage number NR 1) (.E - table → PLC) can be changed during

machining via Q-parameter Q99B669 Low voltage current LV 2)

B670 High voltage current HV 2)

B671 Nominal gap voltage GV 2) 2) These eroding parameters can beW672 Pulse on duration TON 2) temporarily changed during machiningB674 Pulse off duration TOF 2) via the screen status displayB675 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

Page 164: thb416

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 parametersQ99 Current power stage number NR

Q150 Maximum NR

Q151 Minimum NR

Q152 Current eroding table numberQ154 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 MP2040Q161 Eroding timeQ201 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 executedEntry 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 thePLC through special code words. With MP 4020 one can select whether the table should beactivated from the NC (defined by HEIDENHAIN), or from the PLC.

MP 4020 Erosion parameter table from NC or PLC

Entry values: 0 or 10 = Erosion parameter table from NC1 = 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 openedwith 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 parametertable is selected (depending on MP7230)

NAME Column designationELEM 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 erosionType of number (see below)Routine no. = 0: no specification when entering a valueRoutine no. = 1: specification check if value already existsCharacteristics: (must all be programmed at one time)

FRST First element on-line

Page 165: thb416

3/97 TNC 406/TNC 306 4 Gap control 4-65

SENS Element servo sensitivity (used directly by the TNC)LAST Last element on-lineQ154 Element of min-nr. = Q154Q155 Element of min-nr. = Q155, element of max-nr. = Q156Q201 Elements transferred to Q201 ... Q225 from min to maxQ231 Elements transferred to Q231 ... Q255 from min to max

Type of number

Integer (I)I1-9999 1...9999 WI1-2000 1...2000 WI1-255 1...255 BI1-150 1...150 BI1-99 1...99 BI1-31 1...31 BI1-25 1...25 BI1-20 1...20 BI1-15 1...15 BI1-9 1...9 BI1-3 1...3 B

Integer (I)I9999 0...9999 WI999 0...999 WI255 0...255 BI180 0...180 BI150 0...150 BI120 0...120 BI100 0...100 BI99 0...99 BI90 0...90 BI60 0...60 BI31 0...31 BI30 0...30 BI25 0...25 BI21 0...21 BI20 0...20 BI15 0...15 BI9 0...9 BI3 0...3 BI2 0/1/2 BI1 0/1 B

Real (R)R1D200 0.0 ... 200.0 WR1D200I W

R1D99 0.0 ... 99.0 WR1D99I W

R3D9999 0.000 ... 9999.999 DR3D9999I

R3D1000 0.000 ... 1000.000 DR3D1000I

R3D999 0.000 ... 999.999 DR3D999I

R3D9 0.000 ... 9.999 WR3D9I

R3D1 0.000 ... 1.000 WR3D1I

(The identifier I means that thevalues are converted to inch ifthe 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

Page 166: thb416

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 (0–99%) of the original characteristic gradients.

0Ugap [V]

F[mm/min]

52.5

SV = 99

SV = 60

Page 167: thb416

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 ResetM2794 If MP2199 = 0:

a Q-parameter in the range Q90–Q99 has beenchanged and the values transferred to theappropriate addresses in the PLC.Acknowledgment is by a reset from the PLC.If MP2199 = 2:a Q-parameter in the range Q96–Q98 has beenchanged and the values transferred to theappropriate 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 thecurrently active Stage Number of the erosion tableduring program run.Acknowledgment is by a reset from the PLC.

NC PLC

M2796 If M2795 has indicated changed values in thecurrently active erosion table, M2796 should be setby the PLC if these new values are to betransferred immediately to the PLC (B668 andfollowing). The NC will reset the marker toacknowledge successful execution.

PLC NC

M2798 A new parameter table is active (first CYCL DEFGENERATOR)or M36or eroding parameters displayed in the status duringprogram run have been changedor the value of Q99 (Power Stage Number NR) hasbeen changed if M36 is active.Acknowledgment is by a reset from the PLC.

NC PLC

M2799 Strobe marker for starting transmission to thegenerator control

PLC NC

Page 168: thb416

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. TheRS-422/V.11 interface is permanently allocated for transmission. It can be considered an extensionto the available PLC inputs and outputs. The data is transmitted in hexadecimal code in Motorolaformat (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 transmittedand received data blocks match. If this is the case, the receiving unit confirms the data block bytransmitting <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 thenevaluates the command byte (ID character) and executes it. A new transmission must not be starteduntil the old transmission has been concluded with ACK.

Page 169: thb416

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

Page 170: thb416

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 isoutput, a generator setting must be changed during erosion, or the operating mode of the controlmust be changed.

For transmission the PLC provides Words W760 and W762, which must be loaded with the firstbyte to be transmitted or with the number of the bytes to be transmitted. Strobe marker M2799starts data transmission. If transmission is successful, ACK is transmitted to the PLC and the strobemarker 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 MarkerM2924 to M2928. These markers from the memory area of the PLC error messages arepermanently reserved for displaying the transmission error and must not be used for any otherpurpose. Markers M2930 to M3023 can be changed as desired.

If the generator control transmits NAK (faulty transmission) to the PLC, the data will be transmittedtwo more times. If the generator control transmits NAK three times, the transmission is aborted andMarker M2924 for "transmission error" is set.

Marker Function Set Reset

M2799 Strobe marker for starting transmissionto the generator control

PLC NC

M2924 Transmission error (after three NAKs ) NC NCM2925 False marker numbers NC NCM2926 Address exceeds memory area NC NCM2927 Generator setting missing NC NCM2928 External unit is not ready NC NC

W760 No. of the first byte to be transmitted PLC PLCW762 Number of bytes to be transmitted PLC PLC

Page 171: thb416

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 thePL410 X8/16) with the designation "control operational" are available in the control for theEMERGENCY STOP routine.

If a malfunction is recognized in the control, the TNC switches the "control operational" output off, aflashing error message appears on the VDU-screen and the PLC-program is stopped. This errormessage cannot be canceled. After removing the fault the switch-on routine must be gone throughagain.

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. Thiserror 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 externalEMERGENCY STOP is triggered during an axis movement, the moving axis is stopped in acontrolled manner. If the drive amplifiers are blocked by the external EMERGENCY STOP, the setvalue output may exceed the position-monitoring fixed by the machine parameter. In this case, theerror message "Positioning error" or "Gross positioning error" will be displayed.

Set ResetM2190 Cancelable error message is displayed NC NCM2191 Error message "EXTERNAL EMERGENCY

STOP" is displayedNC NC

Page 172: thb416

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. Becauseof the enormous importance of this function this output is tested by the control every time thepower is switched on.

This diagram represents a proposal for circuitry. The machine tool builder is responsible forcomplying with applicable safety regulations.

+ -

Logic unit

Switch opens briefly when the control voltageof each microprocessor is switched on

X41/34 X44/2 X44/1 X42/4X21/34 X24/2 X24/1 X22/4 "Control is

ready"24V notinterruptible

24V interruptible

"Control ready"feedback

EMERGENCYSTOPbuttons

Controlvoltageon

k1

k1

K1

24 VPLC

LE406LE360

Page 173: thb416

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/34X41/34

X22/4X42/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 andreset the "Control operational" output on X21/34 orX41/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). Ifexceeded,

EMERGENCY STOP DEFECTIVE

4. Recognize the acknowledgment and set output X21/34or 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 errormessage can be canceled, followed by normal controloperations.

9. The control switches off the output "control operational"(X21/34 or X41/34 ) after recognizing a fault.

Flashing Error Message

Page 174: thb416

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

Page 175: thb416

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

Page 176: thb416

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 certainfunctions. All machine parameters and PLC markers which influence the display and the operation ofthe control, and those for which there is no separate section in this manual, are described in thesection "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 positioningblock is to be referenced to the reference point of the encoder instead of the set datum point, thiscan 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 bereferenced 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). Theworkpiece 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

Page 177: thb416

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 axisMP950.1 Y axisMP950.2 Z axisMP950.3 Axis 4MP950.4 1) Axis 5

MP960 Shift of the reference point

Entry range: –30000.000 to +30000.000 [mm] or [°]

MP960.0 X axisMP960.1 Y axisMP960.2 Z axisMP960.3 Axis 4MP960.4 1) Axis 5

1) only TNC 406

Page 178: thb416

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

Page 179: thb416

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 (seeUser'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 planeThis 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 conventionview in 3 planes + 1 = American convention

Bit 1 Rotation of the coordinate system + 0 = no rotationin the machining plane by +90° + 2 = coordinate system rotated by +90°

Page 180: thb416

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 andEditing" and "Test Run" the status information (position values, current tool, feed rate, erodingfunctions etc.) are all displayed in the bottom half of the screen. In "Manual Operation" or "ElectronicHandwheel" 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 or0.001°.

The most recently selected axis is displayed inversely. The PLC is informed (by a marker) which axishas 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

Page 181: thb416

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

Page 182: thb416

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 programmedcontouring feed rate is displayed when the feed potentiometer is in the 100% position. The feedpotentiometer 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 = display1 = no display

Page 183: thb416

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 forthe flushing (M08) are displayed in the status display. The display of these M-functions is controlledby 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 rotaryaxis.

Set ResetM2485 Status-display and sign of S-analog for M03 PLC PLCM2486 Status-display and sign of S-analog for M04M2487 Status-display for M05 and rotary axis stop

M2508 Status-display M080 = No status-display M081 = 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 isdisplayed as WTG <Position> beneath the axis display.

Page 184: thb416

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 displaysthe symbol "*". If a current NC-program is interrupted with the external stop key, the "*" will flash inthe status-display.

Set Reset

M2183 Program interruption (display "Controloperational" flashes)

NC NC

M2184 Control operational (display "Controloperational" 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 thestatus display, e.g. tool number, tool length, tool radius, scaling factor, datum-shift, feed rate etc.,will then be reset.

The Q-parameters Q0–Q255 are not immediately deleted after a power interruption. They are storedin the battery-buffered memory. They are not defined as deleted until a program is selected with thekeys "PGM NR" and "ENT."

MP7300 Cancel Status display

Entry: 0 or 1

0 = status display not canceled1 = 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 currentlyactive power stage and the first erosion parameters (LV, HV, GV, TON, TOF, SV, AJD and ET) aredisplayed above the status window and can be changed directly (temporarily) with the cursor keys ifthe 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 machiningtime can be displayed using MP7272 (only TNC 306).

MP7272 Display of actual machining time

Entry: 0 or 1

0 = display1 = no display

Page 185: thb416

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 screenunder 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 faultcorrected. 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 errormessages. 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. Pleasecontact 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 appropriatemarkers.

If several PLC error messages are activated simultaneously, they can be displayed in turn bypressing 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 explicitlyprogrammed 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 errormessage "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-4221)) PLC PLC

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

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

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

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

. .

. .

M3122 PLC error message 198

M3123 PLC error message 199

1) only TNC 406

Page 186: thb416

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 NCprogram (e.g. pecking, tapping, pocket milling etc.).

In addition, the manufacturer of the machine can program manufacturer-cycles and store them inthe control (see "OEM-cycles"). The sequence of some cycles can be altered by machine parametersand 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 535MP7245.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

Page 187: thb416

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 themachining 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 axes1 = "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 (seeyour User's Manual).

The sparking-out is also influenced by MOD entry:MOD 0 to 3 fast sparking outMOD 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 finalvector is reached (i.e. the electrode has reached the programmed depth and radius), the NC setsMarker M2783.

When the generator sets Marker M2616 (sparking out process ended) through a PLC input, it startsa Timer (MP2110, e.g. 2 sec). If the Marker is not reset within this time, the sparking out willcontinue for 1¼ revolutions past the point at which the marker was set. The cycle is then finishedand the NC subsequently sets Marker M2790.

If Marker M2616 is reset within the time from MP2110, the timer is also reset, and it is restartedwhen 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 finalvector is reached (i.e. the electrode has reached the programmed depth and radius), the NC setsMarker M2783.

When the generator sets Marker M2616 (sparking out process ended) through a PLC input, it mustremain set for 1¼ revolutions so that the cycle can be recognized as “finished eroding”. Then theNC 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 thegap monitor.

Page 188: thb416

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 themachine operator as User-parameters.The machine manufacturer determines in machine parameter MP7330.x which machine parametersare 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 0MP7330.1 User-parameter 1. .. .MP7330.14 User-parameter 14MP7330.15 User-parameter 15

Page 189: thb416

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 beused to activate certain control functions.

Code-number Function

95 148 Select machine parameter list807 667 Select PLC mode105 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 parameters531 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 codenumbers above The machine manufacturer can evaluate this code with the aid of the PLC and definehis 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 programmingstation, 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, 20 = Control and programming1 = 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 10 = Decimal comma1 = Decimal point

Page 190: thb416

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 betested upon switching on the control.

MP7690 Memory test at switch-on

Entry: 0 to 3Bit 0 RAM-test + 0 = Memory test at switch-on

+ 1 = No memory test at switch-onBit 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 "Programrun/full sequence", the NC sets marker M2061. This marker is only reset at the start of the nextprogram.The information "End of program" can be evaluated by the PLC. This is necessary when operating,for instance, with a pallet-changer.

Set ResetM2060 A new program is started NC PLCM2061 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 ProgramRun 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 isreset by the NC, when the reapproach position is reached.

Set ResetM2019 Reapproach activated with NC-START NC NCM2059 TNC in Test Run mode NC NC

Page 191: thb416

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 wayinformation 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 beoverwritten 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 ResetM2713 Activate the transfer of the value from D528 to the PLC NC

Q-Parameter defined in W516W516 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 canbe adjusted to suit the corporate image of the machine tool builder image or the design of themachine.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 FAdjustment 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 redbackground), HEIDENHAIN recommends a standard color adjustment. This standard color setting isthe setting generally used by HEIDENHAIN and is prompted by the control system when creatingthe 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 forforeground and background separately and accepted the change with ENT. Pressing END terminateswithout changing the color.

The standard color-adjustment is given in the following list.

Machine Color for ... Standard color adjustment

parameter

MP7350 Window frame $30200CMP7351 Error messages $3F0000

Page 192: thb416

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

MP 7352 Operating-mode "Machine"MP7352.0 Window Background $000000MP7352.1 Operating mode display $342008MP7352.2 Dialog $3F3828

MP7353 Operating-mode "Programming"MP7353.0 Window Background $000000MP7353.1 Operating mode display $342008MP7353.2 Dialog $3F3828

MP7354 Program-text display "Machine"MP7354.0 Background $080400MP7354.1 General program-text $38240CMP7354.2 Current block $38341CMP7354.3 Background of active window $302410

MP7355 Program-Text display "Programming"MP7355.0 Background $080400MP7355.1 General program-text $38240CMP7355.2 Current block $38341CMP7355.3 Background of active window $302410

MP7356 Status- and PLC-windowMP7356.0 Background $0C0800MP7356.1 Axis positions in the status-display $3F2C18MP7356.2 Status-display, except axis positions $3F280C

MP7357 Soft key display "Machine"MP7357.0 Background $000000MP7357.1 Symbols $3F3828

MP7358 Soft key display "Programming"MP7358.0 Background $000000MP7358.1 Symbols $3F3828

MP7360 Graphics: 3D-depictionMP7360.0 Background $000000MP7360.1 Surface $203038MP7360.2 Front face $0C1820MP7360.3 Text-display in graphics window $3F3F3FMP7360.4 Side face $102028

MP7361 Graphics: view in three planesMP7361.0 Background $000000MP7361.1 Plan (Grid) $203038MP7361.2 Front and side view $203038MP7361.3 Axes cross and text $3F3F3FMP7361.4 Cursor $3F0000

MP7362 Additional status-display in graphics windowMP7362.0 Background graphics window $080400MP7362.1 Background status display $0C0800MP7362.2 Status symbols $38240CMP7362.3 Status values $3F2C18

Page 193: thb416

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 ofthese M-functions have a fixed meaning for the NC. Such M-functions are marked with * in thefollowing table. The other M-functions are freely available.

M- Effective at:Function Start of

blockEnd ofblock

* M 00

M 01

* M 02

* M 03

* M 04

* M 05

* M 06

M 07

* M 08

* M 09

M 10

M 11

M 12

M 13

M 14

M 15

M 16

M 17

M 18

M 19

M 20

M 21

M 22

M 23

M 24

M 25

M 26

M 27

M 28

M 29

* M 30

M 31

M 32

M 33

M- Effective at:Function Start of

blockEnd ofblock

M 34

M 35

* M 36

* M 37

* M 38

* M 39

M 40

M 41

M 42

M 43

M 44

M 45

M 46

M 47

M 48

M 49

M 50

M 51

M 52

M 53

M 54

M 55

M 56

M 57

M 58

M 59

M 60

M 61

M 62

M 63

M 64

M 65

M 66

M 67

M- Effective at:Function Start of

blockEnd ofblock

M 68

M 69

M 70

M 71

M 72

M 73

M 74

M 75

M 76

M 77

M 78

M 79

M 80

M 81

M 82

M 83

M 84

M 85

M 86

M 87

M 88

* M 89

M 90

* M 91

* M 92

* M 93

M 94

* M 95

* M 96

* M 97

* M 98

* M 99

*M-function with fixed meaning for the NC

Page 194: thb416

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 tothe 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. Thenext NC-block is only processed when the signal is acknowledged and the marker M2045 (strobesignal for M-function) is reset by the NC.

Marker Function Set Reset

M2045 Strobe signal for M-function NC NCM2482 Acknowledgment of M-functionPLC NC

W260 Code for M-function (NC → PLC)

Page 195: thb416

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/disablePLC-input: I10 = Acknowledgment of M-function

199 L M2045 ;Change signal for M-function200 RN M2482 ;Reset acknowledgment of M-function201 CMT 77 ;Evaluation of M-function . . .901 EM ;End of main program902 LBL 77903 CASE W260 ;M-code904 CM0905 CM1906 CM2907 CM3908 CM4 . . .930 ENDC931 EM ;End of module . . .1170 LBL 3 M-function M031171 L M11172 S M2485 Status display M03, sign of C-axis analog1173 R M2486 Reset M041174 R M2487 Reset M051175 S O10 C-axis enable/disable1176 L I10 Acknowledgment of M-function?1177 S M2482 Acknowledgment of M-function1178 EM

M2482

M2045

M2485

O10

I10

Page 196: thb416

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 areevaluated in the PLC program (M2045 is the M function/signal, the M function is stored under WordW260).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 ResetM2618 = 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

Page 197: thb416

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

PLC example:

400 CASE W260 ;M-code . .436 CM 36 ;Generator ON437 CM 37 ;Generator OFF . .500 ENDC501 EM . .1020 LBL36 ;Generator ON1021 CM361 ;M361022 CM101 ;Acknowledgment for M-function1023 EM . .1050 LBL37 ;Generator OFF1051 CM371 ;M371052 CM101 ;Acknowledgment for M-function1053 EM . .1211 LBL101 ;Acknowledgment for M-function1212 LN M2482 :If no feedback signal available1213 S M2482 ;Acknowledgment for M-function1214 EM . .1412 LBL361 ;M361413 LN M2618 ;If gap control is off1414 S M2618 ;Switch on gap control1415 R M2619 ;Complementary marker for switch on gap control1416 S O10 ;Generator ON1417 EM . .1476 LBL371 ;M371477 L M0 ;Set Accu to "1"1478 ON M0 ;Set Accu to "1"1479 R M2618 ;Switch off gap control1480 S M2619 ;Complementary marker for switch off gap control1481 R O10 ;Generator OFF1482 EM

Page 198: thb416

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 "Programrun/full sequence" and "Program run/single block" is interrupted until the PLC acknowledges that theM-function has been performed.

In some applications the program should be executed continuously and not wait for theacknowledgment 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 areall not permitted during the output of the M-function.

Page 199: thb416

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 thecontrol is set so that a program-halt occurs on M06 then the program must be restarted after thetool 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 blockthere will be a call of the last-programmed machining-cycle. M89 is canceled by M99 ora CYCL CALL-block.

If M89 is not defined as a modal cycle-call by machine parameters, then M89 will be transferred tothe 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 ofM89 at beginning of block

+ 2 = Modal cycle-call M89 at end of blockBit 2 Program-halt on + 0 = Program-halt until acknowledgment

M-functions of M-function+ 4 = No program-halt,

do not wait for acknowledgment

Page 200: thb416

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

Page 201: thb416

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 themanufacturer's own machine control panel. The two control panels are joined to connectors X23 andX27 (LE 306) or X45 and X46 (LE406) on the logic unit by a connecting cable (see "Mounting andElectrical Installation").

The key-code from the TNC-keyboard is directly evaluated by the NC. PLC inputs and outputs for themachine-control panel are available on connector X27 or X46. These PLC inputs and outputs must beevaluated 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. WithM2876 the entire alphabetic keyboard can be inhibited. M2877 inhibits the soft-key row and M2878inhibits the changeover keys to the right of the screen. All other keys can be inhibited selectivelywith M2854 to M2923. If an inhibited key is pressed, the NC sets the marker M2182 and depositsthe key-code for the key which was operated in word W274. If a not inhibited key is pressed, the NCsets 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. Toachieve this the appropriate key-code is entered in Word W516 and activated by the strobe-markerM2813. 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 functionis executed by entering the required code in W516 and activating with M2813. The appropriate softkey function must be displayed in the foreground or background mode for this. With the trailing edgeof M2813 the PLC is told whether the function was properly executed.

Address Function Set Reset

W272 Operating mode1 = Manual operation2 = Electronic handwheel3 = Positioning with manual entry4 = Program run/single block5 = Program run/full sequence7 = Pass over reference point

NC NC

W274 Key-code for the operated, inhibited key ornot inhibited key

NC NC

W516 Word with multiple-functionKey-code for simulating TNC-keyactivated by M2813

PLC PLC

M2181 not inhibited key was operated NC PLCM2182 Inhibited key was operated NC PLCM2187 Soft key function not executed NC NCM2813 Activate the key from W516 PLC NCM2876 Inhibit the alpha keyboard PLC PLCM2877 Inhibit the soft-key row below the screen PLC PLCM2878 Inhibit the changeover keys at right of screen PLC PLC

Page 202: thb416

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 PGMNAME 59 M2872 76 PLC PLC

M2856 L 60 M2873 CT 77 PLC PLC

M2857 RND 61 M2874 TOUCHPROBE 78 PLC PLC

M2858 CC 62 M2880 TOOLDEF 84 PLC PLC

M2859 C 63 M2881 TOOLCALL 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 PGMCALL 69 M2887 CYCL

DEF 91 PLC PLC

M2867 CR 71 M2888 CYCLCALL 92 PLC PLC

M2868 72 M2889 LBLSET 93 PLC PLC

M2869 73 M2890 LBLCALL 94 PLC PLC

M2870 74

Page 203: thb416

2/97 TNC 406/TNC 306 8 Key simulation 4-103

Marker Function

inhibit

Key-

code

Marker Function

inhibit

Key-

code

Set Reset

M2891 NOENT

95 M2907 0 111 PLC PLC

M2892 STOP 96 M2908 1 112 PLC PLC

M2893 EXT 97 M2909 4 113 PLC PLC

M2894 CLPGM 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

Page 204: thb416

4-104 TNC 406/TNC 306 8 Key simulation 2/97

Key-code for the alphabetic keyboard:

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

xx51 (Hex)

xx results as follows:

08 00 0901 02 03 04 05 06 07

Key code for changeover keys at right of screen:

xx52 (Hex)

xx results as follows:

GRAPHICSTEXTSPLITSCREEN

01

00

Special codes:

0080 (Hex): NC-Start0081 (Hex): NC-Stop

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

Page 205: thb416

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", alinear 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 entry1104 L M10 ;Key simulation active?1105 SN M2896 ;No, then disable "Position-transfer" key1106 L M2182 ;Disabled key pressed?1107 CMT 31 ;Yes, then call key simulation1108 EM

1109 LBL 31 ;Key simulation1110 L M10 ;Key simulation active?1111 R M2896 ;Yes, then enable "Position-transfer" key1112 SN M10 ;Otherwise set key simulation active1113 CASE B200 ;Perform single-step1114 CM 130 ;Key L(line)1115 CM 131 ;Key X1116 CM 132 ;Key "Position-transfer"1117 CM 133 ;Key Y1118 CM 132 ;Key "Position-transfer"1119 CM 134 ;Key Z1120 CM 132 ;Key "Position-transfer"1121 CM 135 ;Key "END-BLOCK"1122 CM 141 ;Reset key simulation1123 ENDC1124 EM

1125 LBL 130 ;L(ine)1126 L K60 ;Key-code for L(ine)1127 = W1021128 CM 136 ;Simulate key1129 EM1130 LBL 131 ;X1131 L K109 ;Key-code for X1132 = W1021133 CM 136 ;Simulate key1134 EM

1135 LBL 132 ;"Position-transfer"1136 L K100 ;Key-code for "Position-transfer"1137 = W1021138 CM 136 ;Simulate key1139 EM

Page 206: thb416

4-106 TNC 406/TNC 306 8 Key simulation 2/97

1140 LBL 133 ;Y1141 L K108 ;Key-code for Y1142 = W 1021143 CM 136 ;Simulate key1144 EM

1145 LBL 134 ;Z1146 L K107 ;Key-code for Z1147 = W1021148 CM 136 ;Simulate key1149 EM

1150 LBL 135 ;"END BLOCK"1151 L K119 ;Key-code for "END BLOCK"1152 = W1021153 CM 136 ;Simulate key1154 EM

1155 LBL 136 ;Key simulation1156 L M2813 ;Strobe - key transfer from W5161157 JPT 137 ;Still set, then wait1158 L B200 ;Case byte1159 + K+11160 = B200 ;Increment case byte1161 L W102 ;Buffered key-code1162 = W516 ;To NC1163 LN M28131164 S M2813 ;Set strobe (activate simulation)1165 EM

1166 LBL 137 ;Return marker1167 EM

1168 LBL 141 ;End key simulation1169 L M2813 ;Simulation performed?1170 JPT 137 ;No, then wait1171 L K+01172 = B200 ;Reset step counter1173 L M101174 R M10 ;Reset marker "Key simulation active"1175 R M2182 ;Reset marker "Disabled key pressed"1176 EM

Page 207: thb416

2/97 TNC 406/TNC 306 8 Key simulation 4-107

Page 208: thb416

4-108 TNC 406/TNC 306 8 Key simulation 2/97

Page 209: thb416

2/97 TNC 406/TNC 306 8 Key simulation 4-109

Page 210: thb416

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 contouringcontrols. 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 femaleconnector X27 for the evaluation of the keys on the machine control panel. The evaluation of thesignals from the machine control panel must be performed in the PLC-program. The appropriatemarkers will be set thereby. For safety reasons a complement-marker must be reset when somefunctions are activated. If the complement-marker is not properly set or reset, the flashing errormessage "Error in PLC-program" will appear. The displayed code identifies the marker where theerror has occurred.

An axis-direction key which has been pressed can be stored by marker M2450 (Complement-markerM2466) . This means that the axis will be traversed until the marker M2450 is reset. This memoryfunction must be activated by machine parameter MP7680 Bit 9.

MP7680 Memory function for axis-direction keys 0 = Not stored 1 = Stored

Marker Function Errormessage

Set Reset

M2448 NC-start (edge evaluation) 1A PLC PLCM2464 Complement NC-start

M2449 Rapid traverse 1BM2465 Complement – rapid traverse

M2488 NC-stop ("0" signifies stop)M2450 Memory function for axis-direction keys 1CM2466 Complement – memory function for axis-

direction keys

M2451 Feed enable 1DM2467 Complement – feed enable

M2456 Manual traverse X+ 1IM2472 Complement – manual traverse X+

M2457 Manual traverse X– 1JM2473 Complement – manual traverse X–

M2458 Manual traverse Y+ 1KM2474 Complement – manual traverse Y+

M2459 Manual traverse Y– 1LM2475 Complement – manual traverse Y–

Page 211: thb416

2/97 TNC 406/TNC 306 8 Key simulation 4-111

Marker Function Errormessage

Set Reset

M2460 Manual traverse Z+ 1M PLC PLCM2476 Complement – manual traverse Z+

M2461 Manual traverse Z– 1NM2477 Complement - manual traverse Z–

M2462 Manual traverse 4+ 1OM2478 Complement – manual traverse 4+

M2463 Manual traverse 4– 1PM2479 Complement – manual traverse 4–

M2452 Manual traverse 5+ 2MM2468 Complement – manual traverse 5+

M2453 Manual traverse 5– 2NM2469 Complement – manual traverse 5–

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

.71 L I128 ;First contact NC-start key72 = M2448 ;NC-start73 LN I129 ;Second contact NC-start key74 = M2464 ;Complement – NC-start

.100 L I130 ;Axis-direction key X+101 = M2456 ;Manual traverse X+102 LN I130103 = M2472 ;Complement - manual traverse X+

Page 212: thb416

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, CYCLSTOP and arcing"). If the TNC probing functions are to be utilized, either the electrode or a probesystem 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, forexample 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 shortcircuit input X12.

9.1 Interfacing the probing function

If the probing function is used (such as the TS 120 touch probe), the machine tool manufacturermust 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 "ElectronicHandwheel" 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 MP6120to MP6150.

Max. measuring range(MP6130)

F2

F2 = Probing feed rate (MP6120)

Page 213: thb416

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

The probing sequence must be enabled by the PLC with marker M2503. This marker is set by theNC after a probing cycle starts and the NC waits until the PLC resets marker M2503 beforeexecuting the probing function. A number of conditions are transferred to the PLC with markersM2022 to M2072. This information can be processed further in the PLC program. The probingfunction is controlled entirely from the NC.

In all modes when the stylus is deflected and marker M2502 is set, the controller stops themachine. If M2502 is not set, the controller only detects stylus deflection if the probing function hasstarted. This is why HEIDENHAIN recommend setting marker M2502 as soon as the touch probe isin 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 ResetM2502 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 atconnector 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 connectorX12); only evaluated during the probing sequence)

NC NC

M2028 Probing function activated (for switch on/off testvoltage)

NC NC

Page 214: thb416

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 insuccession. MP6100 defines the number of times contact is to be made. The measured valueresulting from the first contact is not saved; it serves merely to push aside the small layer of dirtfrom the surface of the electrode. The subsequent values are saved: their mean value is calculatedand used as the measuring result. If MP6100 = 0 or 1, the electrode makes contact twice but onlythe second measured value is saved.

MP6110 defines the maximum permitted difference of probe values during successive probing. Ifthis 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 probingprocess does not end upon contact; the electrode merely backs off by the value in MP6140 and thenprobes again. In this way the user can find cavities, for example, in the workpiece. Probing continuesuntil 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 MP6130is 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 ResetM2617 Probing stop in TOUCH PROBE MANUAL PLC PLC

Page 215: thb416

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

Page 216: thb416

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

Page 217: thb416

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 beconnected to HEIDENHAIN contouring controls TNC406 and TNC306 (see also chapter "Mountingand Electrical Installation"). The operation of the electronic handwheel is described in the TNC User'sManuals.

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 unwantedtraverse movement. To avoid this, a threshold sensitivity for the electronic handwheel can beentered in machine parameter MP7660 .The count direction for the encoder signals from the handwheel is entered in machine parameterMP7650.

MP7640 Handwheel

Entry: 0 to 30 = no handwheel1 = HR 3302 = HR 1303 = HR 410

MP7650 Count direction for handwheel

Entry: 0 or 10 = positive count direction1 = 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). Thissubdivision factor determines the traverse distance per turn. In order to ensure that the rapidtraverse rate fixed by the machine parameter MP1010.x is not exceeded, the NC determines theminimum entry value for the interpolation factor. The NC goes by the smallest value which wasentered, 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 120001 10 60002 5 30003 2.5 15004 1.25 7505 0.625 806 0.312 807 0.156 808 0.078 809 0.039 80

10 0.019 80

Page 218: thb416

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 ResetM2789 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 thatdepends on the value entered in MP7640. After initialization is completed, the handwheel mustanswer with a corresponding code. If the code is incorrect, the error message "HANDWHEEL NOTREADY appears.

All keys of the handwheel except for the function keys A, B, and C are evaluated by the NC. Alloutputs except O109 to O111 are driven by the NC. The function keys A, B, and C, and the outputsO109 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 forlow, 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 lastpressed) 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 willuse the value entered in MP7671.x to calculate the feed rate when the HR 410 axis keys arepressed. For this reason the axis direction keys on the machine control panel are inhibited wheneverthe 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 I168Medium feed rate I169Fast feed rate I170Axis direction – I171Axis direction + I172

Page 219: thb416

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%

Page 220: thb416

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. Thegap 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 andElectrical Installation."

Page 221: thb416

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

Page 222: thb416

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 thePLC program. By pressing one of the axis direction keys (e.g. X+) the corresponding axis will moveby the programmed increment (0.001 to 50mm).

Increment positioning is enabled by the PLC marker M2498. In "Electronic Handwheel" mode theprompt "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 oneincrement per press of a key, the edge evaluation of inputs function in the PLC is used. (See thechapter "PLC Programming", section "Edge Evaluation of PLC Inputs.") The continuous jog function ofthe 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 PLCM2528 Complement increment positioning X+M2513 Increment positioning X– 2B PLC PLCM2529 Complement increment positioning X–

M2514 Increment positioning Y+ 2C PLC PLCM2530 Complement increment positioning Y+M2515 Increment positioning Y– 2D PLC PLCM2531 Complement increment positioning Y–

M2516 Increment positioning Z+ 2E PLC PLCM2532 Complement increment positioning Z+M2517 Increment positioning Z– 2F PLC PLCM2533 Complement increment positioning Z–

M2518 Increment positioning IV+ 2G PLC PLCM2534 Complement increment positioning IV+M2519 Increment positioning IV– 2H PLC PLCM2535 Complement increment positioning IV–

M2520 Increment positioning V+ 2I PLC PLCM2536 Complement increment positioning V+M2521 Increment positioning V– 2J PLC PLCM2537 Complement increment positioning V–

Page 223: thb416

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 modeL M2052 Operating modeL M2052 Electronic handwheel modeCMT 10 Electronic handwheel..EM End of main program..LBL 10L M2052

S M2498 Enable increment positioning

R M2512 Reset increment positioningmarkers for X axis

R M2513S M2528S M2529

L M1638 Increment positioning X+AN I133S M2512R M2528

L M1633 Increment positioning X–AN I138S M2513R M2529

EM...

Page 224: thb416

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

Page 225: thb416

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 forthe appropriate axis is entered via the PLC program, strobe marker M2716 is to be set during aM/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 = 50Correction in D528 = +20

Strobe marker M2716 set, i.e. correction is activeNew 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 viaPLC program into D528 to D544.

Marker Function Set Reset

M2716 Strobe marker for datum correction PLC NC

D528 Datum correction for X axisD532 Datum correction for Y axisD536 Datum correction for Z axisD540 Datum correction for axis 4D544 Datum correction for axis 5 1)

1) only TNC 406

Page 226: thb416

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 activatedA M2045S M10 ;buffered marker for strobe marker 2716CMT 200 ;datum correction callR M10L W260== K+21 ;M21 activatedA M2045S M10 ;buffered marker for strobe marker 2716CMT 201 ;deactivate datum correction callR M10EM ;end of main program

LBL 200 ;activate module for datum correctionL D896 ;value from MP4210.32= D536... ;for the other axis the correction value 0 must be entered...L M10S M2716EM

LBL 201 ;deactivate module for datum correctionL D900 ;value from MP4210.33= D536L M10S M2716EM..

Page 227: thb416

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 apick-and-place rack type.

For electrode changers that function with proximity switches, reference should be made to thedescription 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 thePLC program. The evaluation of the TOOL DEF and TOOL CALL blocks as well as the "TOOLDEFINITION" cycle is performed by the NC. Communication between NC and PLC is via markersand words.

NC Program Example

.

.

.TOOL DEF 1 L+2.73 R+5CYCL DEF 3.0 TOOL DEFINITIONCYCL DEF 3.1 T2 R+2.7CYCL DEF 3.2 X+10.3 Y–15.02CYCL DEF 3.3 Z+18.15 C+1.23...TOOL CALL 1 Z U+0.42...TOOL CALL 2 Z U+2.24...

Page 228: thb416

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 correspondingflowcharts and PLC functions. Before production of a PLC program the outline structure for theprogram run must be taken into consideration (sequencing, interlocks, buffer marks etc.)

Each electrode change should be commenced with a TOOL CALL command. The TOOL DEFcommand has no function within the PLC. In this example each rack position in the electrodechanger is defined by two machine parameters (X coordinate and Y coordinate). In the following flowcharts variable names are used to aid understanding of the logic. In the PLC program these variablenames 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 machineparameter MP7480.0. If MP7480.0 = 1, the NC only loads the new tool number into the PLC wordW262 if it is different from the current tool number. If MP7480.0 = 2, PLC word W262 is loaded withthe new tool number at every TOOL CALL. When a value is loaded into W262, the NC sets strobemarker M2046 to inform the PLC program which should then take appropriate action, i.e. change theelectrode. With the change sequence completed the PLC program should set marker M2483 toindicate 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 output1 = Output only when tool number changes2 = Output with every TOOL CALL(See Chapter 5, "Machine Parameter List")

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

Page 229: thb416

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)

Page 230: thb416

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 listedbelow:

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 W262Tmax = Maximum tool number (i.e. 5)SPIREG = Current tool number

Page 231: thb416

2/97 TNC 406/TNC 306 14 Electrode changer 4-131

14.2.1 PLC module "TOOL CALL"

!"#$

%&'

()%

#&#

#

!"#

%&'

()%

*

*

*

(&

*

(+&&%

%

!"#

!"#$

),--.

&&%%%

,"-,

(-/-

&

(&

&&%

()!0

(&

1#/

2

(&

(&

34

,5

(&

*

Page 232: thb416

4-132 TNC 406/TNC 306 14 Electrode changer 2/97

14.2.2 PLC module "REPLACE OLD TOOL"

"6

7,

!"#$

&' '

&&%8

&'9

!"#$

%'&':9&+(

#)#

,

,

!"#$

:)

%'&'

&&%%!&&%%!

(9

*

(

5

Page 233: thb416

2/97 TNC 406/TNC 306 14 Electrode changer 4-133

14.2.3 PLC Module "PLC POS. NEUTRAL"

%,

:)

,

6:

,

%'3*

,",-#'

3*

(9

(

(

*

*

3"*

,

Page 234: thb416

4-134 TNC 406/TNC 306 14 Electrode changer 2/97

14.2.4 PLC module "SELECT NEW TOOL"

! "# $ %$

"6

7

,,

!"#$

&' '

)(%!

&&%

!"#$

%'&'

:9&+(

#,#.

#

1,6

!"#$

%'&'

()%

(9

(

*

8

&&(

9

5

Page 235: thb416

2/97 TNC 406/TNC 306 14 Electrode changer 4-135

14.2.5 PLC module "POC. REG."

%&9

&

1,6,

,,

!"#$

%'&'8

&&(7

&

&

7

!"#$

%'&'8

&&(;

!"#$

%&'8&&(<

&

;

&

<

!"#$

%'&'8

&&(4

(&

(&&

4

!"#$

%'&'8

&&(

*

9(9(&(

(9

%

(&

(&

(&

*

*

*

*

&

& 7

& ;

& <

& 4

Page 236: thb416

4-136 TNC 406/TNC 306 14 Electrode changer 2/97

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

/3=*,,6

-9;>=9<;

/%,/

?-,,,6-

,- -!?-%',@

,,-,- -,

,@,%'

!- -!,

*

!

'

3*,

(!7

+A=+A;

3=*!;B4=!;B

,- -!- '-6

(9

*

(

3*

,

Page 237: thb416

2/97 TNC 406/TNC 306 14 Electrode changer 4-137

14.2.7 PLC module "PLC POS. Z DOWN"

$

%,

,:9&+(

,

(9

*

( :

,

14.2.8 PLC module "PLC. POS. Z UP"

%,

,:)

,

:

,

(9

(

*

Page 238: thb416

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. Detaileddescriptions 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 bycode 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 to0 V, the offset potentiometer must be so adjusted that the axis comes to a stop. After the offsetadjustment remove the short-circuit link on the nominal value!

– Rough velocity adjustment. Connect battery supply to the nominal value input. Adjust the batterysupply 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 drivemotor with a tachometer.

– Tuning of the drive amplifier. As far as the control is concerned, the actual servo-loop consists ofthe drive amplifier, motor and axis slide (see section "Servo positioning"). Before the positioncontrol 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 inputof the drive amplifier. The step response of the tachometer signal can be recorded by anoscilloscope. The axis should be loaded with the permissible workpiece weight while the stepresponse is being recorded. The subordinate control loop (current control, spindle speed control)must be so optimized that the step response shows an overshoot.

Page 239: thb416

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]

Umax

T

Tacho-signal

1 OvershootGiven stepfunction

The following curves show incorrectly adjusted tachosignals:

U [V]

t [ms]

Umax

Several overshoots

Incorrect!

P-component of the subordinate control loop toohigh or I-component too low

U [V]

t [ms]

Umax

Incorrect!

Too flat

P-component of the subordinate control loop toolow or I-component too high

Page 240: thb416

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]

Umax

T

To calculate the acceleration, increase T by 10%.

From this it follows that:

a = vmax vmax = velocity at Umax ---------- T·1.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.

Page 241: thb416

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

Page 242: thb416

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 themachine parameters for the commissioning can be optimized.

Before connecting the control, the NC- and PLC- supply voltages and the ground connections shouldbe tested once more (see "Mounting and Electrical Installation ").

15.3.1 Entry of the provisional and pre-defined machine parametersAfter 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 listand the functional descriptions. The parameters which affect the control loop must be assignedprovisional values (see section 16.3.6).

In order to avoid lengthy delays on restarting during the commissioning of the control, the memorytest can be suppressed by MP7690 (see section "Display and operation").

15.3.2 Entry of the PLC-programA complete PLC-program for all machine functions must be created for commissioning and storedeither in EPROM or RAM (see "PLC-programming").

Machine parameter MP4010 (see section "Display and operation") selects whether the processinguses 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 anEPROM when all functions are operating without error.

In case of doubt, please contact HEIDENHAIN customer service.

15.3.3 Testing the EMERGENCY STOP routineSince 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 traverseTest the controls for the direction of traverse according to the following diagram (effective machineparameters: MP210 count direction of the encoder signals, MP1040 polarity of the nominal valuevoltage, MP1320 direction of traverse on passing over the reference marks).

Page 243: thb416

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

No

No

Yes

No

Yes

No

No

Yes

Yes

Start referencetraverse with

axis direction keys?

(Both types ofreferencing mustbe performed!)

Axis traversedirection correct?

(defined in MP1040and MP210)

"Cross positioning error" or incorrect

traverse directionafter passing over

ref. marks?

Line voltage on

START

Erase POWER INTERRUPTED error message with CE

Control voltage on;axes are in the control loop

Grosspositioning error

(MP1040 orMP210 incorrect)

?

Traverse direction correct?

(as definedin MP1320)

Linevoltageoff

ChangeMP210MP1040MP1320

Reference traverse withmachine START button

Test the traverse direction ofreferencing in each axis

Test the traverse direction in each axis

This flow diagram must be worked through for every axis!

Page 244: thb416

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

15.3.5 Setting the software limit switch rangesDetermine 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 orthe handwheel in positive and negative direction to

just before the EMERGENCY STOP limit switches. Note thevalues 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 lagThe following provisional values can be entered for the machine parameters which determine thecontrol characteristics:

Machine parameter Function Preliminary entry value

MP1050 Analog voltage for rapidtraverse

9 V

MP1060 Acceleration As measured on the machine(see "Preparation of the machine")

MP1810 kv factor 1

These values can usually be further optimized.

Page 245: thb416

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 "Servopositioning." If a different Kv factor is required for rapid traverse to that for the machining feed rate, itmust 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 (kv factor): Reduce entry value until no oscillations are detectable.

U [V]

t [s]

U [V]

t [s]

Connect storage oscilloscope to tachometerof the servo-amplifier of X axis.

Enter following program in"PROGRAMMING AND EDITING"

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

Press machine START button in the"PROGRAM RUN/FULL SEQUENCE"

operating mode. Machine runs.Note: Set feed override to 100%.

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.

Page 246: thb416

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

Page 247: thb416

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 offsetadjustment possibility described in the section "Servo positioning" lets a fine offset adjustment beperformed.

15.3.8 Adjusting the monitoring functionsThe following entry values are recommended for the monitoring functions (see section "Servopositioning"):

Machine parameter Function Entry value

MP1710 Position monitoring 1.2 × lag in rapid traverseMP1720 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.

Page 248: thb416

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

Page 249: thb416

3/2000 TNC 416/TNC 406/TNC 306 5-1

Machine parameters — Contents

1 What are machine parameters? 5–21.1 User parameters 5–2

2 Input/output of machine parameters 5–32.1 Entry format 5–32.2 Activating the machine parameter settings 5–42.3 Changing input values 5–4

3 List of machine parameters 5–53.1 Measuring systems and machines 5–53.2 Positioning 5–113.3 Operation with servo lag 5–133.4 Eroding 5–143.5 Integral PLC 5–173.6 Adaptation of the data interface 5–183.7 Probing 5–193.8 Display and programming 5–193.9 Status display and graphics depiction 5–223.10 Color adjustment 5–243.11 Machining and program run 5–253.12 Hardware 5–27

Page 250: thb416

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) beforeit can execute its programmed instructions.

The machine tool builder provides these data in so-called machine parameters. In addition, machineparameters can be used to activate functions that are possible with HEIDENHAIN contouringcontrols 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 machines1000 to 1399 Positioning1700 to 1999 Operation with servo lag2000 to 2999 Eroding4000 to 4999 Integrate PLC5000 to 5999 Setting the data interface6000 to 6199 Probing7200 to 7399 Display and programming7400 to 7599 Machining and program run7600 to 7699 Hardware

If there is more than one input value for a single function (e.g., a separate input for each axis), theparameter number is provided with indices.

Example:

MP330 Grating periodMP330.0 Grating period for axis XMP330.1 Grating period for axis YMP330.2 Grating period for axis ZMP330.3 Grating period for axis 4MP330.4 Grating period for axis 5

The indices are assigned to the corresponding axes according to a fixed pattern. For example, ifentry 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 changecertain machine parameters. The machine tool builder can define up to 16 different machineparameters as user parameters with MP7330 (see Chapter "Machine Adjustment", Section "Displayand operation").

Page 251: thb416

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 valuesmust now be entered either by hand on the keyboard or through the data interface. The datainterface is activated by pressing EXT. It is pre-set to FE mode. This default setting can be changedthrough 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 inmm/s2 of an individual axis, or the analog voltage in volts.

Some machine parameters have multiple functions. The entry values for these machine parametersare calculated in decimal values according to the function to be activated or they can be entered inbinary 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.

Page 252: thb416

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 pressingEND . 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 andis 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 parametersthat may be changed by the user (see TNC 306 User's Manual). Those machine parameters whichcan be accessed with code number 123 are identified in the machine parameter list with "123" in thecolumn "Change via."

Exit the machine parameter editor by pressing END .

Code number 53 12 10 delete all machine parameter settings.

Page 253: thb416

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 axesEntry range: 1 to 15 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Not active

+1 = ActiveBit 1 Y axis +0 = Not active

+2 = ActiveBit 2 Z axis +0 = Not active

+4 = ActiveBit 3 4th axis +0 = Not active

+8 = ActiveBit 4

* 5th axis +0 = Not active

+16 = Active

RESET 4-5

MP31 Amplitude monitoring of the measuringsystem signalsEntry 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 monitoringEntry 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

Page 254: thb416

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 screenEntry range: 1 to 15 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Not active

+1 = ActiveBit 1 Y axis +0 = Not active

+2 = ActiveBit 2 Z axis +0 = Not active

+4 = ActiveBit 3 4th axis +0 = Not active

+8 = ActiveBit 4 * 5th axis +0 = Not active

+16 = Active

RESET 4-12

MP50 Controlled axesEntry range: 1 to 15 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Not controlled

+1 = ControlledBit 1 Y axis +0 = Not controlled

+2 = ControlledBit 2 Z axis +0 = Not controlled

+4 = ControlledBit 3 4th axis +0 = Not controlled

+8 = ControlledBit 4 * 5th axis +0 = Not controlled

+16 = Controlled

RESET 4-50

MP60 Axis as programmable position displayEntry range: 1 to 15 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Not active

+1 = ActiveBit 1 Y axis +0 = Not active

+2 = ActiveBit 2 Z axis +0 = Not active

+4 = ActiveBit 3 4th Axis +0 = Not active

+8 = ActiveBit 4 * 5th axis +0 = Not active

+16 = Active

RESET 4-50

MP110.0-4 Assignment of encoder inputs to axesEntry range: 0 to 50 = Encoder input X11 = Encoder input X22 = Encoder input X33 = Encoder input X44 = Encoder input X5 (only LE 406)5 = Encoder input X6

RESET 4-11

* only TNC 416/406

Page 255: thb416

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 1VPP or 11µAInput: %xxxxx0 = 1 VPP1 = 11µA

New MP in TNC 416 software 286 180-01

RESET -

MP115.1 ReservedInput: %00000

New MP in TNC 416 software 286 180-01

MP115.2 Input frequency of position encodersInput: %xxxxx0 = 50kHz for 1VPP; 50kHz for 11µA1 = 350kHz for 1VPP; 150kHz for 11µA

New MP in TNC 416 software 286 180-01

RESET -

MP 120.0-4 Assignment of the analog outputsEntry range: 0 to 4

0 = Analog output 11 = Analog output 22 = Analog output 33 = Analog output 44 = Analog output 5 *

RESET 4-12

MP210 Counting direction of the encoder signalsEntry range: 0 to 31 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Positive

+1 = NegativeBit 1 Y axis +0 = Positive

+2 = NegativeBit 2 Z axis +0 = Positive

+4 = NegativeBit 3 4th axis +0 = Positive

+8 = NegativeBit 4 * 5th axis +0 = Positive

+16 = Negative

RESET 4-7

MP330.0-4 Grating periodEntry range: 1 to 360 [µm] or [1/1000 °]

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

4-6

Page 256: thb416

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 ofMP332Input: 0.001 to 99 999.999 [mm or °]

New MP in TNC 416 software 286 180-01New MP in TNC 406 software 280 620-08

Reset

MP332.0-4 Number of signal periods in the distance fromMP331Input: 1 to 16 777 215

New MP in TNC 416 software 286 180-01New MP in TNC 406 software 280 620-08

Reset

MP334.0-4 Distance between reference marks for encoderswith distance-coded reference marksInput: 0 to 65535 [grating periods]0=1000 grating periods (standard setting)

New MP in TNC 416 software 286 180-01New MP in TNC 406 software 280 620-08

Reset

MP410 Designation of axis 4Entry value: 0 to 2

0 = A1 = B2 = C

RESET 4-11

MP411 * Designation of axis 5Entry value: 0 to 5

0 = A1 = B2 = C3 = U4 = V5 = W

4-11

MP720.0-4 Correction factor for linear compensationEntry range: –1.000 to +1.000 [mm/m]MP720.0 X axisMP720.1 Y axisMP720.2 Z axisMP720.3 4th axisMP720.4 * 5th axis

4-18

MP710 Backlash compensation for axis 4Input: –1.000 to +1.000 [mm] or [°]

-

MP711 Backlash compensation for axis 5Input: –1.000 to +1.000 [mm] or [°]

-

Page 257: thb416

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 compensationInput: –1.0000 to +1.0000 [mm/m]

-

MP730 Enable for non-linear axis error compensationEntry 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

MP910MP920

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

Software limit switch range 1Entry 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

MP911MP921

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

Software limit switch range 2Entry 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

Page 258: thb416

5-10 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Change

via

Reaction Page

MP912MP922

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

Software limit switch range 3Entry 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–14

MP950.0–4 Datum for positioning blocks with M92Entry range, linear axis:–30000.000 to +30000.000 [mm]Entry range, rotary axis:–30000.000 to +30000.000 [°]

Values referenced to machine datum (seeMP960.x)

4–77

MP960.0–4 Machine datumEntry range:–30000.000 to +30000.000 [mm] or [°]

Values referenced to scale datum

4–77

*only TNC 416/406

Page 259: thb416

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.0–4 Rapid traverse

Entry range, linear axis:80 to 30000 [mm/min]Entry range, rotary axis:80 to 30000 [°/min]

4–42

MP1020.0–4 Manual feedEntry range, linear axis:80 to 30000 [mm/min]Entry range, rotary axis:80 to 30000 [°/min]

4–43

MP1030.0–4 Positioning windowEntry range, linear axis:0.001 to 2.000 [mm]Entry range, rotary axis:0.001 to 2.000 [°]

4–48

MP1040 Polarity of the nominal value voltage for positivetraverse directionEntry range: 0 to 15 (TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Positive

+1 = NegativeBit 1 Y axis +0 = Positive

+2 = NegativeBit 2 Z axis +0 = Positive

+4 = NegativeBit 3 4th axis +0 = Positive

+8 = NegativeBit 4 * 5th axis +0 = Positive

+16 = Negative

4–7

MP1050.0–4 Analog voltage for rapid traverseEntry range: +4.5 to +9 [V]

4–42

MP1060.0–4 AccelerationEntry range: 0.001 to 9.0 [m/s2]

4–41

MP1070 Radial accelerationEntry range: 0.001 to 3.0 [m/s2]

4–45

MP1090 Default feed rate during positioningEntry range: 0 to 30000 [mm/min]

123 4–60

MP1092MP1093MP1094MP1095MP1096MP1097

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 (spark–out, M2640=1)Modes 1 and 5 (erosion, M2640=0)Modes 1 and 5 (spark–out, M2640=1)Modes 2/3 and 6/7 (erosion, M2640=0)Modes 2/3 and 6/7 (spark–out, M2640=1)

123 4–88

Page 260: thb416

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]

4–48

MP1140 Movement monitoring (Error C)Entry range: 0.03 to 10 [V]

4–47

MP1141 Maximum voltage difference between two controlloop cycles (Error F)Entry range: 0.03 to 10 [V]

Removed in TNC 406 as of software version280 620-07, because the acceleration monitoringis now automatic.

4–47

MP 1220 Automatic drive offset adjustmentEntry range: 0 to 65 535 [s]

0 = No automatic adjustment

4–44

MP1320 Traverse direction when approaching thereference marksEntry range: 0 to 15(TNC 306)

% xxxxx (TNC 416/406)Bit 0 X axis +0 = Positive

+1 = NegativeBit 1 Y axis +0 = Positive

+2 = NegativeBit 2 Z axis +0 = Positive

+4 = NegativeBit 3 4th axis +0 = Positive

+8 = NegativeBit 4 * 5th axis +0 = Positive

+16 = Negative

4–33

MP1330.0–4 Feed rate for crossing the reference marksEntry range: 80 to 30000 [mm/min]

4–33

MP1331.0–4 Feed rate when leaving reference end position(only for encoders with one reference mark,MP1350 = 1)

Entry range: 80 to 500 [mm/min]

4–33

MP1340.0–4 Axis sequence for crossing the reference marksEntry range: 0 to 5

0 = No reference mark evaluation1 = X axis first2 = Y axis first3 = Z axis first4 = 4th axis first5 = 5th axis first *

4–33

• only TNC 416/406

Page 261: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-13

Machine

parameter

Function and input Changevia

Reaction Page

MP1350.0–4 Type of reference mark approachEntry values: 0 or 1

+0 = Encoder with distance–codedreference marks (for square-wave inputsthe encoder must have a 5-fold EXE ifdistance-coded reference marks are used.)

+1 = Encoder without distance–coded referencemarks

4–34

3.3 Operation with servo lag

Machine

parameter

Function and input Changevia

Reaction Page

MP1530 Overshoot behavior during acceleration withfeedforward.It influences the overshoot behavior duringacceleration in the gap control in feedforwardmode.Entry range: 0 to 0.999If MP1530 is programmed to equal 0, thestandard value 0.25 is used.Input value 0.999 = steepest characteristic curve

-

MP1540 Braking behavior during feedforwardIt influences braking to a target in feedforwardmode.Entry range: 0 to 0.999If MP1530 is programmed to equal 0, thestandard value 0.5 is used.Input value 0.999 = steepest characteristic curve

-

MP1550 Filter for feedforwardEntry range: 0 or 11 = Switch off the filter in the feedforwardvoltages

-

MP1700 Selecting the system cycle timesEntry: 0 to 20 gap control 4ms PLC 40 ms1 gap control 4ms PLC 40 ms2 gap control 2ms PLC 40 ms

Page 262: thb416

5-14 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Changevia

Reaction Page

MP1710.0–4 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 normalservo lag by 1.5 and uses the product as limit forservo-lag monitoring (erasable error message). Avalue of 1.8 * servo lag should therefore be usedfor MP1720.x.

4–46

MP1720.0–4 Position monitoring for operation with lag(Emergency Stop, error A)Entry range: 0 to 100,000 [mm]

4–46

MP1810.0–4 Kv factor for positioningEntry range: 0.1 to 10,000

4–42

3.4 Eroding

Machine

parameter

Function and input Changevia

Reaction Page

MP2010

MP2010.0MP2010.1

Characteristic gradientEntry range: 0.001 to 60 . 000

Input characteristic range 2.5 to 5 VInput characteristic range 0 to 2.5 V

4–56

MP2020

MP2020.0MP2020.1

Multiplication factorEntry range: 1.000 to 10 . 000

Input characteristic range 2.5 to 5 VInput characteristic range 0 to 2.5 V

4–56

MP2030

MP2030.0MP2030.1

Characteristic kinkEntry range: 0 to 100 [%]

Input characteristic range 2.5 to 5 VInput characteristic range 0 to 2.5 V

4–57

MP2040 Factor for following electrodeEntry range: 0.1 to 60,000

123 4–64

MP2050 Move back reapproach position after short circuitor CYCL STOPEntry range: 0 to 2 [mm]

123 4–60

MP2051 Move back reapproach position after flushingEntry range: 0 to 2 [mm]

123 4–61

Page 263: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-15

Machine

parameter

Function and input Changevia

Reaction Page

MP2052 Advanced switch-on distance for reapproach;After timing (M2780=1), the oscillator signal of thegenerator can be switch on earlier. In this way thecontrol receives a correct analog gap signal duringthe transition from positioning to gap control.Entry range: 0 to 2 [mm]

MP2060 Infeed rate when eroding on (M36) and markerM2620 is setEntry 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-positioncontrol without characteristic curve. An otherpossibility: The threshold for free-run feed ratefrom MP2141 can be defined with W520 (0..500).

123 4–60

MP2070 Feed rate at maximum gap voltage (5V) andMP 2020 = 1 and MP 2030 = 1;Calibration of input characteristicEntry range: 1 to 3000 [mm/min]

4–57

MP2080 Gap signal inputEntry range: 0 to 20 = Not inverted1 = Inverted2 = Analog input from spindle potentiometer

(for testing purposes only)

4–56

MP2081 Selection of gap controlEntry range: 0 or 10 = Analog input is velocity signal1 = 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 erodingtableEntry value: 0 to 255

MP2110 Delay of "spark-out is completed" signal (markerM2616)Entry range: 0.1 to 99.9 [s]

123 4-61

Page 264: thb416

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 duringerosionEntry range: 0 to 500 [mm/min]

4-56

MP2131 Feed rate limit to switch to new eroding feed ratefrom MP 2132Entry range: 0 to 500 [mm/min]

4-57

MP2132 New eroding feed rate when value from MP 2131exceededEntry range: 0 to 500 [mm/min]

4-57

MP2133 Retraction speed during short circuit detected atconnector X12Entry range: 0 to 500 [mm/min]

4-59

MP2141 Free-run feed rate if analog input is greater thanthreshold 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 flushingEntry values: 0, 1, 2

0 = Electrode braked between each block1 = If the path is geometrically continuous,

the electrode moves at constant speed2 = 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/offEntry values: 0 or 20 = Tables not active2 = Tables active

4-62

Page 265: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-17

3.5 Integral PLC

Machine

parameter

Function and input Changevia

Reaction Page

MP4010 PLC program from RAM or from EPROMEntry value: 0 or 1

0 = EPROM1 = RAM

7-21

MP4020 Erosion parameter table from RAM or fromEPROMEntry value: 0 or 10 = EPROM1 = RAM

4-64

MP4030 Switchover of the PLC interface from markerarea to word areaInput value: 0 or 10 = marker range active (M2000 to M2548)1 = word range active (W1024 to W1060)"New MP in TNC 416 software 286 180-04New MP in TNC 406 software 280 620-10

-

MP4060.0-4 Path-dependent lubricationEntry range: 0 to 65 535 (in units of 65 536 µm)

4-16

MP4110.0-47 PLC: programmed duration for timers 0–47Entry range: 0 to 65 535 (in units of

40 ms)20/40 ms, depending of MP1700)

7-17

MP4120.0-31 PLC: counter preset value for counters 0–31Entry range: 0 to 65 535 in units of 40 ms(TNC 406: 20 or 40 ms depending on MP 1700)

7-19

MP4210.0-47 PLC: 48 positioning values for PLC positioning ordatum shiftEntry range: –30.000 to +30.000 [mm]

7-16

MP4220.0-7 Setting a number in the PLC (W960 ... W974)Entry range: 0 to 65 535

7-16

MP4310.0-15 Setting a number in the PLC (W976 ... W1006)Entry range: 0 to 65 535

7-16

MP4320.0-7 Setting a number in the PLC (W1008 ... W1022)Entry range: 0 to 65 535

7-16

Page 266: thb416

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 Changevia

Reaction Page

MP5010 EXT mode:ASCII character for end of dataEntry range: 0 to 127

123 8-26

MP5011 EXT mode:ASCII character for end of transmissionEntry 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 functionBit 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 functionBit 7 Number of stop bits

+0 = 2 stop bits+128 = 1 stop bit

123 8-27

MP5100 Parity Bit for LSV2-ProtocolEntry value: 0 to 2

0 = no parity1 = even parity2 = odd parity

MP5200 Baud rate for RS-422 interface of the0 = baud rate 96001 = baud rate 38400

MP5990 Check block number sequence with external datatransferEntry value: 0 or 1

0 = Check block number sequence1 = No check

123 8-26

Page 267: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-19

3.7 Probing

Machine

parameter

Function and input Changevia

Reaction Page

MP6100 Successive probingEntry range: 1 to 5

4-114

MP6110 Maximum difference of probe values duringsuccessive probingEntry range: 0 to 2 [mm]

4-114

MP6120 Probing feed rateEntry range: 1 to 30.000 [mm/min]

123 4-113

MP6130 Maximum measuring rangeEntry range: 0 to 30.000 [mm]

123 4-114

MP6140 Retraction pathEntry range: 0 to 30 000 [mm]

4-114

MP6150 Retraction feed rate in probing cycleEntry range: 1 to 30 000 [mm/min]

123 4-113

3.8 Display and programming

Machine

parameter

Function and input Changevia

Reaction Page

MP7210 Programming stationEntry values: 0, 1, 20 = Control1 = Programming station: PLC active2 = Programming station: PLC inactive

123 RESET 4-89

MP7212 *) Acknowledgment of „Power interrupted“Entry values: 0 or 10 = „Power interrupted“ must be acknowledged with CE key1 = automatically acknowledged after 3 sec

MP7230 Dialog languageEntry values: 0 to 3Software Nr.:286 180/ 286 181/ 286 182/280 620 280 621 280 6220 = English English English1 = German German German2 = French Swedish Czech3 = Italian Finnish Reserved

123 –

MP7231 OEM labelEntry values: 0 to 990 = standard label1 to 99 = number of PLC error message,

displayed as OEM label

Page 268: thb416

5-20 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Changevia

Reaction Page

MP7232 Enable Chinese DialogEntry range: 0 to 90 = Disable Chinese dialog1 to 9 = Enable Chinese dialog Character spacing in pixels

MP7240 PGM entry inhibited if PGM NR. same as OEMcycle numberEntry values: 0 or 10 = Program entry inhibited1 = Program entry not inhibited

123 9-3

MP7241 Inhibit the blocks EL–CALL and WP–CALLEntry value: 0 or 10 = Soft keys inhibited1 = Soft keys not inhibited

MP7245.0

MP7245.1

Inhibit the HEIDENHAIN standard cycles 1 to 15Entry range: 0 to 65 5350 = No cycle inhibited

Inhibit HEIDENHAIN cycles 16 to 31Entry range: 0 to 65 5350 = No cycle inhibited

4-86

4-86

MP7250 Difference between Q parameter numbers forDLG DEF block and DLG CALL block in OEM cycleEntry range: 0 to 50

9-3

MP7251 Number of global Q parameters transferred fromOEM cycle to calling programEntry range: 0 to 10010 = Q parameters Q90 to Q99 are global (Q90 to Q99 are eroding parameters)

9-4

Page 269: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-21

Machine

parameter

Function and input Changevia

Reaction Page

MP7271 Display feed rateEntry values: 0 or 10 = Display1 = Do not display

123 4-82

MP7272 *) Display actual machining timeEntry values: 0 or 10 = Display1 = No machining time display

123 4-84

MP7273 Display of blocks being tested during ProgramTestEntry values: 0 or 10 = No block display1 = Block display

123 –

MP7274.0 Display of rotary axis defined with MP410Entry values: 0 or 10 = Display 0 to 359.999 [°]1 = Display - 180 to +179.999 [°]; (MP7470 = 0!)

MP7274.1 Display of rotary axis defined with MP411Entry values: 0 or 10 = Display 0 to 359.999 [°]1 = Display - 180 to +179.999 [°]; (MP7470 = 0!)

MP7280 Decimal characterEntry values: 0 or 1

0 = Comma1 = Point

123 4-89

*) only TNC 306

Page 270: thb416

5-22 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Changevia

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 inch0 0.1 µm 0.000011 0.5 µm 0.000022 1 µm 0.00013 5 µm 0.00024 10 µm 0.0015 50 µm 0.0026 100 µm 0.01

3.9 Status display and graphics depiction

Machine

parameter

Function and input Changevia

Reaction Page

MP7300 Cancel program data and status display with M02,M30 and end of programEntry values: %xxxBit0 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 powerinterruption, and the tool data are always retained.

123 4-84

MP7305 GOTO to a CYCL CALL in mode program runis permittedEntry values: 0 or 10 = GOTO permitted1 = GOTO not permitted

Page 271: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-23

Machine

parameter

Function and input Changevia

Reaction Page

MP7310 Graphics displayEntry range: 0 to 3Bit 0 Projection type for "Projection in 3

planes" display+ 0 = European preferred+ 1 = American preferred

Bit 1 Rotation of coordinate system in theworking plane by +90°+ 0 = No rotation+ 2 = Rotation

123 4-79

MP7315 Tool radius for graphic simulation withoutTOOL 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 viaMOD function

Entry range: 0 to 9999.99 (number of desiredmachine parameter)

4-88

Page 272: thb416

5-24 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

3.10 Color adjustment

Machine

parameter

Function and input Changevia

Reaction Page

MP7350 *MP7351*

MP7352 *MP7352.0MP7352.1MP7352.2

MP7353 *MP7353.0MP7353.1MP7353.2

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

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

MP7356 *MP7356.0MP7356.1MP7356.2

MP7357 *MP7357.0MP7357.1

MP7358 *MP7358.0MP7358.1

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

Window frame $30200CError messages $3F0000

Operating mode "Machine"Window background $000000Operating-mode display $342008Dialog $3F3828

Operating-mode ”Programming”Window background $000000Operating-mode display $342008Dialog $3F3828

Program-text display ”Machine”Background $080400General program text $38240CCurrent block $38341CBackground of active window $302410

Program-text-display ”Programming”Background $080400General program text $38240CCurrent block $38341CBackground of active window $302410

Status-windowBackground $0C0800Axis positions in the status-display $3F2C18Status-display, except axis position $3F280C

Soft-key display ”Machine”Background $000000Symbols $3F3828

Soft-key display ”Programming”Background $000000Symbols $3F3828

Graphics: 3-D viewBackground $000000Surface $203038Front face $0C1820Text-display in graphics window $3F3F3FSide face $102028

4-91

*) only TNC 416/406

Page 273: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-25

Machine

parameter

Function and input Changevia

Reaction Page

4-92MP7361 *MP7361.0MP7361.1MP7361.2MP7361.3MP7361.4

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

MP7365 *

MP7365.0MP7365.1MP7365.2MP7365.3MP7365.4MP7365.5MP7365.6MP7365.7

Graphics: view in three planesBackground $000000Plan (Grating) $203038Front and side view $203038Axis cross and text $3F3F3FCursor $3F0000

Additional status-display in graphics windowBackground graphics window $080400Background status display $0C0800Status symbols $38240CStatus values $3F2C18

Colors of the oscilloscope

Background $000000Channel 1 $003F3FChannel 2 $3F3F00Channel 3 $003F00Channel 4 $3F1230Reserved $000000Grating $30200CCursor and text $3F3F3F

New MP in TNC 416 software 286 180-01New MP in TNC 406 software 280 620-07

*) only TNC 416/406

3.11 Machining and program run

Machine

parameter

Function and input Changevia

Reaction Page

MP7410 ”Scaling factor” cycle effective in two or threeaxesEntry values: 0 or 1

0 = Effective in three axes1 = Effective in working plane

123 4-87

MP7411 Rotation of coordinate system during datum shiftfrom datum tableEntry values: 0 or 1

0 = Rotate coordinate system1 = No rotation

123 –

Page 274: thb416

5-26 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Changevia

Reaction Page

MP7412 Behavior of CYCL CALL after a CYCL DEF 12:PGM CALL xxxx blockEntry values: 0 or 10 = PGM xxxx is called with CYCL CALL like auser cycle (PGM blocks do not appear)1 = PGM xxxx is called with CYCL CALL orM89/99 like a PGM CALL xxxx (PGM blocksappear)canceled in 286 18x-04/280 62x-10

123 –

MP7440 Output of M-functionsEntry range: 0 to 7

Programmed stop with M06Bit 0 + 0 = Programmed stop with M06

+ 1 = No programmed stop with M06

Output of M89, modal cycle callBit 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 functionBit 2 + 0 = Axis standstill

+ 4 = No axis standstill

123 4-99

MP7460 Constant feed rate in cornersEntry range: 0 to 179.999 [°]

123 4-45

MP7470.0 Display mode for rotary axis defined with MP 410Input: 0 or 10 = 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 411Input: 0 or 10 = 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 toolnumber changes

2 = Output of tool number with every TOOLCALL block

4-128

Page 275: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-27

Machine

parameter

Function and input Changevia

Reaction Page

MP7481 Generate the last TOOL CALL after block scan intest modeEntry values: 0 or 10 = no TOOL CALL generating1 = TOOL CALL generating before returning to the contour

MP7490 Transmitting M-function after block scan in testmodeEntry values: 0 or 10 = no transmission1 = transmission of M-function

MP7491 Activating software limit switch in test graphic

Entry values: 0 or 20 = software limit switch active1 = software limit switch not active

3.12 Hardware

Machine

parameter

Function and input Changevia

Reaction Page

MP7620 Feed rate overrideEntry range: 0 to 7

Feed rate override active when rapid traversebutton pressed in program run modeBit 0 +0 = Override not active

+1 = Override active

Feed rate override in 2% or 1% stepsBit 1 +0 = 2% steps

+2 = 1% steps

Feed rate override if rapid traverse button and axisdirection button pressedBit 2 +0 = Override not active

+4 = Override active

123 –

MP7640 Handwheel definitionEntry values: 0 or 10 = No handwheel is active1 = HR 3302 = HR 1303 = HR 410

4-117

Page 276: thb416

5-28 TNC 416/TNC 406/TNC 306 List of machine parameters 3/2000

Machine

parameter

Function and input Changevia

Reaction Page

MP7645 Initializing parameters for handwheelHR410Input: 0 or 10 = evaluation of the keys via NC1 = evaluation of the keys via PLC

-

MP7650 Handwheel counting directionEntry values: 0 or 1

0 = Positive counting direction1 = Negative counting direction

4-117

MP7651 Short circuit monitoring during manual handwheeltraversingInput:0 = Short-circuit monitoring on1 = Short-circuit monitoring offas of 286 18x-04/280 62x-10 removed

-

MP7655 Positioning with the handwheelEntry values: 0 or 11 = Positioning with the handwheel is alsoeffective in the PROGRAMMING AND EDITINGmode of operation.

-

MP7660 Threshold sensitivity for electronic handwheelEntry value: 0 to 65 535 [increments]

4-117

MP7670.0

MP7670.0MP7670.1MP7670.2

Smallest interpolation factor for electronichandwheel (HR 410/HR 130)

Interpolation factor for HR 410 at smallest speedInterpolation factor for HR 410 at medium speedInterpolation factor for HR 410 at greatest speed

Entry range: 0 to 10

4-118

MP7671

MP 7671.0MP 7671.1MP 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 buttonsEntry values: 0 or 1

0 = Not stored 1 = stored

4-110

Page 277: thb416

3/2000 TNC 416/TNC 406/TNC 306 List of machine parameters 5-29

Machine

parameter

Function and input Changevia

Reaction Page

MP7690 Memory test at switch-onEntry range: 0 to 3

RAM testBit 0 + 0 = Test performed

+ 1 = Test not performed

EPROM testBit 1 + 0 = Test performed

+ 2 = Test not performed

4-90

Page 278: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Markers 6–1

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.0was exceeded

NC NC 4-16

M2013 Lubrication pulse axis Y, since value of MP4060.1was exceeded

NC NC 4-16

M2014 Lubrication pulse axis Z, since value of MP4060.2was exceeded

NC NC 4-16

M2015 Lubrication pulse axis 4, since value of MP4060.3was exceeded

NC NC 4-16

M2016 Lubrication pulse axis 5, since value of MP4060.4was 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 duringProgram run

NC NC –

M2050 Operating mode programming and editing NC NC –

M2051 Operating mode: Manual NC NC –

Page 279: thb416

6–2 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 orflashes)

NC NC 4-84

M2185 1st PLC scan after interruption of PLC program NC NC –

M2187 Severe control loop error NC NC –

Page 280: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Markers 6–3

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

M2192toM2239

Markers can be changedvia 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

Page 281: thb416

6–4 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 M1651Falling-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

Page 282: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Markers 6–5

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 outof 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 TOUCHPROBE MANUAL

PLC PLC 4-604-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

Page 283: thb416

6–6 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 D528to 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 D528to 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 onINCREMENT, 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

Page 284: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Markers 6–7

Marker Function Set Reset Page

M2794 Changed values in eroding parameters Q96 to Q98(without erosion tables: Q90 to Q99)

NC PLC 4-67

M27951) Changed values in current table during program run(M2796)

NC PLC 4-67

M27961) Transfer changed values in current table to the PLC(M2795)

PLC NC 4-67

M2797 Manual generator setting –

M27981) Changed values in the status line and Q99 during erosion NC PLC 4-67

M27992) Strobe marker for activate the data transfer via RS-422/V.11 PLC NC 4-70

1) Active if MP2199 = 2 (see chapter "Machine integration," section "Eroding parameters")2) only TNC 416/406

Page 285: thb416

6–8 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 –

M2855to M2923

Disable a TNC key(no function in TNC 416/ TNC 406 as of software 280 62x-07)

PLC PLC 4-102

M2924to 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 totrap

NC NC –

M3200to M3263

Values from MP4310.3 to MP4310.6 NC NC –

Page 286: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 6–9

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 editing1 = Manual operation2 = Electronic handwheel3 = Positioning with manual entry4 = Program run/single block5 = Program run/full sequence6 = Program test7 = 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

Page 287: thb416

6–10 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 M2813Number 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

Page 288: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 6–11

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 —

D628D632D636D640D644D648

Identifier 1, EL CALLCompensation in XCompensation in YCompensation in ZCompensation in CUndersizeRadius

Identifier 2, WP CALLShift in XShift in YShift in ZRotation 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

Page 289: thb416

6–12 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 axisIf the 5th axis has also been defined as angle axis (A or B), youcan switch on the free rotation of this axis (behavior is similarto ROT-C) by loading the PLC ouble word D748 with the speedvalue (e.g. 10 000 for 10 rpm). By loading a negative value youcan 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

D768toD956

Value from MP4210.0 to MP4210.47 NC → PLC 7-14

W960toW974

Value from MP4220.0 to MP4220.7 NC → PLC 7-16

W976toW1006

Value from MP4310.0 to MP4310.15 NC → PLC 7-16

W1008toW1022

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

Page 290: thb416

3/2000 TNC416/TNC 406/TNC 306 List of Bytes, Words and Double Words 6–13

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)

W1064toW1098

Reserved

Page 291: thb416

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

Page 292: thb416

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

Page 293: thb416

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

Page 294: thb416

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

Page 295: thb416

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 ofinstructions for the PLC-program. Commands and comments are entered via the ASCII-keyboard onthe control panel of the TNC 406 or the keyboard of the TNC 306 (see Section "Programming andediting-files").

The functions TRACE and TABLE, as well as a syntax check on entering the PLC commands and alogical test with the Function COMPILE can make it easier to find faults in the PLC-program (seesection "Test functions").

8 ms are available for a PLC-run. Up to 4000 logic commands, equivalent to 32 Kbytes, can beprocessed 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 .

Page 296: thb416

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 KBYTEVACANT MEMORY : XX KBYTE

CODE LENGTH : XX KBYTE

Select PLCeditingmode

SelecttablesM/I/O/T/C/B/W/D

Select TRACEmode

Compile PLCprogram

Copy fromEPROM toRAM

Erase PLCProgram

Quit PLCMode

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 editedvia TNC keyboard.The keys of the TNC 306 assume new assignments, which are indicated on a special tactilemembrane that is place over the TNC keyboard. The tactile membrane is included with thisTechnical Manual. Before editing a new program, it is necessary to reserve memory in theUTILIZATION/ 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.

Page 297: thb416

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. Thecursor then jumps to the next positions within the instruction. The instruction is completed after thecomments 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 acommand. A comment can therefore cover several lines if each line commences with ";". A linecontains a maximum of 26 characters for the comment and may include all numeral, letters andother 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 toa marker and press GOTO. Enter the number of the desired marker. Then press ENT to find themarker.

Key assignments for the TNC 306 PLC editor

X 7 8 9

Y 4 5 6

Z 1 2 3

$ 0 · +/

CE ;END

+ * [ <

_ / ] >

$EXTDEL

MOD ENT

$GOTO

=

A B C D E

F G H I

T U V W K L M NJ

P Q R SO

NOENT

TE 355A

X 7 8 9

Y 4 5 6

Z 1 2 3

$ 0 · +/

CE ;END

K L M NJ

P Q R SO

T U V W

+ * [ <

_ / ] >=

$EXTDEL

MOD ENT

$GOTO

A B C D E

F G H INOENT

TE 355B

Page 298: thb416

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), aPLC 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 PROGRAMFROM EPROM (TNC 306), a program that is stored in the EPROM can be copied into the RAM (seealso 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 pressingthe soft key COMPILE (TNC406) or in the mode TRANSLATE PLC PROGRAM (TNC 306) before itcan 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", "Errormessages").

1.2.5 Utilization

In the main menu (TNC 406) or in the mode UTILIZATION (TNC 306) the occupied PLC processingtime 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 possibleprocessing time is 10 ms (TNC 406) or 8 ms (TNC 306). The current processing time indicates theduration of the last PLC scan. If the current processing time exceeds the maximum, the blinkingerror 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 orhandwheel operation.

Page 299: thb416

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/MDISPLAY TRACE BUFFERSTART TRACEEND TRACE

SELECT I/O/C/T/M

Those inputs (I), outputs (O), counters (C), timers (T) or markers (M) whose logical states are to bechecked 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 entriescan 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, aTRIGGER 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 notrequired. 512 states are recorded before and after a trigger event. The trigger event is regarded asfulfilled only when the conditions for all operands are simultaneously fulfilled with TRIGGER.

Example: M2618 1M2780 0M2781 1I5Trigger 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 continuallyrecorded and, after ending the trace mode, the last 1024 states are displayed.To exit the SELECT I/O/C/T/M function, press END.

Page 300: thb416

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 selectedoperands are graphically displayed in a diagram. With simultaneous triggering, the counter is reset to0 (upper left in screen). By using the cursor keys ← and → (TNC 306) or the soft keys PAGE (TNC406),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 tooearly. Taking the PLC processing time of 40 ms into account, a time displacement in ms can bedetected.

START TRACE

With this mode, TRACE is started. Until the trigger event occurs, the display PCTR blinks in thestatus field. When the trigger event occurs, PCTR is on, and after the trace is stored, the displaygoes 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 TRACEfunction. 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), orwith 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 PLCprogram.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 itpossible to display any memory area of the PLC in the PLC status window in up to three lines. Thevalues are hexadecimal coded. The function is activated by entering the starting address of themarker area to be tested in D308/D312/D316. With K+0 in D308/D312/D316 the function is madeinactive. Byte markers appear as 80..FF with Marker =1, and 00..7F with Marker = 0.

Page 301: thb416

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: -34608Output O: -34224Counter C: -34032Timer T: -33888Word 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 PROGRAMOUTPUT ASCIIOUTPUT ASCII UNFORMATTEDOUTPUT ASCII WITH CROSS-REF.BINARY OUTPUT

PLC programs written on a computer can be transferred into the PLC RAM with the RS-232-Cinterface. To load a program, select READ IN SELECTED PROGRAM. It is not necessary to reservememory 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 externaldevice. 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 thecorresponding menu items (see Section "Program creation", "EPROM creation").

Page 302: thb416

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

Operanddesignation

(I, O, M, T, C,B, W, D, K)

Operandaddress;

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 aparameter (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 memorycontents with a length of 8 Bits (Byte), 16 Bits (Word) or 32 Bits (Double word) (see Section"Commands").

Page 303: thb416

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 programwith the most transparent structure possible. This can be best achieved by dividing the PLC-programinto 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 M27191 SN M2719 ;Activate the strobes for word processing2 L M24973 SN M2497 ;Activate the edge evaluation4 L M24965 SN M2496 ;Activate transfer of decoded M-codes

;(M1900 to M1999). . .. . .20 L M1936 ;M-Function M3621 A M2045 ;Change-signal for M-function22 AN M2618 ;Gap control already active?23 CMT 36 ;Gap control. . .. . .. . .95 EM ;End main program122 LBL 101 ;Acknowledgment for M function. . .. . .125 EM. . .. . .. . .151 LBL 36 ;Gap control152 CM 361 ;Eroding ON153 CM 101 Acknowledgment for M functions154 EM .. . .. . .. . .220 LBL 361 ;Eroding ON. . .. . ..225 EM. . .. . .

Error conditions in the machine should be interrogated in the PLC-program and a plain language errormessage should be displayed on the screen. See Chapter "Machine integration", Section "Displayand operation" and Chapter "PLC-programming", Section "Modules".

Page 304: thb416

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 3263Input 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 C79Release count pulse: C96 to C127

Timer T (Timer) Timer-start: T0 to T47Timer 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 theoperands can be 8,16 or 32 bits wide, an overlap of the memory areas will occur, which must betaken into account in addressing the memory.

8 bit

07B0

B1023B1022B1021B1020D1020 W1020

B1B2B3B4B5

W0D0

W2

W4D4

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 secondaddress 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 doubleword address (D).

Markers M1000 to M2000 and bytes B0 to B127 are non-volatile, i.e. the contents of this memoryare not lost when the power supply is switched off.

Page 305: thb416

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

B0 to B127 Freely available, not deleted with RESETB128 to B255 Freely available, deleted with RESETB256 to B511 Data transfer NC → PLCB512 to B767 Data transfer PLC → NCB768 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 meansthat Q100 to Q107 can be overwritten by the PLC. The numerical value is registered in Double wordD528 and the Q parameter numbers 0 to 7 are defined in Word W516. The numbers 0 to 7correspond 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 D528to the Q-Parameter defined in W516

PLC NC

Address Function

D 528

Double word with multiple function, here data for transfer from thePLC 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 parametersare 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 certainPLC-functions etc. can be filed in these machine parameters. The eroding parameters are stillavailable, which, depending on whether they are defined as Q parameters in the NC program or witha table, are transferred by the NC or E-table into the PLC. The evaluation of all numerical valuestransferred to the PLC takes place in the PLC program. (See chapter "Machine integration", section"Eroding parameters.")

Address Function

D768 Value from MP4210.0D772 Value from MP4210.1D776 Value from MP4210.2D780 Value from MP4210.3D784 Value from MP4210.4D788 Value from MP4210.5

Page 306: thb416

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

Address Function

D792 Value from MP4210.6D796 Value from MP4210.7D800 Value from MP4210.8D804 Value from MP4210.9D808 Value from MP4210.10

D812 Value from MP4210.11D816 Value from MP4210.12D820 Value from MP4210.13D824 Value from MP4210.14D828 Value from MP4210.15

D832 Value from MP4210.16D836 Value from MP4210.17D840 Value from MP4210.18D844 Value from MP4210.19D848 Value from MP4210.20

D852 Value from MP4210.21D856 Value from MP4210.22D860 Value from MP4210.23D864 Value from MP4210.24D868 Value from MP4210.25

D872 Value from MP4210.26D876 Value from MP4210.27D880 Value from MP4210.28D884 Value from MP4210.29D888 Value from MP4210.30

D892 Value from MP4210.31D896 Value from MP4210.32D900 Value from MP4210.33D904 Value from MP4210.34D908 Value from MP4210.35

D912 Value from MP4210.36D916 Value from MP4210.37D920 Value from MP4210.38D924 Value from MP4210.39D928 Value from MP4210.40

D932 Value from MP4210.41D936 Value from MP4210.42D940 Value from MP4210.43D944 Value from MP4210.44D948 Value from MP4210.45

D952 Value from MP4210.46D956 Value from MP4210.47

Page 307: thb416

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

Address Function

W960 Value from MP 4220.0W962 Value from MP 4220.1W964 Value from MP 4220.2W966 Value from MP 4220.3W968 Value from MP 4220.4

W970 Value from MP 4220.5W972 Value from MP 4220.6W974 Value from MP 4220.7W976 Value from MP 4310.0W978 Value from MP 4310.1

W980 Value from MP 4310.2W982 Value from MP 4310.3W984 Value from MP 4310.4W986 Value from MP 4310.5W988 Value from MP 4310.6

W990 Value from MP 4310.7W992 Value from MP 4310.8W994 Value from MP 4310.9W996 Value from MP 4310.10W998 Value from MP 4310.11

W1000 Value from MP 4310.12W1002 Value from MP 4310.13W1004 Value from MP 4310.14W1006 Value from MP 4310.15W1008 Value from MP 4320.0

W1010 Value from MP 4320.1W1012 Value from MP 4320.2W1014 Value from MP 4320.3W1016 Value from MP 4320.4W1018 Value from MP 4320.5

W1020 Value from MP 4320.6W1022 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 W974to MP4220.7 Input range: 80 to 30 000

MP4310.0 Set a number in the PLC: in the Word range W976 to W1022to MP4310.15 Input range: 0 to 65 535and

MP4320.0

to

MP4320.7

Page 308: thb416

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 thesymbol T. The time period for the timers is defined in the machine parameter MP4110.X. The timeunit corresponds to the PLC cycle time.

The timers are started by setting markers T0 to T47 which also sets them to the value fromMP4110.X. This activation may only be performed for a single PLC run, as otherwise the timers willbe restarted upon every succeeding run.

The markers T48 to T95 (timer running) will remain set for the period defined in the machineparameters.

Example:

Start of Timer 1Period in MP4110.1 = 9 (PLC-cycles)

T1

T49

Page 309: thb416

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

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

MP4110.x Time for timers

Input range: 0 to 65 535 [PLC cycles] (= 20/40 ms depending on MP1700)

Page 310: thb416

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 markerswith the symbol C. After setting a marker from the range C0 to C31 the counter is loaded with thevalue from machine parameter MP4120.X. The marker range C48 to C79 indicates whether thecount 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 C1Contents of machine parameter MP4120.1 = 10 (PLC cycles)

C1

C49

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

Page 311: thb416

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 meansthat 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 I31M1564 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 I31M1764 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-inputsRising-edge marker M1500 to M1651Falling-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 betransferred in binary code to the PC via RS-232-C serial port (Motorola EXORMAX S3 Recordformat).

This binary code is needed to create EPROMs with the MEGA-PROMMER software (version 2.12 orhigher). The TNC 306 must be equipped with 1-MB EPROMs, and the TNC 406 (beginning withversion 280 62x 03) with 2-MB EPROMs.

Starting with software version 280 62x 03 (code number for PLC chip is $0002, previously $0000 ason the TNC 306) the output of the TNC 406 will be in a new binary format. This format cannot beread by older software versions.

With binary output from the TNC 406, the machine parameters and the compensation value tablewill be automatically transferred. The erosion parameter tables and OEM cycles must be confirmedindividually with the ENT key. A transfer in progress can be interrupted with the END key.

Page 312: thb416

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 betransferred to the RAM memory with the COPY ROM⇒RAM soft key (only with TNC 406). Theybecome 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 thecontrol 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 themachine to the customer (see also Chapter "Introduction").

MP4010 PLC program from RAM or from EPROM

Input: 0 or 10 = EPROM operation1 = RAM operation

Please contact your HEIDENHAIN customer service representative if you have any questions.

Page 313: thb416

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 theerror was found. If the PLC-program is compiled on switching-on (for example, because the controlwas switched off immediately after editing the PLC-program) then a flashing message "ERROR INPLC-PROGRAM" will be displayed. Remedy: switch off and on again, and call the PLC-Editor withthe 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).

Page 314: thb416

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 theWord Accumulator does not contain a definite value).

22 Logic-Accumulator not loaded (a Logic Assign has been programmed, although the LogicAccumulator does not contain a definite value).

23 Accumulators not loaded on "open-parentheses" (an A[, AN[, O[, ON[, or XON[ command hasbeen programmed, although neither the Word- nor the Logic Accumulator has been gated orloaded).

24 Incorrect type of the parentheses result (a different type has been calculated in theparentheses from that which was defined at the "open-parentheses" command, i.e. Logicinstead 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 programmed29 Blank CASE instruction

A CASE instruction has been programmed followed immediately by an ENDC label30 String accumulator not loaded

A command has been programmed which gates, assigns or manipulates the already loadedstring accumulator even though the accumulator was not previously loaded.

31 String instruction within parenthesesA string instruction has been programmed within parentheses even though string gatescannot be nested with parentheses

32 No string assignmentA new gating chain has started without assigning the gating result previously formed in thestring accumulator

2.7.3 Run-time errors

These errors only appear when the PLC-program is executed. A flashing error-message "ERROR INPLC-PROGRAM NR" is displayed. After switching the control off and on again, the Editor can beaccessed by using the code number. The message ”INPUT ERROR” is then displayed and theEditor stands at the erroneous line or, if the program run-time has been exceeded, at the jumpinstruction 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.

Page 315: thb416

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

Page 316: thb416

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 ConstantExecution time [µs] 1.2 2.0/1.6 1.6 1.2Number 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 startof a logic chain, in order to enable subsequent gating commands. The same function is achievedwhen the gating commands A, O, XO are used at the start of a logic chain, however this shouldonly 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 stateof input I4 is loaded into the Accumulator to enable subsequent gating commands.

Initial state: Input I4 = 1Input I5 = 0Output 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.

Page 317: thb416

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 thestart of a word gating chain must always be with the L command. It is not possible to use a gatingcommand.

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.

Page 318: thb416

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 ConstantExecution time [µs] 1.6 2.4/2.0 2.2 1.8Number 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 isalways used at the start of a logic chain in order to enable subsequent gating commands. The samefunction 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 outputO2. Thus the inverted logic state of Input I4 is loaded into the Accumulator to enable subsequentgating commands.

Initial state: Input I4 = 0Input I5 = 1Output 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.

Page 319: thb416

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 intothe 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 notpossible 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 ByteB8.

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.

Page 320: thb416

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 ConstantExecution time [µs] ---- 2.4/2.0 2.2 1.8Number 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 WordAccumulator as a two's complement. In addition, the Accumulator is filled, if necessary, according tothe sign bit. The two's complement allows negative numbers to be stored. i.e. a number loaded withthe 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 asdecimal 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.

Page 321: thb416

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.0Number of bytes 18

Operands: M, I, O, T, C

Operation:With the command LB, 8 Markers, Inputs, Outputs, Timers or Counters with ascending numberingare loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. Thedesignated operand address occupies the LSB in the Accumulator, the designated address + 1 theLSB + 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.2Number of bytes 18

Operands: M, I, O, T, C

Operation:With the command LW, 16 Markers, Inputs, Outputs, Timers or Counters with ascending numberingare loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. Thedesignated operand address occupies the LSB in the Accumulator, the designated address + 1 theLSB + 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.2Number of bytes 16

Operands: M, I, O, T, C

Operation:With the command LD, 32 Markers, Inputs, Outputs, Timers or Counters with ascending numberingare loaded into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. Thedesignated operand address occupies the LSB in the Accumulator, the designated address + 1 theLSB + 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.

Page 322: thb416

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 = 0Input I4 = 1 Input I8 = 1Input I5 = 1 Input I9 = 1Input 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 usedaccordingly.

Page 323: thb416

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 ConstantExecution 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 LogicAccumulator to the addressed operand. The = command is only used at the end of a logic chain inorder that a gating result is available. The command may be used several times in succession (seeexample).

Example:Inputs I4 and I5 are to be gated with AND and the result assigned to Outputs O2 and O5.

Initial state: Input I4 = 1Input I5 = 0Output 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.

Page 324: thb416

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 WordAccumulator to the addressed operand. The = command is only used at the end of a gating chain inorder that a gating result is available. The command can be used several times in succession (seeexample).

Example:A Constant (K) and the contents of Byte B5 should be gated with AND and the result assigned toByte 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.

Page 325: thb416

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.0Number 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 theAccumulator 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] 50Number 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. TheLSB in the Accumulator is copied to the designated operand address, the LSB + 1 to the designatedaddress + 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.4Number 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 theAccumulator 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.

Page 326: thb416

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

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 thecontents 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 thecontents 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 wordaccumulator to the addressed operand.For example see ASSIGN command (=).

Page 327: thb416

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

Page 328: thb416

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 unchangedExecution time [µs] 2.0 to 2.40 1.0 to 1.4Number 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 LogicAccumulator = 1, the addressed operand is set to 1, otherwise the operand remains unchanged. AnS-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 = 1Input I5 = 0Output 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.

Page 329: thb416

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 unchangedExecution time [µs] 2.0 to 2.4 1.0 to 1.4Number 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 LogicAccumulator = 1, the addressed operand is set to 0, otherwise the operand remains unchanged. AnR command is used at the end of a logic chain, in order that a gating result may influence theoperand. 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 = 1Input I5 = 0Output 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.

Page 330: thb416

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 unchangedExecution time [µs] 2.0 to 2.4 1.0 to 1.4Number 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 LogicAccumulator = 0 , then the addressed operand is set to 1, otherwise the operand remainsunchanged. An SN command is used at the end of a logic chain, in order that a gating result mayinfluence 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 = 0Input I5 = 0Output 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.

Page 331: thb416

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 unchangedExecution time [µs] 2.0 to 2.4 1.0 to 1.4Number 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 LogicAccumulator = 0, then the addressed operand is set to 0, otherwise the operand remainsunchanged. An RN command is used at the end of a logic chain, in order that a gating result mayinfluence 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 = 0Input I5 = 0Output 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.

Page 332: thb416

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

Page 333: thb416

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 ConstantExecution time [µs] 1.2 1.2/1.2 1.8 1.6Number 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 355control which did not have the special L command. In PLC programs for the TNC 306, a logicchain 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 = 1Input I5 = 0Output 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.

Page 334: thb416

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 withAND. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit), 8, 16or 32 bits will be influenced in the Accumulator.

Thus: Bit 0 of the Accumulator is gated with bit 0 of the operandBit 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.

Page 335: thb416

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 ConstantExecution time [µs] 2.0 2.0/2.0 3.0 2.6Number 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 theTNC 355 control which did not have the special LN command. In PLC programs for the TNC 306 alogic 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 = 1Input I5 = 1Output 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.

Page 336: thb416

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 withAND 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 toWord 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.

Page 337: thb416

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 ConstantExecution time [µs] 1.2 1.2/1.2 1.8 1.6Number 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 355control which did not have the special L command. In PLC programs for the TNC 306 a logic chainshould 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 = 0Input I5 = 1Output 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.

Page 338: thb416

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 withOR. In accordance with the different sizes of operand (B = 8 bit; W = 16 bit; D = K = 32 bit), 8, 16 or32 bits will be influenced in the Accumulator.

Thus: Bit 0 in the Accumulator is gated with bit 0 in the operandBit 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.

Page 339: thb416

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 ConstantExecution time [µs] 2.0 2.0/2.0 3.0 2.6Number 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 theTNC 355 control which did not have the special LN command. In PLC programs for the TNC 306a 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 = 0Input I5 = 0Output 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.

Page 340: thb416

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 withOR 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 operandBit 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 toWord 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.

Page 341: thb416

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 ConstantExecution time [µs] 1.6 1.6/1.6 2.4 2.0Number 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 355control which did not have the special L command. In PLC programs for the TNC 306 a logic chainshould 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 LogicAccumulator.

Example:Inputs I4 and I5 are to be gated with EXCLUSIVE OR and the result assigned to Output O2.

Initial state: Input I4 = 1Input I5 = 1Output 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.

Page 342: thb416

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 withEXCLUSIVE 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 operandBit 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 assignedto 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.

Page 343: thb416

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 ConstantExecution time [µs] 2.0 2.0 3.0 2.6Number 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 355control which did not have the special LN command. In PLC programs for the TNC 306 a logicchain 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 LogicAccumulator.

Example:Input I4 and Marker M500 are to be gated with EXCLUSIVE OR NOT and the result assigned toOutput O2.

Initial state: Input I4 = 0Marker M500 = 0Output 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.

Page 344: thb416

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 withEXCLUSIVE 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 operandBit 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 resultassigned 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.

Page 345: thb416

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

Page 346: thb416

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 ConstantExecution time [µs] ---- 2.8/2.4 1.8 1.6Number 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 isstored 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 wordD8.

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

Page 347: thb416

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 ConstantExecution time [µs] ---- 2.8/2.4 1.8 1.6Number 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. Theresult 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 Doubleword 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 decimalnotation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulatorcontents (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.

Page 348: thb416

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 ConstantExecution time [µs]* ---- 10.2/9.4 --- 9.8Number 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. Theresult of the operation is stored in the Word Accumulator and may be processed further. If the resultof 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 Doubleword 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 decimalnotation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulatorcontents (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.

Page 349: thb416

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 ConstantExecution time [µs] *) **) ---- 20.2/19.8 --- 19.8Number 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 resultof the operation is stored in the Word Accumulator and may be processed further. If division by 0 isattempted, 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 Doubleword 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 decimalnotation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulatorcontents (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.

Page 350: thb416

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 ConstantExecution time [µs] ---- 20.6 to 20.2 20.2Number 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 bythe contents of the operand. The REMAINDER is stored in the Word Accumulator and may beprocessed 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 decimalnotation. The 10 bit wide Accumulator allows the entry of the highest possible Accumulatorcontents (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.

Page 351: thb416

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

Page 352: thb416

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 ConstantExecution time [µs] 1.8 to 2.4 2.0Number 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 theWord Accumulator and the contents of the addressed operand are compared. If the WordAccumulator 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 numberof 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 toMarker M500.

Initial state: Constant = 16 000Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulatorallows 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 02 == 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) areassigned to Marker M500.

Page 353: thb416

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 ConstantExecution time [µs] 1.8 to 2.4 2.0Number 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 theWord Accumulator are compared with the contents of the addressed operand. If the WordAccumulator 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. Thecomparison takes place over the number of bits in the operand, i.e. B = 8 bit, W = 16 bit andD = K = 32 bit.

Example:A constant is to be compared with the contents of Double word D8. The result is then assigned toMarker M500.

Initial state: Constant = 16 000Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulatorallows 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 01 < 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 AccumulatorLine 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) areassigned to Marker M500.

Page 354: thb416

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 ConstantExecution time [µs] 1.8 to 2.4 2.0Number 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 theWord Accumulator are compared with the contents of the addressed operand. If the WordAccumulator 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. Thecomparison 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 toMarker M500.

Initial state: Constant = 16 000Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulatorallows 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 01 > 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 AccumulatorLine 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) areassigned to Marker M500.

Page 355: thb416

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 ConstantExecution time [µs] 1.8 to 2.4 1.8 to 2.0Number 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 theWord Accumulator are compared with the contents of the addressed operand. If the WordAccumulator is less than or equal to the operand, the condition is true and the Logic Accumulator isset to 1. If the Word Accumulator is greater than the operand, the Logic Accumulator is set to 0. Thecomparison 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 toMarker M500.

Initial state: Constant = 16 000Double word D8 = 15 000

The Accumulator and operand contents are shown in decimal notation. The 10 bit wide Accumulatorallows 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 01 <= 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.

Page 356: thb416

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 ConstantExecution time [µs] 1.8 to 2.4 1.8 to 2.0Number 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 WordAccumulator is compared with the content of the addressed operand. If the Word Accumulator isgreater than or equal to the operand, the condition is true and the Logic Accumulator is set to 1. Ifthe Word Accumulator is smaller than the operand, the Logic Accumulator is set to 0. Thecomparison takes place over the number of bits corresponding to the operand i.e. B=8 bit, W=16 bitand D=K=32 bit.

Example:A constant is to be compared with the content of Double word D8. The result is then assigned tomarker M500.

Initial state: Constant = 16 000Double word D8 = 15 000

Accumulator and operand contents are entered here in decimal notation. The ten-positionAccumulator 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 01 >= 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 LogicAccumulator is set to 1.

Line 3: The content of the Logic Accumulator (result of the comparison) is assigned to markerM500.

Page 357: thb416

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

3.5.6 UNEQUAL (<>)<>

Abbreviation for PLC Editor: <> (NOT EQUAL)

Byte/Word/Double ConstantExecution time [µs] 1.8 to 2.4 1.8 to 2.0Number 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 WordAccumulator is compared with the content of the addressed operand. If the Word Accumulator andthe operand are not equal, the condition is true and the Logic Accumulator is set to 1. If the WordAccumulator is equal to the operand, the Logic Accumulator is set to 0. The comparison takes placeover 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 tomarker M500.

Output state Constant = 16 000Double word D8 = 15 000

Accumulator and operand contents are entered here in decimal notation. The ten positionAccumulator 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 01 <> 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 Accumulatoris set to 1.

Line 3: The contents of the Logic Accumulator [result of the comparison] is assigned tomarker M500.

Page 358: thb416

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

Page 359: thb416

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" andcorresponding "close-parentheses" commands.

3.6.1 AND [ ] (A[ ]) A[ ]

Abbreviation for PLC Editor: A[ ] (AND [ ])

Logic Byte/Word/DoubleExecution time [µs] 1.6 2.6Number of bytes 6 6

Operands: none

3.6.2 AND NOT [ ] (AN[ ]) AN[ ]

Abbreviation for PLC Editor: AN[ ] (AND NOT [ ])

Logic Byte/Word/DoubleExecution time [µs] 2.0 3.2Number of bytes 6 6

Operands: none

3.6.3 OR [ ] (O[ ]) O[ ]

Abbreviation for PLC Editor: O[ ] (OR [ ])

Logic Byte/Word/DoubleExecution time [µs] 1.6 2.6Number of bytes 6 6

Operands: none

3.6.4 OR NOT [ ] (ON[ ]) ON[ ]

Abbreviation for PLC Editor: ON[ ] (OR NOT [ ])

Logic Byte/Word/DoubleExecution time [µs] 2.0 3.2Number of bytes 6 6

Operands: none

Page 360: thb416

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/DoubleExecution time [µs] 2.0 3.2Number 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/DoubleExecution time [µs] 2.4 3.8Number 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 LogicAccumulator is addressed in the previous command, prior to a "parentheses-open" instruction, thecontent of the Logic Accumulator is loaded into the Program Stack. By addressing the WordAccumulator, the content of the Word Accumulator will be distributed.

The "close-parentheses" instruction initiates the gating of the buffered value from the Program Stackwith the Logic Accumulator and/or the Word Accumulator, depending on which Accumulator wasaddressed prior to the "parentheses-open" instruction. The result is then available in thecorresponding Accumulator. The maximum nesting level is 16 parentheses.

Page 361: thb416

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 logicblock-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 015

... 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 thewhole Accumulator is written onto the Stack.

Page 362: thb416

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

Page 363: thb416

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" andcorresponding "close-parentheses" commands.

3.7.1 ADDITION [ ] (+[ ]) + [ ]

Abbreviation for PLC Editor: + [ ] (PLUS [ ])

Logic Byte/Word/DoubleExecution time [µs] ----- 2.6Number of bytes ----- 6

Operands: none

3.7.2 SUBTRACTION [ ] (–[ ]) – [ ]

Abbreviation for PLC Editor: – [ ] (MINUS [ ])

Logic Byte/Word/DoubleExecution time [µs] ----- 3.2Number of bytes ----- 6

Operands: none

3.7.3 MULTIPLICATION [ ] (x[ ]) X [ ]

Abbreviation for PLC Editor: x [ ] (MULTIPLY [ ])

Logic Byte/Word/DoubleExecution time [µs] *) ----- 11.0Number of bytes ----- 12

Operands: none

3.7.4 DIVISION [ ] (/[ ]) / [ ]

Abbreviation for PLC Editor: / [ ] (DIVIDE [ ])

Logic Byte/Word/DoubleExecution time [µs] *) **) ----- 20.2Number of bytes ----- 16

In the event of an error (Divisor = 0) in the Division and MODULO functions, the execution time willbe in the range 0.9 to 1.3 µs.

Operands: none

*) See Multiplication**) See Division

Page 364: thb416

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/DoubleExecution time [µs] *) **) ----- 20.6Number of bytes ----- 14

*) See Multiplication**) See Division

In the event of an error (Divisor = 0) in the Division and MODULO functions, the execution time willbe 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 aladder may be altered by the use of parentheses. The "open-parentheses" command loads thecontent of the Word Accumulator onto the Program Stack. Then the Accumulator is available for thecalculation of intermediate results. The "close-parentheses" instruction initiates the gating of thebuffered value from the Program Stack with the content of the Word Accumulator. The result isagain loaded into the Accumulator. The maximum nesting level is 16 parentheses.

Example for the commands ADD [ ], SUBTRACT [ ], MULTIPLY [ ], DIVIDE [ ], DIVISIONREMAINDER [ ]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-placeAccumulator thus permits the maximum possible Accumulator content of (2 147 483 647).

Page 365: thb416

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.

Page 366: thb416

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

3.7.6 INCREMENT (INC)

INCREMENT Operand

Abbreviation for the PLC Editor: INCOperands: 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: DECOperands: 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.

Page 367: thb416

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 thecorresponding "close-parenthesis" commands.

3.8.1 EQUAL TO [ ] (==[ ]) (== [ ]

Abbreviation for PLC Editor: == [ ] (EQUAL [ ])

Logic Byte/Word/DoubleExecution time [µs] ---- 3.0 to 3.2Number of bytes ---- 6

Operands: none

3.8.2 LESS THAN [ ] (<[ ]) < [ ]

Abbreviation for PLC Editor: < [ ] (LESS THAN [ ])

Logic Byte/Word/DoubleExecution time [µs] ---- 3.0 to 3.2Number of bytes ---- 6

Operands: none

3.8.3 GREATER THAN [ ] (>[ ])> [ ]

Abbreviation for PLC Editor: > [ ] (GREATER THAN [ ])

Logic Byte/Word/DoubleExecution time [µs] ---- 3.0 to 3.2Number of bytes ---- 6

Operands: none

3.8.4 LESS THAN OR EQUAL TO [ ] (<=[ ]) <= [ ]

Abbreviation for PLC Editor: <= [ ] (LESS EQUAL [ ])

Logic Byte/Word/DoubleExecution time [µs] ---- 3.0 to 3.2Number of bytes ---- 6

Operands: none

Page 368: thb416

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/DoubleExecution time [µs] ---- 3.0 to 3.2Number of bytes ---- 6

Operands: none

3.8.6 NOT EQUAL TO [ ] (<>[ ]) <> [ ]

Abbreviation for PLC Editor: <> [ ] (NOT EQUAL [ ])

Logic Byte/Word/DoubleExecution time [µs] ---- 3.0 to 3.2Number 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. TheAccumulator is now available for the calculation of intermediate results.

The "close-parentheses" instruction initiates the gating of the buffered value from the Program Stackwith the content of the complete Word Accumulator. The result is loaded again into theAccumulator. The maximum nesting depth is 16 parentheses.

A direct transition from Word to Logic execution takes place with comparison commands. If thecomparison condition is "true", the Logic Accumulator is set to "1". If the condition is not fulfilled, theLogic Accumulator is set to "0".

Page 369: thb416

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-positionAccumulator 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 tologic 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 fromWord to Logic processing occurs in this program line. The Logic Accumulator is set orreset, depending on the result of the comparison.

Line 6: The result of the complete logical process is assigned to output O15.

Page 370: thb416

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

Page 371: thb416

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 ConstantExecution time [µs] 2.0 + 0.2 x n 2.0 + 0.2 x nNumber 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 thispurpose, the bits in the Accumulator are simply shifted by one place to the left. The number of the shiftoperations is determined via the operand. Thus the set bits, which are shifted beyond the Accumulator tothe left, are lost; the Accumulator is filled with nulls from the right-hand side. With operand contentsgreater than 32, the operand value Modulo 32 is used, i.e. the integer remainder from the division (operandvalue)/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 hexadecimalnotation.

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 thecommand << K+4.

Line 6: The result is stored in the Double word D12.

Page 372: thb416

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 ConstantExecution time [µs] 2.0 + 0.2 x n 2.0 + 0.2 x nNumber 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 thispurpose, the bits in the Accumulator are simply shifted by one place to the right. The number of the shiftoperations is determined via the operand. Thus the set bits, which are shifted beyond the Accumulator tothe right, are lost; the Accumulator is filled according to the sign, from the left-hand side. With operandcontents 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 hexadecimalnotation.

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 thecommand >> K+4.

Line 6: The result is stored in Double word D12.

Page 373: thb416

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

Page 374: thb416

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 ConstantExecution time [µs] 2.0 to 2.4 2.0Number 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 derivedfrom the content of the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds tothe LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 isused, 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 resultin 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.

Page 375: thb416

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 ConstantExecution time [µs] 2.2 to 2.6 2.2Number 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 derivedfrom the content of the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds tothe LSB and bit 31 the MSB. For operand contents larger than 32, the operand value Modulo 32 isused, 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 inDouble 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.

Page 376: thb416

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 ConstantExecution time [µs] 2.2 to 2.8 2.2 to 2.4Number 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. Directtransition from Word to Logic execution takes place. The BIT TEST tests the status of a bit from theWord 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 logicexecution. The selection (addressing) of the corresponding bit is derived from the content of thespecified Operand or a Constant. In the bit-numbering, bit 0 corresponds to the LSB and bit 31 theMSB. For operand contents larger than 32, the operand value Modulo 32 is used, i.e. the integerremainder 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 LogicAccumulator 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.

Page 377: thb416

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

Page 378: thb416

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 placeaccording 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 ConstantExecution time [µs] 4.2 5.4/5.0 5.5 4.2Number 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 DataStack. Since the Data Stack is organized as 16 bit, a minimum width of one Word must be used inwriting to it. During this the operand value is copied into bit 7 of the current address in the DataStack. The free bits of the reserved memory are undefined or unused. In the event of a Stackoverflow, an error message will be issued.

Memory allocation in the Data Stack:

Bit 15 7 0x 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) iscopied into the current address of the Data Stack. With Word execution, two Words are reserved asstandard on the Data Stack per PS command. The operand is extended in the Stack with signjustification corresponding to the MSB. In the event of a stack overflow, an error message will beissued.

Memory allocation in the Data Stack upon saving of:

Bit 31 15 7 0Byte 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

Page 379: thb416

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 ConstantExecution 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 takenfrom the Data Stack again with PULL. With logic execution, bit 7 is copied from the current addressof the Data Stack into the addressed operand with a PL command. If the Stack is empty, an errormessage 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 takenfrom the Data Stack again with PULL. With Word execution, two Words are copied from the currentaddress of the Data Stack into the addressed memory area with a PL command. If the Stack isempty, 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.0Number of bytes 20

Operands: none

Operation:The Logic Accumulator can be buffered with the PSL command. For this purpose, the LogicAccumulator is loaded onto the Data Stack. Since the Data Stack is organized as 16 bits, it must bewritten to with a minimum width of one Word. During this the content of the Logic Accumulator iscopied into the current address of the Data Stack. The free bits of the reserved memory areundefined or unused. In the event of a Stack overflow, an error message will be issued.

Memory allocation in the Data Stack:

Bit 15 7 0x x x x x x x x L x x x x x x x

Page 380: thb416

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.4Number 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 beissued.

3.11.5 Pull logic accumulator from Data Stack (PLL) PLL

Abbreviation for PLC Editor: PLL (PULL LOGICACCU)

Execution time [µs] 2.2Number of bytes 16

Operands: none

Operation:The PLL command complements the PSL command. With a PLL instruction, bit 7 from the currentaddress of the Data Stack is copied into the Logic Accumulator. If the stack is empty, an errormessage will be issued.

3.11.6 Pull word accumulator from Data Stack (PLW)

Abbreviation for PLC Editor: PLW (PULL WORDACCU)

Execution time [µs] 2.6Number of bytes 16

Operands: none

Operation:The PLW command complements the PSW command. With a PLW instruction, two Words arecopied from the Data Stack into the Word Accumulator. If the stack is empty, an error message willbe issued.

Page 381: thb416

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

Examples for the commands PS, PL, PSL, PSW, PLL, PLWThe Module 15 is to be called at a specific point in the program. After the return into the mainprogram, 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.

Page 382: thb416

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

Page 383: thb416

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 processedExecution 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 processedExecution time [µs] 3.0 to 3.4 1.0 to 1.4Number 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 iscontinued from the specified jump address (Label). If the Logic Accumulator is "0" the jump is notprocessed. 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 processedExecution time [µs] 3.0 to 3.4 1.0 to 1.4Number 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 iscontinued from the specified jump address (Label). If the Logic Accumulator is "1", the jump is notprocessed. This command interrupts a logic sequence.

Page 384: thb416

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.

Page 385: thb416

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 Moduledesignated by the jump address (LBL). Modules are independent subprograms and are terminatedby the command EM. They can also be called at multiple points in the main program. This commandinterrupts 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.4Number of bytes 26 (24)

Special Library Call:Execution time [µs] 7.4 1.4Number 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 thespecified jump address (Label) is processed. If the Logic Accumulator is "0", the main programcontinues 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 processedExecution time [µs] 6.8 to 7.2 1.0 to 1.4Number of bytes 26 (24)

Special Library Call:Execution time [µs] 7.4 1.4Number of bytes 28

Page 386: thb416

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 thespecified jump address (Label) is processed. If the Logic Accumulator is "1", the main programcontinues 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.

Page 387: thb416

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.0Number of bytes 4

Operands: none

Operation:Every program and/or every subprogram (Module) is terminated with an EM command. An EMcommand in a Module initiates the return jump to the Call Module (CM, CMT, CMF). The program iscontinued with the instruction following the Call Module. The command EM is handled as programend 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] 0Number 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. Jumplabels 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 LogicAccumulator 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 LogicAccumulator is "0".

Page 388: thb416

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

Page 389: thb416

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 WordExecution time [µs] 12.0 12.0Number 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 anascending sequence from 0 to a maximum of 127. The content of the operands (B, W) addressesthe required Module.

3.13.2 End indexed call module (ENDC) ENDC

Abbreviation for PLC Editor: ENDC (ENDCASE)

Byte WordExecution time [µs] 0 0Number of bytes 0 0

Operands: none

Operation:The ENDC command is used in conjunction with the CASE command. It must immediately followthe list of CM commands.

Page 390: thb416

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 1502 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 theoperand

Line 2: Call Module for operand contents 0Line 3: Call Module for operand contents 1Line 4: Call Module for operand contents 2Line 5: Call Module for operand contents 3Line 6: Call Module for operand contents 4Line 7: Call Module for operand contents 5Line 8: Call Module for operand contents 6Line 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. Thesetexts may be displayed in the PLC window of the screen by the use of Module 9082, and/or deletedagain with Module 9080 (refer to PLC modules). A STRING Accumulator and four STRING memoriesare provided in the control for STRING execution. A maximum of 128 characters may be loaded intothis.

STRING accumulator: 128 Characters

1 128

STRING memory: 128 Characters

1 128S 0S 1S 2S 3

Example:

1 128C O O L A N T 1 O N

Page 391: thb416

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 withvarious arguments.

Explanation of the Operand:

The operand "S" is only used in STRING execution. The following locations may be addressed withthe 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 TextSTRING, 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 errormessage 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 fileis read for display on the screen.

Note:The execution times depend on the length of the STRINGS. The specified times indicate maximumvalues. For the Immediate STRINGS, the length "n" of the STRINGS must respectively be added tothe 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] < 80Number of bytes STRING memory: 10

Immediate STRING: 18 + nSTRING 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 beloaded, proceeds using the Argument <arg> after the operand designation.Refer also to operand explanation.

Page 392: thb416

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

3.14.2 ADD (+)

Abbreviation for PLC Editor: +

Execution time [µs] < 80Number of bytes STRING memory: 10

Immediate STRING: 18 + nSTRING 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. Theselection of the STRINGS, which should be added, proceeds using the Argument <arg> after theoperand designation. Refer also to operand explanation. The resultant STRING must not be longerthan 128 characters.

3.14.3 Storing a STRING (=)

Abbreviation for PLC Editor: =

Execution time [µs] < 80Number 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. Theselection 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 STRINGmemory (S0 – S3) are valid here.

Page 393: thb416

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] < 80Number 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 thecharacter "STRING-End" is not transferred alongside. By this means, the beginning of a STRINGwhich is already in the STRING memory, can be overwritten.The selection of the memory, into which the STRING should be copied, proceeds using theArgument <arg> after the operand designation. Whereby only the Arguments 0 – 3, which address aSTRING memory (S0 – S3) are valid here.

Example for storing a string:

1

S0S1

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

128S0S1S2S3

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

Page 394: thb416

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 allowstasks to be performed which are very processor-intensive, require program loops or must wait forexternal results. It is assumed, however, that these programs are not bound by a particular timeframe. Depending on processor loading, each Submit program is allocated a certain computingpower, but always at least 5% of the total power. Submit programs are started from the PLCprogram and can access all the same data memories (M/B/W/D) as can the main program. This canlead to problems in certain circumstances. Such problems can be avoided if the data processed bythe 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 WordAccumulator. With this "Identifier" and the REPLY function, it can be interrogated whether or not theprogram is in the queue, is being processed or is already complete. The Submit programs areexecuted in the order of their placement in the queue. Should an error occur during the execution ofthe Submit programs, the following Markers are set:

M3168: Overflow during MultiplicationM3169: Division by 0M3170: MODULO incorrectly executedM3171: Error status for PLC moduleM3172: 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 beedited 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. Theexecution times denote maximum values.

3.15.1 Call up of the Submit Program (SUBM)

Abbreviation for PLC Editor: SUBM (SUBMIT)

Execution time [µs] < 30Number of bytes 10

Operands: jump address (LBL)

Operation:The SUBM command allots an "Identifier" (1 to 255) to the subprogram, designated by the jumpaddress (LBL). Simultaneously, the allocated number is written to the Word Accumulator. If thereare already programs transferred into the Submit queue, the addressed program will not beprocessed until the program immediately prior to it is finished. A submission to the queue may onlytake 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.

Page 395: thb416

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] < 5Number of bytes 10

Operands: B

Operation:With the RPLY command the Status of the Submit program is interrogated with the specifiedIdentifier. This Identifier must already be stored in a Byte prior to the calling up of the Submitprogram. With the RPLY command and the memory address specified above, which contains theIdentifier, one of the following messages about the status is transferred to the Word Accumulator:

Word Accumulator 0: Program complete/not in the queueWord Accumulator 1: Program runningWord Accumulator 2: Program in the queue

3.15.3 Cancellation of a Submit Program (CAN)

Abbreviation for PLC Editor: CAN (CANCEL)

Execution time [µs] < 40Number of bytes 10

Operands: B

Operation:With the CAN command the Submit-Program with the specified Identifier is canceled duringexecution or removed from the queue. This Identifier must already be stored in a Byte prior to thecalling up of the Submit-Program. After the cancellation of the Program, the next Submit program inthe 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 maybe used.

Page 396: thb416

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 forprocessing. In addition, the execution of the subprogram is checked in the main program with theRPLY command and canceled with the CAN command in conjunction with Input I11.

Line Instruction Program Comments:

1 L I10 ;Interrogate state of Input I102 JPF 100 ;Dependent on Input I10 skip

;Call Module3 RPLY B 128 ;Interrogate status of the Submit program4 <> K+0 ;Submit program already transferred to

;the NC for processing ?5 JPT 100 ;If program already transferred to the NC,

;renewed program call skipped6 SUBM 300 ;Call up Submit program7 = B 128 ;Store Identifier in Byte 1288 LBL 100 ;Jump address9 L I 11 ;Interrogate state of Input I1110 JPF 110 ;Dependent on Input I11, skip the deletion

;of the Submit program11 CAN B 128 ;Interrupt execution of the Submit program

;or remove program from the queue12 LBL 110 ;Jump address

• ;Continuation • ;Main program • ;

XX EM ;End main program

XX LBL 300 ;Begin Submit program (is added as with ModulesXX • ;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 PLCwindow, which can be done via a fixed PLC Module.

Page 397: thb416

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

Page 398: thb416

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, intermediatestorage of results and for indexed addressing of operands. The register is 32 bits wide but only thelower 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 withindexed write accesses.

Example: = B100[X]

If the address space is overshot the error message PLC: index range incorrect flashes in thedisplay. 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 thebeginning 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+XWn[X] Operand number = n+2*XDn[X] Operand number = n+4*X

BTX Contents of index register = operandBCX Contents of index register = operandBSX Contents of index register = operand

Commands for operating the Index Register:

The following commands have been introduced to permit data interchange between the WordAccumulator 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 RegisterPSX (Push Index Register) Index Register --> StackPLX (Pull Index Register) Stack --> Index RegisterINCX (Increment Index Register)DECX (Decrement Index Register)

Page 399: thb416

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 programmeruses jump labels (LBL) and conditional and unconditional jumps.When structured instructions are used, the jump labels and jump commands are created by theCompiler. Remember that internal jump labels are generated to implement these structuredcommands, so the total number of available jump labels will be reduced accordingly. Structuredinstructions 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 inthe Logic Accumulator. They terminate the gating chain. Instructions ELSE, ENDI and REPEATrequire 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 branchesdepending on the value in the Logic Accumulator. The ELSE branch can be omitted. The followingcommands 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 I0IFT ;If Logic Accu=1

.... ;Program code for I0 = 1ELSE ; can be omitted

.... ;Program code for I0 = 0 can be omittedENDI ;end of conditional processing

Page 400: thb416

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 executedLX ;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 tohappen!

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. Theexecution condition must be repeated before the ENDW instruction. The condition can also berepeated 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 executedL M101 ;create condition for repeat processingA M102 ;next condition

ENDW ;return to WHILE scan

Two internal jump labels are generated for the WHILE ... ENDW structure.

Page 401: thb416

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 verycomplicated to execute with PLC commands. The error status is displayed after execution of themodule 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 markersor 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 loweraddress than the destination block. In this case the overlapping part of the source block isoverwritten 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 transferred1: Error conditions see above

Page 402: thb416

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 markersor bits in the specified byte range. Changes to inputs can be detected only if a change has alsobeen 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 marker1: falling edge; entry in edge marker2: rising edge; entry in edge byte3: 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

Page 403: thb416

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 tothe stack as an output variable. Indexed reading in the memory is possible by specifying a variableas 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 bytePL B <byte read> (Value)

or

PS B/W/D/K <Number of word to be read> (Address)CM 9011 read wordPL W <word read> (Value)

or

PS B/W/D/K <Number of double word to be read> (Address)CM 9012 read double wordPL D <double word read> (Value)

Example of Module 9010

STACKWortspeicher

35 (80)

35

80

80

B10

B35

B100

...

PS B10CM9010PL B100...

Error status after call: M3171 = 0: Byte/word/double word was read1: Error condition see above

Page 404: thb416

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

STACKWortspeicher

120

35

120

120

B10

B35

B100

...

PS B10PS B100CM9020...

35

Error status after call: M3171 = 0: Byte/word/double word was written1: Error condition see above

Page 405: thb416

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 editablemachine 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 as1001200 (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-timememory.

- 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 9032PL B/W/D <MP value> / <Error Code>

1: No such MP number2: No separator3: MP value out of range4: MP not in file5: No MP file found6: Call was not from SUBMIT Job

Error status after call: M3171 = 0: MP was read1: 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 specifiedaddress.The number is notated as a two's complement. When notated without a sign the absolute amountof the number is converted without a sign being put before the string. With the signed notation asign ("+" 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 numberhas more decimal places than the total of specified places before and after the decimal point, thenthe highest-value decimal places are omitted. With right-justified notation leading zeroes before thedecimal point are replaced by blanks, with left-justified notation they are suppressed. Trailing zeroesafter 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).

Page 406: thb416

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 signBit #2: display converted to INCHBit #1/#0: Format00: Sign and number left-justified01: Sign left-justified, number right-justified10: Sign and number right-justified11: 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 converted1: 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 9071PL PL <Length of string>

Error status after call: M3171 = 0: String length was computed1: Error conditions see above

Page 407: thb416

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...3CM 9079

Error status after call: M3171 = 0: String was transferred1: 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 isdefined 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 deleted1: 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 displayis on the selected screen. This is not the case with a full-page graphic display, when a program isselected or in the MOD operating mode. Bit #1 is set when the screen with the PLC status windowis in the foreground. All other bits are canceled.

Call:

CM 9081PL B/W/D <Status of screen window>

Marker M3171 is not affected.

Page 408: thb416

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 thespecified color.

The string that is identified by the string number and which ends on the ASCII character <NUL> isdisplayed in the screen window for the PLC status display on line 0 (top line) or 1 (bottom line) andfrom column 0 (left margin) to 37 (right margin) in the specified color (1 to 15).

Line 0Line 1

Column 0 37

References to PLC dialogs or PLC error messages are deleted. If the specified dialog or errornumber is greater than the length of the corresponding file, then ASCII character `@' is displayedinstead . 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 parametersMP735x and can be seen from the following table:

Operating mode „Machine“ Operating mode „Edit“Color 0: MP736x.0 MP736x.0Color 1: MP7354.0 MP7355.0Color 2: MP7356.0 MP7356.0Color 3: MP7352.0 MP7353.0Color 4: MP7353.0 MP7352.0Color 5: MP7357.0 MP7358.0Color 6: MP7352.1 MP7353.1Color 7: MP7354.3 MP7355.3Color 8: MP7350 MP7358.1Color 9: MP7357.1 MP7355.1Color 10: MP7354.1 MP7356.2Color 11: MP7356.2 MP7356.1Color 12: MP7356.1 MP7355.2Color 13: MP7354.2 MP7356.2Color 14: MP7352.2 MP7353.2Color 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 (evenwhen a column greater than 0 is specified), a text with the color 0 is always displayed in the color ofthe numerical value to its left (e.g. color 11 when output is under 110% and color 15 when output isover 110%) even though PLC Module 9082 only displays the numerical value again. If the color 0 isspecified for the first characters on a line however, then the color in which these characters aredisplayed is defined in the MP7356.1.

If no screen window is currently shown for the PLC status display (window is not opened or inbackground) the module will run through normally and the string is not displayed until the

Page 409: thb416

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 overwrittenby a repeat call of Module 9082 in the meantime. Module 9081 can be used to check whether thedisplay 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

Page 410: thb416

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 thespecified 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 theASCII text only appears in the right half of every line (19 characters max.).

Line 0Line 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 lengthexceeds 150 it is limited to 150. If current length exceeds maximum length then it is limited to themaximum 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 ofthe 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 thefollowing table:

Operating mode „Machine“ Operating mode „Edit“Color 0: MP736x.0 MP736x.0Color 1: MP7354.0 MP7355.0Color 2: MP7356.0 MP7356.0Color 3: MP7352.0 MP7353.0Color 4: MP7353.0 MP7352.0Color 5: MP7357.0 MP7358.0Color 6: MP7352.1 MP7353.1Color 7: MP7354.3 MP7355.3Color 8: MP7350 MP7358.1Color 9: MP7357.1 MP7355.1Color 10: MP7354.1 MP7356.2Color 11: MP7356.2 MP7356.1Color 12: MP7356.1 MP7355.2Color 13: MP7354.2 MP7356.2Color 14: MP7352.2 MP7353.2Color 15: MP7351 MP7351

Page 411: thb416

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 scalegraduations if these are not to be displayed. If no screen window is currently shown for the PLCstatus display (window is not opened or in background) the module will cycle normally and the barchart will not be displayed until the corresponding screen window reappears and provided the chartis not overwritten by a repeat call of Module 9083 in the meantime. Module 9081 can be used tocheck whether the display is currently active. This job cannot be aborted by a CAN command duringprocessing 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 isdisplayed)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 words,beginning with the given target address. Regardless of whether individual axes have been excludedthrough MP10, the coordinate values are always read for all axes. The values for excluded axesremain undefined. The coordinate value of an axis remains undefined until the reference point hasbeen traversed.

PS K/B/W/D <Target address Dxxxx>PS K/B/W/D <Coordinate type>

0 = actual values1 = nominal values2 = actual values in the reference system3 = servo lag4 = distance-to-go

CM 9040 or CM 9041

Page 412: thb416

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 rateA simultaneous PLC positioning movement of several axes is interpolated. If you start an additionalaxis while already positioning another, the first movement is aborted, and then all the programmedaxes (e.g. X, Y and Z) are positioned together.

There is no tool compensation. The tool path compensation must be ended before a PLCpositioning command. PLC positioning is not shown in the test graphics.

After the module call the corresponding markers M4120 to M4128 are set. You can abortthe PLC positioning command by resetting this marker. If you wish to change a parameter (e.g. feedrate) of a positioning command in progress, you must first abort it with M4120 to M4128, changethe 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

Page 413: thb416

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

Page 414: thb416

3/97 TNC 406/TNC 306 8-1

Data Interface — Contents 8

1 Introduction 8-31.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-102.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-283.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

Page 415: thb416

8-2 TNC 406/TNC 306 3/97

4 Data transfer with BCC 8-344.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-406.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

Page 416: thb416

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 diskdrives, hard disks) or other computer systems.

A data interface makes it possible for the CPU and its peripheral equipment to communicate witheach other.

Such communication requires facilities for transferring data to the peripherals. Peripheral devicecontrol 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 theperipherals, need appropriate software in order to control the transfer of information between theindividual devices. The relationship between hardware and software, which fully defines an inter-face, is illustrated in the following diagram:

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 forthe output modules and is associated with both the operating software of the computer system andthe peripherals.

Due to the wide variety of computers, controllers and peripherals available today, standardinterfaces have been introduced which—ideally—enable widely different types of devices to beconnected to each other.

Standard interfaces include the RS-232-C/V.24 interface which is described in detail later.

Page 417: thb416

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 theprinciples of data transfer. The term data is used to describe all of the information which thecomputer 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 beconverted into a serial data-flow by using a USART (Universal Synchronous/AsynchronousReceiver/Transmitter).The receiver accepts the serial data-flow and converts it back again into parallel information.

0 1 1 0 1 0 1 1

SenderTransmitter

SpeicherMemory

ÜbertragungsstreckeTransmission path

EmpfängerReceiver

Schnittstellen-PufferInterface buffer

MSB

LSB

01101011

01101011

MSB

LSB

01101011

01101011

SpeicherMemory

Schnittstellen-PufferInterface buffer

A parallel interface, on the other hand, does not need a USART, just a line driver. The computersystem and the peripheral are usually connected with a 36-pole ribbon cable. The maximum cablelength is generally about 3 metros.

Page 418: thb416

3/97 TNC 406/TNC 306 1 Introduction 8-5

SenderTransmitter

SpeicherMemory

MSB

LSB

ÜbertragungsstreckeTransmission path

EmpfängerReceiver

Schnittstellen-PufferInterface buffer

01101011

01101011

01101011

MSB

LSB

01101011

01101011

SpeicherMemory

Schnittstellen-PufferInterface buffer

One obvious advantage of serial data transmission becomes apparent when long distances have tobe covered. With parallel transmission, the cost of the cable increases with every additional bitwhich has to be transmitted. In addition, the effect of interference on adjacent wires from sharpsignal edges and electrical coupling is far greater over long lines than it is with serial transmissionwhich is relatively slower and uses fewer wires.

The comparatively slow speed of serial data transmission is, at the same time, its greatestdrawback. Since the individual bits are sent along the line one after the other and each transfer takesa certain amount of time, it takes far longer to send a binary word to the receiver than with paralleltransmission. As it happens, however, most peripheral devices work fairly slowly and in fact cannotcope with high-speed data transmission. Serial data transmission is generally adequate for devicessuch as external memories or mechanical printers, especially as such devices have a large internalbuffer 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 consistsdigitally coded letters, numbers and control characters.

One of the most common codes is the ASCII code (American Standard Code for InformationInterchange) which codes all characters with seven bits.In all, it is possible to code 27 = 128 characters. According to the ASCII code, the control character"Line Feed" or <LF> is coded with the following combination of bits:

0 0 0 1 0 1 0 = 10 dec = 0A hexMSB LSB

Page 419: thb416

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 hexMSB LSB

That is, when the letter z is transmitted serially, the appropriate bits are sent one after the other. TheASCII code is shown in full in the Appendix.

Proper data transmission requires the device concerned to interpret incoming data correctly and, inparticular, to detect the start of a transmission. For this purpose there is a synchronization processwhich ensures that the receiver detects the first bit of a character correctly. With an asynchronousdata format, a start bit is sent before each data word and the word is then ended by one or two stopbits. One feature of this data format is that, starting from a quiescent state, transmission of a dataword can begin at any time.

A quiescent state exists before switch-on and is reverted to after each transmission. Before a databit can be transmitted this has to be communicated to the receiver. Otherwise, if the first bit of thedata word has the same value as the quiescent state, the receiver will not notice any differencefrom 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 thequiescent state and which gives the receiver an opportunity to prepare its polling logic to read in thedata bit. After the start bit has been sent, the data word is transmitted, bit by bit, starting with theLSB (Least Significant Bit). After the MSB (Most Significant Bit) of the data word, a so-called paritybit 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 hasenough 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.

!" # $ % #

#

&

'#

(&(&

Page 420: thb416

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-checkprocedure. A parity bit is sent in addition to the data bits. The evaluation of this bit enables thereceiver 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 countyields an odd number, there is a transmission error and the data word must be repeated, or an errormessage 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 isodd. In this case, an error will be detected if the receiver observes an even number of set bits in itsevaluation.

Example:

$)*+*,,

-.

,/

#

Page 421: thb416

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 datatransmitted in one second.

1 baud = [1 Bits ]

Common baud rates are:110, 150, 300, 600, 1200, 2400, 4800, 9600, 19 200 and 38 400

The time required for transmission of one bit (tB) can be calculated from the baud rate:

**

*,*

tB = 1

Baud rate[bitss ]

For example, a baud rate of 19,200 baud will have a bit duration of tB = 52.083 µs.

The number of characters transmitted per second can be calculated from the baud rate and thetransmission format:

Characters per second = Baud rate[

bitss ]

Number of bits per character

Example:With a transmission format of one start bit, seven data bits and two stop bits, and assuming a datatransfer rate of 300 baud, the number of characters transmitted per second will be

300 Baud10 bits = 30 characters per second

Page 422: thb416

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 devicesare, as it were, working "hand in hand" in order to control data transfer. A distinction is drawnbetween "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, thecharacter is transmitted. Otherwise the computer will delay transmission until the CTS line isswitched 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 characterstransmitted via the data line. One such handshake is the XON/XOFF method, which is in widespreaduse on the RS-232-C/V.24 interface. The meaning "XON" is assigned to an ASCII code controlcharacter (DC1) and the meaning "XOFF" to another (DC3). Before transmitting a character, thecomputer checks whether the receiving unit is transmitting the XOFF character. If it is, it delaystransmission until it receives the character XON, indicating that the connected unit is ready toreceive further characters.

Apart from the data lines (TxD, RxD), and ground, no other lines are needed for softwarehandshaking.

Page 423: thb416

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 101magnetic 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 andcan handle transmission rates up to 19 200 baud. Data transfer is executed asynchronously, with astart bit before each character and one or two stop bits after each character. The interface isdesigned for transmission distances of up to 20 metros.

The RS-232-C interface has been adopted with slight modifications and introduced into Europe asthe 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 commonground connection between transmitter and receiver is used as a return line.

Physical connections:

SenderTransmitter

ÜbertragungsstreckeTransmission path

EmpfängerReceiver

RxDTxD

RxD TxD

Page 424: thb416

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 therange from –3V to –15V.

For all of the signals, the voltage range from –3V to +3V is not defined as a logic level and cantherefore not be evaluated.

– 13

U [V]

+ 15

– 15

+ 13

DatensignaleData signals

Steuer- und MeldesignalControl 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 earthconductor.

Data lines:

TxD Transmitted dataRxD Received data

Page 425: thb416

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 indicatesto the transmitter that the information receivedat 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 connectionSignal GND: 0-volt lines for all signals

01'

22'

3&.3'

&32

/'3

22

3&..''

01'

2.&'23

21

Page 426: thb416

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. Thecorresponding pin layouts are shown below (see the Chapter "Mounting and electrical installation").

ws/brWH/BN

ws/brWH/BN GND Chassis

RXD TXD CTS RTS DTR GND Signal

DSR

123456789

1011121314151617181920

123456789

1011121314151617181920

••123456789

1011121314151617181920

gegnrsgrbrrt

bl

123456789

1011121314151617181920

123456789

1011121314151617181920

123456789

1011121314151617181920

V.24-Adapter-BlockRS-232-C Adapter block

••• • •

LE

Chassis GND TXD RXD RTS CTS DSR

Signal GND

DTR

GNYLGYPKBLRD

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 Allocation1 Do not use2 RxD3 TxD4 DTR5 GND6 DSR7 RTS8 CTS9 Do not use

Page 427: thb416

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, tooutput programs to external devices (e.g. printers), to read in programs and simultaneously executethem 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 HDatum shift table OEroding table EMachine parameters MCorrection table SPLC program P

After the appropriate code numbers for the PLC, the machine parameters and the correction tablehave 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 twointerfaces (NC program: FN 15: PRINT).

The magnetic tape unit has only limited suitability as an external data medium, because only one filecan 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). Thisrepresents a storage capacity of approximately 790 kilobytes.

When transmitting and receiving a file, the appropriate code file is outputted and read in againcomplete with a Block Check Character (BCC).

If the file is stored in an external computer using HEIDENHAIN's TNC.EXE data transfer software, anew file extension is generated. This extension consists of the identification code and the lettersNC.

Example:If an eroding table is stored, it is given the file extension *.ENC.

Page 428: thb416

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 theinterface. For this purpose the TNC has a freely configurable interface mode (EXT) which, withincertain limits, permits any setting of the data format and control characters of the required datatransmission protocol.

The setting selected at the external devices must of course match the TNC. On printers, this is doneby setting the DIP-switches or adjusting the transmission parameters.

Data transfer to a computer requires appropriate data transfer software. HEIDENHAIN offer theirTNC.EXE data transfer software for this purpose, which permits transfer between TNC and a PCusing 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 communicatewith 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 toanother. To do this, the same transmission format (ME mode) must be set at both control units andtransfer started. Be sure that the control receiving the data is started first.

Page 429: thb416

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 beselected 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 withfixed control characters (7 data bits, 1 start bit, 1 stop bit)Freely configurable baud rate

– EXT Standard transmission protocol: data format and controlcharacters can be freely set via machineparameters. 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 continuetransfer until after acknowledgment.

In the event of an attempt to erase write-protected files, the error message PROTECTED PGMand the dialog OVERREAD=ENT/END=NOENT are displayed. In this case, either the next file canbe 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" isissued.

2.4.1 Standard transmission protocol (EXT mode)

With this protocol, the TNC first transmits the character <NUL> 50 times. This is followed by theindividual 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 isfull, the receiver has two alternatives for stopping and recommencing transmission:

– Software handshake - Stopping transfer by sending character <DC3> (XOFF), continuing transferby sending character <DC1> (XON).

– Hardware handshake - By putting appropriate voltage level on the RTS and CTS control and signallines of the RS-232-C/V.24 interface.

Page 430: thb416

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 times0 BEGIN PGM 1 MM<CR><LF> 1st program block1 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:

2

3&.#

4'5

3&.#

&&

4'5

678,,4354$85

69,%"4354$85

21

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 additionaldata checking when transmitting.

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

<SOH>"H" "Name" "M" <ETB>BCC<DC1>

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

Page 431: thb416

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 paritycheck is carried out on a complete transmitted block. The BCC always supplements the individualbits 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 1H 1 0 0 1 0 0 01 0 1 1 0 0 0 15 0 1 1 0 1 0 1E 1 0 0 0 1 0 1ETB 0 0 1 0 1 1 1BCC 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 evenparity, 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 torequest 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 correctlytransferred. To do this, the receiver calculates a BCC from the block received and compares it withthe 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 blockmust be sent again. This process is repeated up to three times. If transfer is still unsuccessful, theerror 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 controlcharacters 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>), transmissionends with characters <ETX> (End of Text) and <EOT> (End of Transmission).

Page 432: thb416

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 dataheader. The header is a sequence ofcharacters containing the programnumber and information concerningthe type of program andtransmission mode.

STX Start of Text Indicates start of program block.

ETB End of Transmission Block ETB ends a data transfer block. Thecharacter following ETB is used fordata 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 theprogram.

EOT End of Transmission EOT ends data transmission andproduces the quiescent state. Thischaracter is sent by the TNC at theend of program input, and as an errorto external devices

ACK ACKnowledged ACK is sent by receiver when a datablock has transferred without error.

NAK Not AcKnowledged NAK is sent by the receiver when adata block has transferred incor-rectly. The transmitter must thentransmit the data block again.

Page 433: thb416

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

8-, 2

4:;5

4:;5

4/ 54-5< 4:54-254'5

42=5**4-254'5

21

42=5**4-254'5

42=5*,*4-254'5

42=5**4-254'5

4-2=54-/25

41:;5

4:;5

4:;5

4:;5

42=5*,*4-254'5

Page 434: thb416

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 receiversends neither a positive (<ACK>) nor a negative acknowledgment (<NAK>), and the transmitterwaits until it receives one of these characters. When the buffer in the receiver is again capable ofaccepting 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>.

Page 435: thb416

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

In addition to the freely configurable operating mode EXT (standard data transfer protocol), there is afixed mode FE1. The FE1 mode must be set if the HEIDENHAIN floppy disk unit or an externalcomputer using the TNC.EXE transmission software is connected. In this mode, the transmissionprotocol with Block Check Character is rigidly defined.

2.5.2 Freely configurable interfaces

The operating mode EXT (standard transmission protocol) is freely configurable via machineparameters.

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 with7 bits is normally used, but for printer interfacing 8 bits are needed.

Page 436: thb416

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 therebydetects that the peripheral unit receiving buffer is full because of the CTS input.

TNC EXT

–RTS +

–CTS +

–TxD +

–RxD +

–CTS +

–RTS +

–RxD+

–TxD+

Receivingbuffer full

DataData 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 theperipheral device at its CTS input.

TNC EXT

+ Positive voltage level

– negative voltage level

–CTS +

–RTS +

–RTS +

–CTS +

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

Page 437: thb416

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 remainingincoming characters are lost. Software handshake is normally recommended when interfaces areconnected to an external device.

The following pin layout is possible for the external device:

123456789

1011121314151617181920

123456789

1011121314151617181920

••123456789

1011121314151617181920

gegnrsgrbrrt

bl

123456789

1011121314151617181920

123456789

1011121314151617181920

123456789

1011121314151617181920

••123456789

1011121314151617181920

123456789

1011121314151617181920

ws/brWH/BN GND Chassis

RXD TXD CTS RTS DTR GND Signal ground

DSR

GNDTXDRXDRTSCTSDSRGND

DTR

V.24-Adapter-BlockRS-232-C Adapter block

••• • •••

PeripheriegerätPeripheral unit

LE

ws/brWH/BNGN

YlGYPKBLRD

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 ofthe setting in MP5020.

If the TNC is receiving data, and no transmission stop is set in the MP5020, the TNC stops theperipheral unit with the software handshake.

If transmission stop by both RTS and by DC3 is active, the TNC stops transfer with the hardwarehandshake.

Character parity

Bits 4 and 5 determine the type of parity check (see Section "Checking data").

Page 438: thb416

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

Page 439: thb416

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 thefollowing machine parameters (for table of ASCII characters, see Appendix). If these machineparameters are set to 0 (zero), no character will be sent.

MP5010 EXT mode: ASCII character for end of data (EXT)

Input range: 0 to 127MP5011 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 arbitrarilymixed 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 thefollowing:

– <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-programblock.

– Blank characters between the individual words can be omitted in NC programs (HEIDENHAINdialog).

– 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 modesEXT. For this purpose, machine parameters MP5010 to MP5020 permit relatively free adjustment ofthe data format and the control characters.

Consider the example of interfacing EXT with a printer using a serial interface (Example: NEC P7PLUS).

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

Page 440: thb416

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 rateset to 9600 (see the TNC 306 User's Manual).

Page 441: thb416

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 forthe various transmission alternatives. When outputting a file, the <NUL> character is sent 50 timesat the start of the file. When reading in, however, the control ignores this character. Therefore itdoes 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 mustbe 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 externalmemory 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. Theirnames are then shown in the TNC.

Page 442: thb416

3/97 TNC 406/TNC 306 3 Standard data transmission protocol 8-29

41>$541>$541>$5

4354$85

$4354$85

41>$541>$541>$5

4354$85

$4354$85

2

4'5

21

4-/25

4354$85

41>$541>$541>$5

$4354$85

$

4-2=5

4'5

4'5

Page 443: thb416

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 withcharacter <DC3> and start it again with character <DC1>.

2

4'5

4'5

41>$541>$541>$5

4354$85

21

$4354$85

"4354$85

4354$85

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 sentbetween 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 theTNC and the TNC be started first, i.e. the TNC outputs the character <DC1>. Transmission of the fileconcerned is then initiated at the peripheral unit.

When the entire file has been transferred, the TNC sends character <EOT>.

Page 444: thb416

3/97 TNC 406/TNC 306 3 Standard data transmission protocol 8-31

2

4-/25

4'5

41>$541>$541>$5

4354$85

21

$4354$854-2=5

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, theTNC 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 remainsstatic without an error message, and transfer must be terminated with the END key.

Example: Reading in program 100.H.

0%,,4354$85

$0%,,4354$854-2=5

2

4-/25

4'5

21

,, *2:32*

41>$541>$5

In this case, if the last PGM block ends without the <ETX> character then transfer is terminatedwithout an error message but the data is not stored. This means that the program was stored onthe data medium with an incorrect program name (PGM NAME ≠ file name).

Page 445: thb416

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:

41>$541>$5

4354$85

$4354$85

41>$541>$5

4354$85

$4354$85

4354$85

41>$541>$5

$4354$854-2=5

2

4'5

21

4-/25

4'5

4'5

4'5

4-2=5

If several programs are gathered together in a file which ends with <ETX> then these programs areread in without being requested by <DC1>.

Data read-in does not stop until a program has ended with <ETX>.

Page 446: thb416

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 thereceiving buffer of the TNC is full. The TNC then stops transmission with <DC3> and awaitsacknowledgment from the user. If the file is to be transferred, the TNC sends <DC1> and theprogram is read in and stored. Otherwise the file is only read in and not stored. If hardwarehandshaking is set, transfer by using the RTS signal is stopped and restarted.

41>$541>$5

4354$85

4354$85

$4354$854-2=5

41>$5

$4354$854-2=5

2

4'5

21

4-/25

4'5

4'5

4'5

4-2=5

4'5 )

3?@1

Page 447: thb416

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 outputpossibilities. In FE1 mode, a command sequence which requests the directory from the peripheraldevice 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

4/ 5*-*4-254'5

2

4-/254:;5

21

The received error message is displayed in the TNC, but can be acknowledged and erased with theCE key.

Page 448: thb416

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 thefollowing lines which are each concluded with <CR><LF>, only the program name and – after anynumber of blank spaces – the number of sectors is stored.XXXXXX "Name" "Sectors" XXXXXX <CR><LF>

Page 449: thb416

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:

4:;5

4:;5

4:;5

2 21

42=54-254'5

4-2=54-/25

42=5$4-254'5

4/ 541514:54-254'5

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.

Page 450: thb416

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 nameconcerned, whereupon the peripheral sends the file.

4:;5

4-2=5

4/ 541514-54-25

2 21

4:;5

4-/25

4:;5

42=54-254'5

42=5$4-254'5

4'5

Page 451: thb416

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 firstfile. The TNC then immediately outputs a header again without a program name, and the nextprogram is sent and so on.

4:;5

4-2=5

4/ 54 54-54-25

2 21

4:;5

4-/25

4:;5

42=50%4-254'5

42=5$4-25

4/ 54 54-54-25

4/ 54 54-54-25

4:;5

42=5$0%4-254'5

4:;5

4'5

4'5

4'5

4'5

Page 452: thb416

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 dataaccording 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 aremote control software.

Page 453: thb416

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 mostcases the messages are self-explanatory.

These error messages occur only in ME mode:

WRONG MODETRANSFERRED DATA INCORRECTWRONG PROGRAM DATAME: END OF TAPEDATA CARRIER FULLDATA CARRIER EMPTYDATA CARRIER WRITE-PROTECTED

General error messages:

INTERFACE ALREADY ASSIGNEDTransfer is already taking place via interface, or data transfer has not been completed.PROGRAM INCOMPLETETransfer has been interrupted or the file has not ended correctly (no END character or END block).EXT. OUTPUT/INPUT NOT READYInterface 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 transferwith BCC (Block Check Character), a Not Acknowledged control character (<NAK>) has beenreceived three times.

The remaining error codes (A to H) in this error message indicate that an error has been detected inthe received module. The error can have the following causes, with no assignment to the codeletters:

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

Page 454: thb416

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 beoutput by the TNC:

Error code Meaning

ERR: 001 Wrong instruction codeERR: 002 Illegal program nameERR: 003 Defective data transmissionERR: 004 Program incomplete

ERR: 010 Program not on floppy diskERR: 011 Program protected against erasureERR: 012 Program storage in progressERR: 013 Program directory fullERR: 014 Floppy disk full

ERR: 100 Floppy disk not formattedERR: 101 Sector number too largeERR: 102 Drive not readyERR: 103 Floppy disk write-protectedERR: 104 Data on floppy disk defectiveERR: 105 Sectors not foundERR: 106 Check sum defectiveERR: 107 Disk controller faultyERR: 108 DMA faulty

If a magnetic tape unit is connected, the following error codes could be sent to the TNC and anappropriate 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.

Page 455: thb416

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

Page 456: thb416

3/97 TNC 406/TNC 306 9-1

User cycles — Contents 9

1 Creating user cycles 9-21.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-105.1 Calls in a HEIDENHAIN dialog program 9-10

Page 457: thb416

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

These cycles can be used in machining programs for executing repetitive machining tasks ormachine-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 canbe stored in the PLC EPROM together with a maximum of 100 different customer-specific dialogtexts.

Instructions for creating user cycles

User cycles in the NC program memory can be called for testing by cycle 12: "Program call". It isthus also possible to test functional capability in the "Program run/single block" mode. (With aprogram 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 tofour levels).

– Call of HEIDENHAIN dialog programs from within user cycles. The called programs are notdisplayed.

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

Page 458: thb416

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 programnumber is in the range 999 999 68.H to 999 999 99.H (TNC 306) and 999 999 30.H to 99 999999.H (TNC 406).Each of these program numbers is permanently assigned to a cycle number (e.g. program number99999968.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" usercycle 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" usercycle 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 thedesignation of the user cycle. The remaining numbers are assigned to the Q parameters inascending order.If fewer than 15 dialogs are to be programmed, the dialog block can end with "END". See alsoMP7250 in the following description of the relevant machine parameters.

Example:0 BEGIN PGM 99999968 MM1 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 programnumber 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 canbe 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 cyclesare stored in the PLC EPROM. If a user cycle is generated in the NC program memory and if at thesame time there is a user cycle with the same number in the PLC EPROM, then the user cycle inthe NC program memory will be executed at a cycle call.

Page 459: thb416

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 areassigned 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 numbersfor "DLG-CALL" and "DLG-DEF" blocks.In the case of a "DLG-CALL" block, the input values of the user cycles are assigned in ascendingorder to the Q parameters Q1 to Q14. For the "DLG-DEF" block, the input values are assigned to Qparameters Q[1 + MP7250] to Q[14 + MP7250].

Example for MP7250 = 30

Parameter number in user cycle withDLG-CALL DLG-DEF

Cycle parameter 1 Q1 Q31Cycle parameter 2 Q2 Q32. . .. . .. . .Cycle parameter 14 Q14 Q44

MP7251 determines whether the values of the Q parameters which are changed in the user cyclesby 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 = 40Q [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= localBEGIN PGM 100 MMFN0: Q1 = +1 +1 +0 +1 +0FN0: Q60 = +5 +1 +5 +1 +5CYCL DEF 69.0 USERCYCLE 1 +1 +5 +1 +5CYCL DEF 69.1 Q1 = +2 +2 +5 +2 +5

BEGIN PGM 99999969 MMDLG–DEF 0/32FN1: Q1 = Q1 + 10 +12 +5 +12 +5FN1: Q60 = Q60 + 10 +12 +15 +12 +15

END PGM 99999969 MM

STOP +2 +15 +2 +5

END PGM 100 MM

Page 460: thb416

3/97 TNC 406/TNC 306 1 Creating user cycles 9-5

MP7240 Inhibit program input if [program number] = [user cycle number inEPROM].Input value: 0 or 10 = Inhibit1 = 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 toM2271. 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 cannotbe executed.

Marker Function Set Reset

M2240 Inhibit user cycle 68 PLC PLCM2241 Inhibit user cycle 69 PLC PLCM2242 Inhibit user cycle 70 PLC PLC

. .

. .

. .M2271 Inhibit user cycle 99 PLC PLC

User cycle 30 to 67 can not be inhibited.

Page 461: thb416

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 foreroding extremely varied hole patterns, curves (e.g. spirals, sinusoidal, ellipse, parabola) and moldcomponents.

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 tableQ81 Coordinate of the X-axisQ82 Coordinate of the Y-axisQ83 Coordinate of the Z-axisQ84 Coordinate of the C-axis

Eroding table OFF:

Q90–Q99 Eroding parameters

Eroding table ON:

Q96–Q98 Additional eroding parametersQ99 Current power stage NRQ150 Maximum power stageQ151 Minimum power stageQ152 Current table numberQ154 Minimum undersize (UNS) of min. NRQ155 Two-times gap (2G) of min. NRQ156 Two-times gap (2G) of max. NRQ201–Q225 Two-times gap of min. to max. NRQ231–Q255 Minimum undersize of min. to max. NR

General Q parameters:

Q100–Q107 Transfer values from PLC to NCQ108 Electrode radiusQ109 Current tool axisQ110 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/OFFContents Q111

no M8/9 -1 (after PGM-NR ENT) M9 active 0 M8 active 1

Page 462: thb416

3/97 TNC 406/TNC 306 1 Creating user cycles 9-7

Q113 MM or INCH programmingContents 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 tableContents Q113

-1 (after PGM-NR ENT) Eroding table mm 0 (after executing CYCL GENERATOR) Eroding table inch 1 (after executing CYCL GENERATOR)

Q115–Q118 Values from the programmable touch probe function in the machining systemQ120–Q124 Values from the programmable touch probe function in the workpiece system

Q153 Return to main program from subprogram or user cycle ⇒ Q153 = 0Eroding with time limit finished ⇒ Q153 = 1Eroding with time limit active ⇒ Q153 = 2

Q157 Following electrode (see TNC User's Manual)Q158 Electrode undersizeQ159 Length of electrodeQ160 Electrode numberQ162 Number of actual CYCL DEF

FN functions with special significance

FN14 Output of error messages and dialogs to VDUFN15 Output of error messages, dialogs and Q-parameter values over RS-232-C data interface

Page 463: thb416

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 bedisplayed from PLC EPROM.

The following dialog texts are stored in the standard PLC EPROM for the designation of the usercycle and the input parameters:

Dialog number in user cycle Standard dialog in PLC EPROM0 USER CYCL1 CYCL PARAMETER 012 CYCL PARAMETER 02. .. .. .

Instead of these standard dialogs, up to 200 different customer-specific dialogs can be stored in PLCEPROM.

Page 464: thb416

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 thePLC program and the eroding tables, for EPROM programming. It is possible to output the fileslocated 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".

Page 465: thb416

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 loadedinto the control.)The Z-axis acts as the tool axis. The first cavity in the circle is at 0°. The cycle calculates the angularpositions of the cavities and of the C axis from the number of cavities. The cavities are approachedin succession in counter-clockwise direction and automatically eroded. Before the cycle is called, theelectrode is held at the safety clearance.

Y

X

Q4

Q3

Q2

Input parameters:Q1 = Number of cavitiesQ2 = Radius of bolt hole circleQ3 = X coordinate of center of bolt hole circleQ4 = Y coordinate of center of bolt hole circleQ5 = 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 MM1 DLG-CALL 0/1/2/3/4/5/6 Dialog block2 FN1: Q6 = +Q6 + +Q5 Distance traversed in Z3 FN4: Q50 = +360 DIV + Q1 Angle increment4 FN0: Q60 = +0 Starting angle5 CC X+Q3 Y+Q4 Center of bolt hole circle6 LBL 11 Jump label7 LP PR +Q2 PA +Q60 C+Q60 R0 FMAX Approach cavity, position C axis8 L IZ +Q6 M36 Erode cavity9 L IZ –Q6 FMAX M37 Retract, generator off10 FN 1: Q60 = +Q60 + +Q50 Next angle11 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 CIRCLE1 NUMBER OF CAVITIES?2 RADIUS?3 X COORDINATE CC?4 Y COORDINATE CC?5 SAFETY CLEARANCE?6 TOTAL CAVITY DEPTH?

Page 466: thb416

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 HEIDENHAINdialog programs.

5.1 Calls in a HEIDENHAIN dialog program

User cycles are defined as standard cycles in the HEIDENHAIN dialog program (see "DialogProgramming" in the TNC 306 User's Manual).

The dialog for cycle definition is initiated with the "CYCL DEF" key. Select the desired cycle either bypaging using the vertical arrow keys or by "GOTO" and entering the cycle number (e.g. 68). Confirmyour 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. Oncedefined, a "CALL-active" user cycle can be called and hence activated either via "CYCL CALL" orM99.

Example:

0 BEGIN PGM 1000 MM1 TOOL DEF 1 L+0 R+2 Tool definition2 TOOL CALL 1 Z U 0.1 Tool call3 CYCL DEF 1.0 GENERATOR Definition and call of the generator4 CYCL DEF 1.1 P–TAB 1 with corresponding eroding5 CYCL DEF 1.2 MAX = 25 MIN = 1 parameters6 L Z+2 R0 FMAX Approach safety clearance7 CYCL DEF 68.0 BOLT CIRCLE Definition of cycle 68 "Bolt hole circle"8 CYCL DEF 68.1 Q1=+8 Q2=+40 Q3=+609 CYCL DEF 68.2 Q4=+50 Q5=–2 Q6=–2010 CYCL CALL Call cycle11 END PGM 1000 MM

Page 467: thb416

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

7-Bit ASCII code

Character DEC OCT HEX

NUL 000 000 00SOH 001 001 01STX 002 002 02ETX 003 003 03EOT 004 004 04ENQ 005 005 05ACK 006 006 06BEL 007 007 07BS 008 010 08HT 009 011 09LF 010 012 0AVT 011 013 0BFF 012 014 0CCR 013 015 0DSO 014 016 0ESI 015 017 0FDLE 016 020 10DC1 (X-ON) 017 021 11DC2 018 022 12DC3 (X-OFF) 019 023 13DC4 020 024 14NAK 021 025 15SYN 022 026 16ETB 023 027 17CAN 024 030 18EM 025 031 19SUB 026 032 1AESC 027 033 1BFS 028 034 1CGS 029 035 1DRS 030 036 1EUS 031 037 1FSP 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

Page 468: thb416

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

Character DEC OCT HEX

0 048 060 301 049 061 312 050 062 323 051 063 334 052 064 345 053 065 356 054 066 367 055 067 378 056 070 389 057 071 39: 058 072 3A; 059 073 3B< 060 074 3C= 061 075 3D> 062 076 3E? 063 077 3F@ 064 100 40A 065 101 41B 066 102 42C 067 103 43D 068 104 44E 069 105 45F 070 106 46G 071 107 47H 072 110 48I 073 111 49J 074 112 4AK 075 113 4BL 076 114 4CM 077 115 4DN 078 116 4EO 079 117 4FP 080 120 50Q 081 121 51R 082 122 52S 083 123 53T 084 124 54U 085 125 55V 086 126 56W 087 127 57X 088 130 58Y 089 131 59Z 090 132 5A[ 091 133 5B\ 092 134 5C] 093 135 5D^ 094 136 5E– 095 137 5F

Page 469: thb416

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

Character DEC OCT HEX

` 096 140 60a 097 141 61b 098 142 62c 099 143 63d 100 144 64e 101 145 65f 102 146 66g 103 147 67h 104 150 68i 105 151 69j 106 152 6Ak 107 153 6Bl 108 154 6Cm 109 155 6Dn 110 156 6Eo 111 157 6Fp 112 160 70q 113 161 71r 114 162 72s 115 163 73t 116 164 74u 117 165 75v 118 166 76w 119 167 77x 120 170 78y 121 171 79z 122 172 7A 123 173 7B¦ 124 174 7C 125 175 7D~ 126 176 7EDEL 127 177 7F

Page 470: thb416

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

Page 471: thb416

3/97 TNC 406/TNC 306 Subject index 11-1

Subject index

AAcceleration...................................................................................................4-40Acceleration, radial ........................................................................................4-45Active axes ....................................................................................................4-5Actual/nominal value transfer ........................................................................4-53ADD (+)........................................................................................................7-102ADDITION......................................................................................................7-56; 7-73Address allocation .........................................................................................7-14Addressing the word memory.......................................................................7-14alphabetic keyboard.......................................................................................4-101Ambient temperature ....................................................................................3-8Amplitude of the measuring system signals .................................................4-8Analog inputs.................................................................................................4-120Analog outputs, Assignment .........................................................................4-12Analog voltage...............................................................................................4-42AND...............................................................................................................7-43; 7-69AND NOT.......................................................................................................7-45; 7-69Angular measurement ...................................................................................4-6Arc recognition ..............................................................................................4-60Arithmetic commands ...................................................................................7-56ASSIGN..........................................................................................................7-33ASSIGN BYTE................................................................................................7-35ASSIGN DOUBLEWORD ..............................................................................7-35ASSIGN NOT (=N) .........................................................................................7-36ASSIGN TWO'S COMPLEMENT (= -) ...........................................................7-36ASSIGN WORD .............................................................................................7-35Axes in position .............................................................................................4-52Axis designation ............................................................................................4-10Axis enable ....................................................................................................4-51Axis limit ........................................................................................................4-13Axis of rotation ..............................................................................................4-10

BBar Chart........................................................................................................7-117Baud rate .......................................................................................................8-9BCC (Block Check Character) ........................................................................8-20BIT RESET ....................................................................................................7-85Bit commands ...............................................................................................7-84BIT SET..........................................................................................................7-84BIT TEST........................................................................................................7-86Buffer battery ................................................................................................3-19Byte ...............................................................................................................7-14

CCall Module (CM)..........................................................................................7-95Call Module if Logic Accumulator = 0 (CMF) ...............................................7-95Call Module if Logic Accumulator = 1 (CMT) ...............................................7-95CALL-active user cycle ..................................................................................9-3

Page 472: thb416

11-2 TNC 406/TNC 306 Subject index 3/97

CAN (CANCEL) ............................................................................................7-105Cancellation of a Submit Program (CAN).....................................................7-105CASE statement ............................................................................................7-99Checking data ................................................................................................8-8Circular feed rates .........................................................................................4-88Clamped axis .................................................................................................4-53Code number 105296....................................................................................4-20Code number 75368......................................................................................4-44Code numbers ...............................................................................................4-138; 4-89Color adjustment ...........................................................................................4-91Command......................................................................................................7-12Commands ....................................................................................................7-26Commissioning..............................................................................................4-138Comparisons..................................................................................................7-62Compensation, axis error ..............................................................................4-18Compensation, linear axis error.....................................................................4-18Compensation, non-linear axis error..............................................................4-19Components, hardware TNC 406..................................................................3-4Connection box..............................................................................................3-33Connections, overview..................................................................................3-13Control loop ...................................................................................................4-37Control loop, open .........................................................................................4-53Control with lag .............................................................................................4-39Controlled ......................................................................................................4-50Cooling...........................................................................................................3-8Copy in Marker ..............................................................................................7-108Correction table .............................................................................................4-19Correction-value difference ...........................................................................4-21Counters ........................................................................................................7-20Counting direction .........................................................................................4-7Counting step ................................................................................................4-6Cycle inhibit ...................................................................................................4-86Cycles, OEM..................................................................................................4-86

DData bits ........................................................................................................8-24Data exchange, PLC/generator......................................................................4-68Data interface ................................................................................................3-41Data transfer..................................................................................................8-4Data transfer PLC ..........................................................................................7-15Data transfer rate ..........................................................................................8-9Data transfer with Block Check Character ....................................................8-19Data transmission protocols..........................................................................8-18Datum correction...........................................................................................4-125Debug Functions, PLC...................................................................................7-10Decimal sign ..................................................................................................4-89DECREMENT (DEC) ......................................................................................7-76DEF-active user cycle ....................................................................................9-3Degree of protection .....................................................................................3-12Dialog language .............................................................................................2-6Dialog number ...............................................................................................9-3Dialogs for user cycles ..................................................................................9-8Direction of traverse......................................................................................4-7Display, active power stage number .............................................................4-84

Page 473: thb416

3/97 TNC 406/TNC 306 Subject index 11-3

Display, actual machining time......................................................................4-84Display, feed rate...........................................................................................4-82Display, M-functions......................................................................................4-83Display, position and status...........................................................................4-80Display, way-to-go (WTG)..............................................................................4-83DIVISION .......................................................................................................7-59; 7-73DLG CALL......................................................................................................9-3DLG DEF........................................................................................................9-3

EEdge evaluation of the PLC-inputs ................................................................7-21Edge separation of the measuring system signals........................................4-9Editing PLC-programs....................................................................................7-6Electrical noise immunity...............................................................................3-8Electrode changer..........................................................................................4-127EMERGENCY STOP routine..........................................................................4-71EMERGENCY STOP, connection diagram.....................................................4-72Encoder inputs, Assignment .........................................................................4-11Encoder monitoring .......................................................................................4-8Encoders........................................................................................................4-5End indexed call module (ENDC)..................................................................7-99End of Module if Logic Accumulator = 0 (EMF) ............................................7-97End of Module if Logic Accumulator = 1 (EMT) ............................................7-97End of Module, Program End (EM)...............................................................7-97Entry format...................................................................................................5-3EPROM..........................................................................................................2-8EPROM creation............................................................................................7-21EPROM operation..........................................................................................7-22EPROM slots .................................................................................................3-9EPROM test ..................................................................................................4-90EQUAL TO.....................................................................................................7-62; 7-77Eroding parameters .......................................................................................4-62Eroding parameters, Transmission to the PLC..............................................4-67Erosion table from PLC..................................................................................4-64Error in PLC-program.....................................................................................4-110Error message ...............................................................................................4-48; 4-85; 4-110; 7-23ERROR=........................................................................................................9-5Errors, PLC ....................................................................................................7-23EXCLUSIVE OR .............................................................................................7-51; 7-70EXCLUSIVE OR NOT.....................................................................................7-53; 7-70External programming ...................................................................................8-28Extra linear axis .............................................................................................4-11

FFeed forward control .....................................................................................4-56Feed rate override .........................................................................................4-54Feed rate, constant........................................................................................4-45Flushing the gap ............................................................................................4-61Free run .........................................................................................................4-61

GGap control ....................................................................................................4-56Gap signal ......................................................................................................4-56

Page 474: thb416

11-4 TNC 406/TNC 306 Subject index 3/97

Generator ON/OFF (M36/M37) .....................................................................4-96Global Q parameters .....................................................................................9-4Graduation period .........................................................................................4-5Graphics.........................................................................................................4-79Graphics display ............................................................................................4-79GREATER THAN............................................................................................7-77GREATER THAN (>) ....................................................................................7-64GREATER THAN OR EQUAL TO...................................................................7-66; 7-78Gross positioning error A...............................................................................4-46Gross positioning error C...............................................................................4-47Gross positioning error D...............................................................................4-48Gross positioning error F ...............................................................................4-47Grounding plan, TNC 306 ..............................................................................3-22Grounding plan, TNC 406 ..............................................................................3-21

HHandshaking..................................................................................................8-10Handwheel ....................................................................................................4-117Handwheel HR 130 .......................................................................................3-45Handwheel HR 330 .......................................................................................3-43; 3-44Handwheel HR 410 .......................................................................................4-118Handwheel input ...........................................................................................3-43Handwheel, count direction...........................................................................4-117Hardware handshaking..................................................................................8-10Hardware version ..........................................................................................0-7Heat generation .............................................................................................3-8HR 130...........................................................................................................4-117HR 330...........................................................................................................4-117Humidity ........................................................................................................3-9

IIdentifier ........................................................................................................7-104INCREMENT (INC).........................................................................................7-76Indexed call module (CASE) .........................................................................7-99Inhibited key ..................................................................................................4-101Installation, hardware ....................................................................................3-8Interface configuration...................................................................................8-24Interpolation factor ........................................................................................4-117

JJog increment positioning .............................................................................4-122Jump commands...........................................................................................7-93Jump if Logic Accumulator = 0 (JPF) ...........................................................7-93Jump if Logic Accumulator = 1 (JPT) ...........................................................7-93Jump Label (LBL)..........................................................................................7-97

KKey simulation ...............................................................................................4-101Key-code........................................................................................................4-101Kv factor ........................................................................................................4-41; 4-42; 4-145

Page 475: thb416

3/97 TNC 406/TNC 306 Subject index 11-5

LL (LOAD)......................................................................................................7-101Lag.................................................................................................................4-41LESS THAN ...................................................................................................7-63; 7-77LESS THAN OR EQUAL TO ..........................................................................7-65; 7-77List of machine parameters...........................................................................5-5LOAD.............................................................................................................7-26LOAD (L)......................................................................................................7-101LOAD BYTE...................................................................................................7-31Load command..............................................................................................7-26Load data onto Data Stack (PS) ....................................................................7-88LOAD DOUBLEWORD..................................................................................7-31Load logic accumulator onto Data Stack (PSL).............................................7-89LOAD NOT ....................................................................................................7-28LOAD TWO'S COMPLEMENT......................................................................7-30LOAD WORD ................................................................................................7-31Load word accumulator onto Data Stack (PSW) ..........................................7-90Local Q parameters .......................................................................................9-4Logic gates ....................................................................................................7-43Logic unit .......................................................................................................3-4; 3-5LSV/2 Protocol ...............................................................................................8-41Lubrication pulse ...........................................................................................4-16Lubrication, path-dependent..........................................................................4-16

MM06, program-halt on ....................................................................................4-99M36 off..........................................................................................................4-59M36 on ..........................................................................................................4-59; 4-96M37 off..........................................................................................................4-96M89 ...............................................................................................................4-99Machine axes ................................................................................................4-5Machine control panel ...................................................................................3-56; 4-110Machine datum..............................................................................................4-34; 4-76Machine parameter, read ..............................................................................7-112Machine parameters .....................................................................................5-2Machine parameters, list of...........................................................................5-5Manual feed...................................................................................................4-43Measuring system cables .............................................................................3-29Measuring system, inputs.............................................................................3-28Measuring systems.......................................................................................3-27; 4-5Measuring systems, angular .........................................................................3-27Measuring systems, linear ............................................................................3-27Mechanical vibration......................................................................................3-9Memory test..................................................................................................4-90M functions ...................................................................................................4-93Module 9051 .................................................................................................7-112Module 9071 .................................................................................................7-113Module 9079 .................................................................................................7-114Module 9000/9001 ........................................................................................7-108Module 9020/9021/9022 ...............................................................................7-111Module 9032 .................................................................................................7-112Module 9080 .................................................................................................7-100; 7-114Module 9081 .................................................................................................7-114

Page 476: thb416

11-6 TNC 406/TNC 306 Subject index 3/97

Module 9082 .................................................................................................7-100; 7-115Module 9083 .................................................................................................7-117Module technique..........................................................................................7-13Monitoring analog voltage .............................................................................4-47Monitoring functions .....................................................................................4-46; 4-147Monitoring, movement..................................................................................4-47Monitoring, standstill .....................................................................................4-48Mounting dimensions....................................................................................3-64Mounting position..........................................................................................3-9MULTIPLICATION .........................................................................................7-58; 7-73

NNC software number .....................................................................................2-6Nesting depth ................................................................................................9-2Nominal value potential .................................................................................3-31NOT EQUAL TO ............................................................................................7-78

OOffset adjustment .........................................................................................4-44; 4-147Operand directory..........................................................................................7-14Operating mode.............................................................................................4-101OR .................................................................................................................7-47; 7-69OR NOT.........................................................................................................7-49; 7-69Overflow........................................................................................................7-104Overwrite Q-parameters ...............................................................................4-91Overwriting of a STRING (OVWR)...............................................................7-103OVWR (OVERWRITE)..................................................................................7-103

PParentheses...................................................................................................7-69; 7-73PL 410 B ........................................................................................................3-52PLC – Main menu..........................................................................................7-6PLC DIALOG..................................................................................................7-101PLC ERROR...................................................................................................7-101PLC functions ................................................................................................7-5PLC input/output board..................................................................................3-4; 3-6; 3-12PLC inputs .....................................................................................................3-47PLC Modules .................................................................................................7-108PLC operation, selecting................................................................................7-5PLC outputs...................................................................................................3-47PLC positioning..............................................................................................4-24PLC positioning, Feed for ..............................................................................4-24PLC program, translating...............................................................................7-8PLC programs, deleting .................................................................................7-8PLC programs, editing ...................................................................................7-6PLC software.................................................................................................0-8PLC window ..................................................................................................7-100Position monitoring........................................................................................4-46Positional deviation........................................................................................4-43Positioning window .......................................................................................4-48Power supply.................................................................................................3-16Power supply, NC..........................................................................................3-16Power supply, PLC ........................................................................................3-17

Page 477: thb416

3/97 TNC 406/TNC 306 Subject index 11-7

Power supply, VDU .......................................................................................3-20Probing function ............................................................................................4-112probing, manual .............................................................................................4-114probing, successive.......................................................................................4-114Program creation ...........................................................................................7-12Program, ........................................................................................................4-90Programming station .....................................................................................4-89Programs, transferring from EPROM ............................................................7-8Pull data from Data Stack (PL)......................................................................7-89Pull logic accumulator from Data Stack (PLL)...............................................7-90Pull word accumulator from Data Stack (PLW) ............................................7-90

QQ parameters.................................................................................................4-63; 9-4Q parameters, global .....................................................................................9-4Q parameters, local .......................................................................................9-4

RRAM operation ..............................................................................................7-22RAM test .......................................................................................................4-90Range (Module 9010/9011/9012 ...................................................................7-110Rapid traverse................................................................................................4-41; 4-42Read in Word.................................................................................................7-110Reference end-position .................................................................................4-28Reference marks ...........................................................................................4-27; 4-33Reference marks, direction for traversing .....................................................4-33Reference marks, distance-coded.................................................................4-27Reference marks, feed rate for leaving .........................................................4-33Reference marks, passing over.....................................................................4-28Reference marks, Sequence for traversing...................................................4-33Reference point, shift of the..........................................................................4-77Referencing to machine datum with M92 positioning blocks .......................4-77REMAINDER .................................................................................................7-60; 7-74REPLY............................................................................................................7-104RESET............................................................................................................7-39RESET NOT ...................................................................................................7-41Restore position ............................................................................................4-90Retraction of the electrode............................................................................4-59Retraction speed ...........................................................................................4-59Rotary axis, non-controlled ............................................................................4-54Rotary encoder and ballscrew .......................................................................4-5RPLY (REPLY)..............................................................................................7-105RS 422/V.11...................................................................................................3-42; 4-68RS-232-C interface.........................................................................................8-3; 8-11

SScaling factor .................................................................................................4-87Servo accuracy ..............................................................................................4-43Servo lag........................................................................................................4-41Servo lag, optimizing .....................................................................................4-144Servo positioning ...........................................................................................4-37Servo sensitivity ............................................................................................4-66SET ................................................................................................................7-38

Page 478: thb416

11-8 TNC 406/TNC 306 Subject index 3/97

SET NOT........................................................................................................7-40Set commands ..............................................................................................7-38Shift commands ............................................................................................7-81SHIFT LEFT....................................................................................................7-81SHIFT RIGHT .................................................................................................7-82Short circuit ...................................................................................................4-59; 4-112Short-circuit signal .........................................................................................3-37Signal period ..................................................................................................4-5soft key..........................................................................................................4-101Software handshaking...................................................................................8-10Software limit switch.....................................................................................4-13; 4-144Software types ..............................................................................................2-7Spark-out .......................................................................................................4-61Stack operations............................................................................................7-88Standard data transmission protocol .............................................................8-30Standard transmission protocol.....................................................................8-18Status display, canceling ...............................................................................4-84Status Interrogation (RPLY) ...........................................................................7-105Status window...............................................................................................4-80Storing a STRING (=) ...................................................................................7-102STRING accumulator .....................................................................................7-100STRING Execution.........................................................................................7-100STRING memory ...........................................................................................7-100SUBM (SUBMIT) .........................................................................................7-104Submit Programs...........................................................................................7-104Submit Queue ...............................................................................................7-104Subprograms .................................................................................................7-104SUBTRACTION..............................................................................................7-57; 7-73

TTABLE function..............................................................................................7-10Technical data................................................................................................2-3Test functions, PLC .......................................................................................7-9Threshold sensitivity......................................................................................4-117Timers............................................................................................................7-18TNC keyboard................................................................................................3-4; 3-5; 3-59; 4-101Tool axis.........................................................................................................4-12Touch probe systems, TS 120.......................................................................3-39TRACE BUFFER, DISPLAY............................................................................7-10TRACE function .............................................................................................7-9TRACE, END..................................................................................................7-10TRACE, START ..............................................................................................7-10Transferring programs from EPROM ............................................................7-8Transferring the PLC-program .......................................................................7-11Translating PLC programs .............................................................................7-8

UUnconditional jump (JP)................................................................................7-93UNEQUAL .....................................................................................................7-67User cycles....................................................................................................9-2User parameters............................................................................................4-88; 5-2Utilization .......................................................................................................7-8

Page 479: thb416

3/97 TNC 406/TNC 306 Subject index 11-9

VVDU display ...................................................................................................4-12Visual display unit ..........................................................................................3-6; 3-12; 3-35Voltage step...................................................................................................4-43

WWorkpiece datum ..........................................................................................4-76Write in word range.......................................................................................7-111

XX1 ..................................................................................................................3-60

ZZero reference mark ......................................................................................4-28

Page 480: thb416

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 ContourCycle 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 thetool axis (gap-controlled), and plunge to a programmable depth.If this depth is reached when a certain percentage (PRC) of the programmed contour length isattained, 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 atwhich it begins.The starting point of the contour should be in the contour center so that the contour can bescaled 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 GEOMETRYCYCL DEF 14.1 IZ-1 M36 (IZ-Qnn)CYCL DEF 14.2 PGM CONTOUR1CYCL DEF 14.3 PRC=90 (PRC=Qnn)

• During a reference run with the direction keys, traverse continues in manual mode after thereference mark has been evaluated.

• New Q parameter Q164The minimum undersize UNS of the maximum power stage is loaded after Q164 duringexecution of the generator cycle.

• If a program was interrupted with ext./int stop and restarted with NC Start, then an incrementalpositioning after a GOTO is always started from the current machine position.

Page 481: thb416

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 valuesof 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=1IFF (IF LOGIC-ACCU FALSE) Following code only if logic accu=0ELSE (ELSE) Following code only if IF is not fulfilledENDI (END OF IF-STRUCTURE) End of the IF structure

REPEAT (REPEAT) Repeat from here the program sequenceUNTILT (UNTIL TRUE) Repeat sequence until logic accu = 1UNTILF (UNTIL FALSE) Repeat sequence until logic accu = 0

WHILET (WHILE TRUE) Runs the sequence if logic accu = 1WHILEF (WHILE FALSE) Runs the sequence if logic accu = 0ENDW (END WHILE) End of program sequence, return jump to beginning

• To operate the index register, commands were introduced that permit data exchange betweenword 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 registerPSX (Push Index Register) Index register --> StackPLX (Pull Index Register) Stack --> Index registerINCX (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+XIn[X]On[X]Cn[X]Tn[X]

Bn[X] Operand number= n+XWn[X] Operand number= n+2*XDn[X] Operand number= n+4*X

• It is now possible to assign label names with up to 8 places instead of the previous labelnumbers. The maximum label number is 1000.

Page 482: thb416

3/2000 TNC 416/TNC 406/TNC 306 1-3

• HandwheelBesides 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 thespecial short-circuit monitoring in manual mode. The monitor is now always active duringtraverse 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 inmanual and handwheel mode.

• Machine parameter MP7412 (behavior during cycle call) has been removed.

• Change in machine parameter MP4060.xThe 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 complementmarkers as of M2464 and as of M2528 have been removed.

• New marker M2507The status display M7 can be switched on with marker M2507. This same applies for statusdisplay M8 (M2508). M7 can be used to display a second flushing.

• New PLC word W498W498 is the encoded current handwheel axis (X=bit 0, Y=bit 1, Z=bit 2, ...)

Page 483: thb416

1-4 TNC 416/TNC 406/TNC 306 3/2000

• New machine parameter MP4030Extension of the word marker range up to W1098With MP 4030 = 1 you can switch to the new axis marker interface of the PLC. Here the newwords 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 canthen be used as desired.

The following PLC words are used when MP 4030 = 1 instead of the corresponding bit marker:

Words MarkersW1024 Axis release (M2000...)W1026 Axes into position (M2008...)W1028 ReservedW1030 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 ReservedW1044 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 pulseW1064 ... W1098 Reserved

• New PLC Module 9040Module 9040 Read axis positionsCall: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 value2: Reference value3: Following error4: Distance-to-go

CM 9040

M3171 = 1 if error occurs during execution of the module

Page 484: thb416

3/2000 TNC 416/TNC 406/TNC 306 1-5

• New PLC Module 9221Module 9221 Start PLC positioningCallPS B/W/D/K <axis> 0..4 = X .. 5th axisPS B/W/D/K <target position in the reference system> (0,001 mm)PS B/W/D/K <feed rate> (mm/min)CM 9221PL B/W/D <error code>

Error code :0: No error, positioning started1: ErrorM3171 = 1 if error occurs during execution of the module

Page 485: thb416

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 ManualTNC 416/TNC 406/TNC 306. Please incorporate them into your Manual, following the filinginstructions below.

Change Remove Insert

Title page March 1997 Title page New title pageUpdate Information – Update Information No. 15IntroductionPage 2-9 Software releases

IntroductionPage 2-9, 2-10

New chapter IntroductionPage 2-9, 2-10

Chapter 5 Machine parametersPage 5-7Page 5-17Page 5-26Page 5-28

Page 5-7, 5-8Page 5-17, 5-18Page 5-25, 5-26Page 5-27, 5-28

Page 5-7, 5-8Page 5-17, 5-18Page 5-25, 5-26Page 5-27, 5-28

Chapter 6 Marker and WordsNew markers and words

List of markers and words New list of markers andwords

Chapter 7 PLC programmingContentsPage 7-84 BTXPage 7-85 BCXPage 7-86 BSXPage 7-108 to 7-123 structuredinstructions, new PLC Modules

ContentsPage 7-83, 7-84 BTXPage 7-85 BCXPage 7-86 BSXPage 7-107 to 7-120

New ContentsPage 7-83, 7-84 BTXPage 7-85 BCXPage 7-86 BSXPage 7-107 to 7-124

Page 486: thb416

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. Itsupersedes 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-3xor 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 unitsLE 4xxM. Please note this when using the LE.

For installation instructions, dimensions, and connector layout for the new components, please referto Chapter 3 "Mounting and electrical installation.”

Please note that the LE 416D has no TTL position encoder inputs. All position encoder inputs are1 VPP or 11µAPP, switchable by machine parameter MP115.0 (see Chapter 5 “List of machineparameters”).

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 theTNC 406 with software version 280 620-08. PLC programs that can run on the TNC 406 (software280 620-08), can also run on the TNC 416.

Software version 1 for the TNC 416 was released in March 1999.

Page 487: thb416

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 MP331MP331.0-4 Distance per number of signal periods out of MP332Input: 0.001 to 99 999.999 [mm or °]

• New machine parameter MP332MP332.0-4 Number of signal periods in the distance from MP331Input: 1 to 16 777 215

• New machine parameter MP334MP334.0-4 Distance between reference marks for encoders with distance-coded reference

marksInput: 0 to 65535 [grating periods]0=1000 grating periods (standard setting)

• New “Restore Position” functionAfter pressing the “manual” soft key to switch to manual operation, you can now use thehandwheel to move axes in the stopped condition (NC stop, internal stop). With the thenavailable “Restore position” soft key and the NC start key you can return to the starting positionin the sequence determined via soft key. Then you can resume machining by pressing the NCstart key.

• Cycle 16 has been changedTo reduce the risk of collision, in Cycles 16 when PAT 4 or 5 is entered, the electrode is nowretracted 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 = $1BERL = $1BFEXT = $1CDCL PGM = $1CC

• New word W586The 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 nowno 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 theemergency stop circuit is closed clears the error message. When the "measuring systemdefective..." error occurs, the control makes a reference run after the error message isacknowledged.

Page 488: thb416

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 ManualTNC 416/TNC 406/TNC 306. Please incorporate them into your Manual, following the filinginstructions below.

Change Remove Insert

Title page March 1997 Title page New title pageUpdate Information – Update Information No. 14Introduction Introduction New chapter IntroductionMounting and electrical installation Mounting and electrical

installationNew chapter Mounting andelectrical installation

New machine parameters List of machine parameters New list of machineparameters

New markers and words List of markers and words New list of markers andwords

Page 489: thb416

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 thefollowing 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 9180PL 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 9181PL B/W/D <Status/Error code> 0: NC key was disabled -1: Key code > maximum value -2: Key code invalidM3171 = 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 9182PL B/W/D <Error code> 0: NC key was enabled -1: Key code > maximum value -2: Key code invalidM3171 = 0 if module execution was successful, 1 if not

Page 490: thb416

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 groupCM 9183PL B/W/D <Error code> 0: Group of NC keys was disabled -1: Group code > maximum valueM3171 = 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 groupCM 9184PL B/W/D <Error code> 0: Group of NC keys was enabled -1: Group code > Maximum valueM3171 = 0 if module execution was successful, 1 if not

The groups of keys are arranged as follows:0: All keys 1: ASCII keys2: Soft keys 3: Cursor keys4: Numerical keys 5: Operating mode keys6: 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 thefollowing code:

L M2813 ;KEY STROBE LOCALCMT 790 ;SEND KEY CODEEM ;END OF MAIN PROGRAM

LBL 790L M980 ;WAIT FOR PROCESSINGJPT 799 ;KEY CODE ALREADY FIXED

PS W516 ;SEND KEY CODECM 9180PL W240 ;RETURN CODE

L W240< K+0JPT 795 ;ERROR

L W240

Page 491: thb416

1/98 TNC406/TNC 306 1-3

= K+0JPT 791 ;KEY WAS PROCESSED

SN M980 ;SET: WAIT FOR PROCESSING

LBL 791EM

LBL 795 ;ERROR HANDLING KEY SIMULATIONEM

LBL 799PS K+0 ;ASK WHETHER KEY HAS BEEN SIMULATEDCM 9180PLW= K+0R M980 ;KEY PROCESSEDR M2813EM

M980 and W240 can be replaced by any free markers/words. M2813 and W516 no longer evaluatethe 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 clampedaxes and at the same time monitor the limit switches. This permits the servo lag to be set to 0 foran 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 theyare 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 ofthis 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 Mfunction 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. Thisenables more exact positioning and gap control. The entire control loop has been redeveloped andthe calculation of the feedforward voltage for gap control has been completely redesigned. Also, afilter was integrated that is automatically activated for eight control loop cycles if a step in thefeedforward voltage is too large.

Page 492: thb416

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 asall PLC data. The oscilloscope is activated in MOD by a soft key. Machine adjustment has now beengreatly simplified because you no longer need any external devices. You can create oscillograms in aconnected PC by using the screen dump function of TNCremo as of version 3.00.

MP7365 added: Colors of the oscilloscope

MP 7365.0: Background $000000MP 7365.1: Channel 1 $003F3FMP 7365.2: Channel 2 $3F3F00MP 7365.3: Channel 3 $003F00MP 7365.4: Channel 4 $3F1230MP 7365.5: Reserved $000000MP 7365.6: Grating $30200CMP 7365.7: Cursor and text $3F3F3F

The various functions of the oscilloscope can be selected with the aid of soft keys. With the cursorkeys on the keyboard you can switch channels and move the screen cursor. In the setup menu youcan 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 controlcalculates 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 feedrate, 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 followingmenu for machine commissioning (setup):

OFFSET COMPENSATIONOUTPUT STEP FUNCTION (Here also you can go into the parameter list)PLC FUNCTIONS (Trace: here also you can go into the oscilloscope)MACHINE PARAMETER PROGRAMMINGCOMPENSATION VALUE LIST

Under the code number 79513 you will find the following menu and the corresponding data outputson 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 usesthe product as limit for servo-lag monitoring (erasable error message). A value of 1.8 * servo lagshould therefore be used for MP1720.x.

Page 493: thb416

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 controlin feedforward mode.Input: 0 to 0.999If 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.999If 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 ofoperation.

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.000011 0.5 µm 0.000022 1 µm 0.0001 (previous resolution)3 5 µm 0.00024 10 µm 0.0015 50 µm 0.0026 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 specialapplications, 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 resultin 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 (EMERGENCYSTOP) 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 circuitis reclosed, the control goes into the reference run mode.

Page 494: thb416

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. Allinput values except the M functions can be transferred by Q parameter. Cycle 17 can thereforecompletely replace Cycle 17.

Example:CYCL DEF 16.0 ORBITCYCL DEF 16.1 IZ-5.02 M36CYCL DEF 16.2 RAD=20.014 DIR=0CYCL 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 M16.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 thestarting 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 withTiming/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)

Page 495: thb416

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 firstin the erosion axis and then in the direction of the center of orbital movement. Now the TNC retractsthe electrode as in MOD 3 in the direction of the starting point. The gap control during orbital sinkingis as before only in the erosion axis.

CYCL DEF 17.0 DISKCYCL DEF 17.1 IZ-x.xxx M36CYCL DEF 17.2 RAD=y.yyy MOD=0..7

MOD (0...7)Bit 1 and bit 0:00 = Circular expansion together with sinking (corresponds to PAT = 0 in Cycle 16)01 = Quadratic expansion together with sinking (corresponds to PAT = 1 in Cycle 16)10 = Orbital sinking with retraction to starting point (corresponds to PAT = 2 in Cycle 16)11 = Same as 10

Bit 2:0 = Terminate sparking out if final radius has been reached and the sparking-out duration (MP2110

or Cycle 4) has expired (fast sparking out, corresponds to SPO = 0 in Cycle 16)1 = Terminate sparking out if final radius has been reached and there have been 11/4 revolutions

of continuous free running (M2616 complete sparking out, corresponds to SPO = 1 in Cycle 16)

Change in Cycle 19: WORKING PLANE: Tilting the working plane

The datum of the tilting motion is now identical with the manually set datum (as in the millingmachine controls TNC 426/TNC 430). The TNC shows the tilting angle in the graphic status after thesoft key STATUS TILT has been pressed. If there is a basic rotation, it is calculated into the tilt in thebasic axis of rotation. The TOUCH PROBE cycle is also possible in the tilted system (through a 3-Dstraight line).

Probing with the electronic handwheel

If the short circuit monitor (MP 7651=0) is active, you can probe with the electronic handwheel. Ifthe electrode makes contact with the workpiece during probing with the electronic handwheel (shortcircuit), then the TNC stops the positioning in the direction of the workpiece and permits traverseonly in the opposite direction. It is also impossible to switch axes. The TNC permits normal operationagain if the electrode is retracted by at least 100 µm. The short circuit monitoring during handwheelpositioning 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 pressedBit 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.

Page 496: thb416

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 MP1700The 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 acceleration1 = 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 of12 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 theutilization 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 mmMP711 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 thedesired 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 ismissing, 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 axisMP410 (4th axis) and MP411 (5th axis) must have different values. For machines with angularaxis and secondary linear axis, the angular axis must be programmed as 4th axis and the linearaxis as 5th axis.

• Machine parameter MP2130 has been removedIn 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 theaxes involved. Machine parameter MP2130 is therefore obsolete and has been removed.

Page 497: thb416

1-2 TNC 406/TNC 306 3/98

• New possibilities for infeed in free runIf the voltage of the analog input (W392) lies above the value from W520 (if W520 > 0), theelectrode moves into the workpiece at the free-run feed rate from MP2141.

• Change in MP2081With MP2081 = 2 you can transfer the comparison of the actual gap with the nominal gap (fromW524) 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 characteristiccurve. 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 PLCprogram: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 thresholdfor 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 thePLC 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 thousandths0.1 ... 10.0 ==> 100 ... 10000 in thousandthsW588 for positive feed rate (MP2010.0)W590 for negative feed rate (MP2010.1)

Characteristic curve after kink point: Multiplication factor0.1 ... 10.0 ==> 100 ... 10000 in thousandthsW592 positive (MP2020.0)W594 negative (MP2020.1)

Kink as a percentage of the characteristic curve0 ... 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/ZW398 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.

Page 498: thb416

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 toB763. During control without a table (MP2199=0), the value of the corresponding SV-Qparameter in the PLC program can be transferred to B763, and SV can therefore be changedduring erosion.

• The step-output function was modified so that the duration of output can be determined bypressing the key. This also makes it possible to move across larger distances with constantvoltage.

• Markers 2688 and following (switching off monitoring functions in the control loop) was removed

to ensure safety.

• New machine parameter MP7651With the new MP 7651 you can select whether the short circuit monitoring during manualhandwheel traversing is switched on or off.Input:0 = Switch short-circuit monitoring on1 = Switch short-circuit monitoring off

• New Cycle 4 SPARK OUT TIMEThe new Cycle 4 enables you to program the sparking out time during erosion in the range of1...9999 seconds. This value remains effective until another Cycle 4 is run or the part program isreselected. 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 beinserted only between the NC blocks. It is not possible to insert a comment at the end of an NCblock.

• 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 ina special status window. The control uses the entered angle to calculate movement in axes X, Yand Z. Positioning commands are executed in the tilted plane if Cycle 19 has been run and at thesame time an OEM cycle or the disk cycle is being run. Positioning commands outside an OEMcycle 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 notpossible in a tilted OEM cycle, which is indicated by the error message CIRCLE TILTING NOTPOSSIBLE.

Page 499: thb416

1-4 TNC 406/TNC 306 3/98

Filing instructions

This Update Information issue includes a set of replacement sheets for your Technical Manual TNC406/TNC 306. Please incorporate them into your Manual, following the filing instructions below.

Change Remove Insert

Title page April 1996 Title page New title pageUpdate Information No. 12 – 1-1 to 1-2

Page 500: thb416

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 (erosionswitched 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 adjustmentUnder the code number 105296 it is possible to start the output of a step function (analogvoltage). The step is adjustable in amplitude (voltage or feed rate) and duration through the arrowkeys. The axis is selected through the axis key. With the step function you can optimize theservo amplifier adjustment and find the values for acceleration and Kv.

• Sampling rate of the analog signal for gap controlThe digital scanning rate of the analog input is now 1 ms. This means that for each cycle, fouranalog values are read and their mean value is accounted for in the following control-loop cycle (4ms). This makes it possible to read input frequencies up to 250 Hz.

• New gap control via gap signalNew MP2081Input 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 iscompared 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 inthe control software. The nominal value is read from the PLC word W524; the actual value isfound in W392. A value of 0 to 500 in W392 corresponds to 0 to 5 volts at the analog input. Inthe generator a signal must be formed corresponding to the instantaneous status of the sparkinggap (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 inW524.

- The threshold must be loaded in W520.

Page 501: thb416

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 rateL 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 forforward 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 ratefrom 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 SVmust 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 accelerationa = 72 mm / (4 ms * 60 s) = 1.2 m / 4 s * s = 0.300 m/s2.

If the machine can no longer achieve this acceleration, the gap control becomes unstable.

If MP2081=1, the following machine parameters of the input characteristic for conventional gapcontrol are no longer applicable:MP2010 to MP2030, MP2060, MP2070, MP2080, MP2131 and MP 2132.

Page 502: thb416

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 detectedthrough 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 backwardsValue 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 positioningThe new M function M93 was introduced to make it simpler to program the OEM cyclenecessary for erosion of vector cavities and star cavities. Erosion blocks (also circle / helix) thatare programmed with this M function are automatically repositioned to the starting point afterexecution (as in the disk cycle). M93 is permitted only when M36 is active.

• Improvement of the function for erosion with time limitCycle 2 (eroding with time limit) is also effective for erosion blocks with M93.

• New marker M2189M2189 is set by the NC if an error message is displayed from the PLC by error markers M2924to M3123. PLC error messages are deleted by resetting the error marker or by pressing the CEkey.

• 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 equippedwith a 5-fold EXE if it has distance-coded reference marks (MP1350). If an angular axis isconnected to a square-wave input, the encoder must output 90 000 pulses per revolution (ppr) ora 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 ora divisor thereof:ROD 4xx with 2000 ppr * transmission ratio 180 (no EXE) = 360 000 MP330=1ROD 4xx with 1000 ppr * transmission ratio 180 (no EXE) = 180 000 MP330=2ROD 4xx with 1000 ppr * transmission ratio 90 (no EXE) = 90 000 MP330=4ROD 4xx with 3000 ppr without transmission ration = 3 000 MP330=120

Page 503: thb416

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-specificThe 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 onthe oscillator signal of the generator earlier during workpiece reapproach after timing (markerM2780). The control then receives a correct analog gap signal during the transition frompositioning 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 controlInput 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 interfaceInput 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/1000degrees] per encoder signal period.For more information see above description of new features for TNC 306.

• New PLC word D400D400 = 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), thenmarker M2189 is set. PLC error messages are erased after the error message is reset or bypressing the CE key.

Page 504: thb416

3/97 TNC406/TNC 306 Update Information No. 11 1-5

• New soft key under code number 98 148The new soft key "SETUP COLORS" enables you to adjust the colors red, green, and blue in themachine parameter for the respective color. You can mix the colors for foreground andbackground separately and accept the change with ENT. Pressing END terminates withoutchanging the color.

• Change in reading the analog input for gap controlThe digital sampling rate of the analog input is now 1 or 0.5 ms, i.e., each time four analog valuesare read and the mean value is used in the following control loop cycle (4/2 ms). This makes itpossible to acquire input frequencies up to max. 250 / 500 Hz.

• TOUCH-PROBE functionsIf 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 eliminatesthe need to make the datum selection beforehand through Q80.

• Output of a step function for machine adjustmentUnder 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) andpulse duration through the arrow keys. The axis is selected by axis key. The step function makesit possible to best adjust the servo amplifier and define the values for acceleration and Kv.

• Output of dialogsUnder the code number 105 296 it is possible to activate the output of dialogs. The followingcontrol dialogs can be output in the adjusted language with the corresponding dialog numberthrough 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 PLCchip for correctness of translation and spelling.

• Output of analog valuesOn connector X8, pin 8 you can output the analog values by selecting the code number 79 513and 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 axis4. Nominal velocity (analog output) of the axis5. 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.

Page 505: thb416

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 themdirectly via RS-232 by using NAME.LNC (in TNC.EXE). This makes it possible, for example, to logany data from the PLC during the erosion process (with Module 9079) and output them throughthe RS-232 interface during or at the conclusion of erosion. If a blinking error message hasoccurred at the control, after a restart you can now determine the sequence of keystrokes priorto the error.

• Upper screen switchover keyWith this key you can now switch directly between the normal operating modes and the MODfunctions. 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 isactivated with the soft key Q-PAR. During program run all Q parameters can be checked; theycan 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 bypressing the PGM NR and ENT or the soft key RESET. If there is no table yet, it will automaticallybe generated during program start.

If a new generator setting goes to the PLC during execution of a program, the programname, block number, tool number, datum table, datum number, power stage, erosion parametertable, and the current machining time are registered in the table. The time difference from anearlier 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 tablesMultiple datum tables with the extension ".D" can be created. This serves, for example, to assignsets of positions of electrodes, i.e. a separate table for each electrode. Depending on MP10 astructure is generated with 4 or 5 axes. If there are 5 axes, 5 values (Q81...Q85) are used forCycle 7 and M38/M39. Cycle 7 has been expanded by one block (CYCL DEF 7.2 NAME), so thatyou can give a name to the selected position table. If block 7.2 is not programmed, the control asbefore uses table 0.D.

• MDI modeWhen MDI is selected, an $MDI file is automatically opened in which more than one NC blockcan be directly programmed. To run a block, you must select it with the cursor and press NCSTART. 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 signalNew machine parameter MP2081For more information see above description of new features for TNC 306.

Page 506: thb416

3/97 TNC406/TNC 306 Update Information No. 11 1-7

• New M function M93 for repositioningThe M function M93 was introduced to facilitate programming the OEM cycles required forerosion of vector or star cavities. Erosion blocks (also circles / helixes) that are programmed withthis M function are automatically returned by the control to the starting point after execution (asin the disk cycle). M93 is permitted only when M36 is active.

• Improvement of the eroding-with-time-limit functionCycle 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 (worstcase). The actual number depends on the complexity of the blocks, whereby for example moresimple line segments can be retraced than helical contour elements. For most contoursconsisting of circular arcs and line segments, approx. 56 to 60 blocks can be retraced.

• CASE branch in the PLCThe maximum number of calls programmable in a CASE branch was increased from 32 to 128.

• Improved test functionsIn the Test mode, pressing the STOP AT N soft key now calls menu with which you can programthe block number (break point), the program name and a repetition counter. The breakpoint cantherefore also be set in any subprogram with loop counter. The test run up to the breakpoint isstarted with the START soft key.

• Customized character setNew machine parameter MP7232Input value: 0 to 9:0 = disable OEM fonts display1 – 9 = enable OEM fonts display, the number sets the distance in pixels between any 2characters on the screen.

In the PLC chip you can now program your own character sets to be used in the display. You canactivate these so-called OEM fonts with MP7232. This function is limited to the display ofdialogs, operating modes, and NC error messages. PLC error messages and PLC dialogs cannotbe display in OEM fonts. The character set and character sequence for OEM fonts must beprogrammed with the PLC compiler (PLCEPROM version V2.44 and later).

Two new code words FONT and OEMTEXT were introduced. They must be programmedin 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 fileOEMTEXT CHINESE.TXT ; Code word in project file...

Page 507: thb416

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 beidentified with a symbolic name. A period "." in the matrix definition stands for the backgroundcolor and a hatch mark "#" stands for the foreground color. CHINESE.TXT is generated beforeprogramming 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 andCHR_R from the customized character set. Error message no 45 is shown as control-internalmessage, 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 MP7241 (0=disabled, 1=enabled). With EL CALL and WP CALL, an automatic handling system canbe used to load electrodes and workpieces onto the machine and remove them. The changingprocess is controlled by the PLC.

EL CALL functions like TOOL DEF with compensation and TOOL CALLThe electrode offset data (D628 ... D640) are always applied in the X/Y plane depending on thecurrent C position, regardless of a programmed tool axis. A compensation of the C position onthe basis of a C offset must not be included in this matrix rotation.

Example: C offset 10.0L 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 ifthe 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

Page 508: thb416

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 rotationresults in an automatic shift in C.

The control takes the data for the two blocks from the PLC. When EL CALL or WP CALL isexecuted the programmed name and an identifier are transferred to the PLC. Then the NC setsthe S strobe (M2044). The PLC can then decide which of the two blocks is to be executed inorder to operate an EWIS robot system, for example. After the electrode, workpiece or pallet hasbeen changed, the data of the electrode or workpiece must be available in the PLC in the wordmarkers starting with D628. Then the acknowledgment marker M2481 must be set in the PLCfor a PLC scan. The NC takes the EL CALL and WP CALL data from the PLC and resets thestrobe M2044. Now the corresponding calculations are made (compensation/shift/rotation) andexecuted. The datum-shift data of the workpiece are always relative to pallet datum, which mustagree with the manual preset.

It is recommended that after an EL CALL/TOOL CALL with a block L X... Y... C... theelectrode be moved to a compensated position for further machining, since the electrodeshifting movements are rotated depending on the C position. This means that for all erosionprocesses in which the electrode must move in the proper direction, the compensated Cposition 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 --> PLCB600 Identifier: 1 = EL CALL, 2 = WP CALLB601 ... B603 FreeB604 ... B619 16-byte ASCII string EL name or WP NameB620 Number of tilts for identifier 2B621 ... B623 Free

B624 ... B655 Data PLC --> NCB624 ... B627 FreeB628 ... B651 Data for identifier 1 (EL CALL) or identifier 2 (WP CALL)

Identifier 1: Identifier 2:D628 Compensation X Shift XD632 Compensation Y Shift YD636 Compensation Z Shift ZD640 Compensation C Rotation CD644 UndersizeD648 RadiusB652 ... B655 Free

• FN14With 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

• FN15With 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 chipFN15: PRINT 200 Output to RS-232: special character ETXFN15: PRINT Q1..Q255 Output to RS-232: content of the Q parameter

Page 509: thb416

1-10 TNC 406/TNC 306 Update Information No. 11 3/97

• FN19With FN 19 you can sent commands (also with data) to the PLC and receive resulting values. FN19 is to be considered an expansion of the M functions.Example:FN19: PLC= +11 / +Q13 / Q77

11 = 1st parameter after D280Q13 = 2nd parameter after D284Q77 = 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. Afteran acknowledgment is recognized, the strobe M2149 is reset and the value from D512 (if the 3rdparameter was programmed) is transferred to this Q parameter (result parameter), and theprogram 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 NCM2611 Acknowledgment FN19 Set/reset PLC

D280 1st value for FN19 Must be programmedD284 2nd value for FN19 OptionalD512 Return value from PLC Optional

• Note: Change in the binary block format in an RND blockIf an RND block has been used in an OEM cycle, the PLC chip must be remade!

Page 510: thb416

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 ManualTNC 406/TNC 306 (April 1996 edition). Please incorporate them into your Manual, following the filinginstructions below.

Change Remove Insert

Title page April 1996 Title page New title pageUpdate Information No. 11 – 1-1 to 1-11

Contents 2-1/2–2 2-1/2–2Software 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-4TS 120 removed 3–39/3–40 3–39/3–40PLC Input I152 3–55/3–56 3–55/3–56RS–232–C adapter 3–79/3–80 3–79/3–80

Contents 4-1...4-4 4-1...4-4Input range MP330 4–5/4–6 4–5/4–6Temperature compensation removed 4–21...4–24 4–21...4–24Incorrect illustration 4–29/4–30 4–29/4–30M2568 /D752 4–53/4–54 4–53/4–54Description expanded 4–57/4–70 4–57/4–70Color adjustment via soft key 4–91/4–92 4–91/4–92Marker M2503 4–113/4–114 4–113/4–114Adjustment for MP1820/MP1830 removed 4–145/4–146 4–145/4–146

Contents 5-1/5-2 5-1/5-2List of machine parameters 5–5...5–23 5–5...5–25

List of markers and words 6–1...6–12 6–1...6–12

Contents 7-3/7-4 7-3/7-4String processing, module 7–101...7–118 7–101...7–119

Subject index 11–1...11...9 11–1...11–9