HEIDENHAIN TNC 128 User Manual

Page 1
User’s Manual HEIDENHAIN Conversational Programming
TNC 128
NC Software 771841-01 771844-01
Page 2

Controls of the TNC

1
50
0
50
100
F %
1
50
0
50
100
S %

Keys on visual display unit

Key Function
Split screen layout
Toggle the display between machining and programming modes
Soft keys for selecting functions on screen
Shift between soft-key rows

Machine operating modes

Key Function
Manual Operation
Electronic Handwheel
Positioning with Manual Data Input
Program Run, Single Block

Program/file management, TNC functions

Key Function
Select or delete programs and files, external data transfer
Define program call, select datum and point tables
Select MOD functions
Display help text for NC error messages, call TNCguide
Display all current error messages
Show calculator

Navigation keys

Key Function
Move highlight
Go directly to blocks, cycles and parameter functions

Programming modes

Key Function
Program Run, Full Sequence
Programming and Editing
Test Run

Potentiometer for feed rate and spindle speed

Feed rate Spindle speed

Cycles, subprograms and program section repeats

Key Function
Define and call cycles
Enter and call labels for subprogramming and program section repeats
Enter program stop in a program
Page 3

Tool functions

Key Function
Define tool data in the program

Coordinate axes and numbers: Entering and editing

Key Function
Select coordinate axes or enter them into the program
Call tool data

Special functions

Key Function
Show special functions
Select the next tab in forms
Up/down one dialog box or button
Numbers
Decimal point / Reverse algebraic sign
Enter incremental dimensions
Q parameter programming / Q parameter status
Save actual position or values from calculator
Skip dialog questions, delete words
Confirm entry and resume dialog
Conclude block and exit entry
Clear numerical entry or TNC error message
Abort dialog, delete program section
Page 4
Page 5

About this manual

The symbols used in this manual are described below.
This symbol indicates that important notes about the function described must be regarded.
This symbol indicates that there is one or more of the following risks when using the described function:
Danger to workpieceDanger to fixturesDanger to toolDanger to machineDanger to operator
This symbol indicates that the described function must be adapted by the machine tool builder. The function described may therefore vary depending on the machine.
This symbol indicates that you can find detailed information about a function in another manual.
About this manual

Would you like any changes, or have you found any errors?

We are continuously striving to improve our documentation for you. Please help us by sending your requests to the following e-mail address: tnc-userdoc@heidenhain.de.
HEIDENHAIN TNC 128 5
Page 6

TNC model, software and features

This manual describes functions and features provided by TNCs as of the following NC software numbers.
TNC model NC software number
TNC 128 771841-01
TNC 128 Programming Station 771844-01
The machine tool builder adapts the usable features of the TNC to his machine by setting machine parameters. Some of the functions described in this manual may therefore not be among the features provided by the TNC on your machine tool.
TNC functions that may not be available on your machine include:
Probing functions for the 3-D touch probe
Please contact your machine tool builder to become familiar with the features of your machine.
Many machine manufacturers, as well as HEIDENHAIN, offer programming courses for the TNCs. We recommend these courses as an effective way of improving your programming skill and sharing information and ideas with other TNC users.
TNC model, software and features
6
Page 7

Software options

The TNC 128 features various software options that can be enabled by your machine tool builder. Each option is to be enabled separately and contains the following respective functions:
Touch probe function (option number 17) Touch probe cycles
Datum settingWorkpiece measurement
HEIDENHAIN DNC (option number 18) Communication with external PC applications over COM
component
Additional conversational language (option number 41) Function for enabling the conversational languages Slovenian,
Slovak, Norwegian, Latvian, Estonian, Korean, Turkish, Romanian, Lithuanian.
TNC model, software and features
HEIDENHAIN TNC 128 7
Page 8

Feature content level (upgrade functions)

Along with software options, significant further improvements of the TNC software are managed via the Feature Content Level (FCL) upgrade functions. Functions subject to the FCL are not available simply by updating the software on your TNC.
All upgrade functions are available to you without surcharge when you receive a new machine.
Upgrade functions are identified in the manual with FCL n, where n indicates the sequential number of the feature content level.
You can purchase a code number in order to permanently enable the FCL functions. For more information, contact your machine tool builder or HEIDENHAIN.

Intended place of operation

The TNC complies with the limits for a Class A device in accordance with the specifications in EN 55022, and is intended for use primarily in industrially-zoned areas.

TNC model, software and features

Legal information

