HEIDENHAIN TNC 640 User Manual

TNC 640

User's Manual
HEIDENHAIN Conversational Programming
NC Software 340590-02 340591-02 340594-02
English (en) 5/2013

Controls of the TNC

Controls of the TNC

Keys on visual display unit

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

Alphanumeric keyboard

Key Function
File names, comments
DIN/ISO programming

Programming modes

Key Function
Programming
Test run

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

Machine operating modes

Key Function
Manual operation
Electronic handwheel
Positioning with manual data input
Program run, single block
Program run, full sequence
Show calculator

Navigation keys

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

Potentiometer for feed rate and spindle speed

Feed rate Spindle speed
2
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual

Cycles, subprograms and program section repeats

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

Tool functions

Key Function
Define tool data in 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

Entering and editing coordinate axes and numbers

Key Function
Select coordinate axes or enter
. . . .
. . . .
them in a program
Numbers
Decimal point / Reverse algebraic sign

Programming path movements

Key Function
Approach/depart contour
FK free contour programming
Straight line
Circle center/pole for polar coordinates
Circular arc with center
Circle with radius
Circular arc with tangential connection
Chamfer/Corner rounding
Polar coordinate input / Incremental values
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
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
3
Controls of the TNC
4
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual

Fundamentals

Fundamentals

About this manual

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 workpiece Danger to fixtures Danger to tool Danger to machine Danger to operator
This symbol indicates a possibly dangerous situation that may cause light injuries if not avoided.
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.

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.
6
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual

TNC model, software and features

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 640 340590-02 TNC 640 E 340591-02 TNC 640 Programming Station 340594-02
The suffix E indicates the export version of the TNC. The export version of the TNC has the following limitations:
Simultaneous linear movement in up to 4 axes
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:
Tool measurement with the TT
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.
User's Manual for Cycle Programming:
All of the cycle functions (touch probe cycles and fixed cycles) are described in the Cycle Programming User’s Manual. Please contact HEIDENHAIN if you require a copy of this User’s Manual. ID: 892905-xx
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
7
Fundamentals
TNC model, software and features

Software options

The TNC 640 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:
Hardware, options
1st additional axis for 4 axes plus spindle
2nd additional axis for 5 axes plus spindle
Software option 1 (option number 08) Rotary table machining
Coordinate transformation Interpolation
Software option 2 (option number 09) 3-D machining
Interpolation
HEIDENHAIN DNC (option number 18)
Display step (Option number 23)
step
Programming of cylindrical contours as if in two axes Feed rate in distance per minute Working plane, tilting the ... Circle in 3 axes with tilted working plane (spacial arc)
Motion control with minimum jerk 3-D tool compensation through surface normal vectors Using the electronic handwheel to change the angle of the swivel head
during program run without affecting the position of the tool point. (TCPM = Tool Center Point Management)
Keeping the tool normal to the contour Tool radius compensation perpendicular to traversing and tool direction Linear in 5 axes (subject to export permit)
Communication with external PC applications over COM component
Linear axes to 0.01 µmInput resolution and display Rotary axes to 0.00001°
Dynamic Collision Monitoring (DCM) software option (option number 40) Collision monitoring in all
machine operating modes
Software option for additional conversational languages (option number 41) Additional conversational
languages
8
The machine manufacturer defines objects to be monitored
Three warning levels in manual operation
Program interrupt during automatic operation
Includes monitoring of 5-axis movements
Slovenian
Norwegian
Slovak
Latvian
Korean
Estonian
Turkish
Romanian
Lithuanian
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
TNC model, software and features
DXF Converter software option (option number 42) Extracting contour
programs and machining positions from DXF data. Extracting contour sections from plain-language programs.
Adaptive Feed Control (AFC) software option (option number 45) Function for adaptive feed-
rate control for optimizing the machining conditions during series production
KinematicsOpt software option (option number 48) Touch-probe cycles for
automatic testing and optimization of the machine kinematics
Mill-Turning software option (option number 50) Functions for milling/turning
mode
Supported DXF format: AC1009 (AutoCAD R12)
For contours and point patterns
Simple and convenient specification of reference points
Select graphical features of contour sections from conversational
programs
Recording the actual spindle power by means of a teach-in cut
Defining the limits of automatic feed rate control
Fully automatic feed control during program run
Backup/restore active kinematics
Test active kinematics
Optimize active kinematics
Switching between Milling/Turning mode of operation
Constant cutting speed
Tool-tip radius compensation
Turning cycles
Extended Tool Managment software option (option number 93)
Extended tool management, python-based
Remote Desktop Manager software option (option number 133)
Windows on a separate computer unitRemote operation of
external computer units (e.g. Windows PC) via the TNC user interface
Incorporated in the TNC interface
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
9
Fundamentals
Cross Talk Compensation (CTC) software option (option number 141)
TNC model, software and features
Compensation of axis couplings
Position Adaptive Control (PAC) software option (option number 142) Changing control
parameters
Load Adaptive Control (LAC) software option (option number 143)
parameters
Active Chatter Control (ACC) software option (option number 145)
Fully automatic function for chatter control during machining
Determination of dynamically caused position deviation through axis
acceleration Compensation of the TCP
Changing of the control parameters depending on the position of the
axes in the working space Changing of the control parameters depending on the speed or
acceleration of an axis
Automatic determination of workpiece weight and frictional forcesDynamic changing of control
Continuous adaptation of the parameters of the adaptive precontrolling
to the actual weight of the workpiece during machining
10
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
TNC model, software and features