This product uses open source software. Further information is available on the control under
Programming and Editing operating modeMOD functionLICENSE INFO soft key
8
Page 9
Contents
First steps with the TNC 128
1
Introduction
2
Programming: Fundamentals, file management
3
Programming: Programming aids
4
Programming: Tools
5
Programming: Tool movements
6
Programming: Subprograms and program section repeats
7
Programming: Q parameters
8
Programming: Miscellaneous functions
9
Programming: Special functions
10
Manual operation and setup
11
Positioning with manual data input
12
Test run and program run
13
MOD functions
14
Fundamentals of cycles
15
Drilling, boring and thread cycles
16
Fixed cycles: Pocket milling / stud milling / slot milling
17
Cycles: Coordinate transformations
18
Cycles: Special functions
19
Touch probe cycles
20
Tables and overviews
21
HEIDENHAIN TNC 128 9
Page 10
Page 11
1 First steps with the TNC 128 ..... 35
1.1 Overview ..... 36
1.2 Machine switch-on ..... 37
Acknowledging the power interruption and moving to the reference points ..... 37
1.3 Programming the first part ..... 38
Selecting the correct operating mode ..... 38
The most important TNC keys ..... 38
Creating a new program/file management ..... 39
Defining a workpiece blank ..... 40
Program layout ..... 41
Programming a simple contour ..... 42
Creating a cycle program ..... 45
1.4 Graphically testing the first part ..... 48
Selecting the correct operating mode ..... 48
Selecting the tool table for the test run ..... 48
Choosing the program you want to test ..... 49
Selecting the screen layout and the view ..... 49
Starting the test run ..... 50
1.5 Tool setup ..... 51
Selecting the correct operating mode ..... 51
Preparing and measuring tools ..... 51
The tool table TOOL.T ..... 51
1.6 Workpiece setup ..... 52
Selecting the correct operating mode ..... 52
Clamp the workpiece ..... 52
Datum setting with a 3-D touch probe ..... 53
1.7 Running the first program ..... 54
Selecting the correct operating mode ..... 54
Choosing the program you want to run ..... 54
Starting the program ..... 54
HEIDENHAIN TNC 128 11
Page 12
2 Introduction ..... 55
2.1 The TNC 128 ..... 56
Programming: HEIDENHAIN conversational format ..... 56
Compatibility ..... 56
2.2 Visual display unit and keyboard ..... 57
Visual display unit ..... 57
Setting the screen layout ..... 58
Operating panel ..... 59
2.3 Operating modes ..... 60
Manual Operation and El. Handwheel ..... 60
Positioning with Manual Data Input ..... 60
Programming and Editing ..... 61
Test Run ..... 61
Program Run, Full Sequence and Program Run, Single Block ..... 62
2.4 Status displays ..... 63
"General" status display ..... 63
Additional status displays ..... 64
2.5 Window manager ..... 71
Task bar ..... 72
2.6 Accessories: HEIDENHAIN 3-D touch probes and electronic handwheels ..... 73
3-D touch probes ..... 73
HR electronic handwheels ..... 73
12
Page 13
3 Programming: Fundamentals, file management ..... 75
3.1 Fundamentals ..... 76
Position encoders and reference marks ..... 76
Reference system ..... 76
Reference system on milling machines ..... 77
Designation of the axes on milling machines ..... 77
Absolute and incremental workpiece positions ..... 78
Setting the datum ..... 79
3.2 Creating and writing programs ..... 80
Organization of an NC program in HEIDENHAIN conversational format ..... 80
Defining the workpiece blank: BLK FORM ..... 80
Creating a new part program ..... 81
Programming tool movements in conversational format ..... 83
Actual position capture ..... 85
Editing a program ..... 86
The TNC search function ..... 90
3.3 File management: Fundamentals ..... 92
Files ..... 92
Showing externally created files on the TNC ..... 94
Data backup ..... 94
3.4 Working with the file manager ..... 95
Directories ..... 95
Paths ..... 95
Overview: Functions of the file manager ..... 96
Calling the file manager ..... 97
Selecting drives, directories and files ..... 98
Creating a new directory ..... 100
Creating a new file ..... 100
Copying a single file ..... 101
Copying files into another directory ..... 102
Copying a table ..... 103
Copying a directory ..... 103
Choosing one of the last files selected ..... 104
Deleting a file ..... 104
Deleting a directory ..... 105
Tagging files ..... 106
Renaming a file ..... 107
File sorting ..... 107
Additional functions ..... 108
Additional tools for management of external file types ..... 109
Data transfer to or from an external data medium ..... 114
The TNC in a network ..... 116
USB devices on the TNC ..... 117
HEIDENHAIN TNC 128 13
Page 14
4 Programming: Programming aids ..... 119
4.1 Screen keyboard ..... 120
Entering text with the screen keyboard ..... 120
4.2 Adding comments ..... 121
Application ..... 121
Adding comments ..... 121
Functions for editing of the comment ..... 121
4.3 Structuring programs ..... 122
Definition and applications ..... 122
Displaying the program structure window / Changing the active window ..... 122
Inserting a structuring block in the (left) program window ..... 122
Selecting blocks in the program structure window ..... 122
4.4 Integrated calculator ..... 123
Operation ..... 123
4.5 Programming graphics ..... 125
Generating / not generating graphics during programming ..... 125
Generating a graphic for an existing program ..... 125
Block number display ON/OFF ..... 126
Erasing the graphic ..... 126
Showing grid lines ..... 126
Magnifying or reducing a detail ..... 126
4.6 Error messages ..... 127
Display of errors ..... 127
Opening the error window ..... 127
Closing the error window ..... 127
Detailed error messages ..... 128
INTERNAL INFO soft key ..... 128
Clearing errors ..... 129
Error log ..... 129
Keystroke log ..... 130
Informational texts ..... 131
Saving service files ..... 131
Calling the TNCguide help system ..... 131
4.7 Context-sensitive help system ..... 132
Application ..... 132
Working with the TNCguide ..... 133
Downloading current help files ..... 137
14
Page 15
5 Programming: Tools ..... 139
5.1 Entering tool-related data ..... 140
Feed rate F ..... 140
Spindle speed S ..... 141
5.2 Tool data ..... 142
Requirements for tool compensation ..... 142
Tool numbers and tool names ..... 142
Tool length L ..... 142
Tool radius R ..... 142
Delta values for lengths and radii ..... 143
Entering tool data into the program ..... 143
Entering tool data in the table ..... 144
Calling tool data ..... 151
Tool change ..... 152
5.3 Tool compensation ..... 155
Introduction ..... 155
Tool length compensation ..... 155
Tool radius compensation for paraxial positioning blocks ..... 156
HEIDENHAIN TNC 128 15
Page 16
6 Programming: Tool movements ..... 159
6.1 Fundamentals ..... 160
Tool movements in the program ..... 160
Radius compensation ..... 160
Miscellaneous functions M ..... 160
Subprograms and program section repeats ..... 161
Programming with Q parameters ..... 161
6.2 Programming tool movements ..... 162
Programming tool movements for workpiece machining ..... 162
16
Page 17
7 Programming: Subprograms and program section repeats ..... 165
7.1 Labeling subprograms and program section repeats ..... 166
Labels ..... 166
7.2 Subprograms ..... 167
Operating sequence ..... 167
Programming notes ..... 167
Programming a subprogram ..... 167
Calling a subprogram ..... 167
7.3 Program section repeats ..... 168
Label LBL ..... 168
Operating sequence ..... 168
Programming notes ..... 168
Programming a program section repeat ..... 168
Calling a program section repeat ..... 168
7.4 Separate program as subprogram ..... 169
Operating sequence ..... 169
Programming notes ..... 169
Calling any program as a subprogram ..... 170
7.5 Nesting ..... 171
Types of nesting ..... 171
Nesting depth ..... 171
Subprogram within a subprogram ..... 172
Repeating program section repeats ..... 173
Repeating a subprogram ..... 174
7.6 Programming examples ..... 175
HEIDENHAIN TNC 128 17
Page 18
8 Programming: Q parameters ..... 179
8.1 Principle and overview ..... 180
Programming notes ..... 181
Calling Q-parameter functions ..... 182
8.2 Part families—Q parameters in place of numerical values ..... 183
Application ..... 183
8.3 Describing contours through mathematical operations ..... 184
Application ..... 184
Overview ..... 184
Programming fundamental operations ..... 185
8.4 Trigonometric functions ..... 186
Definitions ..... 186
Programming trigonometric functions ..... 187
8.5 Circle calculations ..... 188
Application ..... 188
8.6 If-then decisions with Q parameters ..... 189
Application ..... 189
Unconditional jumps ..... 189
Programming if-then decisions ..... 190
Abbreviations used: ..... 190
8.7 Checking and changing Q parameters ..... 191
Procedure ..... 191
8.8 Additional functions ..... 192
Overview ..... 192
FN 14: ERROR: Display error messages ..... 193
FN 16: F-PRINT: Formatted output of text and Q-parameter values ..... 198
FN 18: SYS-DATUM READ ..... 202
FN 19: PLC: Transfer values to the PLC ..... 211
FN 20: WAIT FOR: NC and PLC synchronization ..... 211
FN 29: PLC: Transfer values to the PLC ..... 213
FN 37: EXPORT ..... 214
8.9 Accessing tables with SQL commands ..... 215
Introduction ..... 215
A transaction ..... 216
Programming SQL commands ..... 218
Overview of the soft keys ..... 218
SQL BIND ..... 219
SQL SELECT ..... 220
SQL FETCH ..... 223
SQL UPDATE ..... 224
SQL INSERT ..... 224
SQL COMMIT ..... 225
SQL ROLLBACK ..... 225
18
Page 19
8.10 Entering formulas directly ..... 226
Entering formulas ..... 226
Rules for formulas ..... 228
Programming example ..... 229
8.11 String parameters ..... 230
String processing functions ..... 230
Assigning string parameters ..... 231
Chain-linking string parameters ..... 232
Converting a numerical value to a string parameter ..... 233
Copying a substring from a string parameter ..... 234
Converting a string parameter to a numerical value ..... 235
Checking a string parameter ..... 236
Finding the length of a string parameter ..... 237
Comparing alphabetic priority ..... 238
Reading machine parameters ..... 239
8.12 Preassigned Q parameters ..... 242
Values from the PLC: Q100 to Q107 ..... 242
Active tool radius: Q108 ..... 242
Tool axis: Q109 ..... 243
Spindle status: Q110 ..... 243
Coolant on/off: Q111 ..... 243
Overlap factor: Q112 ..... 243
Unit of measurement for dimensions in the program: Q113 ..... 244
Tool length: Q114 ..... 244
Coordinates after probing during program run ..... 244
Deviation between actual value and nominal value during automatic tool measurement with the TT 130 ..... 245
HEIDENHAIN TNC 128 19
Page 20
9 Programming: Miscellaneous functions ..... 247
9.1 Entering miscellaneous functions M and STOP ..... 248
Fundamentals ..... 248
9.2 Miscellaneous functions for program run control, spindle and coolant ..... 249
Overview ..... 249
9.3 Miscellaneous functions for coordinate data ..... 250
Programming machine-referenced coordinates: M91/M92 ..... 250
Reducing display of a rotary axis to a value less than 360°: M94 ..... 252
9.4 Miscellaneous functions for contouring behavior ..... 253
Feed rate factor for plunging movements: M103 ..... 253
Feed rate in millimeters per spindle revolution: M136 ..... 254
Retraction from the contour in the tool-axis direction: M140 ..... 255
Suppressing touch probe monitoring: M141 ..... 256
20
Page 21
10 Programming: Special functions ..... 257
10.1 Overview of special functions ..... 258
Main menu for SPEC FCT special functions ..... 258
Program defaults menu ..... 259
Functions for contour and point machining menu ..... 259
Menu for defining various plain-language functions ..... 260
10.2 Freely definable tables ..... 261
Fundamentals ..... 261
Creating a freely definable table ..... 261
Editing the table format ..... 262
Switching between table and form view ..... 264
FN26: TABOPEN: Opening a freely definable table ..... 265
FN 27: TABWRITE: Writing to a freely definable table ..... 266
FN28: TABREAD: Reading a freely definable table ..... 267
10.3 File functions ..... 268
Application ..... 268
Defining file functions ..... 268
10.4 Defining coordinate transformations ..... 269
Overview ..... 269
TRANS DATUM AXIS ..... 269
TRANS DATUM TABLE ..... 270
TRANS DATUM RESET ..... 270
10.5 Creating text files ..... 271
Application ..... 271
Opening and exiting text files ..... 271
Editing texts ..... 272
Deleting and re-inserting characters, words and lines ..... 272
Editing text blocks ..... 273
Finding text sections ..... 274
HEIDENHAIN TNC 128 21
Page 22
11 Manual operation and setup ..... 275
11.1 Switch-on, switch-off ..... 276
Switch-on ..... 276
Switch-off ..... 277
11.2 Moving the machine axes ..... 278
Note ..... 278
Moving the axis using the machine axis direction buttons ..... 278
Incremental jog positioning ..... 279
Traversing with the HR 410 electronic handwheel ..... 280
11.3 Spindle speed S, feed rate F and miscellaneous functions M ..... 281
Function ..... 281
Entering values ..... 281
Changing the spindle speed and feed rate ..... 282
Activating feed-rate limitation ..... 283
11.4 Datum setting without a 3-D touch probe ..... 284
Note ..... 284
Preparation ..... 284
Workpiece presetting with axis keys ..... 285
Datum management with the preset table ..... 286
11.5 Using the 3-D touch probe ..... 291
Overview ..... 291
Functions in touch probe cycles ..... 292
Selecting touch probe cycles ..... 293
Recording measured values from the touch-probe cycles ..... 294
Writing the measured values from touch probe cycles to datum tables ..... 295
Writing the measured values from touch probe cycles to the preset table ..... 296
11.6 Calibrating a 3-D touch probe ..... 297
Introduction ..... 297
Calibrating the effective length ..... 298
Calibrating the effective radius and compensating center offset ..... 299
Displaying calibration values ..... 302
11.7 Datum setting with a 3-D touch probe ..... 303
Overview ..... 303
Datum setting in any axis ..... 303
Circle center as datum ..... 304
Center line as datum ..... 307
Measuring workpieces with a 3-D touch probe ..... 308
Using touch probe functions with mechanical probes or dial gauges ..... 310
22
Page 23
12 Positioning with manual data input ..... 311
12.1 Programming and executing simple machining operations ..... 312
Positioning with manual data input (MDI) ..... 312
Protecting and erasing programs in $MDI ..... 314
HEIDENHAIN TNC 128 23
Page 24
13 Test run and program run ..... 315
13.1 Graphics ..... 316
Application ..... 316
Setting the speed of the test run ..... 317
Overview of display modes ..... 318
Plan view ..... 318
Projection in 3 planes ..... 319
3-D view ..... 320
Magnifying details ..... 322
Repeating graphic simulation ..... 323
Displaying the tool ..... 323
Measuring the machining time ..... 324
13.2 Showing the workpiece blank in the working space ..... 325
Application ..... 325
13.3 Functions for program display ..... 326
Overview ..... 326
13.4 Test Run ..... 327
Application ..... 327
13.5 Program run ..... 330
Application ..... 330
Running a part program ..... 331
Interrupting machining ..... 332
Moving the machine axes during an interruption ..... 333
Resuming program run after an interruption ..... 334
Mid-program startup (block scan) ..... 335
Returning to the contour ..... 337
13.6 Optional block skip ..... 338
Application ..... 338
Inserting the "/" character ..... 338
Erasing the "/" character ..... 338
13.7 Optional program-run interruption ..... 339
Application ..... 339
24
Page 25
14 MOD functions ..... 341
14.1 Selecting MOD functions ..... 342
Selecting the MOD functions ..... 342
Changing the settings ..... 342
Exiting the MOD functions ..... 342
Overview of MOD functions ..... 343
14.2 Software numbers ..... 344
Application ..... 344
14.3 Entering code numbers ..... 345
Application ..... 345
14.4 Setting the data interfaces ..... 346
Serial interfaces on the TNC 128 ..... 346
Application ..... 346
Setting the RS-232 interface ..... 346
Setting the baud rate (baudRate) ..... 346
Setting the protocol (protocol) ..... 346
Setting the data bits (dataBits) ..... 347
Parity check (parity) ..... 347
Setting the stop bits (stopBits) ..... 347
Setting the handshake (flowControl) ..... 347
Settings for data transfer with the TNCserver PC software ..... 348
Setting the operating mode of the external device (fileSystem) ..... 348
Software for data transfer ..... 349
14.5 Ethernet interface ..... 351
Introduction ..... 351
Connection possibilities ..... 351
Connecting the control to the network ..... 352
14.6 Position display types ..... 357
Application ..... 357
14.7 Unit of measurement ..... 358
Application ..... 358
14.8 Displaying operating times ..... 359
Application ..... 359
HEIDENHAIN TNC 128 25
Page 26
15 Fundamentals of cycles ..... 361
15.1 Introduction ..... 362
15.2 Available cycle groups ..... 363
Overview of fixed cycles ..... 363
15.3 Working with fixed cycles ..... 364
Machine-specific cycles ..... 364
Defining a cycle using soft keys ..... 365
Defining a cycle using the GOTO function ..... 365
Calling cycles ..... 366
15.4 PATTERN DEF pattern definition ..... 368
Application ..... 368
Entering PATTERN DEF ..... 369
Using PATTERN DEF ..... 369
Defining individual machining positions ..... 370
Defining a single row ..... 371
Defining a single pattern ..... 372
Defining individual frames ..... 373
Defining a full circle ..... 374
Defining a pitch circle ..... 375
15.5 POLAR PATTERN (Cycle 220) ..... 376
Cycle run ..... 376
Please note while programming: ..... 376
Cycle parameters ..... 377
15.6 CARTESIAN PATTERN (Cycle 221) ..... 379
Cycle run ..... 379
Please note while programming: ..... 379
Cycle parameters ..... 380
15.7 Point tables ..... 381
Application ..... 381
Creating a point table ..... 381
Hiding single points from the machining process ..... 382
Selecting a point table in the program ..... 382
Calling a cycle in connection with point tables ..... 383
26
Page 27
16 Drilling, boring and thread cycles ..... 385
16.1 Fundamentals ..... 386
Overview ..... 386
16.2 CENTERING (Cycle 240) ..... 387
Cycle run ..... 387
Please note while programming: ..... 387
Cycle parameters ..... 388
16.3 DRILLING (Cycle 200) ..... 389
Cycle run ..... 389
Please note while programming: ..... 389
Cycle parameters ..... 390
16.4 REAMING (Cycle 201) ..... 391
Cycle run ..... 391
Please note while programming: ..... 391
Cycle parameters ..... 392
16.5 BORING (Cycle 202) ..... 393
Cycle run ..... 393
Please note while programming: ..... 394
Cycle parameters ..... 395
16.6 UNIVERSAL DRILLING (Cycle 203) ..... 397
Cycle run ..... 397
Please note while programming: ..... 398
Cycle parameters ..... 399
16.7 BACK BORING (Cycle 204) ..... 401
Cycle run ..... 401
Please note while programming: ..... 402
Cycle parameters ..... 403
16.8 UNIVERSAL PECKING (Cycle 205) ..... 405
Cycle run ..... 405
Please note while programming: ..... 406
Cycle parameters ..... 407
16.9 SINGLE-LIP DEEP-HOLE DRILLING (Cycle 241) ..... 409
Cycle run ..... 409
Please note while programming: ..... 409
Cycle parameters ..... 410
HEIDENHAIN TNC 128 27
Page 28
16.10 Programming examples ..... 412
16.11 TAPPING NEW with floating tap holder (Cycle 206) ..... 416
Cycle run ..... 416
Please note while programming: ..... 416
Cycle parameters ..... 417
16.12 RIGID TAPPING without a floating tap holder NEW (Cycle 207) ..... 418
Cycle run ..... 418
Please note while programming: ..... 419
Cycle parameters ..... 420
16.13 Programming example ..... 421
28
Page 29
17 Fixed cycles: Pocket milling / stud milling / slot milling ..... 425
17.1 Fundamentals ..... 426
Overview ..... 426
17.2 RECTANGULAR POCKET (Cycle 251) ..... 427
Cycle run ..... 427
Please note while programming: ..... 428
Cycle parameters ..... 429
17.3 RECTANGULAR STUD (Cycle 256) ..... 432
Cycle run ..... 432
Please note while programming: ..... 433
Cycle parameters ..... 434
17.4 Programming examples ..... 437
HEIDENHAIN TNC 128 29
Page 30
18 Cycles: Coordinate transformations ..... 441
18.1 Fundamentals ..... 442
Overview ..... 442
Effect of coordinate transformations ..... 442
18.2 DATUM SHIFT (Cycle 7, DIN/ISO: G54) ..... 443
Effect ..... 443
Cycle parameters ..... 443
18.3 DATUM SHIFT with datum tables (Cycle 7) ..... 444
Effect ..... 444
Please note while programming: ..... 445
Cycle parameters ..... 446
Selecting a datum table in the part program ..... 446
Editing the datum table in the Programming and Editing mode of operation ..... 447
Configuring the datum table ..... 448
Exiting a datum table ..... 448
Status displays ..... 448
18.4 DATUM SETTING (Cycle 247) ..... 449
Effect ..... 449
Please note before programming: ..... 449
Cycle parameters ..... 449
Status displays ..... 449
18.5 MIRROR IMAGE (Cycle 8) ..... 450
Effect ..... 450
Please note while programming: ..... 450
Cycle parameters ..... 451
18.6 SCALING FACTOR (Cycle 11) ..... 452
Effect ..... 452
Cycle parameters ..... 452
18.7 AXIS-SPECIFIC SCALING (Cycle 26) ..... 453
Effect ..... 453
Please note while programming: ..... 453
Cycle parameters ..... 454
18.8 Programming examples ..... 455
30
Page 31
19 Cycles: Special functions ..... 457
19.1 Fundamentals ..... 458
Overview ..... 458
19.2 DWELL TIME (Cycle 9) ..... 459
Function ..... 459
Cycle parameters ..... 459
19.3 PROGRAM CALL (Cycle 12) ..... 460
Cycle function ..... 460
Please note while programming: ..... 460
Cycle parameters ..... 461
19.4 ORIENTED SPINDLE STOP (Cycle 13) ..... 462
Cycle function ..... 462
Please note while programming: ..... 462
Cycle parameters ..... 462
HEIDENHAIN TNC 128 31
Page 32
20 Touch probe cycles ..... 463
20.1 General information about touch probe cycles ..... 464
Method of function ..... 464
Touch probe cycles in the Manual Operation and El. Handwheel modes ..... 464
20.2 Before you start working with touch probe cycles ..... 465
Maximum traverse to touch point: DIST in touch probe table ..... 465
Set-up clearance to touch point: SET_UP in touch probe table ..... 465
Orient the infrared touch probe to the programmed probe direction: TRACK in touch probe table ..... 465
Touch trigger probe, probing feed rate: F in touch probe table ..... 466
Touch trigger probe, rapid traverse for positioning: FMAX ..... 466
Touch trigger probe, rapid traverse for positioning: F_PREPOS in touch probe table ..... 466
Executing touch probe cycles ..... 466
20.3 Touch probe table ..... 467
General information ..... 467
Editing touch probe tables ..... 467
Touch probe data ..... 468
20.4 Fundamentals of tool measurement ..... 469
Overview ..... 469
Setting the machine parameters ..... 471
Entries in the tool table TOOL.T ..... 472
20.5 Calibrating the TT (Cycle 480) ..... 474
Cycle run ..... 474
Please note while programming: ..... 474
Cycle parameters ..... 474
20.6 Calibrating the wireless TT 449 (Cycle 484) ..... 475
Fundamentals ..... 475
Cycle run ..... 475
Please note while programming: ..... 475
Cycle parameters ..... 475
20.7 Measuring the tool length (Cycle 481) ..... 476
Cycle run ..... 476
Please note while programming: ..... 476
Cycle parameters ..... 477
20.8 Measuring the tool radius (Cycle 482) ..... 478
Cycle run ..... 478
Please note while programming: ..... 478
Cycle parameters ..... 479
20.9 Measuring the tool length and radius (Cycle 483) ..... 480
Cycle run ..... 480
Please note while programming: ..... 480
Cycle parameters ..... 481
32
Page 33
21 Tables and overviews ..... 483
21.1 Machine-specific user parameters ..... 484
Application ..... 484
21.2 Pin layouts and connecting cables for the data interfaces ..... 492
RS-232-C/V.24 interface for HEIDENHAIN devices ..... 492
Non-HEIDENHAIN devices ..... 493
Ethernet interface RJ45 socket ..... 493
21.3 Technical information ..... 494
HEIDENHAIN TNC 128 33
Page 34
34
Page 35
First steps with the
TNC 128
Page 36
1.1 Overview
This chapter is intended to help TNC beginners quickly learn to handle the most important procedures. For more information on a respective topic, see the section referred to in the text.
The following topics are included in this chapter:
Machine switch-on

1.1 Overview

Programming the first partGraphically testing the first partTool setupWorkpiece setupRunning the first program
36 First steps with the TNC 128
Page 37
1.2 Machine switch-on

Acknowledging the power interruption and moving to the reference points

Switch-on and crossing the reference points can vary depending on the machine tool. Your machine manual provides more detailed information.
Switch on the power supply for control and machine. The TNC
starts the operating system. This process may take several minutes. Then the TNC will display the message "Power interrupted" in the screen header
Press the CE key: The TNC compiles the PLC
program
Switch on the control voltage: The TNC checks
operation of the emergency stop circuit and goes into the reference run mode
Cross the reference points manually in the displayed
sequence: For each axis press the machine START button. If you have absolute linear and angle encoders on your machine there is no need for a reference run
The TNC is now ready for operation in the Manual Operation mode.
Further information on this topic
Traversing the reference marks: See "Switch-on" on page 276Operating modes: See "Programming and Editing" on page 61

1.2 Machine switch-on

HEIDENHAIN TNC 128 37
Page 38
1.3 Programming the first part

Selecting the correct operating mode

You can write programs only in the Programming and Editing mode:
Press the operating modes key: The TNC goes into
the Programming and Editing mode
Further information on this topic
Operating modes: See "Programming and Editing" on page 61

The most important TNC keys

Functions for conversational guidance Key
Confirm entry and activate the next dialog prompt
Ignore the dialog question

1.3 Programming the first part

End the dialog immediately
Abort dialog, discard entries
Soft keys on the screen with which you select functions appropriate to the active state
Further information on this topic
Writing and editing programs: See "Editing a program" on page 86Overview of keys: See "Controls of the TNC" on page 2
38 First steps with the TNC 128
Page 39

Creating a new program/file management