Feature Content Level (upgrade functions)

Along with software options, significant further improvements of the TNC software are managed via the Feature Content Level 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.

Legal information

This product uses open source software. Further information is available on the control under
Programming and Editing operating mode MOD function LICENSE INFO soft key
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
11
Fundamentals
TNC model, software and features

New functions

New functions 34059x-02
DXF files can be opened directly on the TNC in order to extract contours and point patterns (Programming: Data transfer from DXF files or plain-language contours, page 243).
The active tool-axis direction can now be activated in manual mode and during handwheel superimposition as a virtual tool axis (Superimposing handwheel positioning during program run: M118 , page 360).
The machine manufacturer can now define any areas on the machine for collision monitoring (Dynamic Collision Monitoring (software option), page 371).
Writing and reading data in freely definable tables (Freely definable tables, page 402).
The Adaptive Feed Control (AFC) function has been integrated (Adaptive Feed Control Software Option (AFC), page 377)
New touch probe cycle 484 for calibrating the wireless TT 449 tool touch probe (see User's Manual for Cycles).
The new HR 520 and HR 550 FS handwheels are supported (Traverse with electronic handwheels, page 490).
New machining cycle 225 ENGRAVING (see User’s Manual for Cycle Programming)
New Active Chatter Control (ACC) software option (Active Chatter Control (ACC; software option), page 389).
New manual probing cycle "Center line as datum" (Setting a center line as datum , page 535).
New function for rounding corners (Rounding corners: M197, page 366).
External access to the TNC can now be blocked with a MOD function (External access, page 584).
12
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
TNC model, software and features
Modified functions 34059x-02
The maximum number of characters for the NAME and DOC fields in the tool table has been increased from 16 to 32 (Enter tool data into the table, page 160).
The columns AFC and ACC were added to the tool table (Enter tool data into the table, page 160).
Operation and position behavior of the manual probing cycles has been improved (Using 3-D touch probes , page 514).
Predefined values can now be entered into a cycle parameter with the PREDEF function in cycles (see User’s Manual for Cycle Programming).
The status display has been expanded with the AFC tab (Additional status displays, page 76).
The FUNCTION TURNDATA SPIN rotational function has been expanded with an input option for maximum speed (Program spindle speed, page 464).
A new optimization algorithm is now used with the KinematicsOpt cycles (see User’s Manual for Cycle Programming).
With Cycle 257, circular stud milling, a parameter is now available with which you can determine the approach position on the stud (see User's Manual for Cycle Programming)
With Cycle 256, rectangular stud, a parameter is now available with which you can determine the approach position on the stud (see User's Manual for Cycle Programming).
With the "Basic Rotation" probing cycle, workpiece misalignment can now be compensated for via a table rotation (Compensation of workpiece misalignment by rotating the table, page 528)
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
13
Fundamentals
TNC model, software and features
14
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual

Contents

1 First Steps with the TNC 640......................................................................................................... 47
2 Introduction.......................................................................................................................................69
3 Programming: Fundamentals, file management...........................................................................89
4 Programming: Programming aids................................................................................................ 131
5 Programming: Tools....................................................................................................................... 155
6 Programming: Programming contours........................................................................................ 191
7 Programming: Data transfer from DXF files or plain-language contours................................. 243
8 Programming: Subprograms and program section repeats...................................................... 261
9 Programming: Q Parameters.........................................................................................................277
10 Programming: Miscellaneous functions.......................................................................................347
11 Programming: Special functions.................................................................................................. 367
12 Programming: Multiple Axis Machining...................................................................................... 409
13 Programming: Pallet editor........................................................................................................... 453
14 Programming: Turning Operations............................................................................................... 459
15 Manual operation and setup.........................................................................................................485
16 Positioning with Manual Data Input............................................................................................ 547
17 Test run and program run............................................................................................................. 553
18 MOD functions................................................................................................................................581
19 Tables and overviews.....................................................................................................................605
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
15
Contents
16
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
1 First Steps with the TNC 640......................................................................................................... 47
1.1 Overview................................................................................................................................................. 48
1.2 Machine switch-on.................................................................................................................................48
Acknowledging the power interruption and moving to the reference points...........................................48
1.3 Programming the first part...................................................................................................................49
Selecting the correct operating mode..................................................................................................... 49
The most important TNC keys.................................................................................................................49
Creating a new program/file management.............................................................................................. 50
Defining a workpiece blank......................................................................................................................51
Program layout......................................................................................................................................... 52
Programming a simple contour................................................................................................................53
Creating a cycle program......................................................................................................................... 56
1.4 Graphically testing the first part..........................................................................................................58
Selecting the correct operating mode..................................................................................................... 58
Selecting the tool table for the test run..................................................................................................58
Choosing the program you want to test................................................................................................. 59
Selecting the screen layout and the view............................................................................................... 59
Starting the test run.................................................................................................................................60
1.5 Setting up tools..................................................................................................................................... 61
Selecting the correct operating mode..................................................................................................... 61
Preparing and measuring tools................................................................................................................ 61
The tool table TOOL.T............................................................................................................................. 62
The pocket table TOOL_P.TCH.................................................................................................................63
1.6 Workpiece setup.....................................................................................................................................64
Selecting the correct operating mode..................................................................................................... 64
Clamping the workpiece.......................................................................................................................... 64
Workpiece alignment with 3-D touch probe............................................................................................ 65
Datum setting with 3-D touch probe....................................................................................................... 66
1.7 Running the first program.................................................................................................................... 67
Selecting the correct operating mode..................................................................................................... 67
Choosing the program you want to run.................................................................................................. 67
Start the program.....................................................................................................................................67
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
17
Contents
2 Introduction.......................................................................................................................................69
2.1 The TNC 640........................................................................................................................................... 70
Programming: HEIDENHAIN conversational and ISO formats.................................................................70
Compatibility.............................................................................................................................................70
2.2 Visual display unit and operating panel..............................................................................................71
Display screen..........................................................................................................................................71
Setting the screen layout.........................................................................................................................71
Control Panel............................................................................................................................................72
2.3 Modes of Operation...............................................................................................................................73
Manual Operation and El. Handwheel.....................................................................................................73
Positioning with Manual Data Input.........................................................................................................73
Programming............................................................................................................................................ 73
Test Run................................................................................................................................................... 74
Program Run, Full Sequence and Program Run, Single Block.................................................................74
2.4 Status displays....................................................................................................................................... 75
"General" status display............................................................................................................................75
Additional status displays.........................................................................................................................76
2.5 Window Manager...................................................................................................................................83
Task bar.................................................................................................................................................... 84
2.6 SELinux security software.....................................................................................................................85
2.7 Accessories: HEIDENHAIN 3-D Touch Probes and Electronic Handwheels.......................................86
3-D touch probes..................................................................................................................................... 86
HR electronic handwheels....................................................................................................................... 87
18
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
3 Programming: Fundamentals, file management...........................................................................89
3.1 Fundamentals......................................................................................................................................... 90
Position encoders and reference marks.................................................................................................. 90
Reference system.................................................................................................................................... 90
Reference system on milling machines...................................................................................................91
Designation of the axes on milling machines..........................................................................................91
Polar coordinates...................................................................................................................................... 92
Absolute and incremental workpiece positions....................................................................................... 93
Selecting the datum.................................................................................................................................94
3.2 Opening programs and entering.......................................................................................................... 95
Organization of an NC program in HEIDENHAIN Conversational format.................................................95
Define the blank: BLK FORM.................................................................................................................. 95
Opening a new part program.................................................................................................................. 96
Programming tool movements in conversational.....................................................................................97
Actual position capture.............................................................................................................................99
Editing a program...................................................................................................................................100
The TNC search function....................................................................................................................... 103
3.3 File manager: Fundamentals...............................................................................................................105
Files........................................................................................................................................................ 105
Displaying externally generated files on the TNC..................................................................................107
Data Backup........................................................................................................................................... 107
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
19
Contents
3.4 Working with the file manager.......................................................................................................... 108
Directories.............................................................................................................................................. 108
Paths.......................................................................................................................................................108
Overview: Functions of the file manager.............................................................................................. 109
Calling the file manager......................................................................................................................... 110
Selecting drives, directories and files....................................................................................................111
Creating a new directory....................................................................................................................... 112
Creating a new file.................................................................................................................................112
Copying a single file...............................................................................................................................112
Copying files into another directory.......................................................................................................113
Copying a table...................................................................................................................................... 114
Copying a directory................................................................................................................................ 115
Choosing one of the last files selected.................................................................................................115
Deleting a file.........................................................................................................................................116
Deleting a directory................................................................................................................................116
Tagging files........................................................................................................................................... 117
Renaming a file...................................................................................................................................... 118
Sorting files............................................................................................................................................ 118
Additional functions................................................................................................................................119
Additional tools for management of external file types.........................................................................120
Data transfer to/from an external data medium.................................................................................... 125
The TNC in a network............................................................................................................................127
USB devices on the TNC.......................................................................................................................128
20
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
4 Programming: Programming aids................................................................................................ 131
4.1 Adding comments................................................................................................................................132
Application.............................................................................................................................................. 132
Entering comments during programming..............................................................................................132
Inserting comments after program entry.............................................................................................. 132
Entering a comment in a separate block...............................................................................................132
Functions for editing of the comment...................................................................................................133
4.2 Display of NC Programs...................................................................................................................... 134
Syntax highlighting................................................................................................................................. 134
Scrollbar..................................................................................................................................................134
4.3 Structuring programs...........................................................................................................................135
Definition and applications..................................................................................................................... 135
Displaying the program structure window / Changing the active window.............................................135
Inserting a structuring block in the (left) program window.................................................................... 135
Selecting blocks in the program structure window............................................................................... 135
4.4 Calculator.............................................................................................................................................. 136
Operation................................................................................................................................................136
4.5 Programming graphics........................................................................................................................ 138
Generating / not generating graphics during programming................................................................... 138
Generating a graphic for an existing program....................................................................................... 138
Block number display ON/OFF...............................................................................................................139
Erasing the graphic................................................................................................................................ 139
Showing grid lines..................................................................................................................................139
Magnification or reduction of details..................................................................................................... 140
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
21
Contents
4.6 Error messages..................................................................................................................................... 141
Display of errors.....................................................................................................................................141
Open the error window......................................................................................................................... 141
Closing the error window...................................................................................................................... 141
Detailed error messages........................................................................................................................142
INTERNAL INFO soft key.......................................................................................................................142
Clearing errors........................................................................................................................................143
Error log..................................................................................................................................................143
Keystroke log..........................................................................................................................................144
Informational texts................................................................................................................................. 145
Saving service files................................................................................................................................ 145
Calling the TNCguide help system........................................................................................................ 146
4.7 TNCguide context-sensitive help system..........................................................................................147
Application.............................................................................................................................................. 147
Working with the TNCguide.................................................................................................................. 148
Downloading current help files.............................................................................................................. 152
22
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
5 Programming: Tools....................................................................................................................... 155
5.1 Entering tool-related data................................................................................................................... 156
Feed rate F.............................................................................................................................................156
Spindle speed S..................................................................................................................................... 157
5.2 Tool data................................................................................................................................................158
Requirements for tool compensation.................................................................................................... 158
Tool number, tool name......................................................................................................................... 158
Tool length L.......................................................................................................................................... 158
Tool radius R.......................................................................................................................................... 158
Delta values for lengths and radii.......................................................................................................... 159
Entering tool data into the program...................................................................................................... 159
Enter tool data into the table.................................................................................................................160
Importing tool tables..............................................................................................................................169
Pocket table for tool changer.................................................................................................................170
Call tool data.......................................................................................................................................... 173
Tool change............................................................................................................................................ 175
Tool usage test.......................................................................................................................................178
Tool management (software option)...................................................................................................... 180
5.3 Tool compensation............................................................................................................................... 187
Introduction.............................................................................................................................................187
Tool length compensation...................................................................................................................... 187
Tool radius compensation...................................................................................................................... 188
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
23
Contents
6 Programming: Programming contours........................................................................................ 191
6.1 Tool movements................................................................................................................................... 192
Path functions........................................................................................................................................ 192
FK free contour programming................................................................................................................192
Miscellaneous functions M....................................................................................................................192
Subprograms and program section repeats.......................................................................................... 193
Programming with Q parameters.......................................................................................................... 193
6.2 Fundamentals of Path Functions........................................................................................................194
Programming tool movements for workpiece machining......................................................................194
6.3 Approaching and departing a contour...............................................................................................198
Overview: Types of paths for contour approach and departure.............................................................198
Important positions for approach and departure....................................................................................199
Approaching on a straight line with tangential connection: APPR LT.................................................... 201
Approaching on a straight line perpendicular to the first contour point: APPR LN................................ 201
Approaching on a circular path with tangential connection: APPR CT...................................................202
Approaching on a circular path with tangential connection from a straight line to the contour: APPR
LCT......................................................................................................................................................... 203
Departing in a straight line with tangential connection: DEP LT........................................................... 204
Departing in a straight line perpendicular to the last contour point: DEP LN........................................ 204
Departing on a circular path with tangential connection: DEP CT.........................................................205
Departing on a circular arc tangentially connecting the contour and a straight line: DEP LCT...............205
6.4 Path contours - Cartesian coordinates...............................................................................................206
Overview of path functions................................................................................................................... 206
Straight line L.........................................................................................................................................207
Inserting a chamfer between two straight lines....................................................................................208
Corner rounding RND.............................................................................................................................209
24
Circle center CC..................................................................................................................................... 210
Circular path C around circle center CC................................................................................................ 211
Circle CR with defined radius................................................................................................................ 212
Circle CT with tangential connection.....................................................................................................214
Example: Linear movements and chamfers with Cartesian coordinates............................................... 215
Example: Circular movements with Cartesian coordinates................................................................... 216
Example: Full circle with Cartesian coordinates.................................................................................... 217
TNC 640 | User's Manual
HEIDENHAIN Conversational Programming | 5/2013
6.5 Path contours – Polar coordinates..................................................................................................... 218
Overview................................................................................................................................................ 218
Zero point for polar coordinates: pole CC..............................................................................................219
Straight line LP.......................................................................................................................................219
Circular path CP around pole CC........................................................................................................... 220
Circle CTP with tangential connection...................................................................................................220
Helix........................................................................................................................................................221
Example: Linear movement with polar coordinates.............................................................................. 223
Example: Helix........................................................................................................................................224
6.6 Path contours – FK free contour programming................................................................................ 225
Fundamentals......................................................................................................................................... 225
FK programming graphics...................................................................................................................... 227
Initiating the FK dialog........................................................................................................................... 229
Pole for FK programming....................................................................................................................... 229
Free straight line programming..............................................................................................................230
Free circular path programming............................................................................................................. 231
Input options.......................................................................................................................................... 232
Auxiliary points....................................................................................................................................... 235
Relative data...........................................................................................................................................236
Example: FK programming 1................................................................................................................. 238
Example: FK programming 2................................................................................................................. 239
Example: FK programming 3................................................................................................................. 240
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
25
Contents
7 Programming: Data transfer from DXF files or plain-language contours................................. 243
7.1 Processing DXF Files (Software Option)........................................................................................... 244
Application.............................................................................................................................................. 244
Opening a DXF file.................................................................................................................................245
Working with the DXF converter...........................................................................................................245
Basic settings.........................................................................................................................................246
Setting layers..........................................................................................................................................248
Defining the datum................................................................................................................................ 249
Selecting and saving a contour..............................................................................................................251
Selecting and saving machining positions............................................................................................. 255
26
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
8 Programming: Subprograms and program section repeats...................................................... 261
8.1 Labeling Subprograms and Program Section Repeats.................................................................... 262
Label....................................................................................................................................................... 262
8.2 Subprograms........................................................................................................................................ 263
Operating sequence...............................................................................................................................263
Programming notes................................................................................................................................263
Programming a subprogram...................................................................................................................263
Calling a subprogram............................................................................................................................. 264
8.3 Program-section repeats..................................................................................................................... 265
Label LBL............................................................................................................................................... 265
Operating sequence...............................................................................................................................265
Programming notes................................................................................................................................265
Programming a program section repeat................................................................................................ 265
Calling a program section repeat...........................................................................................................266
8.4 Any desired program as subprogram................................................................................................ 267
Operating sequence...............................................................................................................................267
Programming notes................................................................................................................................267
Calling any program as a subprogram................................................................................................... 268
8.5 Nesting.................................................................................................................................................. 269
Types of nesting.....................................................................................................................................269
Nesting depth.........................................................................................................................................269
Subprogram within a subprogram......................................................................................................... 270
Repeating program section repeats.......................................................................................................271
Repeating a subprogram........................................................................................................................272
8.6 Programming examples.......................................................................................................................273
Example: Milling a contour in several infeeds.......................................................................................273
Example: Groups of holes..................................................................................................................... 274
Example: Group of holes with several tools..........................................................................................275
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
27
Contents
9 Programming: Q Parameters.........................................................................................................277
9.1 Principle and overview of functions.................................................................................................. 278
Programming notes................................................................................................................................279
Calling Q parameter functions............................................................................................................... 280
9.2 Part families—Q parameters in place of numerical values.............................................................. 281
Application.............................................................................................................................................. 281
9.3 Describing contours with mathematical functions.......................................................................... 282
Application.............................................................................................................................................. 282
Overview................................................................................................................................................ 282
Programming fundamental operations...................................................................................................283
9.4 Angle functions (trigonometry)..........................................................................................................284
Definitions...............................................................................................................................................284
Programming trigonometric functions................................................................................................... 284
9.5 Calculation of circles............................................................................................................................285
Application.............................................................................................................................................. 285
9.6 If-then decisions with Q parameters................................................................................................. 286
Application.............................................................................................................................................. 286
Unconditional jumps...............................................................................................................................286
Programming if-then decisions.............................................................................................................. 286
Abbreviations used:................................................................................................................................287
9.7 Checking and changing Q parameters...............................................................................................288
Procedure............................................................................................................................................... 288
9.8 Additional functions.............................................................................................................................290
Overview................................................................................................................................................ 290
FN 14: ERROR: Displaying error messages...........................................................................................291
FN 16: F-PRINT: Output of formatted texts and Q parameter values.....................................................295
FN 18: SYS-DATUM READ: Reading system data................................................................................. 299
FN 19: PLC: Transfer values to PLC...................................................................................................... 308
FN 20: WAIT FOR: NC and PLC synchronization.................................................................................. 308
FN 29: PLC: Transfer values to the PLC................................................................................................310
FN 37: EXPORT......................................................................................................................................310
28
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
9.9 Accessing tables with SQL commands............................................................................................. 311
Introduction.............................................................................................................................................311
A transaction.......................................................................................................................................... 312
Programming SQL commands...............................................................................................................314
Overview of the soft keys..................................................................................................................... 314
SQL BIND...............................................................................................................................................315
SQL SELECT.......................................................................................................................................... 316
SQL FETCH............................................................................................................................................ 318
SQL UPDATE..........................................................................................................................................319
SQL INSERT...........................................................................................................................................319
SQL COMMIT........................................................................................................................................ 320
SQL ROLLBACK..................................................................................................................................... 320
9.10 Entering formulas directly...................................................................................................................321
Entering formulas...................................................................................................................................321
Rules for formulas..................................................................................................................................323
Programming example........................................................................................................................... 324
9.11 String parameters................................................................................................................................ 325
String processing functions................................................................................................................... 325
Assigning string parameters.................................................................................................................. 326
Chain-linking string parameters..............................................................................................................326
Converting a numerical value to a string parameter..............................................................................327
Copying a substring from a string parameter........................................................................................328
Converting a string parameter to a numerical value..............................................................................329
Checking a string parameter..................................................................................................................330
Finding the length of a string parameter...............................................................................................331
Comparing alphabetic sequence............................................................................................................332
Reading machine parameters.................................................................................................................333
TNC 640 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
29
Contents
9.12 Preassigned Q parameters.................................................................................................................. 336
Values from the PLC: Q100 to Q107.....................................................................................................336
Active tool radius: Q108.........................................................................................................................336
Tool axis: Q109.......................................................................................................................................336
Spindle status: Q110.............................................................................................................................. 337
Coolant on/off: Q111...............................................................................................................................337
Overlap factor: Q112.............................................................................................................................. 337
Unit of measurement for dimensions in the program: Q113.................................................................337
Tool length: Q114................................................................................................................................... 337
Coordinates after probing during program run.......................................................................................338
Deviation between actual value and nominal value during automatic tool measurement with the TT
130..........................................................................................................................................................338
Tilting the working plane with mathematical angles: rotary axis coordinates calculated by the TNC.....338
Measurement results from touch probe cycles (see also User’s Manual for Cycle Programming)........339
9.13 Programming examples.......................................................................................................................341
Example: Ellipse..................................................................................................................................... 341
Example: Concave cylinder machined with spherical cutter..................................................................343
Example: Convex sphere machined with end mill.................................................................................345
30
HEIDENHAIN Conversational Programming | 5/2013
TNC 640 | User's Manual
Loading...
+ 632 hidden pages