Press the PGM MGT key: The TNC opens the file
manager. The file management of the TNC is arranged much like the file management on a PC with the Windows Explorer. The file management enables you to manipulate data on the TNC hard disk
Use the arrow keys to select the folder in which you
want to open the new file
Enter a file name with the extension .H: The TNC then
automatically opens a program and asks for the unit of measure for the new program
To select the unit of measure, press the MM or INCH
soft key: The TNC automatically starts the workpiece blank definition (see "Defining a workpiece blank" on page 40)
The TNC automatically generates the first and last blocks of the program. Afterwards you can no longer change these blocks.
Further information on this topic
File management: See "Working with the file manager" on page 95Creating a new program: See "Creating and writing programs" on
page 80
1.3 Programming the first part
HEIDENHAIN TNC 128 39
Page 40

Defining a workpiece blank

Y
X
Z
MAX
MIN
-40
100
100
0
0
Immediately after you have created a new program, the TNC starts the dialog for entering the workpiece blank definition. Always define the workpiece blank as a cuboid by entering the MIN and MAX points, each with reference to the selected reference point.
After you have created a new program, the TNC automatically initiates the workpiece blank definition and asks for the required data:
Working plane in graphic: XY?: Enter the active spindle axis. Z is
saved as default setting. Accept with the ENT key
Workpiece blank def.: minimum X: Enter the smallest X coordinate
of the workpiece blank with respect to the reference point, e.g. 0. Confirm with the ENT key
Workpiece blank def.: minimum Y: Smallest Y coordinate of the
workpiece blank with respect to the reference point, e.g. 0. Confirm with the ENT key
Workpiece blank def.: minimum Z: Smallest Z coordinate of the
workpiece blank with respect to the reference point, e.g. –40. Confirm with the ENT key
Workpiece blank def.: maximum X: Largest X coordinate of the
1.3 Programming the first part
workpiece blank with respect to the reference point, e.g. 100. Confirm with the ENT key
Workpiece blank def.: maximum Y: Largest Y coordinate of the
workpiece blank with respect to the reference point, e.g. 100. Confirm with the ENT key
Workpiece blank def.: maximum Z: Largest Z coordinate of the
workpiece blank with respect to the reference point, e.g. 0. Confirm with the ENT key. The TNC concludes the dialog
Example NC blocks
0 BEGIN PGM NEW MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 END PGM NEW MM
Further information on this topic
Defining the workpiece blank: (see page 81)
40 First steps with the TNC 128
Page 41

Program layout

NC programs should be arranged consistently in a similar manner. This makes it easier to find your place, accelerates programming and reduces errors.
Recommended program layout for simple, conventional contour machining
1 Call tool, define tool axis 2 Retract the tool 3 Pre-position the first axis in the working plane in front of the
contour starting point
4 Pre-position the second axis in the working plane next to the
contour starting point
5 In the tool axis, position the tool above the workpiece, or
preposition immediately to workpiece depth. If required, switch on the spindle/coolant
6 Approach the contour 7 Machine the contour 8 Depart the contour 9 Retract the tool, end the program
Further information on this topic:
Contour programming: See "Fundamentals" on page 160
Recommended program layout for simple cycle programs 1 Call the tool, define the tool axis 2 Retract the tool 3 Define the machining positions 4 Define the fixed cycle 5 Call the cycle, switch on the spindle/coolant 6 Retract the tool, end the program
Further information on this topic:
Cycle programming: See "Working with fixed cycles" on page 364.
Example: Layout of contour machining programs
0 BEGIN PGM BSPCONT MM 1 BLK FORM 0.1 Z X... Y... Z... 2 BLK FORM 0.2 X... Y... Z... 3 TOOL CALL 5 Z S5000 4 Z+250 R0 FMAX 5 X... R0 FMAX 6 Y... R0 FMAX 7 Z+10 R0 F3000 M13 ... 16 X... R0 FMAX 17 Z+250 R0 FMAX M2 18 END PGM BSPCONT MM
Example: Cycle program layout
0 BEGIN PGM BSBCYC MM 1 BLK FORM 0.1 Z X... Y... Z... 2 BLK FORM 0.2 X... Y... Z... 3 TOOL CALL 5 Z S5000 4 Z+250 R0 FMAX 5 PATTERN DEF POS1( X... Y... Z... ) ... 6 CYCL DEF... 7 CYCL CALL PAT FMAX M13 8 Z+250 R0 FMAX M2 9 END PGM BSBCYC MM
1.3 Programming the first part
HEIDENHAIN TNC 128 41
Page 42

Programming a simple contour

X
Y
95
5
95
5
1
4
2
3
The contour shown to the right is to be milled once to a depth of 5 mm. You have already defined the workpiece blank. After you have initiated a dialog through a function key, enter all the data requested by the TNC in the screen header.
Call the tool: Enter the tool data. Confirm each of your
entries with the ENT key. Do not forget the tool axis
Retract the tool: Press the orange Z axis key in order
to retract in the tool axis, and enter the value for the position to be approached, e.g. 250. Confirm with the ENT key
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Confirm the Miscellaneous function M? with the
END key: The TNC saves the entered positioning
1.3 Programming the first part
block
Preposition the tool in the working plane: Press the
orange X axis key and enter the value for the position to be approached, e.g. –20
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Confirm the Miscellaneous function M? with the
END key: The TNC saves the entered positioning block
Press the orange Y axis key and enter the value for the
position to be approached, e.g. –20. Confirm with the ENT key
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Confirm the Miscellaneous function M? with the
END key: The TNC saves the entered positioning block
42 First steps with the TNC 128
Page 43
Move the tool to workpiece depth: Press the orange Z
axis key and enter the value for the position to be approached, e.g. –5. Confirm with the ENT key
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Feed rate F=? Enter the positioning feed rate, e.g.
3000 mm/min and confirm with the ENT key
Miscellaneous function M? Switch on the spindle and
coolant, e.g. M13. Confirm with the END key: The TNC saves the entered positioning block
Approach contour point 1: Press the orange X axis key
and enter the value 5 for the position to be approached
Tool radius comp: R+/R–/no comp? Select the R– soft
key: The traverse path is decreased by the tool radius
Feed rate F=? Enter the machining feed rate, e.g. 700
mm/min, and confirm your entry with the END key
Approach contour point 2: Press the orange Y axis key
and enter the value 95 for the position to be approached
Tool radius comp: R+/R–/no comp? Select the R+ soft
key: The traverse path is increased by the tool radius. Confirm your entry with the END soft key
Approach contour point 3: Press the orange X axis key
and enter the value 95 for the position to be approached
Tool radius comp: R+/R-/no comp? Select the R+ soft
key: The traverse path is increased by the tool radius. Confirm your entry with the END soft key
Approach contour point 4: Press the orange Y axis key
and enter the value 5 for the position to be approached
Tool radius comp: R+/R-/no comp? Select the R+ soft
key: The traverse path is increased by the tool radius. Confirm your entry with the END soft key
1.3 Programming the first part
HEIDENHAIN TNC 128 43
Page 44
Approach contour point 1 and retract the tool: Press
the orange X axis key and enter the value 0 for the position to be approached
Tool radius comp: R+/R-/no comp? Select the R+ soft
key: The traverse path is increased by the tool radius. Confirm your entry with the END soft key
Retract the tool: Press the orange Z axis key in order
to retract in the tool axis, and enter the value for the position to be approached, e.g. 250. Confirm with the ENT key
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Miscellaneous function M? Enter M2 to end the
program and confirm with the END key: The TNC saves the entered positioning block
Further information on this topic
Creating a new program: See "Creating and writing programs" on
1.3 Programming the first part
page 80
Programmable feed rates: See "Possible feed rate input" on page 84Tool radius compensation: See "Tool radius compensation for
paraxial positioning blocks" on page 156
Miscellaneous functions (M): See "Miscellaneous functions for
program run control, spindle and coolant" on page 249
44 First steps with the TNC 128
Page 45

Creating a cycle program

X
Y
20
10
100
100
10
90
9080
The holes (depth of 20 mm) shown in the figure at right are to be drilled with a standard drilling cycle. You have already defined the workpiece blank.
Call the tool: Enter the tool data. Confirm each of your
entries with the ENT key. Do not forget the tool axis
Retract the tool: Press the orange Z axis key in order
to retract in the tool axis, and enter the value for the position to be approached, e.g. 250. Confirm with the ENT key
Confirm Radius comp.: R+/R–/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Confirm the Miscellaneous function M? with the
END key: The TNC saves the entered positioning block
Call the cycle menu
Display the drilling cycles
Select the standard drilling cycle 200: The TNC starts
the dialog for cycle definition. Enter all parameters requested by the TNC step by step and conclude each entry with the ENT key. In the screen to the right, the TNC also displays a graphic showing the respective cycle parameter
1.3 Programming the first part
HEIDENHAIN TNC 128 45
Page 46
Call the menu for special functions
Display the functions for point machining
Select the pattern definition
Select point entry: Enter the coordinates of the 4
points and confirm each with the ENT key. After entering the fourth point, save the block with the END key
Display the menu for defining the cycle call
Run the drilling cycle on the defined pattern:Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Miscellaneous function M? Switch on the spindle and
coolant, e.g. M13. Confirm with the END key: The TNC saves the entered positioning block
Retract the tool: Press the orange Z axis key in order
1.3 Programming the first part
to retract in the tool axis, and enter the value for the position to be approached, e.g. 250. Confirm with the ENT key
Confirm Radius comp.: RL/RR/no comp? by pressing
the ENT key: Do not activate the radius compensation
Confirm Feed rate F=? with the ENT key: Move at
rapid traverse (FMAX)
Miscellaneous function M? Enter M2 to end the
program and confirm with the END key: The TNC saves the entered positioning block
46 First steps with the TNC 128
Page 47
Example NC blocks
0 BEGIN PGM C200 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL CALL 5 Z S4500 4 Z+250 R0 FMAX 5 PATTERN DEF
POS1 (X+10 Y+10 Z+0) POS2 (X+10 Y+90 Z+0) POS3 (X+90 Y+90 Z+0) POS4 (X+90 Y+10 Z+0)
6 CYCL DEF 200 DRILLING
Q200=2 ;SET-UP CLEARANCE Q201=–20 ;DEPTH Q206=250 ;FEED RATE FOR PLNGNG Q202=5 ;PLUNGING DEPTH Q210=0 ;DWELL TIME AT TOP Q203=–10 ;SURFACE COORDINATE Q204=20 ;2ND SET-UP CLEARANCE
Q211=0.2 ;DWELL TIME AT DEPTH 7 CYCL CALL PAT FMAX M13 8 Z+250 R0 FMAX M2 9 END PGM C200 MM
Definition of workpiece blank
Tool call Retract the tool Define the machining positions
Define the cycle
1.3 Programming the first part
Spindle and coolant on, call the cycle Retract the tool, end program
Further information on this topic
Creating a new program: See "Creating and writing programs" on
page 80
Cycle programming: See User’s Manual for Cycles
HEIDENHAIN TNC 128 47
Page 48
1.4 Graphically testing the first part

Selecting the correct operating mode

You can test programs only in the Test Run mode:
Press the Test Run operating mode key: the TNC
switches to that mode
Further information on this topic
Operating modes of the TNC: See "Operating modes" on page 60Testing programs: See "Test Run" on page 327

Selecting the tool table for the test run

You only need to execute this step if you have not activated a tool table in the Test Run mode.
Press the PGM MGT key: The TNC opens the file
manager
Press the SELECT TYPE soft key: The TNC shows a
soft-key menu for selection of the file type to be displayed

1.4 Graphically testing the first part

Press the SHOW ALL soft key: The TNC shows all
saved files in the right window
Move the highlight to the left onto the directories
Move the highlight to the TNC:\table directory
Move the highlight to the right onto the files
Move the highlight to the file TOOL.T (active tool
table) and load with the ENT key: TOOL.T receives the status S and is therefore active for the test run
Press the END key: Exit the file manager
Further information on this topic
Tool management: See "Entering tool data in the table" on page 144Testing programs: See "Test Run" on page 327
48 First steps with the TNC 128
Page 49

Choosing the program you want to test

Press the PGM MGT key: The TNC opens the file
manager
Press the LAST FILES soft key: The TNC opens a
pop-up window with the most recently selected files
Use the arrow keys to select the program that you
want to test. Load with the ENT key
Further information on this topic
Selecting a program: See "Working with the file manager" on page
95

Selecting the screen layout and the view

Press the key for selecting the screen layout. The TNC
shows all available alternatives in the soft-key row
Press the PROGRAM + GRAPHICS soft key: In the
left half of the screen the TNC shows the program; in the right half it shows the workpiece blank
Select the desired view via soft key Plan view
Projection in three planes
1.4 Graphically testing the first part
3-D view
Further information on this topic
Graphic functions: See "Graphics" on page 316Running a test run: See "Test Run" on page 327
HEIDENHAIN TNC 128 49
Page 50

Starting the test run

Press the RESET + START soft key: The TNC
simulates the active program up to a programmed break or to the program end
While the simulation is running, you can use the soft
keys to change views
Press the STOP soft key: The TNC interrupts the test
run
Press the START soft key: The TNC resumes the test
run after a break
Further information on this topic
Running a test run: See "Test Run" on page 327Graphic functions: See "Graphics" on page 316Adjusting the test speed: See "Setting the speed of the test run" on
page 317
1.4 Graphically testing the first part
50 First steps with the TNC 128
Page 51
1.5 Tool setup

Selecting the correct operating mode

Tools are set up in the Manual Operation mode:
Press the Manual Operation operating mode key: the
TNC switches to that mode
Further information on this topic
Operating modes of the TNC: See "Operating modes" on page 60

Preparing and measuring tools

Clamp the required tools in their chucksWhen measuring with an external tool presetter: Measure the tools,
note down the length and radius, or transfer them directly to the machine through a transfer program
When measuring on the machine: Insert the tool

The tool table TOOL.T

In the tool table TOOL.T (permanently saved under TNC:\TABLE\), save the tool data such as length and radius, but also further tool-specific information that the TNC needs to perform its functions.
To enter tool data in the tool table TOOL.T, proceed as follows:
Display the tool table

1.5 Tool setup

Edit the tool table: Set the EDITING soft key to ONWith the upward or downward arrow keys you can
select the tool number that you want to edit
With the rightward or leftward arrow keys you can
select the tool data that you want to edit
To exit the tool table, press the END key
Further information on this topic
Operating modes of the TNC: See "Operating modes" on page 60Working with the tool table: See "Entering tool data in the table" on
page 144
HEIDENHAIN TNC 128 51
Page 52
1.6 Workpiece setup

Selecting the correct operating mode

Workpieces are set up in the Manual Operation or El. Handwheel mode
Press the Manual Operation operating mode key: the
TNC switches to that mode
Further information on this topic
Manual Operation mode: See "Moving the machine axes" on page
278

1.6 Workpiece setup

Clamp the workpiece

Mount the workpiece with a fixture on the machine table so that it is fixed with its edges parallel to the machine axes.
52 First steps with the TNC 128
Page 53

Datum setting with a 3-D touch probe

Insert the 3-D touch probe: In the MDI mode, run a TOOL CALL block
containing the tool axis and then return to the Manual Operation mode
Select the probing functions: The TNC displays the
available functions in the soft-key row
Select the function for setting the datum, e.g. Probe
Position
Position the touch probe near the first touch point on
the first workpiece edge
Select the probing direction via soft key, e.g. +XPress NC start: The touch probe moves in the defined
direction until it contacts the workpiece and then automatically returns to its starting point
Then the TNC displays the coordinates of the
measured position
Set to 0: Press the SET DATUM soft keyPress the END soft key to close the menu
Repeat this procedure for all axes, in which you want to set the
datum
Further information on this topic
Datum setting: See "Datum setting with a 3-D touch probe" on page
303
1.6 Workpiece setup
HEIDENHAIN TNC 128 53
Page 54
1.7 Running the first program

Selecting the correct operating mode

You can run programs either in the Single Block or the Full Sequence mode:
Press the operating mode key: The TNC goes into the
Program Run, Single Block mode and the TNC executes the program block by block. You have to confirm each block with the NC start key
Press the Program Run, Full Sequence operating
mode key: The TNC switches to that mode and runs the program after NC start up to a program interruption or to the end of the program
Further information on this topic
Operating modes of the TNC: See "Operating modes" on page 60Running programs: See "Program run" on page 330

1.7 Running the first program

Choosing the program you want to run

Press the PGM MGT key: The TNC opens the file
manager
Press the LAST FILES soft key: The TNC opens a
pop-up window with the most recently selected files
If desired, use the arrow keys to select the program
that you want to run. Load with the ENT key
Further information on this topic
File management: See "Working with the file manager" on page 95

Starting the program

Press the NC start key: The TNC runs the active
program
Further information on this topic
Running programs: See "Program run" on page 330
54 First steps with the TNC 128
Page 55

Introduction

Page 56
2.1 The TNC 128
The TNC 128 is a workshop-oriented straight cut control that enables you to program conventional machining operations right at the machine in an easy-to-use conversational programming language. They are designed for milling, drilling and boring machines with up to 3 axes. You can also change the angular position of the spindle under program control.
Keyboard and screen layout are clearly arranged in such a way that the functions are fast and easy to use.

2.1 The TNC 128

Programming: HEIDENHAIN conversational format

The HEIDENHAIN conversational programming format is an especially easy method of writing programs. Interactive graphics illustrate the individual machining steps for programming the contour. Workpiece machining can be graphically simulated either during or before actual machining.
You can also enter and test one program while the control is running another.

Compatibility

Machining programs created on the HEIDENHAIN TNC 124 straight cut control may not always run on the TNC 128. If NC blocks contain invalid elements, the TNC will mark them as ERROR blocks when the file is opened.
56 Introduction
Page 57
2.2 Visual display unit and
1
3
4
4
5
77
8
2
1
6
9
keyboard

Visual display unit

The TNC is shipped with a 12.1-inch TFT flat-panel display.
1 Header
When the TNC is on, the selected operating modes are shown in the screen header: the machining mode at the left and the programming mode at right. The currently active operating mode is displayed in the larger box, where the dialog prompts and TNC messages also appear (unless the TNC is showing only graphics).
2 Soft keys
In the footer the TNC indicates additional functions in a soft-key row. You can select these functions by pressing the keys immediately below them. The thin bars immediately above the soft-key row indicate the number of soft-key rows that can be called with the arrow keys to the right and left. The bar representing the active soft-key row is highlighted.
3 Soft-key selection keys 4 Shifting between soft-key rows 5 Setting the screen layout 6 Shift key for switchover between machining and programming
modes
7 Soft-key selection keys for machine tool builders 8 Switching the soft-key rows for machine tool builders 9 USB connection

2.2 Visual display unit and keyboard

HEIDENHAIN TNC 128 57
Page 58

Setting the screen layout

You select the screen layout yourself: In the PROGRAMMING AND EDITING mode of operation, for example, you can have the TNC show program blocks in the left window while the right window displays programming graphics. As an alternative, the program can be displayed in a large window. The available screen windows depend on the selected operating mode.
To change the screen layout:
Press the screen layout key: The soft-key row shows the available layout options (see "Operating modes", page 60)
Select the desired screen layout
2.2 Visual display unit and keyboard
58 Introduction
Page 59

Operating panel

1
7
5
1
3
2
4
6
8
The TNC 128 is delivered with an integrated keyboard. The figure at right shows the controls and displays of the keyboard:
1 File management
CalculatorMOD functionHELP function
2 Programming modes 3 Machine operating modes 4 Initiation of programming dialog 5 Arrow keys and GOTO jump command 6 Numerical input and axis selection 7 Navigation keys 8 Machine operating panel
The functions of the individual keys are described on the inside front cover.
The keys on the operating panel are assigned to machine­dependent functions. Refer to your machine manual.
Machine panel buttons, e.g. NC START or NC STOP, are described in the manual for your machine tool.
2.2 Visual display unit and keyboard
HEIDENHAIN TNC 128 59
Page 60
2.3 Operating modes

Manual Operation and El. Handwheel

The Manual Operation mode is required for setting up the machine tool. In this operating mode, you can position the machine axes manually or by increments and set the datums.
The El. Handwheel mode of operation allows you to move the machine axes manually with the HR electronic handwheel.
Soft keys for selecting the screen layout (select as described previously)
Window Soft key

2.3 Operating modes

Positions
Left: positions, right: status display

Positioning with Manual Data Input

This mode of operation is used for programming simple traversing movements, such as for face milling or prepositioning.
Soft keys for selecting the screen layout
Window Soft key
Program
Left: program blocks, right: status display
60 Introduction
Page 61

Programming and Editing

In this mode of operation you can write your part programs. The various cycles and Q-parameter functions help you with programming and adding necessary information. If desired, you can have the programming graphics show the programmed paths of traverse.
Soft keys for selecting the screen layout
Window Soft key
Program
Left: program, right: program structure
Left: program blocks, right: graphics

Test Run

In the Test Run mode of operation, the TNC checks programs and program sections for errors, such as geometrical incompatibilities, missing or incorrect data within the program or violations of the working space. This simulation is supported graphically in different display modes.
Soft keys for selecting the screen layout: see "Program Run, Full Sequence and Program Run, Single Block", page 62.
2.3 Operating modes
HEIDENHAIN TNC 128 61
Page 62

Program Run, Full Sequence and Program Run, Single Block

In the Program Run, Full Sequence mode of operation the TNC executes a part program continuously to its end or to a manual or programmed stop. You can resume program run after an interruption.
In the Program Run, Single Block mode of operation you execute each block separately by pressing the machine START button.
Soft keys for selecting the screen layout
Window Soft key
Program
2.3 Operating modes
Left: program, right: program structure
Left: program, right: status
Left: program, right: graphics
Graphics
62 Introduction
Page 63
2.4 Status displays
ACTL.
X Y Z
F S M

"General" status display

The status display in the lower part of the screen informs you of the current state of the machine tool. It is displayed automatically in the following modes of operation:
Program Run, Single Block and Program Run, Full Sequence, except
if the screen layout is set to display graphics only, and
Positioning with Manual Data Input (MDI).
In the Manual Operation and El. Handwheel modes the status display appears in the large window.
Information in the status display
Symbol Meaning
Actual or nominal coordinates of the current position
Machine axes; the TNC displays auxiliary axes in lower-case letters. The sequence and quantity of displayed axes is determined by the machine tool builder. Refer to your machine manual for more information
The displayed feed rate in inches corresponds to one tenth of the effective value. Spindle speed S, feed rate F and active M functions

2.4 Status displays

Axis is clamped
Axis can be moved with the handwheel
No active program
Program run has started
Program run is stopped
Program run is being aborted
HEIDENHAIN TNC 128 63
Page 64

Additional status displays

The additional status displays contain detailed information on the program run. They can be called in all operating modes except for the Programming and Editing mode of operation.
To switch on the additional status display:
Call the soft-key row for screen layout
2.4 Status displays
To select an additional status display:
The available status displays described below can be selected either directly by soft key or with the switch-over soft keys.
Select the screen layout with additional status display: In the right half of the screen, the TNC shows the Overview status form
Switch the soft-key rows until the STATUS soft keys appear
Either select the additional status display directly by soft key, e.g. positions and coordinates, or
use the switch-over soft keys to select the desired view
Please note that some of the status information described below is not available unless the associated software option is enabled on your TNC.
64 Introduction
Page 65
Overview
After switch-on, the TNC displays the Overview status form, provided that you have selected the PROGRAM+STATUS screen layout (or POSITION + STATUS). The overview form contains a summary of the most important status information, which you can also find on the various detail forms.
Soft key Meaning
Position display
Tool information
Active M functions
Active coordinate transformations
Active subprogram
Active program section repeat
Program called with PGM CALL
Current machining time
Name of the active main program
General program information (PGM tab)
Soft key Meaning
No direct selection possible
Name of the active main program
Dwell time counter
Machining time when the program was completely simulated in the Test Run operating mode
2.4 Status displays
Active programs
HEIDENHAIN TNC 128 65
Page 66
Program section repeat/Subprograms (LBL tab)
Soft key Meaning
No direct selection possible
Information on standard cycles (CYC tab)
2.4 Status displays
Soft key Meaning
No direct selection possible
Active program section repeats with block number, label number, and number of programmed repeats/repeats yet to be run
Active subprogram numbers with block number in which the subprogram was called and the label number that was called
Active machining cycle
66 Introduction
Page 67
Active miscellaneous functions M (M tab)
Soft key Meaning
No direct selection possible
List of the active M functions with fixed meaning
List of the active M functions that are adapted by your machine manufacturer
2.4 Status displays
HEIDENHAIN TNC 128 67
Page 68
Positions and coordinates (POS tab)
Soft key Meaning
Type of position display, e.g. actual position
Information on tools (TOOL tab)
Soft key Meaning
T: Tool number and nameRT: Number and name of a replacement tool
2.4 Status displays
Tool axis
Tool length and radii
Oversizes (delta values) from the tool table (TAB) and the TOOL CALL (PGM)
Tool life, maximum tool life (TIME 1) and maximum tool life for TOOL CALL (TIME 2)
Display of the active tool and the (next) replacement tool
68 Introduction
Page 69
Tool measurement (TT tab)
The TNC displays the TT tab only if the function is active on your machine.
Soft key Meaning
No direct selection possible
Number of the tool to be measured
Display whether the tool radius or the tool length is being measured
MIN and MAX values of the individual cutting edges and the result of measuring the rotating tool (DYN = dynamic measurement)
Cutting edge number with the corresponding measured value. If the measured value is followed by an asterisk, the permissible tolerance in the tool table was exceeded
Coordinate transformations (TRANS tab)
Soft key Meaning
Name of the active datum table
Active datum number (#), comment from the active line of the active datum number (DOC) from Cycle 7
Active datum shift (Cycle 7); The TNC displays an active datum shift in up to 8 axes
Mirrored axes (Cycle 8)
Active scaling factor/factors (Cycles 11 / 26); The TNC displays an active scaling factor in up to 6 axes
2.4 Status displays
Scaling datum
For further information, refer to the User's Manual for Cycles, "Coordinate Transformation Cycles."
HEIDENHAIN TNC 128 69
Page 70
Displaying Q parameters (QPARA tab)
Soft key Meaning
Display the current values of the defined Q parameters
Display the character strings of the defined string parameters
Press the Q PARAMETER LIST soft key. The TNC opens a
2.4 Status displays
pop-up window in which you can enter the desired range for display of the Q parameters or string parameters. Multiple Q parameters are entered separated by commas (e.g. Q 1,2,3,4). To define display ranges, enter a hyphen (e.g. Q 10-14).
70 Introduction
Page 71
2.5 Window manager
The machine tool builder determines the scope of function and behavior of the window manager. The machine manual provides further information.
The TNC features the Xfce window manager. Xfce is a standard application for UNIX-based operating systems, and is used to manage graphical user interfaces. The following functions are possible with the window manager:
Display a task bar for switching between various applications (user
interfaces).
Manage an additional desktop, on which special applications from
your machine tool builder can run.
Control the focus between NC-software applications and those of
the machine tool builder.
The size and position of pop-up windows can be changed. It is also
possible to close, minimize and restore the pop-up windows.
The TNC shows a star in the upper left of the screen if an application of the window manager or the window manager itself has caused an error. In this case, switch to the window manager and correct the problem. If required, refer to your machine manual.

2.5 Window manager

HEIDENHAIN TNC 128 71
Page 72

Task bar

In the task bar you can choose different workspaces by mouse click. The TNC provides the following workspaces:
Workspace 1: Active mode of operationWorkspace 2: Active programming modeWorkspace 3: Manufacturer's applications (optionally available)
In the task bar you can also select other applications that you have started together with the TNC (switch for example to the PDF viewer or TNCguide).
Click the green HEIDENHAIN symbol to open a menu in which you can get information, make settings or start applications. The following functions are available:
2.5 Window manager
About Xfce: Information on the Windows manager XfceAbout HEROS: Information about the operating system of the TNCNC Control: Start and stop the TNC software. Only permitted for
diagnostic purposes
Web Browser: Start Mozilla FirefoxDiagnostics: Available only to authorized specialists to start
diagnostic functions
Settings: Configuration of miscellaneous settings
Date/Time: Set the date and timeLanguage: Language setting for the system dialogs. During startup
the TNC overwrites this setting with the language setting of MP 7230
Network: Network settingReset WM-Conf: Restore basic settings of the Windows Manager.
May also reset settings implemented by your machine manufacturer
Screensaver: Settings for the screen saver; several are availableShares: Configure network connections
Tools: Only for authorized users. The applications available under
tools can be started directly by selecting the pertaining file type in the file management of the TNC (see "File management: Fundamentals" on page 92)
72 Introduction
Page 73
2.6 Accessories: HEIDENHAIN 3-D touch probes and electronic handwheels

3-D touch probes

The various HEIDENHAIN 3-D touch probes enable you to:
Quickly and precisely set datumsMeasure the workpiece
TS 220 and KT 130 touch trigger probes
These touch probes are particularly effective for datum setting and workpiece measurement. The TS 220 and KT 130 touch probes transmit the triggering signals to the TNC via cable.
Principle of operation: HEIDENHAIN triggering touch probes feature a wear resisting optical switch that generates an electrical signal as soon as the stylus is deflected. This signal is transmitted to the control, which stores the current position of the stylus as the actual value.

HR electronic handwheels

Electronic handwheels facilitate moving the axis slides precisely by hand. A wide range of traverses per handwheel revolution is available. Apart from the HR 130 and HR 150 panel-mounted handwheels, HEIDENHAIN also offers the HR 410 portable handwheel.
HEIDENHAIN TNC 128 73

2.6 Accessories: HEIDENHAIN 3-D touch probes and electronic handwheels

Page 74
2.6 Accessories: HEIDENHAIN 3-D touch probes and electronic handwheels
74 Introduction
Page 75
Programming:
Fundamentals,
file management
Page 76
3.1 Fundamentals
Y
X
Z
X (Z,Y)
X
MP
Y
X
Z

Position encoders and reference marks

The machine axes are equipped with position encoders that register the positions of the machine table or tool. Linear axes are usually equipped with linear encoders, rotary tables and tilting axes with angle encoders.
When a machine axis moves, the corresponding position encoder generates an electrical signal. The TNC evaluates this signal and calculates the precise actual position of the machine axis.

3.1 Fundamentals

If there is a power interruption, the calculated position will no longer correspond to the actual position of the machine slide. To recover this association, incremental position encoders are provided with reference marks. The scales of the position encoders contain one or more reference marks that transmit a signal to the TNC when they are crossed over. From that signal the TNC can re-establish the assignment of displayed positions to machine positions. For linear encoders with distance-coded reference marks, the machine axes need to move by no more than 20 mm, for angle encoders by no more than 20°.
With absolute encoders, an absolute position value is transmitted to the control immediately upon switch-on. In this way the assignment of the actual position to the machine slide position is re-established directly after switch-on.

Reference system

A reference system is required to define positions in a plane or in space. The position data are always referenced to a predetermined point and are described through coordinates.
The Cartesian coordinate system (a rectangular coordinate system) is based on the three coordinate axes X, Y and Z. The axes are mutually perpendicular and intersect at one point called the datum. A coordinate identifies the distance from the datum in one of these directions. A position in a plane is thus described through two coordinates, and a position in space through three coordinates.
Coordinates that are referenced to the datum are referred to as absolute coordinates. Relative coordinates are referenced to any other known position (reference point) you define within the coordinate system. Relative coordinate values are also referred to as incremental coordinate values.
76 Programming: Fundamentals, file management
Page 77

Reference system on milling machines

+X
+Y
+Z
+X
+Z
+Y
W+
C+
B+
V+
A+
U+
Y
X
Z
When using a milling machine, you orient tool movements to the Cartesian coordinate system. The illustration at right shows how the Cartesian coordinate system describes the machine axes. The figure illustrates the right-hand rule for remembering the three axis directions: the middle finger points in the positive direction of the tool axis from the workpiece toward the tool (the Z axis), the thumb points in the positive X direction, and the index finger in the positive Y direction.
The TNC 128 can control up to 4 axes optionally. The axes U, V and W are secondary linear axes parallel to the main axes X, Y and Z, respectively. Rotary axes are designated as A, B and C. The illustration at lower right shows the assignment of secondary axes and rotary axes to the main axes.

Designation of the axes on milling machines

The X, Y and Z axes on your milling machine are also referred to as tool axis, principal axis (1st axis) and secondary axis (2nd axis). The assignment of the tool axis is decisive for the assignment of the principal and secondary axes.
Tool axis Principal axis Secondary axis
XYZ
YZX
3.1 Fundamentals
ZXY
HEIDENHAIN TNC 128 77
Page 78

Absolute and incremental workpiece positions

X
Y
2
1
3
10 30 50
10
20
30
X
Y
20
10 10
20
10
5
4
6
10
Absolute workpiece positions
Absolute coordinates are position coordinates that are referenced to the datum of the coordinate system (origin). Each position on the workpiece is uniquely defined by its absolute coordinates.
Example 1: Holes dimensioned in absolute coordinates Hole 1 Hole 2 Hole 3
X = 10 mm X = 30 mm X = 50 mm Y = 10 mm Y = 20 mm Y = 30 mm
3.1 Fundamentals
Incremental workpiece positions
Incremental coordinates are referenced to the last programmed nominal position of the tool, which serves as the relative (imaginary) datum. When you write an NC program in incremental coordinates, you thus program the tool to move by the distance between the previous and the subsequent nominal positions. This is why they are also referred to as chain dimensions.
To program a position in incremental coordinates, enter the prefix "I" before the axis.
Example 2: Holes dimensioned in incremental coordinates Absolute coordinates of hole 4 X = 10 mm
Y = 10 mm Hole 5, with respect to 4 Hole 6, with respect to 5
X = 20 mm X = 20 mm Y = 10 mm Y = 10 mm
78 Programming: Fundamentals, file management
Page 79

Setting the datum

Y
X
Z
MAX
MIN
X
Y
325
320
0
450 900
950
150
-150
750
0
300
±
0,1
21
3 4
7 6
5
A production drawing identifies a certain form element of the workpiece, usually a corner, as the absolute datum. When setting the datum, you first align the workpiece along the machine axes, and then move the tool in each axis to a defined position relative to the workpiece. Set the display of the TNC either to zero or to a known position value for each position. This establishes the reference system for the workpiece, which will be used for the TNC display and your part program.
If the production drawing is dimensioned in relative coordinates, simply use the coordinate transformation cycles (see User’s Manual for Cycles, Cycles for Coordinate Transformation).
If the production drawing is not dimensioned for NC, set the datum at a position or corner on the workpiece from which the dimensions of the remaining workpiece positions can be most easily measured.
The fastest, easiest and most accurate way of setting the datum is by using a 3-D touch probe from HEIDENHAIN. See "Setting the Datum with a 3-D Touch Probe" in the Touch Probe Cycles User’s Manual.
Example
The workpiece drawing shows holes (1 to 4) whose dimensions are shown with respect to an absolute datum with the coordinates X=0 Y=0. Holes 5 to 7 are dimensioned with respect to a relative datum with the absolute coordinates X=450, Y=750. With the DATUM SHIFT cycle you can temporarily set the datum to the position X=450, Y=750, to be able to program holes 5 to 7 without further calculations.
3.1 Fundamentals
HEIDENHAIN TNC 128 79
Page 80
3.2 Creating and writing programs
10 X+10 R+ F100 M3
Block number
Words
Block

Organization of an NC program in HEIDENHAIN conversational format

A part program consists of a series of program blocks. The figure at right illustrates the elements of a block.
The TNC numbers the blocks in ascending sequence. The first block of a program is identified by BEGIN PGM, the program
name and the active unit of measure. The subsequent blocks contain information on:
The workpiece blankTool callsApproaching a safe positionFeed rates and spindle speeds, as well asPath contours, cycles and other functions
The last block of a program is identified by END PGM, the program name and the active unit of measure.

3.2 Creating and writing programs

Defining the workpiece blank: BLK FORM

Immediately after initiating a new program, you define a cuboid workpiece blank. If you wish to define the blank at a later stage, press the SPEC FCT key, the PROGRAM DEFAULTS soft key, and then the BLK FORM soft key. This definition is needed for the TNC’s graphic simulation feature. The sides of the workpiece blank lie parallel to the X, Y and Z axes and can be up to 100 000 mm long. The workpiece blank is defined by two of its corner points:
MIN point: the smallest X, Y and Z coordinates of workpiece blank,
entered as absolute values
MAX point: the largest X, Y and Z coordinates of the workpiece
blank, entered as absolute or incremental values
After each tool call, HEIDENHAIN recommends always traversing to a safe position from which the TNC can position the tool for machining without causing a collision!
You only need to define the workpiece blank if you wish to run a graphic test for the program!
80 Programming: Fundamentals, file management
Page 81

Creating a new part program

You always enter a part program in the Programming and Editing mode of operation. An example of program initiation:
Select the Programming and Editing operating mode
Press the PGM MGT key to call the file manager
Select the directory in which you wish to store the new program:
FILE NAME = ALT.H
Enter the new program name and confirm your entry with the ENT key
Select the unit of measure: Press the MM or INCH soft key. The TNC switches the screen layout and initiates the dialog for defining the BLK FORM (workpiece blank)
WORKING PLANE IN GRAPHIC: XY
3.2 Creating and writing programs
Enter spindle axis, e.g. Z
WORKPIECE BLANK DEF.: MINIMUM
Enter in sequence the X, Y and Z coordinates of the MIN point and confirm each of your entries with the ENT key
WORKPIECE BLANK DEF.: MAXIMUM
Enter in sequence the X, Y and Z coordinates of the MAX point and confirm each of your entries with the ENT key
HEIDENHAIN TNC 128 81
Page 82
Example: Display the BLK form in the NC program
0 BEGIN PGM NEW MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 END PGM NEW MM
The TNC generates the block numbers as well as the BEGIN and END blocks automatically.
If you do not wish to define a blank form, cancel the dialog at Working plane in graphic: XY by pressing the DEL key.
The TNC can display the graphics only if the shortest side is at least 50 µm long and the longest side is no longer than 99 999.999 mm.
3.2 Creating and writing programs
Program begin, name, unit of measure Spindle axis, MIN point coordinates MAX point coordinates Program end, name, unit of measure
82 Programming: Fundamentals, file management
Page 83
Programming tool movements in conversational
10
format
To program a block, initiate the dialog by pressing an axis key. In the screen header, the TNC then asks you for all the information necessary to program the desired function.
Example of a positioning block
Open
COORDINATES?
Enter the target coordinate for the X axis
TOOL RADIUS COMP: R+/R–/NO COMP?
Enter "No radius compensation" and go to the next question with ENT
FEED RATE F=? / F MAX = ENT
Enter a feed rate of 100 mm/min for this path contour; go to the next question with ENT
MISCELLANEOUS FUNCTION M?
Enter the miscellaneous function M3 "spindle ON." Pressing the ENT key terminates this dialog
The program-block window displays the following line:
3 X+10 R0 F100 M3
3.2 Creating and writing programs
HEIDENHAIN TNC 128 83
Page 84
Possible feed rate input
Functions for setting the feed rate Soft key
Rapid traverse, non-modal. Exception.
Traverse feed rate automatically calculated in
TOOL CALL
Move at the programmed feed rate (unit of measure is mm/min or 1/10 inch/min). With rotary axes, the TNC interprets the feed rate in degrees/min, regardless of whether the program is written in mm or inches
Define the feed per revolution (units in mm/rev or inch/rev). Caution: In inch-programs, FU cannot be combined with M136
Define the tooth feed (units in mm/tooth or inch/tooth). The number of teeth must be defined in the tool table in the CUT. column
Functions for conversational guidance Key
3.2 Creating and writing programs
Ignore the dialog question
End the dialog immediately
Abort the dialog and erase the block
84 Programming: Fundamentals, file management
Page 85

Actual position capture

The TNC enables you to transfer the current tool position into the program, for example during
Positioning-block programmingCycle programming
To transfer the correct position values, proceed as follows:
Place the input box at the position in the block where you want to
insert a position value
Select the actual-position-capture function: In the
soft-key row the TNC displays the axes whose positions can be transferred
Select the axis: The TNC writes the current position of
the selected axis into the active input box
In the working plane the TNC always captures the coordinates of the tool center, even though tool radius compensation is active.
In the tool axis the TNC always captures the coordinates of the tool tip and thus always takes the active tool length compensation into account.
The TNC keeps the soft-key row for axis selection active until you deactivate it by pressing the actual-position­capture key again. This behavior remains in effect even if you save the current block and open a new one with a path function key. If you select a block element in which you must choose an input alternative via soft key (e.g. for radius compensation), then the TNC also closes the soft-key row for axis selection.
3.2 Creating and writing programs
HEIDENHAIN TNC 128 85
Page 86

Editing a program

You cannot edit a program while it is being run by the TNC in a machine operating mode.
While you are creating or editing a part program, you can select any desired line in the program or individual words in a block with the arrow keys or the soft keys:
Function Soft key/Keys
Go to previous page
Go to next page
Go to beginning of program
Go to end of program
Change the position of the current block on
3.2 Creating and writing programs
the screen. Press this soft key to display additional program blocks that are programmed before the current block
Change the position of the current block on the screen. Press this soft key to display additional program blocks that are programmed after the current block
Move from one block to the next
Select individual words in a block
To select a certain block, press the GOTO key, enter the desired block number, and confirm with the ENT key. Or: Enter the block number step and press the N LINES soft key to jump over the entered number of lines upward or downward
86 Programming: Fundamentals, file management
Page 87
Function Soft key/Key
Set the selected word to zero
Erase an incorrect number
Clear a (non-blinking) error message
Delete the selected word
Delete the selected block
Erase cycles and program sections
Insert the block that you last edited or deleted
Inserting blocks at any desired location
Select the block after which you want to insert a new block and
initiate the dialog
Editing and inserting words
Select a word in a block and overwrite it with the new one. The
plain-language dialog is available while the word is highlighted
To accept the change, press the END key
If you want to insert a word, press the horizontal arrow key repeatedly until the desired dialog appears. You can then enter the desired value.
3.2 Creating and writing programs
HEIDENHAIN TNC 128 87
Page 88
Looking for the same words in different blocks
To use this function, set the AUTO DRAW soft key to OFF.
Select a word in a block: Press the arrow keys repeatedly until the highlight is on the desired word
Select a block with the arrow keys
The word that is highlighted in the new block is the same as the one you selected previously.
If you have started a search in a very long program, the TNC shows a progress display window. You then have the option of canceling the search via soft key.
Finding any text
Select the search function: Press the FIND soft key. The TNC
displays the Find text: dialog prompt
Enter the text that you wish to find
3.2 Creating and writing programs
To find the text, press the FIND soft key
88 Programming: Fundamentals, file management
Page 89
Marking, copying, deleting and inserting program sections
The TNC provides certain functions for copying program sections within an NC program or into another NC program—see the table below.
To copy a program section, proceed as follows:
Select the soft-key row containing the marking functionsSelect the first (last) block of the section you wish to copyTo mark the first (last) block, press the SELECT BLOCK soft key. The
TNC then highlights the first character of the block and the CANCEL SELECTION soft key appears
Move the highlight to the last (first) block of the program section you
wish to copy or delete. The TNC shows the marked blocks in a different color. You can end the marking function at any time by pressing the CANCEL SELECTION soft key
To copy the selected program section, press the COPY BLOCK soft
key. To delete the selected section, press the DELETE BLOCK soft key. The TNC stores the selected block
Using the arrow keys, select the block after which you wish to insert
the copied (deleted) program section
To insert the section into another program, select the corresponding program using the file manager and then mark the block after which you wish to insert the copied block.
To insert the block, press the INSERT BLOCK soft keyTo end the marking function, press the CANCEL SELECTION soft
key
3.2 Creating and writing programs
Function Soft key
Switch the marking function on
Switch the marking function off
Delete the marked block
Insert the block that is stored in the buffer memory
Copy the marked block
HEIDENHAIN TNC 128 89
Page 90

The TNC search function

+40
The search function of the TNC enables you to search for any text within a program and replace it by a new text, if required.
Finding any text
If required, select the block containing the word you wish to find
Select the search function: The TNC superimposes
the search window and displays the available search functions in the soft-key row (see table of search functions)
Enter the text to be searched for. Please note that the
search is case-sensitive
Start the search process: The TNC moves to the next
block containing the text you are searching for
Repeat the search process: The TNC moves to the
next block containing the text you are searching for
End the search function
3.2 Creating and writing programs
90 Programming: Fundamentals, file management
Page 91
Finding/Replacing any text
The find/replace function is not possible if
a program is protectedthe program is currently being run by the TNC
When using the REPLACE ALL function, ensure that you do not accidentally replace text that you do not want to change. Once replaced, such text cannot be restored.
If required, select the block containing the word you wish to find
Select the Search function: The TNC superimposes
the search window and displays the available search functions in the soft-key row
Enter the text to be searched for. Please note that the
search is case-sensitive. Then confirm with the ENT key
Enter the text to be inserted. Please note that the
entry is case-sensitive
Start the search process: The TNC moves to the next
occurrence of the text you are searching for
To replace the text and then move to the next
occurrence of the text, press the REPLACE soft key. To replace all text occurrences, press the REPLACE ALL soft key. To skip the text and move to its next occurrence press the FIND soft key
End the search function
3.2 Creating and writing programs
HEIDENHAIN TNC 128 91
Page 92
3.3 File management: Fundamentals

Files

Files in the TNC Ty p e Programs
In HEIDENHAIN format In DIN/ISO format
.H .I
Tables for
Tools Tool changers Pallets Datums Points Presets Touch probes Backup files Dependent data (such as structure items)
Texts as
ASCII files Log files

3.3 File management: Fundamentals

Help files
When you write a part program on the TNC, you must first enter a program name. The TNC saves the program to the internal memory of the control as a file with the same name. The TNC can also save texts and tables as files.
The TNC provides a special file management window in which you can easily find and manage your files. Here you can call, copy, rename and erase files.
You can create folder structures in the TNC so that you can manage your files. The memory available in the control is 2GB.
Depending on the setting, the TNC generates a backup file (*.bak) after editing and saving of NC programs. This can reduce the memory space available to you.
.T .TCH .P .D .PNT .PR .TP .BAK .DEP
.A .TXT .CHM
92 Programming: Fundamentals, file management
Page 93
File names
When you store programs, tables and texts as files, the TNC adds an extension to the file name, separated by a point. This extension indicates the file type.
PROG20 .H File name File type
File names should not exceed 25 characters, otherwise the TNC cannot display the entire file name.
File names on the TNC must comply with this standard: The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (Posix-Standard). Accordingly, the file names may include the characters below:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 . _ -
You should not use any other characters in file names in order to prevent any file transfer problems.
The maximum limit for the path and file name together is 82 characters (see "Paths" on page 95).
3.3 File management: Fundamentals
HEIDENHAIN TNC 128 93
Page 94

Showing externally created files on the TNC

The TNC features several additional tools which you can use to display the files shown in the table below. Some of the files can also be edited.
File types Ty p e
PDF files Excel tables
Internet files
pdf xls csv html
Text files txt
Graphics files bmp
For further information about displaying and editing the listed file types: See "Additional tools for management of external file types" on page 109.
ini
gif jpg png

Data backup

3.3 File management: Fundamentals
We recommend saving newly written programs and files on a PC at regular intervals.
The TNCremoNT data transmission freeware from HEIDENHAIN is a simple and convenient method for backing up data stored on the TNC.
You additionally need a data medium on which all machine-specific data, such as the PLC program, machine parameters, etc., are stored. Ask your machine manufacturer for assistance, if necessary.
Saving the contents of the entire hard disk can take up to several hours. In this case, it is a good idea to save the data outside of work hours, e.g. during the night.
Take the time occasionally to delete any unneeded files so that the TNC always has enough hard-disk space for system files (such as the tool table).
Depending on operating conditions (e.g., vibration load), hard disks generally have a higher failure rate after three to five years of service. HEIDENHAIN therefore recommends having the hard disk inspected after three to five years.
94 Programming: Fundamentals, file management
Page 95
3.4 Working with the file manager
TNC:\
AUFTR1
NCPROG
WZTAB
A35K941
ZYLM
TESTPROG
HUBER
KAR25T

Directories

To ensure that you can easily find your files, we recommend that you organize your hard disk into directories. You can divide a directory into further directories, which are called subdirectories. With the –/+ key or ENT you can show or hide the subdirectories.

Paths

A path indicates the drive and all directories and subdirectories under which a file is saved. The individual names are separated by a backslash "\".
The path, including all drive characters, directory and the file name, including the extension, must not exceed 82 characters!
Drive designations must not include more than 8 uppercase letters.
Example
The directory AUFTR1 was created on the TNC:\ drive. Then, in the AUFTR1 directory, the subdirectory NCPROG was created and the part
program PROG1.H was copied into it. The part program now has the following path:
TNC:\AUFTR1\NCPROG\PROG1.H
The chart at right illustrates an example of a directory display with different paths.

3.4 Working with the file manager

HEIDENHAIN TNC 128 95
Page 96

Overview: Functions of the file manager

Function Soft key Page
Copy a file Page 101
Display a specific file type Page 98
Create new file Page 100
Display the last 10 files that were selected
Delete a file or directory Page 104
Tag a file Page 106
Rename a file Page 107
3.4 Working with the file manager
Protect a file against editing and erasure Page 108
Cancel file protection Page 108
Import tool table Page 150
Manage network drives Page 116
Select the editor Page 108
Sort files by properties Page 107
Page 104
Copy a directory Page 103
Delete directory with all its subdirectories
Display all the directories of a particular drive
Rename a directory
Create a new directory
96 Programming: Fundamentals, file management
Page 97

Calling the file manager

Press the PGM MGT key: The TNC displays the file management window (see figure for default setting. If the TNC displays a different screen layout, press the WINDOW soft key.)
The narrow window on the left shows the available drives and directories. Drives designate devices with which data are stored or transferred. One drive is the hard disk of the TNC. Other drives are the interfaces (RS232, Ethernet), which can be used, for example, for connecting a personal computer. A directory is always identified by a folder symbol to the left and the directory name to the right. Subdirectories are shown to the right of and below their parent directories. A triangle in front of the folder symbol indicates that there are further subdirectories, which can be shown with the –/+ or ENT keys.
The wide window on the right shows you all files that are stored in the selected directory. Each file is shown with additional information, illustrated in the table below.
Display Meaning
File name Name with max. 25 characters
Type File type
Bytes File size in bytes
Status File properties:
E Program is selected in the Programming
mode of operation
S Program is selected in the Test Run mode of
operation
M Program is selected in a Program Run mode
of operation
File is protected against erasing and editing
File is protected against erasing and editing, because it is being run
Date Date that the file was last edited
Time Time that the file was last edited
3.4 Working with the file manager
HEIDENHAIN TNC 128 97
Page 98

Selecting drives, directories and files

Call the file manager
Use the arrow keys or the soft keys to move the highlight to the desired position on the screen:
Moves the highlight from the left to the right window, and vice versa
Moves the highlight up and down within a window
Moves the highlight one page up or down within a window
Step 1: Select drive
3.4 Working with the file manager
Move the highlight to the desired drive in the left window:
To select a drive, press the SELECT soft key, or
Press the ENT key
Step 2: Select a directory
Move the highlight to the desired directory in the left-hand window— the right-hand window automatically shows all files stored in the highlighted directory
98 Programming: Fundamentals, file management
Page 99
Step 3: Select a file
Press the SELECT TYPE soft key
Press the soft key for the desired file type, or
Press the SHOW ALL soft key to display all files, or
Move the highlight to the desired file in the right window:
Press the SELECT soft key, or
Press the ENT key
The TNC opens the selected file in the operating mode from which you called the file manager
3.4 Working with the file manager
HEIDENHAIN TNC 128 99
Page 100

Creating a new directory

Move the highlight in the left window to the directory in which you want to create a subdirectory
Enter the new file name, and confirm with ENT
CREATE \NEW DIRECTORY?
Press the YES soft key to confirm, or
Abort with the NO soft key

Creating a new file

3.4 Working with the file manager
Select the directory in which you wish to create the new file
Enter the new file name with the file extension, and confirm with ENT
Open the dialog box for creating a new file
Enter the new file name with the file extension, and confirm with ENT
100 Programming: Fundamentals, file management
Loading...