100% found this document useful (2 votes)
501 views286 pages

Fundamentals of CNC Machining

This document is a 286-page manual on the fundamentals of CNC machining. It covers topics like fundamental geometrical principles, NC programming principles, positional data, motion commands, frames, and tool offsets. The manual is intended to teach the basics of CNC machining through detailed explanations of concepts and programming codes. It was created by the Brno University of Technology in the Czech Republic for educational purposes.

Uploaded by

Alfredo Mora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
501 views286 pages

Fundamentals of CNC Machining

This document is a 286-page manual on the fundamentals of CNC machining. It covers topics like fundamental geometrical principles, NC programming principles, positional data, motion commands, frames, and tool offsets. The manual is intended to teach the basics of CNC machining through detailed explanations of concepts and programming codes. It was created by the Brno University of Technology in the Czech Republic for educational purposes.

Uploaded by

Alfredo Mora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 286

Fundamentals of CNC Machining Full Screen

Brno University of Technology


Faculty of Mechanical Engineering
The Institute of Manufacturing Technology

Fundamentals of CNC Machining

Technical Collaborator: Ing. Petra CIHLAROVA


[email protected]

Narrator: Mr. Michael HILL (U.K.)

Responsible Person: Ing. Miroslav PISKA, PhD.


Associate Professor
[email protected]

Contents Page 1 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Contents
1 FUNDAMENTAL GEOMETRICAL PRINCIPLES 5
1.1 Description of workpiece points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Workpiece coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 Definition of workpiece positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.3 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1.4 Absolute dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.5 Incremental dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.6 Plane designation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2 Position of zero points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Position of coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.1 Overview of various coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.2 Machine coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3.3 Basic coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3.4 Workpiece coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.3.5 Frame system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.3.6 Assignment of workpiece coordinate system to machine axes . . . . . . . . . . . . . . . . . 26
1.3.7 Current workpiece coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2 FUNDAMENTAL PRINCIPLES OF NC PROGRAMMING 28


2.1 Structure and contents of an NC program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2 Language elements of the programming language . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 POSITIONAL DATA 51
3.1 Absolute/incremental dimensions, G90/G91 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.1.1 G91 extension (SW 4.3 and higher) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.2 Absolute dimensions for rotary axes, DC, ACP, ACN . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.3 Metric/imperial dimension, G70/G71/G700/G710 . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.4 Settable zero offset/frame, G54 to G599 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.5 Selecting the working plane, G17 to G 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Contents Page 2 of 286 Go Back


Fundamentals of CNC Machining Full Screen

3.6 Programmable working area limitation, G25/G26 . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4 PROGRAMMING MOTION COMMANDS 77


4.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2 Traversing commands with polar coordinates, G110, G111, G112, AP, RP . . . . . . . . . . . . . 79
4.3 Rapid traverse movement, G0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.4 Linear interpolation, G1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.5 Circular interpolation, G2/G3, CIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.6 Helical interpolation, G2/G3 TURN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

5 FRAMES 119
5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5.2 Frame instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
5.3 Programmable zero offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.3.1 TRANS, ATRANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.3.2 G58, G59: Axial programmable ZO (SW 5 and later) . . . . . . . . . . . . . . . . . . . . 127
5.4 Programmable rotation, ROT, AROT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.5 Programmable frame rotations with solid angles, ROTS, AROTS and CROTS . . . . . . . . . . 142
5.6 Programmable scale factor, SCALE, ASCALE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.7 Programmable mirroring, MIRROR, AMIRROR . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

6 TOOL OFFSETS 154


6.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
6.2 List of tool types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.3 Tool selection/tool call T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.3.1 Tool change with M06 (mill) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.3.2 Tool change with T command (rotate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.4 Tool offset D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.5 Tool selection T with tool management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6.5.1 Turning machine with circular magazine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
6.5.2 Milling machine with chain magazine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Contents Page 3 of 286 Go Back


Fundamentals of CNC Machining Full Screen

6.6 Tool offset call D with tool management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170


6.6.1 Turning machine with circular magazine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
6.7 Make active tool offset operative immediately . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.8 Tool radius compensation, G40, G41, G42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

7 MISCELLANEOUS FUNCTION 182


7.1 Auxiliary function outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.1.1 M functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

8 TURNING CYCLES 185


8.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
8.2 Preconditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
8.3 Grooving cycle - CYCLE93 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
8.4 Undercut cycle - CYCLE94 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
8.5 Stock removal cycle - CYCLE95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
8.6 Thread undercut - CYCLE96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
8.7 Thread cutting - CYCLE97 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.8 Thread chaining - CYCLE98 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.9 Thread recutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
8.10 Extended stock removal cycle - CYCLE950 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

9 APPENDIX 281
9.1 Excersises & Problems of CNC Machining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
9.1.1 Geometrical Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
9.1.2 Cutting Conditions, Time Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
9.1.3 Physical Phenomena . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
9.1.4 CNC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
9.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
9.3 Vocabulary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

10 REFERENCES 286

Contents Page 4 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1. FUNDAMENTAL GEOMETRICAL PRINCIPLES


1.1. Description of workpiece points
1.1.1. Workpiece coordinate systems

Milling: Turning:
In order for the machine or control to operate with the specified positions, these data must be made in a
reference system that corresponds to the direction of motion of the axis slides. A coordinate system with the
axes X, Y and Z is used for this purpose. DIN 66217 stipulates that machine tools must use right-handed,
rectangular (Cartesian) coordinate systems.

1.1.2. Definition of workpiece positions


To specify a position, imagine that a ruler is placed along the coordinate axes. You can now describe every point
in the coordinate system by specifying the direction (X, Y and Z) and three numerical values. The workpiece
zero always has the coordinates X0, Y0 and Z0.

Contents Page 5 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

For the sake of simplicity, we will only use one plane of the coordinate system in this example, i.e. the X/Y
plane. Points P1 to P4 then have the following coordinates:

P1 corresponds to X100 Y50


P2 corresponds to X-50 Y100
P3 corresponds to X-105 Y-115
P4 corresponds to X70 Y-75

One plane is sufficient to describe the contour on a turning machine.

Contents Page 6 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

Points P1 to P4 are defined by the following coordinates:

P1 corresponds to X25 Z-7.5


P2 corresponds to X40 Z-15
P3 corresponds to X40 Z-25
P4 corresponds to X60 Z-35

Contents Page 7 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

Points P1 and P2 are defined by the following coordinates:

P1 corresponds to X-20 Y-20 Z23


P2 corresponds to X13 Y-13 Z27

The infeed depth must also be described in milling operations. To do this, we need to specify a numerical
value for the third coordinate (Z in this case).

Contents Page 8 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

Points P1 to P3 are defined by the following coordinates:

P1 corresponds to X10 Y45 Z-5


P2 corresponds to X30 Y60 Z-20
P3 corresponds to X45 Y20 Z-15

1.1.3. Polar coordinates


The coordinates used up to this point to specify points in the coordinate system are called Cartesian coordi-
nates. However, there is another way to specify coordinates, namely as polar coordinates. It is useful to use
polar coordinates in cases where a workpiece or part of a workpiece is dimensioned by radius and angle. The
origin of the dimensional measurements is referred to as the pole.

Contents Page 9 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

The points P1 and P2 can then be described - with reference to the pole - as follows:

P1 corresponds to radius =100 plus angle =30


P2 corresponds to radius =60 plus angle =75

1.1.4. Absolute dimensions


With absolute dimensions, all the positional parameters refer to the currently valid zero point. Applied to tool
movement this means: The absolute dimensions describe the position to which the tool is to travel.

Contents Page 10 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for milling:

The positional parameters for points P1 to P3 in absolute dimensions referring to the zero point are the
following:

P1 corresponds to X20 Y35


P2 corresponds to X50 Y60
P3 corresponds to X70 Y20

Contents Page 11 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for turning:

The positional parameters for points P1 to P4 in absolute dimensions referring to the zero point are the
following:

P1 corresponds to X25 Z-7.5


P2 corresponds to X40 Z-15
P3 corresponds to X40 Z-25
P4 corresponds to X60 Z-35

1.1.5. Incremental dimensions


Production drawings are frequently encountered, however, where the dimensions refer not to the origin, but to
another point on the workpiece. In order to avoid having to convert such dimensions, it is possible to specify
them in incremental dimensions. Incremental dimensions refer to the positional data for the previous point.
Applied to tool movement this means: The incremental dimensions describe the distance the tool is to travel.

Contents Page 12 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for milling:

The positional data for points P1 to P3 in incremental dimensions are:

P1 corresponds to X20 Y35 ;(with reference to the zero point)


P2 corresponds to X30 Y20 ;(with reference to P1)
P3 corresponds to X20 -35 ;(with reference to P2)

Contents Page 13 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for turning:

The positional data for points P1 to P4 in incremental dimensions are:

G90 P1 corresponds to X25 Z-7.5 ;(with reference to the zero point)


G91 P2 corresponds to X15 Z-7.5 ;(with reference to P1)
G91 P3 corresponds to Z-10 ;(with reference to P2)
G91 P4 corresponds to X20 Z-10 ;(with reference to P3)

When DIAMOF or DIAM90 is active, the path setpointn is programmed as a radius dimension with G91.

1.1.6. Plane designation


A plane is defined by means of two coordinate axes. The third coordinate axis is perpendicular to this plane and
determines the infeed direction of the tool (e.g. for 2/1/2/ D machining). When programming, it is necessary
to specify the working plane in order that the control can calculate the tool offset values correctly. The plane
is also relevant to certain types of circular programming and polar coordinates.

Contents Page 14 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling: Turning:
The working planes are specified as follows in the NC program with G17, G18 and G19:

Plane Identifier In feed direction


X/Y G17 Z
Z/X G18 Y
Y/Z G19 X

1.2. Position of zero points


The various origins and reference positions are defined on the NC machine. They are reference points:

for the machine to approach and,

refer to programming the workpiece dimensions.

Contents Page 15 of 286 Go Back


Fundamentals of CNC Machining Full Screen

M Machine zero
A Blocking point. Can coincide with the workpiece zero (turning machines only)
W Workpiece zero = Program zero
B Start point. Can be defined for each program. Start point of the first tool for machining.
R Reference point. Position determined by cam and measuring system. The distance to the
machine zero M must be known, so that the axis position can be set to exactly this value at
this position.

The diagrams show the zero points and reference points for turning machines and drilling/milling machines.

1.3. Position of coordinate system


1.3.1. Overview of various coordinate systems
We distinguish between the following coordinate systems:

the machine coordinate system with the machine zero M,

the basic coordinate system (this can also be the workpiece coordinate system W),

the workpiece coordinate system with the workpiece zero W,


the current workpiece coordinate system with the current offset workpiece zero Wa.

Contents Page 16 of 286 Go Back


Fundamentals of CNC Machining Full Screen

In cases where various different machine coordinate systems are in use (e.g. 5-axis transformation), an
internal transformation function mirrors the machine kinematics on the coordinate system currently selected
for programming.
The individual axis identifiers are explained in the subsection headed Axis types in this section.

Contents Page 17 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1.3.2. Machine coordinate system

The machine coordinate system comprises all the physically existing machine axes. Reference points and
tool and pallet changing points (fixed machine points) are defined in the machine coordinate system. Where
the machine coordinate system is used for programming (this is possible with some of the G functions), the
physical axes of the machine are addressed directly. No allowance is made for workpiece clamping.

Contents Page 18 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The location of the coordinate system relative to the machine depends on the machine type. The axis
directions follow the so-called three-finger rule of the right hand (in accordance with DIN 66217). Standing
in front of the machine, the middle finger of the right hand points away from the infeed direction of the main
spindle. The following then applies:

the thumb points in the +X direction,

the index finger points in the +Y direction,

the middle finger points in the +Z direction.

In practice, this can look quite different on different types of machine. The following are examples of machine
coordinate systems for various machines.

Contents Page 19 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Contents Page 20 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1.3.3. Basic coordinate system

The basic coordinate system is a Cartesian coordinate system, which is mirrored by kinematic transformation
(for example, 5-axis transformation or by using Transmit with peripheral surfaces) onto the machine coordinate
system. If there is no kinematic transformation, the basic coordinate system differs from the machine coordinate
system only in terms of the axes designations. The activation of a transformation can produce deviations in the

Contents Page 21 of 286 Go Back


Fundamentals of CNC Machining Full Screen

parallel orientation of the axes. The coordinate system does not have to be at a right angle. Zero offset, scaling,
etc. are always executed in the basic coordinate system. The coordinates also refer to the basic coordinate
system when specifying the working field limitation.

1.3.4. Workpiece coordinate system

Normally, all CNC programmes are made in the workpiece coordinate system preferably. In other words, the
data in the NC program refer to the workpiece coordinate system. The workpiece coordinate system is always
a Cartesian coordinate system and assigned to a specific workpiece.

Contents Page 22 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1.3.5. Frame system

The frame is a self-contained arithmetic rule that transforms one Cartesian coordinate system into another
Cartesian coordinate system. It is a spatial description of the workpiece coordinate system. The following
components are available within a frame:

zero offset,

rotate,
mirror,

scale.

These components can be used individually or in any combination.

Contents Page 23 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Mirroring of the Z axis

One way of machining inclined contours is to use appropriate fixtures


to align the workpiece parallel to the machine axes.

Contents Page 24 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Another way is to generate a coordinate system which is oriented to


the workpiece. The coordinate system can be moved and/or rotated with programmable frames. This enables
you to:

move the zero point to any position on the workpiece,


align the coordinate axes parallel to the desired working plane by rotation,

and thus machine surface clamped in inclined positions, produce drill holes at different angles,

perform multiside machining operations.

Contents Page 25 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1.3.6. Assignment of workpiece coordinate system to machine axes

The location of the workpiece coordinate system in relation to the basic coordinate system (or machine
coordinate system) is determined by settable frames.
The settable frames are activated in the NC program by means of commands such as G54.

Contents Page 26 of 286 Go Back


Fundamentals of CNC Machining Full Screen

1.3.7. Current workpiece coordinate system

Sometimes it is advisable or necessary to reposition and to rotate, mirror and/or scale the originally selected
workpiece zero within a program.
The programmable frames can be used to reposition (rotate, mirror and/or scale) the current zero point
at a suitable point in the workpiece coordinate system. You will thus obtain the current workpiece coordinate
system.
Several zero offsets are possible in the same program.

Contents Page 27 of 286 Go Back


Fundamentals of CNC Machining Full Screen

2. FUNDAMENTAL PRINCIPLES OF NC PROGRAMMING


2.1. Structure and contents of an NC program

DIN 66025 is the guideline for designing a part program.


An (NC/part) program consists of a sequence of NC blocks (see table below). Each data block represents
one machining step. Instructions are written in the blocks in the form of words. The last block in the execution
sequence contains a special word for the end of program: M2, M17 or M30.

Block Word Word Word ... ;Comment


Block N10 G0 X20 ... ;1st block
Block N20 G2 Z37 ... ;2nd block
Block N30 G91 ... ... ; ...
Block N40 ... ... ... ...
Block N50 M30 ... ... ;End of program (last block)

Program names
Each program has a different name; the name can be chosen freely during program creation (except for
punchtape format), taking the following conditions into account:

the first two characters must be letters (or a letter with an underscore character),

otherwise: letters or numerals.

Example:

MPF100 or
SHAFT or
SHAFT 2

Contents Page 28 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Only the first 24 characters of a program identifier are displayed on the NC.
Punchtape format
File names:

1. File names can contain the characters 0...9, A...Z, a...z or and may be up to 24 characters in length.

2. File names must have a 3-digit identifier ( xxx).

3. Data in punchtape format can be created externally or modified using an editor. The name of a file
which is stored internally in the NC memory begins with N . A file in punchtape format begins with
%name, % must appear in the first column of the first line.

Example:

% N SHAFT123 MPF part program SHAFT123 or


%flange3 MPF part program flange3

2.2. Language elements of the programming language


Character set The following characters are available for writing NC programs:
Upper case
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
Please note:
Take care to differentiate between the letter O and the numeral 0.
Lower case
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

Contents Page 29 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Numerals
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
No distinction is made between upper and lower case letters.

Special characters

% Program start character (used only for writing programs on an external PC)
( For bracketing parameters or expressions
) For bracketing parameters or expressions
[ For bracketing addresses or indexes
] For bracketing addresses or indexes
Less than
Greater than
: Main block, label suffix, chain operator
= Assignment, part of equation
/ Division, block suppression
* Multiplication
+ Addition
- Subtraction, minus sign
Double quotation marks, identifier for character string
Single quotation marks, identifier for spec. numerical values: hexadec., binary
$ System variable identifiers
Underscore, belonging to letters
? Reserved
! Reserved
. Decimal point
, Comma, parameter separator
; Comment start
& Format character, same effect as space character
LF Block end

Contents Page 30 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Tab character Separator


Space character Separator (blank)

Words

NC programs are made up of blocks and each block is made up of words. A word in the NC language
consists of an address character and a digit or sequence of digits representing an arithmetic value. The address
character of the word is usually a letter. The sequence of digits can contain a leading sign and decimal point.
The leading sign always appears between the address letter and the sequence of digits. The positive leading
sign (+) does not have to be specified.
Blocks and block format
An NC program consists of individual blocks. A block generally consists of (several) words. A block should
contain all the data required for performing an operation step and is terminated with the character LF (LINE
FEED = new line).
The characters LF character does not have to be inserted manually, it is generated automatically when

Contents Page 31 of 286 Go Back


Fundamentals of CNC Machining Full Screen

you change lines.

Block length
A block may contain

(up to SW 3.x) a maximum of 242 characters,

(SW 4 and higher) a maximum of 512 characters (including the comment and end-of-block character
LF ).

Three blocks of up to 66 characters each are normally displayed in the current block display on the screen.
Comments are also displayed. Messages are displayed in a separate message window.

Word sequence in blocks


In order to keep the block structure as clear as possible, the words in a block should be arranged as follows:
Example:
N10 G . . . X . . . Y . . . Z . . . F . . . S . . . T . . . D . . . M . . . H . . .

Address Definition
N Address of block number
10 Block number
G Preparatory function
X,Y,Z Positional data
F Feed
S Speed
T Tool
D Tool offset number
M Miscellaneous function
H Auxiliary function

Contents Page 32 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Some addresses can be used repeatedly within a block (e.g.: G . . . , M . . . , H . . . ).

Main block/subblock
There are two types of blocks:

main blocks and,

subblocks.

The main block must contain all the words necessary to start the operation sequence in the program section
beginning with the main block.
Main blocks can be contained in both main programs and subprograms. The control does not check whether
a main block contains all the necessary information. The identification of a block as a main block is used
when searching for a main block or performing a search after the last main block. A subblock contains all the
information required for each operation step.

Block number
Main blocks are identified by a main block number. A main block number consists of the character : and
a positive integer (block number). The block number always appears at the start of a block.
Main block numbers must be unique within a program to achieve an unambiguous result when searching.

Example:
N10 D2 F200 S900 M3
Subblocks are identified by a subblock number. A subblock number consists of the character N and a
positive integer (block number). The block number always appears at the start of a block.
Example:

N20 G1 X14 Y35


N30 X20 Y40

Contents Page 33 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The order of the block numbers is arbitrary, however increasing block numbers are recommended.
You can also program NC blocks without block numbers.
Addresses
Addresses are fixed or variable identifiers for axes (X, Y, . . . ) spindle speed (S), feed (F), circle radius (CR),
etc.
Example:
N10 X100
Important addresses

Address Meaning (default setting) Remarks


A=DC( . . . ) Rotary axis variable
A=ACP( . . . )
A=ACN( . . . )
ADIS Rounding clearance for path functions fixed
B=DC( . . . ) Rotary axis variable
B=ACP( . . . )
B=ACN( . . . )
C=DC( . . . ) Rotary axis variable
C=ACP( . . . )
C=ACN( . . . )
CHR= . . . Chamfer the contour corner fixed
D ... Tool number fixed
F ... Feed fixed
FA[axis]= . . . or Axial feed fixed
FA[spindle]= . . . or
[SPI(spindle)]= only if spindle no. defined by variable)
G ... Preparatory function fixed
H ... Auxiliary function fixed

Contents Page 34 of 286 Go Back


Fundamentals of CNC Machining Full Screen

H=QU( . . . ) Auxiliary function without read stop


I ... Interpolation parameters variable
J ... Interpolation parameters variable
K ... Interpolation parameters variable
L ... Subprogram call fixed
M ... Miscellaneous function fixed
M=QU( . . . ) Miscellaneous fct. w/o read stop
N ... Subblock fixed
OVR= . . . Path override fixed
P ... Number of program passes fixed
POS[axis]= . . . Positioning axis fixed
POSA[axis]=v Positioning axis across block boundary fixed
SPOS= . . . Spindle position fixed
SPOS[n]= . . .
SPOSA= . . . Spindle position across block boundary fixed
SPOSA[n]= . . .
Q ... Axis variable
R0= . . . to Rn= . . . Arithmetic parameter, n can be set via MD (default 0-99) fixed
R ... Axis (SW 5.1 and higher) variable
RND Round contour corner fixed
RNDM Round contour corner (modal) fixed
S ... Spindle speed fixed
T ... Tool number fixed
U ... Axis variable
V ... Axis variable
W ... Axis variable
X ... Axis variable
X=AC( . . . ) bsolute
X=IC(...) ncremental
Y... Axis variable

Contents Page 35 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Y=AC( . . . )
Y=IC( . . . )
Z ... Axis variable
Z=AC( . . . )
Z=IC( . . . )
AR+= . . . Aperture angle variable
AP= . . . Polar angle variable
CR= . . . Circle radius variable
RP= . . . Polar radius variable
: ...: Main block fixed

fixed These address names are available for a spec. function.

Modal/non-modal addresses
Modal addresses remain valid with the programmed value (in all subsequent blocks) until a new value is
programmed at the same address. Non-modal addresses only apply in the block in which they were programmed.
Example:

N10 G01 F500 X10


N20 X10 ;Feed is effective until a new value is entered.

Addresses with axial extension


In addresses with axial extension, an axis name is inserted in square brackets after the address. The axis
name assigns the axis.
Example:
FA[U]=400; Axis-specific feed for U axis

Contents Page 36 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Extended addresses
Extended address notation enables a larger number of axes and spindles to be organized in a system. An
extended address is composed of a numeric extension or a variable identifier enclosed in square brackets and an
arithmetic expression assigned with an = sign.
Example:

X7 ;No = required, 7 is a value, but the = ;character is also possible here


X4=20 ;Axis X4 (= required)
CR=7.3 ;2 letters (= required)
S1=470 ;Speed for 1st spindle 470 rpm
M3=5 ;Spindle stop for 3rd spindle

The extended address notation is only permitted for the following direct addresses:

X, Y, Z, . . . Axis addresses
I, J, K Interpolation parameters
S Spindle speed
SPOS, SPOSA Spindle position
M Miscellaneous functions
H Auxiliary functions
T Tool number
F Feed

The number (index) in extended address notation can be substituted by a variable for M, H and S addresses
and SPOS and SPOSA. The variable identifier is enclosed in square brackets.
Example:

S[SPINU]=47 ;Speed for the spindle whose number is stored in the variable SPINU
0

Contents Page 37 of 286 Go Back


Fundamentals of CNC Machining Full Screen

M[SPINU]=3 ;Clockwise rotation for the spindle whose number is stored in the variable SPINU
T[SPINU]=7 ;Selection of the tool for the spindle whose number is stored in the variable SPINU

Fixed addresses
The following addresses are set permanently:

Address Meaning (default setting)


D Tool edge number
F Feed
G Preparatory function
H Auxiliary function
L Subprogram call
M Special function
N Subblock
P Number of program passes
R Arithmetic parameter
S Spindle speed
T Tool number
: Main block

Example for programming:


N10 G54 T9 D2
Fixed addresses with axis extension:

Address Meaning (default setting)


AX Axis value (variable axis programming)
ACC Axial acceleration
FA Axial feed
FDA Axis feedrate for handwheel override

Contents Page 38 of 286 Go Back


Fundamentals of CNC Machining Full Screen

FL Axial feed limit


IP Interpolation parameter (variable axis programming)
OVRA Axial override
PO Polynomial coefficient
POS Positioning axis
POSA Positioning axis across block boundary

Example:
N10 POS[X]=100
When programming with the axis extension, the axis to be traversed is enclosed in square brackets.
Settable addresses
Addresses can be defined either as an address letter (with numerical extension if necessary) or as freely
selected identifiers.
Variable addresses must be unique within the control, i.e. the same identifier name may not be used for
different address types.
A distinction is made between the following address types:

axis values and end points,

interpolation parameters,

feeds,

approximate positioning criteria,


measurements,

axis and spindle response.

...

Contents Page 39 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Variable address letters are:


A, B, C, E, I, J, K, Q, U, V, W, X, Y, Z
The user can change the names of the variable addresses in the machine data.

Example:
X1, Y30, U2, I25, E25, E1=90, . . .
The numeric extension has one or two digits and is always positive.
Address identifier:
The address notation can be expanded by adding further letters.
Example:

CR e.g. for circle radius


XPOS

Operators/mathematical functions

+ Addition
- Subtraction
* Multiplication
/ Division, Notice: (Type INT)/(Type INT)=(Type REAL); e.g. 3/4 = 0.75
DIV Division, for variable type INT and REAL
Notice: (Type INT)DIV(Type INT)=(Type INT); e.g. 3 DIV 4 = 0
MOD Modulo division (only type INT) produces remainder of INT division, e.g. 3 MOD
4=3
: Chain operator (for FRAME variables)
Sin() Sine
COS() Cosine
TAN() Tangent

Contents Page 40 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ASIN() Arcsine
ACOS() Arccosine
ATAN2() Arctangent2
SQRT() Square root
ABS() Absolute number
POT() 2nd power (square)
TRUNC() runcate to integer
ROUND() Round to integer
LN() Natural logarithm
EXP() Exponential function

Comparison and logic operators

== Equal to
<> Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<< Concatenation of strings (not for 810D)
AND AND
OR OR
NOT Negation
XOR Exclusive OR

In arithmetic expressions, the execution order of all the operators can be specified by parentheses, in order
to override the normal priority rules.
Value assignments
Values can be assigned to the addresses. The method of value assignment depends on the type of address

Contents Page 41 of 286 Go Back


Fundamentals of CNC Machining Full Screen

identifier. An = sign must be inserted between the address identifier and the value if:

the address identifier consists of more than one letter or

the value consists of more than one constant.

The =-sign can be omitted if the address identifier is a single letter and the value consists of only one
constant. Leading signs are allowed and separators are permitted after the address letter.
Examples:

X10 ;Value assignment (10) to address X, = not required


X1=10 ;Value assignment (10) to address (X) with numeric extension (1), = required
FGROUP(X1, Y2) ;Axis names from passed parameters
AXDATA[X1] ;Axis name as an index when accessing axis data
AX[X1]=10 ;Indirect axis programming
X=10*(5+SIN(37.5)) ;Value assignment by means of a numeric expression, = required

A numeric extension must always be followed by one of the special characters =, (, [)], , or an
operator in order to distinguish an address name with numeric extension from an address letter with a value.

Identifiers
Identifiers can also be used to describe words (in compliance with DIN 66025). The identifiers have the same
meaning as the words within an NC block. Identifiers must be unique. Identical identifiers must not be used
for different objects. Identifiers can stand for:
variables,
system variables,
user variables,
subprograms,

Contents Page 42 of 286 Go Back


Fundamentals of CNC Machining Full Screen

vocabulary words,

DIN addresses with several letters,

jump labels.

Structure
The identifiers are composed of up to 32 characters. The following characters may be used:

letters,

underscores,

numerals.
The first two characters must be letters or underscores, separators must not be programmed between the
individual characters (see the following pages).
Example:
CMIRROR, CDON
Only a limited number of characters can be displayed on the screen. With the standard display setting, the
limits are as follows:

Program names: 24 characters


Axis identifiers: 3 characters
Variable identifiers: 32 characters

Rules for allocating identifiers


The following rules are provided in order to avoid identifier collisions:
all identifiers which begin with CYCLE or are reserved for SIEMENS cycles,
all identifiers which begin with CCS are reserved for SIEMENS compile cycles,

Contents Page 43 of 286 Go Back


Fundamentals of CNC Machining Full Screen

user compile cycles begin with CC,

we recommend that users select identifier names which either begin with U (User) or contain the
underscore symbol, because these are not used by the system or compile cycles or SIEMENS cycles.

Further reserved identifiers:

the identifier RL is reserved for conventional turning machines,

all identifiers beginning with E are reserved for EASYSTEP programming.

Variable identifiers
In variables used by the system, the first letter is replaced by the $ character. This character may not be
used for user-defined variables.
Example:
$P IFRAME, $P F
Leading zeroes are ignored in variables with numeric extensions (i.e. R01 is interpreted as R1). Separators
are allowed before a numeric extension.
Array identifiers
The rules for elementary variables also apply to array identifiers. It is possible to address arithmetic variables
as arrays.
Example:
R[10] . . .
Data types
A variable can contain a numeric value (or several) or a character (or several), e.g. an address letter. The
data type permitted for the variable is determined when the variable is defined. The data type for system
variables and predefined variables is fixed.

Contents Page 44 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Elementary variable types/data types are:

Type Definition Value range


INT Integers with leading sign (231 - 1)
REAL Real numbers (fractions with decimal point, (10-300 10+300)
LONG REAL according to IEEE)
BOOL Boolean values: TRUE (1) and FALSE (0) 1, 0
CHAR 1 ASCII character specified by the code 0 255
STRING Character string, number of characters in [], Sequence of values with 0 255
maximum of 200 characters
AXIS Axis names (axis addresses) only Any axis identifiers in the channel
FRAME Geometrical parameters for translation, rota-
tion, scale and mirror

Identical elementary types can be combined in arrays. Up to two-dimensional arrays are possible.
Constants

Integer constants:
Integer with or without leading sign, e.g. for assigning a value to an address.
Example:

X100 ;Assignment of the value +100 to address X


X-100 ;Assignment of the value -100 to address X

Real constants:
Real number, e.g. with decimal point, with or without leading sign, e.g. for assigning a value to an address.

Contents Page 45 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

X10.25 ;Assignment of the value +10.25 to address X


X-10.25 ;Assignment of the value -10.25 to address X
X0.25 ;Assignment of the value +0.25 to address X
X.25 ;Assignment of the value +0.25 to address X without leading 0
X=-.1EX-3 ;Assignment of the value -0.1*10-3 to address X

If, in an address which permits decimal point input, more decimal places are specified than actually provided
for the address, then they are rounded to fit the number of places provided.

X0 cannot be replaced with X.

Example:
Do not replace G01 X0 with G01 X!
Hexadecimal constants
Constants can also be interpreted in hexadecimal format. The letters A to F stand for the digits 10 to
15. Hexadecimal constants are enclosed in single quotation marks and start with the letter H, followed by
the value in hexadecimal notation. Separators are allowed between the letters and digits.
Example for machine data:

$MC TOOL MANAGEMENT MASK=H3C7F ;Assignment of hexadecimal values to machine data

The maximum number of characters is limited by the value range of the integer data type.
Binary constants
Constants can also be interpreted in binary format. In this case, only the digits 0 and 1 are used.
Binary constants are enclosed in single quotation marks and start with the letter B, followed by the binary
value. Separators are allowed between the digits.

Contents Page 46 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for machine data:

$MN AUXFU GROUP SPEC=B10000001 ;Assignment of binary constants to machine


data Bits 0 and 7 are set

The maximum number of characters is limited by the value range of the integer data type.
Program section
A program section consists of a main block and several subblocks.
Example:

:10 D2 F200 S900 M3


N20 G1 X14 Y35
N30 X20 Y40
N40 Y-10
...
N100 M30

Skipping blocks
Blocks which are not to be executed on every program pass can be skipped (e.g. positioning program). Blocks
which are to be skipped are marked with an oblique / in front of the block number. Several consecutive blocks
can also be skipped. The instructions in the skipped blocks are not executed; the program continues with the
next block which is not skipped.

Contents Page 47 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

N10 ;is executed


/N20 ;skipped
N30 ;is executed
/N40 ;skipped
N70 ;is executed

SW 5 and later
Up to 8 skip levels can be programmed. Only 1 skip level can be specified per NC block:

/ ... ;Block is skipped (1st skip level)


/0 . . . ;Block is skipped (1st skip level)
/1 N010 . . . ;Block is skipped (2nd skip level)
/2 N020 . . . ;Block is skipped (3rd skip level)

Contents Page 48 of 286 Go Back


Fundamentals of CNC Machining Full Screen

...
/7 N100 . . . ;Block is skipped (8th skip level)

Comments
To make NC programs easier to understand for other users and programmers, it is advisable to insert
meaningful comments in the program. Comments are appended to the end of a block and are separated from
the program section of the NC block by a semicolon (;).
Example:

N10 G1 F100 X10 Y20 ; Comments to explain the NC block or


N10 ; G&S Co., order no. 12A71
N20 ; Program written by Bob Miller, Dept. TV 4, on 21.11.94
N50 ; Part no. 12, housing for pump type TP23A

Comments are stored and appear in the current block display when the program is running.

Programming messages
Messages can be programmed to provide the user with information about the current machining situation
during program execution. A message in an NC program is generated when the message text is typed af-
ter vocabulary word MSG in round parentheses () and quotation marks. A message can be cleared by
programming MSG ().
Example:

N10 MSG (Roughing the contour) ;Activate message


N20 X . . . Y . . .
N ...
N90 MSG () ;Clear message from N10

Contents Page 49 of 286 Go Back


Fundamentals of CNC Machining Full Screen

A message text can be up to 124 characters long and is displayed in two lines (2*62 characters). Contents
of variables can also be displayed in message texts.

Example:

N10 R12=$AA IW [X] ;Current position of the X axis in R12


N20 MSG (check position of X axis<<R12<<)
N ...
N90 MSG () ;Clear message from N20 or
N20 MSG (check position of X axis<<$AA IW[X]<<)

Setting alarms
You can also set alarms in addition to messages in an NC program. Alarms are displayed in a separate
field on the screen display. An alarm is associated with a reaction on the control which depends on the alarm
category. Alarms are programmed by writing the vocabulary word SETAL followed by the alarm number
enclosed in brackets. The valid range for alarm numbers lies between 60,000 and 69,999, whereby 60,000 to
64,999 are reserved for SIEMENS cycles and 65,000 to 69,999 are available to the user.
Alarms are always programmed in a separate block.

Example:

N100 SETAL (65000) ;Set alarm no. 65,000

The alarm text must be configured in the MMC.

Contents Page 50 of 286 Go Back


Fundamentals of CNC Machining Full Screen

3. POSITIONAL DATA
3.1. Absolute/incremental dimensions, G90/G91

Programming:

Absolute dimensioning G90


X=AC() Y=AC() Z=AC()
Incremental dimensioning G91 or
X=IC() Y=IC() Z=IC()

Explanation of the parameters

XYZ Axis identifiers of the axes to be traversed


=AC Absolute dimensions (non-modal)
=IC Incremental dimensions (non-modal)

Function
The G90/91 commands and the non-modal dimensions AC/IC are used to define the system for describing
the approach to setpoints.

Contents Page 51 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Absolute dimensions, G90


The dimensions refer to the origin of the active coordinate system. You program the point to which the tool
is to travel, e.g. in the workpiece coordinate system.
Incremental dimensions, G91
The dimensions refer to the last point approached. You program how far the tool is to travel.
Non-modal absolute or incremental dimensioning AC, IC
When G91 is active, AC can be used to allow entry of absolute dimensions for individual axes in a specific
block. When G90 is active, IC can be used to allow entry of incremental dimensions for individual axes in a
specific block.

Contents Page 52 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Additional notes

The commands G90 and G91 generally apply to all axes programmed in ubsequent NC blocks. Both
commands are modal. On conventional turning machines it is standard practice to interpret incremental NC
blocks in the transverse axis as radius values, while diameter dimensions are valid for absolute coordinates. This
conversion for G90/G91 is performed using the commands DIAMON, DIAMOF or DIAM90.
Programming example
The traverse paths are entered in absolute coordinates with reference to the workpiece zero. The center
point coordinates I and J for circular interpolation are specified blockwise in absolute coordinates, since the arc
center is programmed - independent of G90/G91 - in incremental coordinates as standard.

Contents Page 53 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N10 G90 G0 X45 Y60 Z2 T1 S2000 M3 Absolute dimensioning, rapid traverse to YZ, tool,
spindle on clockwise
N20 G1 Z-5 F500 Tool infeed
N30 G2 X20 Y35 I=AC(45) J=AC(35) Circle center point in absolute dimensions
or
N30 G2 X20 Y35 I0 J-25 Circle center point in incremental dimensions
N40 G0 Z2 Retract
N50 M30 End of block

Contents Page 54 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N5 T1 D1 S2000 M3 Tool, spindle on clockwise


N10 G0 G90 X11 Z1 Absolute dimensioning, rapid traverse to XYZ
N20 G1 Z-15 F0.2 Tool infeed
N30 G3 X11 Z-27 I=AC(-5) K=AC(-21) Circle center point in absolute dimensions
or
N30 G3 X11 Z-27 I-8 K-6 Circle center point in incremental dimensions
N40 G1 Z-40 Retract
N50 M30 End of block

3.1.1. G91 extension (SW 4.3 and higher)

Programming:
Incremental dimension data input G91 or
X=IC() Y=IC() Z=IC()

Contents Page 55 of 286 Go Back


Fundamentals of CNC Machining Full Screen

without traversing through the active tool offset SD 42442

SD 42442 TOOL OFFSET INCR PROG = 0

without traversing through the active zero offset SD 42440

SD 42440 FRAME OFFSET INCR PROG = 0


Explanation of the parameters:

SD 42440 FRAME OFFSET INCR PROG = 0 The active zero offset is not traversed.
SD 42442 TOOL OFFSET INCR PROG = 0 The active tool offset is not traversed.

Function:
For applications such as scratching, it is necessary only to traverse the path programmed in the incremental
coordinates. The active zero offset or tool offset is not traversed. This can be set separately via SDs
FRAME OFFSET INCR PROG (zero point) and TOOL OFFSET INCR PROG (tool offset).
Programming example:

G54 contains an offset of 25 in X


SD 42440 FRAME OFFSET INCR PROG = 0 (no retraction of the active zero offset)

N10 G90 G0 G54 X100


N20 G1 G91 X10 traverse X by 10 mm, the offset is not traversed
N30 G90 X50 traverse to position X75, the offset is traversed

Contents Page 56 of 286 Go Back


Fundamentals of CNC Machining Full Screen

3.2. Absolute dimensions for rotary axes, DC, ACP, ACN

Programming:
A=DC() B=DC() C=DC()
or
A=ACP() B=ACP() C=ACP()
or
A=ACN() B=ACN() C=ACN()
Explanation of the parameters:

ABC Axis identifier for rotary axis to be traversed


DC Absolute dimensions, approach position directly
ACP Absolute dimensions, approach position in positive direction
ACN Absolute dimensions, approach position in negative direction

Function:
With the above parameters you can define the desired approach strategy for positioning rotary axes.

Contents Page 57 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence:

Absolute dimensioning with


The rotary axis travels to the position programmed in absolute coordinates along the shortest direct path.
The rotary axis traverses across an area of up to 180.
Absolute dimensioning with ACP
The rotary axis travels to the positions programmed in absolute coordinates in the positive direction of axis
rotation (counterclockwise).
Absolute dimensioning with ACN
The rotary axis travels to the positions programmed in absolute coordinates in the negative direction of axis
rotation (clockwise).
The traversing range between 0 and 360 must be set in the machine data (modulo method) for positioning
with directional data (ACP, ACN). G91 or IC must be programmed to traverse modulo rotary axes by more than

Contents Page 58 of 286 Go Back


Fundamentals of CNC Machining Full Screen

360 in a block. You will find more information on the previous pages.

The positive direction of rotation (clockwise or counterclockwise) is set in the machine data.

Additional notes:
All of the commands are modal. You can also use DC, ACP and ACN for spindle positioning from zero
speed.
Example:
Example: SPOS=DC(45)
Programming example:
Machining on a rotary table: the tool is stationary, the table rotates through 270 in clockwise direction to
produce a circular groove.

N10 SPOS=0 Spindle in position control


N20 G90 G0 X-20 Y0 Z2 T1 Absolute, infeed in rapid traverse

Contents Page 59 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N30 G1 Z-5 F500 Reduce feed


N40 C=ACP(270) The table rotates through 270 in clockwise direction,
the tool mills a circular groove
N50 G0 Z2 M30 Lift, end of program

3.3. Metric/imperial dimension, G70/G71/G700/G710

Programming:
Call
G70 or G71
G700 or G710 SW5 and later

Explanation of the commands:

G70 Imperial measure (length [inches])


G71 Metric measure (length [mm])
G700 Imperial measure (length [inch]; feedrate [inch/min])
G710 Metric measure (length [mm]; feed [mm/min])

Function:
Depending on the dimensions in the production drawing, you can program workpiece geometries alternately
in metric measures and inches.
In SW 5 and higher, the functionality of G70/G71 has been extended with G700/G710. In addition to
the geometrical parameters, the technological parameters, such as feed F, are interpreted during part program

Contents Page 60 of 286 Go Back


Fundamentals of CNC Machining Full Screen

execution in the system of units set in G700/G710.

Sequence:

G70 or G71
You can instruct the control to convert the following geometrical dimensions (with necessary deviations)
into the system of units not set and then enter them directly (see examples):

positional data X, Y, Z, ,

intermediate point coordinates I1, J1, K1 Interpolation parameters I, J, K and circle radius CR in circle
programming,

thread lead,

programmable zero offset (TRANS),


polar radius RP.

All other parameters such as feedrates, tool offsets or settable zero offsets are interpreted (when using
G70/G71) in the default system of units (MD 10240: SCALING SYSTEM IS METRIC).
The representation of system variables and machine data is also independent of the G70/G71 context.
G700 or G710
In SW 5 and higher, the controller interprets all feedrates used with G700/G710 in the programmed system of
units, unlike G70/G71. The G700/G710 codes are contained in the same group as G70/G71. The programmed
feedrate value is modal and thus does not change automatically on subsequent G70 /G71/G700/G710 selections.
If the feedrate in the G70/G71/G700/G710 context is to be activated, a new F value must be programmed
explicitly.

Contents Page 61 of 286 Go Back


Fundamentals of CNC Machining Full Screen

All length-related NC data, machine data and setting data for G700/G710 are always read and written in
the programmed context of G700/G710.

Synchronized actions
If positioning tasks are performed in synchronized actions and no G70/G71/G700/G710 command is pro-
grammed in the synchronized action itself, the G70/G71/G700/G710 context active at the time of execution
determines which system of units is used.
Programming example
Change between metric and imperial input with basic setting metric (G70/G71).

N10 G0 G90 X20 Y30 Z2 S2000 M3 T1 Basic setting metric


N20 G1 Z-5 F500 At feed in Z [mm/min]
N30 X90
N40 G70 X2.75 Y3.22 Enter destination positions in inches, G70 is active
until deselected by G71 or end of program
N50 X1.18 Y3.54

Contents Page 62 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N60 G71 X 20 Y30 Enter positions in mm


N70 G0 Z2 M30 Retract in rapid traverse, end of program

3.4. Settable zero offset/frame, G54 to G599

Programming:
Call
G54 or G55 or G56 or G57 or G505 G599
Deactivate
G53 or G500 or SUPA or G153
Explanation of the commands

G53 Non-modal deactivation of current settable zero offset and programmable zero
offset
G54 to G57 Call the second to fifth settable zero offset/frame
G153 Non-modal suppression of settable, programmable and total basic frame
G500 - G500 = zero frame, default setting, (contains no offset, rotation, mirroring or
scaling)
a) Deactivation of settable zero offsets / frames (G54 to G599) until the next
call,
b) Activation of the total basic frame ($P ACTBFRAME).
- G500 is not 0
a) Activation of first settable zero offset/frames ($P UIFR[0])
b) Activation of total basic frame ($P ACTBFRAME), or a modified basic
frame is activated.
SUPA Non-modal deactivation, including programmed offsets, handwheel offsets
(DRF), external zero offset and PRESET offset.
G505 . . . G599 Call the 6th to the 99th settable zero offset

Contents Page 63 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function
The settable zero offset relates the workpiece zero on all axes to the origin of the basic coordinate system.
It is therefore possible to call up cross-program zero points for different fixtures with a G command.

Milling:
For turning, e.g. the offset value for tightening the chuck is entered in G54.

Contents Page 64 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

Contents Page 65 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence:

Setting the offset values

On the operator panel or universal interface, enter the following values in the internal control zero offset
table:

coordinates for the offset,

angle for rotated clamping and

scale factors if necessary.

Contents Page 66 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Activating the zero offset

In the NC program, the zero offset is moved from the machine coordinate system to the workpiece coordinate
system by executing commands G54 to G57. In the next NC block with a programmed movement, all of the
positional parameters and thus the tool movements refer to the workpiece zero which is now valid.
The four available zero offsets can be used, e.g. for multiple machining operations, to describe four workpiece
clamping positions simultaneously and execute them in the program.

Further settable zero offsets, G505 to G599


Command numbers G505 to G599 are available for this purpose. This enables you to create up to 100
settable zero offsets in total, in addition to the four default zero offsets G54 to G57, by using the machine data.
They are stored in the zero point memory.
Deactivating a zero offset
Command G500 activates the first settable zero offset including basic offset, i.e. when zero frame is selected
as the default, the current settable zero offset is deactivated. G53 suppresses the programmable and settable

Contents Page 67 of 286 Go Back


Fundamentals of CNC Machining Full Screen

offset non-modally. G153 has the same effect as G53 and also suppresses the total basic frame. SUPA has the
same effect as G153 and also suppresses the DRF offset, overlaid motions and external ZOs. You will find more
information on programmable zero offsets in Chapter 6 (frames).
Additional notes
The basic setting at program start, e.g. G54 or G500, can be set with machine data.
Programming example
In this example, three workpieces, arranged on a pallet according to the zero offset values G54 to G56, are
machined successively. The machining sequence is programmed in subprogram L47.

N10 G0 G90 X10 Y10 F500 T1 Approach


N20 G54 S1000 M3 Call the first zero offset, spindle clockwise
N30 L47 Run program, in this case as a subprogram
N40 G55 G0 Z200 Call the second zero offset Z via obstacle
N50 L47 Run program as subprogram
N60 G56 Call third zero offset

Contents Page 68 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N70 L47 Run program as subprogram


N80 G53 X200 Y300 M30 Suppress zero offset, end of program

3.5. Selecting the working plane, G17 to G 19

Programming:
Call
G17 or G18 or G19
Explanation of the commands

G17 Working plane X/Y Infeed direction Z


G18 Working plane Z/X Infeed direction Y
G19 Working plane Y/Z Infeed direction X

The axis assignment for G17, G18, G19 specified above is based on the supposition that X is assigned to the
1st geometry axis, Y to the second and Z to the third in the machine data.

Function
The specification of the working plane, in which the contour is to be machined also defines the following
functions:

the plane for tool radius compensation,

the infeed direction for tool length compensation depending on the tool type,

the plane for circular interpolation.

Contents Page 69 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling:
Sequence
It is advisable to define the working plane at the beginning of the program. The working plane must be
specified when the tool path compensation G41/G42 (see Section Tool offsets) is called so that the control
can correct the tool length and radius. In the initial setting, G17 (X/Y plane) is defined for milling and G18
(Z/X plane) is defined for turning.

Contents Page 70 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:
Machining on inclined planes

Contents Page 71 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Rotate the coordinate system with ROT (see Section Coordinate system offset) to position the coordinate
axes on the inclined surface. The working planes rotate accordingly. Tool length compensation in inclined
planes. The tool length compensation generally always refers to the fixed, non-rotated working plane.
Note
The tool length components can be calculated according to the rotated working planes with the functions
for Tool length compensation for orientable tools.
Additional notes
The control provides convenient coordinate transformation functions for the spatial definition of the working
plane.
Programming example
The conventional approach: Define the working plane, call up the tool type and tool offset values, activate
the path compensation, program the traversing movements.
Example for milling tool:

N10 G17 T5 D8 G17 Call the working plane, in this example X/Y T,
D tool call. The length compensation is performed
in the Z direction.
N20 G1 G41 X10 Y30 Z-5 F500 The radius compensation is performed in the X/Y
plane.
N30 G2 X22.5 Y40 I50 J40 Circular interpolation / tool radius compensation in
the X/Y plane.

3.6. Programmable working area limitation, G25/G26

Programming:

G25 X ...Y ...Z ... (Programmed in a separate NC block)

Contents Page 72 of 286 Go Back


Fundamentals of CNC Machining Full Screen

G26 X ...Y ...Z ... (Programmed in a separate NC block)


WALIMON, WALIMOF

Explanation of the commands:

G25 X Y Z Lower working area limitation, value assignment in the channel axes*
G26 X Y Z Upper working area limitation, value assignment in the channel axes*
WALIMON Working area limitation: activate
WALIMOF Deactivate working area limitation

* Value assignments in the basic coordinate system


Function

G25/G26 limits the working area in which the tool can traverse in all channel axes. These commands allow
you to set up protection zones in the working area which are out of bounds for tool movements. In addition to
programming values using G25/G26, you can also parameterize them in setting data. The axial setting data

Contents Page 73 of 286 Go Back


Fundamentals of CNC Machining Full Screen

define the axes for which the working area limitation is valid. The working area limitation for all validated axes
must be programmed with the WALMON command. The WALIMOF command deactivates the working area
limitation.
Sequence:

Reference points on the tool


When tool length compensation is active, the reference point is the tip of the tool, otherwise it is the
toolholder reference point. If the tool is positioned outside the specified area or leaves this area, the program
stops executing.

Programmable working area limitation, G25/G26


An upper (G26) and lower (G25) working area limit is defined for each axis. These values apply immediately
and are not lost on Reset and when the control is switched on again. The tool (milling tool) radius can be
changed in the channel-specific machine data $MC WORKAREA WITH TOOL RADIUS.

Contents Page 74 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The coordinates for the individual axes apply in the basic coordinate system!

Activate/deactivate working area limitation


The command WALIMON activates working area limitation for all axes with the values programmed in
G25/G26. WALIMON is the default setting. It therefore only has to be programmed if working area limitation
has been disabled. The command WALIMOF is used to deactivate working area limitation for all of the axes.
Additional notes
G25/G26 can also be used to program limits for spindle speeds at the address S. For further information,
please refer to Section Feed control and spindle motion.
Programming example

A protection zone is defined in the working area of a turning machine. This protects the surrounding
equipment such as turrets, measuring stations, etc. against damage. Default setting: WALIMON

N10 G0 G90 F0.5 T1

Contents Page 75 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N20 G25 X-80 Z30 Define the lower limit for the individual coordinate
axes
N30 G26 X80 Z330 Define the upper limit
N40 L22 Cutting program
N50 G0 G90 Z102 T2 To tool change location
N60 X0
N70 WALIMOF Deactivate working area limitation
N80 G1 Z-2 F0.5 Boring
N90 G0 Z200 Back
N100 WALIMON Activate working area limitation
N110 X70 M30 End of program

Contents Page 76 of 286 Go Back


Fundamentals of CNC Machining Full Screen

4. PROGRAMMING MOTION COMMANDS


4.1. General information

Motion commands

In this section you will find a description of all the travel commands you can use to machine workpiece
contours. You can program straight lines and arcs of a circle. A helix can be produced by combining these two
elements. Executed in succession, these contour elements produce the workpiece contour. Before a machining
process is started, you need to position the tool in such a way as to avoid any damage to the tool or workpiece.

Contents Page 77 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling: Turning:
Start point destination point
The traversing movement always runs from the last approached position to the programmed destination
position. This destination position is also the start position for the next travel command.
Number of axis values
Depending on the control configuration, you can program up to 8 axes per set of movements. These may
include path axes, synchronized axes, positioning axes and spindle oscillation mode.
An axis address can only be programmed once in each block.
These commands can be programmed in Cartesian or polar coordinates.

Contents Page 78 of 286 Go Back


Fundamentals of CNC Machining Full Screen

4.2. Traversing commands with polar coordinates, G110, G111, G112, AP, RP

Programming

Define pole:

G110, G111, G112 X . . . Y . . . Z . . .


G110, G111, G112 AP= . . . RP= . . .

Traversing commands with polar coordinates:

G0 AP= . . . RP= ...


G1 AP= . . . RP= ...
G2 AP= . . . RP= ...
G3 AP= . . . RP= ...

The new end point is defined in relation to a pole.


Explanation of the commands and parameters

G110 Pole parameter, with reference to the last approached position


G111 Pole parameter, absolute in the workpiece coordinate system
G112 Pole parameter, with reference to the last valid pole
AP= Polar angle, value range 0360, angle refers to horizontal axis of the working
plane
RP= Polar radius in mm or inches

Contents Page 79 of 286 Go Back


Fundamentals of CNC Machining Full Screen

All the commands relating to pole input must be programmed in a separate NC block

Function

A workpiece is frequently dimensioned with a central point as origin; the dimensions are given in terms of
angles and radii, e.g. in drilling patterns. Polar coordinates can be used to program these dimensions directly
in accordance with the drawing.
Sequence

Traversing commands
The positions specified by polar coordinates can be traversed with G0, G1, G2 and G3.
Working plane
The polar coordinates are valid in the working plane selected with G17 to G19.

Contents Page 80 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Cylindrical coordinates

The 3rd geometry axis, which lies perpendicular to the working plane, can also be specified in Cartesian
coordinates. This enables spatial parameters to be programmed in cylindrical coordinates.
Example:
G17 G0 AP . . . RP . . . Z . . .

Contents Page 81 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Defining the pole G110, G111, G112

The pole can be specified in Cartesian or polar coordinates. G commands G110 to G112 are used to provide a
unique definition of the reference point for dimensions. Absolute or incremental dimensioning (AC/IC) therefore
has no effect on the systematics specified in the G command.

Contents Page 82 of 286 Go Back


Fundamentals of CNC Machining Full Screen

If no pole is specified, the origin of the active workpiece coordinate system applies.

Polar angle AP

Value range 0360. With absolute input, the angle refers to the horizontal axis of the working plane, e.g.
X axis with G17. The positive direction of rotation runs counterclockwise. When incremental coordinates are
entered (AP=IC), the last angle programmed is taken as the reference. The polar angle is stored until a new
pole is defined or the working plane is changed.
Polar radius RP
The polar radius is specified in mm or inches in absolute positive values. RP is stored until a new value is
input.
SW 4.1 and later
If the modally active polar radius is RP = 0, the polar radius is calculated from the distance between
the starting point vector in the polar plane and the active pole vector. The calculated polar radius is stored
modally afterwards. This applies irrespective of the selected pole definition G110, G111, G112. If both points

Contents Page 83 of 286 Go Back


Fundamentals of CNC Machining Full Screen

are programmed identically, then this radius becomes 0 and alarm 14095 is generated.
If a pole angle AP is programmed with RP = 0, if the current block contains a polar angle AP rather than
a polar radius RP and if there is a difference between the current position and pole in workpiece coordinates,
then this difference is applied as the polar radius and stored modally.
If the difference = 0, the pole coordinates are specified again and the modal polar radius remains zero.
The following general rule applies:
You must not program Cartesian coordinates, such as interpolation parameters or axis addresses, for the
selected working plane in NC blocks with polar end position coordinates.
Additional notes
In the NC program you can switch between polar and Cartesian coordinates, block by block.

Programming example

Making a hole pattern: the positions of the holes are specified in polar coordinates. Each hole is machined
with the same production sequence: Predrill, drill to size, ream etc. The machining sequence is stored in a

Contents Page 84 of 286 Go Back


Fundamentals of CNC Machining Full Screen

subprogram.

N10 G17 G54 Working plane X/Y, workpiece zero


N20 G111 X43 Y38 Define pole
N30 G0 RP=30 AP=18 Z5 Approach starting point, position in cylindrical co-
ordinates
N40 L10 Subprogram call
N50 G91 AP=72 Approach next position in rapid traverse, polar angle
in incremental dimensions, polar radius from block
N30 is still stored and does not need to be specified
N60 L10 Subprogram call
N70 AP=IC(72) ...
N80 L10 ...
N90 AP=IC(72)
N100 L10 ...
N110 AP=IC(72)
N120 L10 ...
N130 G0 X300 Y200 Z100 M30 Retract tool, end of program

4.3. Rapid traverse movement, G0

Programming

G0 X . . . Y . . . Z . . .
G0 AP= . . . RP= . . .
RTLIOF, RTLION (SW 6.1 and later)

Explanation of the parameters

XYZ End point in Cartesian coordinates


Contents Page 85 of 286 Go Back
Fundamentals of CNC Machining Full Screen

AP= End point in polar coordinates, in this case the polar angle
RP= End point in polar coordinates, in this case the polar radius
RTLIOF with G0 Nonlinear interpolation (each path axis interpolates as a single axis)
RTLION with G0 Linear interpolation (path axes are interpolated together)

Function
You can use the rapid traverse movements to position the tool rapidly, to travel round the workpiece or to
approach tool change locations.
This function is not suitable for workpiece machining!

Sequence

The tool movement programmed with G0 is executed at the highest possible speed (rapid traverse). The
rapid traverse speed is defined separately for each axis in machine data. If the rapid traverse movement is
executed simultaneously on several axes, the rapid traverse speed is determined by the axis which requires the
greatest time for its section of the path.

Contents Page 86 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Additional notes
G0 is modal.
Function

SW 6.1 and later


Traversing path axes as positioning axes with Path axes can travel in one of two different modes to execute
movements in rapid traverse:

linear interpolation: (behavior in earlier SW version) The path axes are interpolated together,

nonlinear interpolation: (SW 6 and later) Each path axis is interpolated as an individual (positioning)
axis independently of the other axes involved in the rapid traverse movement.

Relevant part program commands:


RTLIOF activates nonlinear interpolation,

RTLION activates linear interpolation.


Linear interpolation must always be selected in the following cases:

with a G code combination including G0 which does not permit positioning movements (e.g. G40/41/42),
with a combination of G0 and G64,

when the compressor is active,

when a transformation is active.

With nonlinear interpolation, the setting for the relevant positioning axis BRISKA, SOFTA, DRIVEA
applies with regard to axial jerk.

Contents Page 87 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Since a different contour can be traversed in nonlinear interpolation mode, synchronized actions that refer
to coordinates of the original path are not operative in some cases!

Sequence
Traverse path axes as positioning axes with G0
Example:

G0 X0 Y10
G0 G40 X20 Y20
G0 G95 X100 Z100 m3 s100

Path POS[X]=0 POS[Y]=10 is traversed in path mode. No revolutional feedrate is active if path POS[X]=100
POS[Z]=100 is traversed.
Additional notes

SW 6.2 and later


Settable block change time with G0: It is possible to set a new motion end criterion, i.e. FINEA, COARSEA
or IPOENDA, in single axis interpolation mode for block changes within the braking ramp. All axes can reach
their end points independently of one another through a combination of Block change settable in braking ramp
of single axis interpolation and Traverse path axes as positioning axes with G0 rapid traverse. In this way,
two sequentially programmed X and Z axes are treated like positioning axes in conjunction with G0. The block
change to axis Z can be initiated by axis X as a function of the braking ramp time setting (100-0%). Axis Z
starts to move while axis X is still in motion. Both axes approach their end point independently of one another.
Programming example
G0 is used for approaching starting positions or tool change locations, retracting the tool, etc.

Contents Page 88 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling:

N10 G90 S400 M3 Absolute dimensioning, spindle clockwise


N20 G0 X30 Y20 Z2 Approach start position
N30 G1 Z-5 F1000 Tool infeed
N40 X80 Y65 Travel on straight line
N50 G0 Z2
N60 G0 X-20 Y100 Z100 M30 Retract tool, end of program

Contents Page 89 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

N10 G90 S400 M3 Absolute dimensioning, spindle clockwise


N20 G0 X25 Z5 Approach start position
N30 G1 G94 Z0 F1000 Tool infeed
N40 G95 Z-7.5 F0.2
N50 X60 Z-35 Travel on straight line
N60 Z-50
N70 G0 X62
N80 G0 X80 Z20 Retract tool
N90 M30 End of program

G0 cannot be replaced with G.

Contents Page 90 of 286 Go Back


Fundamentals of CNC Machining Full Screen

4.4. Linear interpolation, G1

Programming

G1 X . . . Y . . . Z . . . F . . .
G1 AP= . . . RP= . . . F . . .

Explanation of the parameters

XYZ End point in Cartesian coordinates


AP= End point in polar coordinates, in this case the polar angle
RP= End point in polar coordinates, in this case the polar radius
F Feedrate in mm/min

Contents Page 91 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

With G1, the tool travels along straight lines that are parallel to the
axis, inclined or in any orientation in space. The straight line interpolation enables machining of 3D surfaces,
grooves, etc.
Sequence
The tool travels at feedrate F along a straight line from the current starting point to the programmed
destination point. The workpiece is machined along this path. You can enter the destination point in Cartesian
or polar coordinates.
Example:
G1 G94 X100 Y20 Z30 A40 F100
The end point on X, Y, Z is approached at a feedrate of 100 mm/min; the rotary axis A is traversed as a
synchronized axis in order that all four movements are completed at the same time.
Additional notes
G1 is modal. The spindle speed S and the direction of spindle rotation M3/M4 must be specified for

Contents Page 92 of 286 Go Back


Fundamentals of CNC Machining Full Screen

machining. FGROUP can be used to define groups of axes to which the path feed F applies.
Programming example
Machining of a groove: the tool travels from the starting point to the end point in the X/Y direction. Infeed
takes place simultaneously in the Z direction.
Milling:

N10 G17 S400 M3 Select working plane, spindle clockwise


N20 G0 X20 Y20 Z2 Approach start position
N30 G1 Z-2 F40 Tool infeed
N40 X80 Y80 Z-15 Travel along inclined straight line
N50 G0 Z100 M30 Retract to tool change location

Contents Page 93 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

N10 G17 S400 M3 Select working plane, spindle clockwise


N20 G0 X40 Y-6 Z2 Approach start position
N30 G1 Z-3 F40 Tool infeed
N40 X12 Y-20 Travel along inclined straight line
N50 G0 Z100 M30 Retract to tool change location

4.5. Circular interpolation, G2/G3, CIP

Programming

G2/G3 X ...Y ...Z ...I ...J ...K ...


G2/G3 AP= . . . RP= . . .
G2/G3 X . . . Y . . . Z . . . CR= . . .
G2/G3 AR= . . . I . . . J . . . K . . .

Contents Page 94 of 286 Go Back


Fundamentals of CNC Machining Full Screen

G2/G3 AR= . . . X . . . Y . . . Z . . .
CIP X . . . Y . . . Z . . . I1= . . . J1= . . . K1= . . .
CT X . . . Y . . . Z . . .

Explanation of the commands and parameters

G2 Travel on a circular path in clockwise direction


G3 Travel on a circular path in counterclockwise direction
CIP Circular interpolation through intermediate point
CT Circle with tangential transition
XYZ End point in Cartesian coordinates
IJK Circle center point in Cartesian coordinates (in X, Y, Z direction)
AP= End point in polar coordinates, in this case the polar angle
RP= End point in polar coordinates, in this case polar radius corresp. to circle radius
CR= Circle radius
AR= Arc angle
I1= J1= K1= Intermediate points in Cartesian coordinates (in X, Y, Z direction)

Contents Page 95 of 286 Go Back


Fundamentals of CNC Machining Full Screen

There is no practical limitation on the maximum size of the programmable radius.

Function

Circular interpolation enables machining of full circles or arcs.

Contents Page 96 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Indication of working plane


The control needs the working plane parameter (G17 to G19) in order to calculate the direction of rotation
for the circle G2 is clockwise/G3 is counterclockwise. It is generally advisable to specify the working plane.
Exception:
You can also machine circles outside the selected working plane (not with arc angle and helix parameters).
In this case, the axis addresses that you specify as an end point determine the circle plane.
Additional notes
G2/G3 are modal. You can use FGROUP to specify which axes are to be traversed with a programmed
feedrate. The control provides a range of different ways to program circular movements. This allows you to
implement almost any type of drawing dimension directly. For detailed descriptions please refer to the following
pages.

Contents Page 97 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming a circle with center point and end point


The circular movement is described by:
the end point in Cartesian coordinates X, Y, Z and

the circle center point at addresses I, J, K.

The identifiers have the following meanings:

I: Coordinate of the circle center point in the X direction


J: Coordinate of the circle center point in the Y direction
K: Coordinate of the circle center point in the Z direction

If the circle is programmed with a center point but no end point, the result is a full circle. Input in absolute
and incremental dimensions. The defaults G90/G91 absolute or incremental coordinates are valid only for the
circle end point. The center point coordinates I, J, K are normally entered in incremental dimensions with
reference to the circle starting point.

Milling:

Contents Page 98 of 286 Go Back


Fundamentals of CNC Machining Full Screen

You program the absolute center point non-modally with reference to the workpiece zero with: I=AC( . . . ),
J=AC( . . . ), K=AC( . . . )
Example for incremental dimensions:

N10 G0 X67.5 Y80.211


N20 G3 X17.203 Y38.029 I17.5 J30.211 F500

Example for absolute dimensions:

N10 G0 X67.5 Y80.211


N20 G3 X17.203 Y38.029 I=AC(50) J=AC(50)

An interpolation parameter I, J, K with value 0 can be omitted but the second associated parameter must

Contents Page 99 of 286 Go Back


Fundamentals of CNC Machining Full Screen

always be specified.

Turning:
Example for incremental dimensions:

N120 G0 X12 Z0
N125 G1 X40 Z-25 F0.2
N130 G3 X70 Z-75 I-3.335 K-29.25
N135 G1 Z-95

Example for absolute dimensions:

N120 G0 X12 Z0
N125 G1 X40 Z-25 F0.2
N130 G3 X70 Z-75 I=AC(33.33) K=AC(-54.25)
N135 G1 Z-95

Contents Page 100 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming a circle with radius and end point


The circular movement is described by:
the circle radius CR= and

the end point in Cartesian coordinates X, Y, Z.

In addition to the circle radius, you must also specify the leading sign +/ to indicate whether the traversing
angle is to be greater than or less than 180. A positive leading sign can be omitted.
The identifiers have the following meanings:

CR=+ . . . : angle smaller or equal to 180


CR= . . . : angle larger than 180

Milling:
Example:

N10 G0 X67.5 Y80.211


Contents Page 101 of 286 Go Back
Fundamentals of CNC Machining Full Screen

N20 G3 X17.203 Y38.029 CR=34.913 F500

You dont need to specify the center point with this procedure. Full circles (traversing angle 360) cannot be
programmed with CR=, but must be programmed using the circle end point and interpolation parameters.

Turning:
Example:

N125 G1 X40 Z-25 F0.2


N130 G3 X70 Z-75 CR=30
N135 G1 Z-95

Programming a circle with arc angle and center point or end point
The circular movement is described by:
the arc angle AR = and

Contents Page 102 of 286 Go Back


Fundamentals of CNC Machining Full Screen

the end point in Cartesian coordinates X, Y, Z or

the circle center point at addresses I, J, K.

The identifiers have the following meanings: AR=: arc angle, value range 0 to 360. Please refer to the
preceding pages for the meanings of I, J, K.
Full circles (traversing angle 360) cannot be programmed with AR=, but must be programmed using the circle
end point and interpolation parameters.

Milling:
Example:

N10 G0 X67.5 Y80.211


N20 G3 X17.203 Y38.029 AR=140.134 F500
or
N20 G3 I17.5 J30.211 AR=140.134 F500

Contents Page 103 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

N125 G1 X40 Z-25 F0.2


N130 G3 X70 Z-75 AR=135.944
or
N130 G3 I-3.335 K-29.25 AR=135.944
or
N130 G3 I=AC(33.33) K=AC(-54.25) AR=135.944
N135 G1 Z-95

Programming a circle with polar coordinates


The circular movement is described by:
the polar angle AP= ,
and the polar radius RP= .

Contents Page 104 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The following rule applies: The pole lies at the circle center point. The polar radius corresponds to the
circle radius.

Milling:
Example:

N10 G0 X67.5 Y80.211


N20 G111 X50 Y50
N30 G3 RP=34.913 AP=200.052 F500

Contents Page 105 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:
Example:

N125 G1 X40 Z-25 F0.2


N130 G111 X33.33 Z-54.25
N135 G3 RP=30 AP=142.326
N140 G1 Z-95

Programming example
The following program lines contain an example for each circular programming possibility. The necessary
dimensions are shown in the opposite production drawing.

Contents Page 106 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling:

N10 G0 G90 X133 Y44.48 S800 M3 Approach starting point


N20 G17 G1 Z-5 F1000 Tool infeed
N30 G2 X115 Y113.3 I-43 J25.52 Circle end point, center point in incremental dimen-
sions
or
N30 G2 X115 Y113.3 I=AC(90) J=AC(70) Circle end point, center point in absolute dimensions
or
N30 G2 X115 Y113.3 CR=-50 Circle end point, circle radius
or
N30 G2 AR=269.31 I-43 J25.52 Arc angle, center point in incremental dimensions
or
N30 G2 AR=269.31 X115 Y113.3 Arc angle, circle end point
N40 M30 End of program

Contents Page 107 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

N ... ...
N120 G0 X12 Z0
N125 G1 X40 Z-25 F0.2
N130 G3 X70 Y-75 I-3.335 K-29.25 Circle end point, center point in incremental dimen-
sions
or
N130 G3 X70 Y-75 I=AC(33.33) K=AC(- Circle end point, center point in absolute dimensions
54.25)
or
N130 G3 X70 Z-75 CR=30 Circle end point, circle radius
or
N130 G3 X70 Z-75 AR=135.944 Arc angle, circle end point
or
N130 G3 I-3.335 K-29.25 AR=135.944 Arc angle, center point in incremental dimensions
or
N130 G3 I=AC(33.33) K=AC(-54.25) Arc angle, center point in absolute dimensions

Contents Page 108 of 286 Go Back


Fundamentals of CNC Machining Full Screen

AR=135.944
or
N130 G111 X33.33 Z-54.25 Polar coordinates
N135 G3 RP=30 AP=142.326 Polar coordinates
N140 G1 Z-95
N ... ...

Programming a circle with intermediate and end points


You can use CIP to program arcs. These arcs can also be inclined in space. In this case, you describe the
intermediate and end points with three coordinates.

The circular movement is described by:


the intermediate point at addresses I1=, J1=, K1= and
the end point in Cartesian coordinates X, Y, Z.
The identifiers have the following meanings:

Contents Page 109 of 286 Go Back


Fundamentals of CNC Machining Full Screen

I1=: Coordinate of the interm. point in the X direction


J1=: Coordinate of the interm. point in the Y direction
K1=: Coordinate of the interm. point in the Z direction

Input in absolute and incremental dimensions


The G90/G91 defaults for absolute or incremental dimensions are valid for the intermediate and circle end
points. With G91, the circle starting point is used as the reference for the intermediate point and end point.
CIP is modal. The traversing direction is determined by the order of the starting point, intermediate point and
end point.
Programming example for CIP
In order to machine an inclined circular groove, a circle is described by specifying the intermediate point
with 3 interpolation parameters, and the end point with 3 coordinates.

Milling:
Example:

Contents Page 110 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N10 G0 G90 X130 Y60 S800 M3 Approach starting point


N20 G17 G1 Z-2 F100 Tool infeed
N30 CIP X80 Y120 Z-10 Circle end point and intermediate point
I1= IC(-85.35) J1=IC(-35.35) K1=-6 Coordinates for all three geometry axes
N40 M30 End of program

Turning:
Example:

N125 G1 X40 Z-25 F0.2


N130 CIP X70 Z-75 I1=IC(26.665) K1=IC(-29.25)
or
N130 CIP X70 Z-75 I1=93.33 K1=-54.25
N135 G1 Z-95

Contents Page 111 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming a circle with tangential transition

The Tangential transition function is an expansion of the circle programming.


The circle is defined by:

the start and end point and


the tangent direction at the start point.

The G code CT produces an arc that lies at a tangent to the contour element programmed previously.
CT is modal.
As a rule, the direction of the tangent, as well as the start and end point of the circle are uniquely defined.
Position of the circle plane The position of the circle plane depends on the active plane (G17-G19). If the
tangents of the previous block do not lie in the active plane, their projection in the active plane is used. If the
start and end points do not have the same position components perpendicular to the active plane, a helix is
produced instead of a circle.
Specifying TURN= . . . enables you to program circles with more than one full rotation.

Contents Page 112 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Determining the direction of the tangent


The direction of tangent at the start point of a CT block is determined from the end tangent of the
programmed contour of the previous block with a traversing movement. Any number of blocks without traversing
information may lie between this block and the current block. In the case of splines, the tangential direction is
defined by the straight line through the last two points. This direction is generally not the same as the direction
at the end point of the splines for A and C splines with active ENAT or EAUTO. The transition of B splines
is always tangential, the tangent direction is defined as for A or C splines and active ETAN.
Frame change
If a frame change takes place between the block defining the tangent and the CT block, the tangent is also
subjected to this change.
Limit case
If the extension of the start tangent runs through the end point, a straight line is produced instead of a
circle (limit case: circle with infinite radius). In this special case, TURN must either not be programmed or
the value must be TURN=0.
Additional notes
When the values tend towards this limit case, circles with an unlimited radius are produced and machining
with TURN unequal 0 is generally aborted with an alarm due to violation of the software limits.
Programming example for CT
Mill a circular arc following a straight line:

Contents Page 113 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling:

N10 G0 X0 Y0 Z0 G90 T1 D1
N20 G41 X30 Y30 G1 F1000 Activate tool radius compensation
N30 CT X50 Y15 Program circle with tangential transition
N40 X60 Y-5
N50 G1 X70
N60 G0 G40 X80 Y0 Z20
N70 M30

Contents Page 114 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

N110 G1 X23.293 Z0 F10


N115 X40 Z-30 F0.2
N120 CT X58.146 Z-42 Program circle with tangential transition
N125 G1 X70

4.6. Helical interpolation, G2/G3 TURN

Programming

G2/G3 X Y Z I J K TURN=
G2/G3 X Y Z I J K TURN=
G2/G3 AR= I J K TURN=
G2/G3 AR= X Y Z TURN=
G2/G3 AP RP= TURN=

Contents Page 115 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Explanation of the commands and parameters

G2 Travel on a circular path in clockwise direction


G3 Travel on a circular path in counterclockwise direction
XYZ End point in Cartesian coordinates
IJK Circle center point in Cartesian coordinates
AR Arc angle
TURN= Number of additional circle passes within the range 0 to 999
AP= Polar angle
RP= Polar radius

Function
Helical interpolation (Helical interpolation) can be used to manufacture threads and oil grooves, for example.
Sequence

Contents Page 116 of 286 Go Back


Fundamentals of CNC Machining Full Screen

In helical interpolation, two movements are superimposed and executed in parallel:

a horizontal circular movement on which,

a vertical linear movement is superimposed.

The circular movement is performed on the axes specified by the working plane.
Example:
Working plane G17, axes for circular interpolation X and Y. The infeed movement is performed on the
perpendicular infeed axis, in this case Z.
Sequence of motions

1. Approach starting point

2. With TURN= execute the full circles programmed

3. Approach the circle end point, e.g. as a partial revolution

Contents Page 117 of 286 Go Back


Fundamentals of CNC Machining Full Screen

4. Execute steps 2 and 3 across the infeed depth.

The lead with which the helix is to be machined is calculated from the number of full circles plus the
programmed end point executed across the infeed depth. Programming the end point for helical interpolation
Please refer to circular interpolation for a detailed description of the interpolation parameters.
Additional notes
For helical interpolation, it is advisable to specify a programmed feedrate override (CFC).
Programming example
Helical interpolation

N10 G17 G0 X27.5 Y32.99 Z3 Approach start position


N20 G1 Z-5 F50 Tool infeed
N30 G3 X20 Y5 Z-20 I=AC(20) J=AC (20) Helix with following parameters: Execute 2 full cir-
TURN=2 cles from start position, then approach end point
N40 M30 End of program

Contents Page 118 of 286 Go Back


Fundamentals of CNC Machining Full Screen

5. FRAMES
5.1. General

What is a frame? Frame is the conventional term for a geometrical expression that describes an arithmetic
rule, such as translation or rotation. Frames are used to describe the position of a destination coordinate system
by specifying coordinates or angles starting from the current workpiece coordinate system.
Possible frames:

basic frame (basic offset),

settable frames (G54...G599),

programmable frames.

Machine manufacturer (MH6.1)


Settable frames: See machine manufacturers specifications

Contents Page 119 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Frame components

Milling: Turning:
A frame can consist of the following arithmetic rules:
Translation, TRANS, ATRANS,
Rotation, ROT, AROT,
Scale, SCALE, ASCALE,
Mirroring, MIRROR, AMIRROR.

The above frame instructions are programmed in separate NC blocks and executed in the programmed order.

5.2. Frame instructions

Basic frame (basic offset)


The basic frame describes the coordinate transformation from the Basic Coordinate System (BCS) to the

Contents Page 120 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Basic Zero System (BZS) and has the same effect as for settable frames.
Settable instructions
Settable instructions are the zero offsets which can be called from any NC program with the commands G54
to G599. The offset values are predefined by the user and stored in the zero offset memory on the control. This
is used to define the Workpiece Coordinate System (WCS).
Programmable instructions
Programmable instructions (TRANS, ROT, ...) are valid in the current NC program and refer to the settable
instructions. The programmable frame is used to define the Workpiece Coordinate System (WCS).
Substituting instructions

TRANS, ROT, SCALE and MIRROR are substituting instructions.


This means that each of these instructions cancels all other previously programmed frame instructions.
The last called settable zero offset G54 to G599 is used as the reference.

Contents Page 121 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Additive instructions

ATRANS, AROT, ASCALE and AMIRROR are additive instructions. The currently set zero point or the
last workpiece zero to be programmed with frame instructions is used as the reference. The above instructions
are added to existing frames.
Note:
Additive instructions are frequently used in subprograms. The basic functions defined in the main program
are not lost after the end of the subprogram if the subprogram has been programmed with the SAVE attribute.

5.3. Programmable zero offset


5.3.1. TRANS, ATRANS

Programming

TRANS X . . . Y . . . Z . . . (programmed in a separate NC block)

Contents Page 122 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ATRANS X . . . Y . . . Z . . . (programmed in a separate NC block)

Explanation of the commands and parameters

TRANS Absolute zero offset, with reference to the currently valid workpiece zero set with G54
to G599
ATRANS as TRANS, but with additive zero offset
XYZ Offset value in the direction of the specified geometry axis

Function

Milling: Turning:
TRANS/ATRANS can be used to program translations for all path and positioning axes in the direction of
the specified axis. This allows you to work with different zero points, for example when performing recurring
machining processes at different workpiece positions.

Contents Page 123 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Substituting instruction, TRANS X Y Z

Translation through the offset values programmed in the specified axis directions (path, synchronized axes
and positioning axes). The last specified settable zero offset (G54 to G599) is used as a reference.

Contents Page 124 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The TRANS command cancels all frame components of the previously activated programmable frame.

You can use ATRANS to program a translation which is to be added to existing frames.

Additive instruction, ATRANS X Y Z

Translation through the offset values programmed in the specified axis directions. The currently set or last
programmed zero point is used as the reference. Deactivate programmable zero offset For all axes: TRANS
(without axis parameter)
Programming example
With this workpiece, the illustrated shapes recur several times in the same program. The machining sequence
for this shape is stored in a subprogram. You use the translation to set only those workpiece zeroes and then
call up the subprogram.

Contents Page 125 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Milling:

N10 G1 G54 Working plane X/Y, workpiece zero


N20 G0 X0 Y0 Z2 Approach starting point
N30 TRANS X10 Y10 Absolute offset
N40 L10 Subprogram call
N50 TRANS X50 Y10 Absolute offset
N60 L10 Subprogram call
N70 M30 End of program

Contents Page 126 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Turning:

N ... ...
N10 TRANS X0 Z150 Absolute offset
N15 L20 Subprogram call
N20 TRANS X0 Z140 (or ATRANS Z-10) Absolute offset
N25 L20 Subprogram call
N30 TRANS X0 Z130 (or ATRANS Z-10) Absolute offset
N35 L20 Subprogram call
N ... ...

5.3.2. G58, G59: Axial programmable ZO (SW 5 and later)

Programming

G58 X . . . Y . . . Z . . . A . . . (programmed in a separate NC block)


G59 X . . . Y . . . Z . . . A . . . (programmed in a separate NC block)

Contents Page 127 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Explanation of the commands and parameters

G58 Replaces the absolute translation component of the programmable zero offset for the
specified axis, but the programmed additive offset remains valid, (in relation to the
workpiece zero set with G54 to G599)
G59 Replaces the absolute translation component of the programmable zero offset for the
specified axis, but the programmed absolute offset remains valid
XYZ Offset value in the direction of the specified geometry axis

Function

G58 and G59 allow translation components of the programmable zero offset (frame) to be replaced for
specific axes.
The translation function comprises the:
absolute component (G58, coarse offset),
additive component (G59, fine offset).

Contents Page 128 of 286 Go Back


Fundamentals of CNC Machining Full Screen

These functions can only be used when the fine offset is configured. If G58 or G59 is used without a
configured fine offset, alarm 18312 channel %1 block %2 frame: Fine offset not configured is output.
Machine manufacturer (MH6.2)
The fine offset must be configured via MD for this function.
Note
MD24000:FRAME ADD COMPONENTS=1, or else an alarm is generated in response to G58, G59.
The absolute translation component is modified by the following commands:

TRANS,
G58,

CTRANS,
CFINE,

$P PFRAME[X,TR].
The additive translation component is modified by the following commands:

ATRANS,

G59,

CTRANS,

CFINE,

$P PFRAME[X,FI].

The table below describes the effect of various program commands on the absolute and additive offsets.
Effect of the additive/absolute offset:

Contents Page 129 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Command Rough or ab- Fine or additive Comment


solute offset offset
TRANS X10 10 Unchanged Absolute offset for X
G58 X10 10 Unchanged Overwrites absolute offset for X
$P PFRAME[X,TR] = 10 10 Unchanged Progr. offset in X
ATRANS X10 Unchanged Fine (old) + 10 Additive offset for X
G59 X10 Unchanged 10 Overwrites additive offset for X
$P PFRAME[X,FI] = 10 Unchanged 10 Progr. fine offset in X
CTRANS(X,10) 10 0 offset for X
CTRANS() 0 0 Deselection of offset(including fine off-
set component)
CFINE(X,10) 0 10 Fine offset in X

Programming example

N ...
N50 TRANS X10 Y10 Z10 ; absolute translation component X10 Y10 Z10
N60 ATRANS X5 Y5 ; additive translation component X5 Y5 = total offset
X15 Y15 Z10
N70 G58 X20 ; absolute translation component X20 + addit. X5
Y5 = total offset X25 Y15 Z10
N80 G59 X10 Y10 ; additive translation component X10 Y10 + abso-
lute. X20 Y 10 = total offset X30 Y20 Z10
N ...

5.4. Programmable rotation, ROT, AROT

Programming

Contents Page 130 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ROT X . . . Y . . . Z . . .
ROT RPL= . . .

AROTX . . . Y . . . Z . . .
AROT RPL= . . .

Each instruction must be programmed in a separate NC block.


Explanation of the commands and parameters

ROT Absolute rotation with reference to the currently valid workpiece zero set with G54
to G599
AROT Additive rotation with reference to the currently valid set or programmed zero point
XYZ Rotation in space: geometry axes around which the rotation takes place
RPL Rotation in the plane: Angle through which the coordinate system is rotated (plane
set with G17-G19)

Contents Page 131 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

ROT/AROT can be used to rotate the workpiece coordinate system around each of the geometry axes X,
Y, Z or through an angle RPL in the selected working plane G17 to G19 (or around the perpendicular infeed
axis). This allows inclined surfaces or several workpiece sides to be machined in one setting.

Contents Page 132 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence: Rotation in space

Substituting instruction, ROT X Y Z

The coordinate system is rotated through the programmed angle around the specified axes. The center of
rotation is the last specified settable zero offset (G54 to G599).

Contents Page 133 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The ROT command cancels all frame components of the previously activated programmable frame.

A new rotation based on existing frames is programmed with AROT.

Additive instruction, AROT X Y Z

Rotation through the angle values programmed in the axis direction parameters. The center of rotation is
the currently set or last programmed zero point.
Note
For both instructions, please note the order and direction of rotation in which the rotations are performed.

Contents Page 134 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Direction of rotation

The following is defined as the positive direction of rotation: The view in the direction of the positive
coordinate axis and clockwise rotation.

Contents Page 135 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Order of rotation

You can rotate up to three geometry axes simultaneously in one NC block. The order of the RPY notation
(= Roll, Pitch, Yaw) or Euler angle through which the rotations are performed can be defined in machine
parameters.
RPY notation is the default setting. This defines the order of rotation as follows:
1. Rotation around the 3rd geometry axis (Z)
2. Rotation around the 2nd geometry axis (Y)
3. Rotation around the 1st geometry axis (X)
This order applies if the geometry axes are programmed in a single block. It also applies irrespective of the
input sequence. If only two axes are to be rotated, the parameter for the 3rd axis (value zero) can be omitted.
Value range

Rotation around 1st geometry axis: 180 to +180

Contents Page 136 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Rotation around 2nd geometry axis: 90 to +90


Rotation around 3rd geometry axis: 180 to +180
All possible rotations can be represented with this value range. Values outside the range are normalized by
the control into the above range. This value range applies to all frame variables.
If you want to define the order of the rotations individually, program the desired rotation successively for
each axis with AROT.

The working plane also rotates

The working plane defined with G17, G18 or G19 rotates with the spatial rotation.
Example:
Working plane G17 X/Y, the workpiece coordinate system is positioned on the top surface of the workpiece.
Translation and rotation is used to move the coordinate system to one of the side surfaces. Working plane G17
also rotates. This feature can be used to program plane destination positions in X/Y coordinates and the infeed
in the Z direction.

Contents Page 137 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Precondition:
The tool must be positioned perpendicular to the working plane. The positive direction of the infeed axis
points in the direction of the toolholder. Specifying CUT2DF activates the tool radius compensation in the
rotated plane. For more information please refer to Section 2 1/2 D Tool Compensation, CUT2D CUT2DF.
Sequence: Rotation in the plane

The coordinate system is rotated in the plane selected with G17 to G19. Substituting instruction, ROT
RPL Additive instruction, AROT RPL The coordinate system is rotated through the angle programmed with
RPL= in the current plane.
Change of plane
If you program a change of plane (G17 to G19) after a rotation, the angles of rotation programmed for the
axes are retained and continue to apply in the new working plane. It is therefore advisable to deactivate the
rotation before a change of plane. Deactivate rotation For all axes: ROT (without axis parameter)

Contents Page 138 of 286 Go Back


Fundamentals of CNC Machining Full Screen

In both cases, all frame components of the previously programmed frame are reset.

Programming example: Rotation in the plane

With this workpiece, the illustrated shapes recur several times in the same program. Rotations have to be
performed in addition to the translation, because the shapes are not arranged parallel to the axes.

N10 G17 G54 Working plane X/Y, workpiece zero


N20 TRANS X20 Y10 Absolute offset
N30 L10 Subprogram call
N40 TRANS X55 Y35 Absolute offset
N50 AROT RPL=45 Rotation of the coordinate system through 45
N60 L10 Subprogram call
N70 TRANS X20 Y40 Absolute offset (cancels all previous offsets)
N80 AROT RPL=60 Additive rotation through 60
N90 L10 Subprogram call
N100 G0 X100 Y100 Retraction

Contents Page 139 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N110 M30 End of program

Programming example: 3D rotation

N10 G17 G54 Working plane X/Y, workpiece zero


N20 TRANS X10 Y10 Absolute offset
N30 L10 Subprogram call
N40 ATRANS X35 Additive offset
N50 AROT Y30 Rotation through the Y axis
N60 ATRANS X5 Additive offset
N70 L10 Subprogram call
N80 G0 X300 Y100 M30 Retraction, end of program

Contents Page 140 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example: Multi-face machining

In this example, identical shapes on two perpendicular workpiece surfaces are machined by using subpro-
grams. The set-up of the infeed direction, working plane and zero point in the new coordinate system on the
righthand workpiece surface matches that of the top surface. The conditions required for subprogram execution
apply as before: working plane G17, coordinate plane X/Y, infeed direction Z.

N10 G17 G54 Working plane X/Y, workpiece zero


N20 L10 Subprogram call
N30 TRANS X100 Z-100 Absolute offset
N40 AROT Y90 Rotation of the coordinate system through Y
N50 AROT Z90 Rotation of the coordinate system through Z
N60 L10 Subprogram call
N70 G0 X300 Y100 M30 Retraction, end of program

Contents Page 141 of 286 Go Back


Fundamentals of CNC Machining Full Screen

5.5. Programmable frame rotations with solid angles, ROTS, AROTS and CROTS

Programming

ROTS X . . . Y . . .
AROTS X . . . Y . . .
CROTS X . . . Y . . .

When solid angles X and Y are programmed, the new X axis is located in the old Z-X plane (SW 5.3 and
later). When solid angles Z and X are programmed, the new Z axis is located in the old Y-Z plane (SW 5.3
and later). When solid angles Y and Z are programmed, the new X axis is located in the old X-Y plane (SW
5.3 and later).
Explanation of the commands and parameters

ROTS Frame rotations with solid angles for spatial orientation of a plane absolute, referred
to the currently valid frame with set workpiece zero for G54 to G599.
AROTS Frame rotations with solid angles for spatial orientation of a plane additive, referred
to the currently valid frame with set or programmed zero point.
CROTS Frame rotations with solid angles for spatial orientation of a plane, referred to the
valid frame in the data management with rotation in the specified axes.
XYZ A maximum of two solid angles may be specified
RPL Rotation in the plane: Angle through which the coordinate system is rotated (plane
set with G17-G19)

Function
Spatial orientations can be defined via frame rotations with solid angles ROTS, AROTS, CROTS. Program-
ming commands ROTS and AROTS behave analogously to ROT and AROT.

Contents Page 142 of 286 Go Back


Fundamentals of CNC Machining Full Screen

5.6. Programmable scale factor, SCALE, ASCALE

Programming

SCALE X . . . Y . . . Z . . . (programmed in a separate NC block)


ASCALE X . . . Y . . . Z . . . (programmed in a separate NC block)

Explanation of the commands and parameters

SCALE Absolute enlargement/reduction with reference to the currently valid coordinate sys-
tem set with G54 to G599
ASCALE Additive enlargement/reduction with reference to the currently valid set or pro-
grammed coordinate system
XYZ Scale factor in the direction of the specified geometry axis

Function
SCALE/ASCALE enables you to program scaling factors in the direction of the axis specified for all path,
synchronous and positioning axes. This enables the size of a shape to be changed. You can thus program similar
geometrical shapes in different sizes.

Contents Page 143 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Substituting instruction, SCALE X Y Z


You can specify an individual scale factor for each axes, by which the shape is to be reduced or enlarged.
The scale refers to the workpiece coordinate system set with G54 to G57.

Contents Page 144 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The SCALE command cancels all frame components of the previously activated programmable frame.

Additive instruction, ASCALE X Y Z

You can program scale changes which are to be added to existing frames by using the ASCALE command.
In this case, the last valid scale factor is multiplied by the new one. The currently set or last programmed
coordinate system is used as the reference for the scale change.
Deactivate scaling factor For all axes
SCALE (without axis parameter). All frame components of the previously programmed frame are reset.

Contents Page 145 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Additional notes

If you program an offset with ATRANS after SCALE, the offset values are also scaled.
Please take great care when using different scale factors! Example: Circular interpolations can only be scaled
using identical factors.
You can, however, use different scale factors to program distorted circles, for example.

Contents Page 146 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example

With this workpiece, the two pockets occur twice, but in different sizes and at different angles to each other.
The machining sequence is stored in a subprogram. Use translation and rotation to set each of the workpiece
zeroes, reduce the contour with a scale and then call the subprogram up again.

N10 G17 G54 Working plane X/Y, workpiece zero


N20 TRANS X15 Y15 Absolute offset
N30 L10 Machine large pocket
N40 TRANS X40 Y20 Absolute offset
N50 AROT RPL=35 Rotation in the plane through 35
N60 ASCALE X0.7 Y0.7 Scale factor for the small pocket
N70 L10 Machine small pocket
N80 G0 X300 Y100 M30 Retraction, end of program

Contents Page 147 of 286 Go Back


Fundamentals of CNC Machining Full Screen

5.7. Programmable mirroring, MIRROR, AMIRROR

Programming

MIRROR X0 Y0 Z0 (programmed in a separate NC block)


AMIRROR X0 Y0 Z0 (programmed in a separate NC block)

Explanation of the commands and parameters

MIRROR Absolute mirror image with reference to the currently valid coordinate system set
with G54 to G599
AMIRROR Additive mirror image with reference to the currently valid set or programmed coor-
dinate system
XYZ Geometry axis whose direction is to be changed. The value specified here can be
chosen freely, e.g. X0 Y0 Z0

Function
MIRROR/AMIRROR can be used to mirror workpiece shapes on coordinate axes. All traversing movements
which are programmed after the mirror call, e.g. in the subprogram, are executed in the mirror image.

Contents Page 148 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Substituting instruction, MIRROR X Y Z


The mirror is programmed by means of an axial change of direction in the selected working plane.
Example:
working plane G17 X/Y
The mirror (on the Y axis) requires a change of direction on X and is subsequently programmed with
MIRROR X0. The contour is then mirrored on the opposite side of the mirror axis Y. The mirror image refers
to the coordinate axes set with G54 to G57.

Contents Page 149 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The MIRROR command cancels all previously set programmable frames.

Additive instruction, AMIRROR X Y Z

A mirror image which is to be added to an existing transformation is programmed with AMIRROR. The
currently set or last programmed coordinate system is used as the reference.
Deactivate mirroring
For all axes: MIRROR (without axis parameter) All frame components of the previously programmed frame
are reset.

Contents Page 150 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Additional notes

The mirror command causes the control to automatically change the path compensation commands
(G41/G42 or G42/G41) according to the new machining direction.
The same applies to the direction of circle rotation (G2/G3 or G3/G2).
If you program an additive rotation with AROT after MIRROR, you may have to work with reversed direc-
tions of rotation (positive/negative or negative/positive). Mirrors on the geometry axes are converted automat-
ically by the control into rotations and, where appropriate, mirrors on the mirror axis specified in the machine
data. This also applies to settable zero offsets.

Machine manufacturer (MH 6.3)


SW 5 and higher
You can set the axis around which mirroring is performed via MD. MD10610 = 0: Mirroring is performed
in relation to the programmed axis (negation of values). MD10610 = 1 or 2 or 3: Depending on the data
setting, mirroring is performed in relation to a specific reference axis (1=X axis; 2=Y axis; 3=Z axis) and
rotations of two other geometry axes.

Contents Page 151 of 286 Go Back


Fundamentals of CNC Machining Full Screen

MD10612 MIRROR TOGGLE = 0 can be used to define that the programmed values are always evaluated.
With a value of 0, as with MIRROR X0, the axis mirroring is deactivated and, with values not equal to
0, the axis is mirrored if it is not yet mirrored.

Programming example
Program the contour shown here once as a subprogram and generate the three other contours with a mirror
operation. The workpiece zero is located at the center of the contours.

Milling:

N10 G17 G54 Working plane X/Y, workpiece zero


N20 L10 Machine first contour, top right.
N30 MIRROR X0 Mirror X axis (the direction is changed in X).
N40 L10 Machine second contour, top left.
N50 AMIRROR Y0 Mirror Y axis (the direction is changed in Y).
N60 L10 Machine third contour, bottom left
N70 MIRROR Y0 MIRROR cancels previous frames. Mirror Y axis
(the direction is changed in Y).

Contents Page 152 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N80 L10 Machine fourth contour, bottom right.


N90 MIRROR Deactivate mirroring.
N100 G0 X300 Y100 M30 Retraction, end of program

Turning:

N10 TRANS X0 Z140 Zero offset to W


N ... ... Machine first side with spindle 1
N30 TRANS X0 Z600 Zero offset to spindle 2
N40 AMIRROR Z0 Mirroring of the Z axis
N50 ATRANS Z120 Zero offset to W1
N ... ... Machine second side with spindle 2

Contents Page 153 of 286 Go Back


Fundamentals of CNC Machining Full Screen

6. TOOL OFFSETS
6.1. General information

Why use tool offsets?

When writing a program, it is not necessary to specify the cutter diameter, the tool point direction of the
turning tool (left/right-handed turning tools) or tool length. You simply program the workpiece dimensions
according to the dimensions in the production drawing. When machining a workpiece, the tool paths are
controlled according to the tool geometry such that the programmed contour can be machined using any tool.

Contents Page 154 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The control corrects the traverse path

You enter the tool data separately in the tool table on the control. All you need to do is call the required
tool with its offset data in the program. During program execution, the control fetches the offset data from the
tool files and corrects the tool path individually for different tools.

Contents Page 155 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Which tool offsets are stored in the controls compensation memory?

In the compensation memory enter the following:

geometrical dimensions: length, radius. They consist of several components (geometry, wear). The control
computes the components to a certain dimension (e.g. overall length 1, total radius). The respective overall
dimension becomes effective when the compensation memory is activated. These values are calculated in
the axes according to the tool type and the current plane G17, G18, G19,

tool type, The type determines which geometry axes are needed and how they are calculated (drill or
milling tool or turning tool).

tool point direction.

Contents Page 156 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Tool parameters
The following section .List of tool types. describes the individual tool parameters in the display. The relevant
tool parameters must be entered in the input fields with DP . . . . Any unneeded tool parameters must be set
to zero.
Caution: Values that have been entered once in the compensation memory are included in the processing for
each tool numbered.

Tool length compensation

This value compensates for the differences in length between the tools used. The tool length is the distance
between the toolholder reference point and the tip of the tool. This length is measured and entered in the
control together with definable wear values. From this data, the control calculates the traversing movements in
the infeed direction.
Additional notes
The compensation value of the tool length depends on the spatial orientation of the tool. See the section on

Contents Page 157 of 286 Go Back


Fundamentals of CNC Machining Full Screen

tool orientation and tool length compensation for more information.


Tool radius compensation

The contour and tool path are not identical. The cutter or tool nose radius center must travel on a path
that is equidistant from the contour. To do this, the programmed tool center point path is displaced by an
amount that depends on the radius and the direction of machining and such that the tool nose travels exactly
along the desired contour. The control fetches the required radii during program execution and calculates the
tool path from these values.

6.2. List of tool types


Breakdown of tool types for turning tools

Contents Page 158 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Group type 5xy (turning tools):

500 Roughing tool


510 Finishing tool
520 Grooving tool
530 Parting tool
540 Threading tool

6.3. Tool selection/tool call T


6.3.1. Tool change with M06 (mill)

Programming

Tx or
T=x or

Contents Page 159 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Ty=X
T0
M06

Explanation of the parameters

Tx or T=x or Tool selection with T No.


Ty=x
x x stands for T No.: 0-32000
T0 Tool deselection
M06 Tool change, then tool T . . . and tool offset D are active
Number of tools: 600, as of SW 5:
1200 (depending on the machine manufacturers configuration)

Comment:
Tool change command can be modified according to customer claim, for example: H1 T1 D1.

H1 . . . position of the tool turret


T1 . . . tool number
D1 . . . edge number

This is an example for SPN 12 CNC/Sinumerik 810D at the BUT, FME.


Function
Tool selection takes place when the T word is programmed.
Tool selection without TOOLMAN
Free selection of D No. (flat D No.) relative to cutting edges

Contents Page 160 of 286 Go Back


Fundamentals of CNC Machining Full Screen

T ... [8-digit]

1D 2D 3D ... D32000

Tabular D No.: D1 . . . D8

Tool selection with tool management

Free selection of D No. (flat D No.) relative to cutting edges


Fixed assignment of D No. to cutting edge

The tool is not active until M06 (incl. corresponding D No.).


Machine manufacturer (MH 8.1)
The effect of the T number call is defined in machine data. See machine manufacturers configuration.

Contents Page 161 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Explanation

SW 4 and higher

The free selection of the D No. flat D number structure is applied when tool management is implemented
outside the NCK. In this case, the D numbers are created with the corresponding tool compensation blocks
without assignment to tools. T can continue to be programmed in the part program. However, this T has no
reference to the programmed D number.
Example:
Circular magazine with 12 locations and 12 singleedge tools.
Machine manufacturer (MH 8.5)
T can or cannot be programmed in the part program, depending on the setting in MD 18102.

Contents Page 162 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Sequence

Creating a new D number


Creating a new D number with the associated tool compensation blocks is performed exactly as for the
normal D number via tool parameters $TC DP1 to $TC DP25. The T number need not be entered any more.
Machine manufacturer (MH 8.6)
The type of D number management is defined in the machine data. There are two settings available for
programming D numbers in the flat D number structure:
flat D number structure with direct programming,

flat D number structure with indirect programming (SW5 and higher).

6.3.2. Tool change with T command (rotate)

Programming

Tx or T=x
or Ty=X
T0

Explanation of the parameters

Tx or T=x or Ty=x Tool selection with T No. including tool change (active tool), tool offset is active
x x stands for T No.: 0-32000
T0 Tool deselection
Number of tools: 600, as of SW 5: 1200
(depending on the machine manufacturers configuration)

Contents Page 163 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function
A direct tool change takes place when the T word is programmed.

Tool selection without TOOLMAN

Free selection of D No. (flat D No.) relative to cutting edges

Tabulare D No.: D1 . . . D8

Tool selection with tool management

Free selection of D No. (flat D No.) relative to cutting edges


Fixed assignment of D No. to the cutting edges

Machine manufacturer (MH 8.1)


The effect of the T number call is defined in machine data. See machine manufacturers configuration.

6.4. Tool offset D

Programming

D ...
D0

Explanation of the parameters

Dx Tool offset number:


- without T 18 or
- with T (as of SW5) 112
x x stands for the D No.: 0-32000
Contents Page 164 of 286 Go Back
Fundamentals of CNC Machining Full Screen

D0 Deselect tool offset, no offsets active

Function

It is possible to assign between 1 and 8 (12) tool noses with different tool compensation blocks to a specific
tool. This allows you to define various cutting edges for one tool, which you can call as required in the NC
program. Different offset values could be used, for example, for the left and right cutting edge of a grooving tool.
When D is called, the tool length compensation for a specific tool nose is activated. When D0 is programmed,
offsets for the tool are ineffective. If no D word is programmed, the default setting from the machine data is
valid for tool change. Tool length compensations take immediate effect if the D number is programmed. A tool
radius offset must also be activated by G41/G42.
Machine manufacturer (MH 8.10)
Default setting by machine manufacturer, e.g.: D1, i.e. without D programming, D1 is activated/selected
when the tool is changed (M06). The tools are activated with T programming (see machine manufacturers
specifications). The compensation is performed with the first programmed traversing of the respective tool

Contents Page 165 of 286 Go Back


Fundamentals of CNC Machining Full Screen

length compensation axis.


The required D number must always be programmed before the tool length compensation can be selected. The
tool length compensation is also effective if the compensation is set in the machine data.
Working without tool offsets, D0 D0 is the default setting after start-up of the control. If you do not enter
a D number you work without a tool offset.
The modified values do not become active until the T or D number is next programmed.

Programming example
(turning: tool change with T command)

N10 T1 D1 Tool T1 is replaced and activated with associated D1


N11 G0 X . . . Z . . . The length offsets are traversed
N50 T4 D2 Load tool T4, D2 from T4 is active
...
N70 G0 Z . . . D1 Other cutting edge D1 is activated for tool T4

Contents Page 166 of 286 Go Back


Fundamentals of CNC Machining Full Screen

6.5. Tool selection T with tool management

Example:

A magazine has locations 1 to 20:


location 1 is taken up by drilling tool, duplo no.=1, T15, disabled,

location 2 is not occupied,

location 3 is taken up by drilling tool, duplo no.=2, T10, enabled,

location 4 is taken up by drilling tool, duplo no.=3, T1, active,


locations 5 to 20 are not occupied.

1. Programming of T1 or T=1: Location number 1 of the magazine associated with the toolholder is selected.

2. Identifier Drill of tool in location is determined. The selection procedure is completed.

Contents Page 167 of 286 Go Back


Fundamentals of CNC Machining Full Screen

3. It is followed by the tool change procedure: On completion of tool search strategy Take the first available
tool from group, T10 is loaded because T15 is disabled.

4. On completion of tool search strategy Take the first tool with status active from group, T1 is loaded.

6.5.1. Turning machine with circular magazine

Programming
The following procedure usually applies:
T = slot or T = identifier
T triggers the tool change
D . . . Tool offset number: 1 . . . 32000 (max., see machine manufacturers specifications) D0: no offset active!
Sequence
The following procedure usually applies:
T = slot,
T triggers the tool change
D = offsets 1 to n (n = 32000)
If the relative D No. structure with internal reference to the associated tools is used, replacement tool
management and monitoring function are possible.
Note:
When calling the tool, the:

tool offset values stored under a D number must be activated,

the appropriate working plane (system setting: G18) must be programmed. This ensures that the length
compensation is assigned to the correct axis.

If the selected magazine location is not occupied in a selected magazine location, the tool command has
the same effect as T0. Selection of the unoccupied magazine location can be used for positioning the empty
location.

Contents Page 168 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Machine manufacturer (MH 8.2)


Tool management: See machine manufacturers configuration.

6.5.2. Milling machine with chain magazine

Sequence
The following procedure usually applies:
T = Ident or T = No. or T=Duplo no.,
M06 triggers the tool change
D = offset 1 to nth edge no.
(n = 8, SW 5:12 and later)
Selection:

with integrated tool management (inside NC) relative D no. structure with internal reference to the
associated tools (e.g. replacement tool management and monitoring function possible),
without integrated tool management (outside NC) flat D no. structure without internal reference to
associated tools.
.
Machine manufacturer (MH 8.3)
Tool management: See machine manufacturers configuration.
Tool magazine
The T number preselects the tool, e.g. positioning the magazine to the tool change position. The actual
tool change is triggered by M6. The M number for the tool change is set via the machine data. (See also the
section on miscellaneous functions M). Only then do the new tool offsets apply.
Note:
When calling the tool, the:

Contents Page 169 of 286 Go Back


Fundamentals of CNC Machining Full Screen

tool offset values stored under a D number must be activated,

the appropriate working plane (system setting: G17) must be programmed. This ensures that the length
compensation is assigned to the correct axis.

If the selected magazine location is not occupied in a selected magazine location, the tool command has
the same effect as T0. Selection of the unoccupied magazine location can be used for positioning the empty
location.

6.6. Tool offset call D with tool management

Machine manufacturer (MH 8.4)


See machine manufacturers configuration.

6.6.1. Turning machine with circular magazine

Programming
The following procedure usually applies:
T = slot or T = identifier or T=Duplo no.,
T triggers the tool change
D . . . Tool offset number: 1 . . . 32000 (max., see machine manufacturers specifications)
D0: no offset active!
Direct, absolute programming
Programming is performed with the D number structure. The compensation blocks to be used are called
directly via their D number. Assignment of the D number to a specific tool does not take place in the NC
kernel.
Machine manufacturer (MH 8.7)
Direct programming is defined by MD.

Contents Page 170 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example

$MC TOOL CHANGE MODE=0 MD20270 CUTTING EDGE DEFAULT = 1


...
D92 Traverse with tool offsets from D92
...
T17 Select T17, traverse with tool offsets from D92
...
D16 Traverse with tool offsets from D16
...
D32000 Traverse with tool offsets from D32000
...
T29000500 Select T29000500, traverse with tool offsets from D32000
...
1D Traverse with tool offsets from D1

6.7. Make active tool offset operative immediately

Function
MD $MM ACTIVATE SEL USER DATA can be used to define that the active tool offset can be activated
immediately if the part program is in stop mode.
Danger
The offset is backed out the next time the part program is started.

6.8. Tool radius compensation, G40, G41, G42

Programming

G40
Contents Page 171 of 286 Go Back
Fundamentals of CNC Machining Full Screen

G41
G42
OFFN=

Explanation of the commands

G40 Deactivate tool radius compensation


G41 Activate tool radius compensation; tool operates in machining direction to the left of
the contour.
G42 Activate tool radius compensation, tool operates in machining direction to the right
of the contour.
OFFN= Allowance on the programmed contour (normal contour offset)

Function

When tool radius compensation is active, the control automatically calculates the equidistant tool paths for

Contents Page 172 of 286 Go Back


Fundamentals of CNC Machining Full Screen

different tools. You can generate equidistant paths with OFFN, e.g. for rough-finishing.
Sequence

The control requires the following information in order to calculate the tool paths:
1. Tool number T/edge number D
Where appropriate, a tool offset number D is also required. The distance between the tool path and the
workpiece contour is calculated from the cutter and tool edge radii and the tool point direction parameters.
With flat D number structure it is only necessary to program the D number.
2. Direction of machining G41, G42
From this information, the control detects the direction in which the tool path is to be displaced.
3. Working plane G17 toG19
From this information, the control detects the plane and therefore the axis directions for compensation.

Contents Page 173 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example: Milling cutters


N10 G17 G41 . . .

Milling:
The tool radius compensation is performed in the X/Y plane, the tool length compensation is performed in
the Z direction.
Note:
On 2-axis machines, the tool radius compensation is only possible in real planes, in general with G18 (see
tool length compensation table).

Contents Page 174 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Tool length compensation

Turning:
The wear parameter assigned to the diameter axis on tool selection can be defined as the diameter value
(MD). This assignment is not automatically altered when the plane is subsequently changed. To do this, the
tool must be selected again after the plane has been changed.
Activation/deactivation of tool radius compensation

A travel command must be programmed with G0 or G1 in an NC block with G40, G41 or G42. This travel
command must specify at least one axis in the selected working plane.
If you only specify one axis on activation, the last position on the second axis is added automatically and
traversed with both axes.

Contents Page 175 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

Milling:

N10 G0 X50 T1 D1
N20 G1 G41 Y50 F200
N30 Y100

Only tool length compensation is activated in block N10. X50 is approached without compensation. In
block N20, the radius compensation is activated, point X50/Y50 is approached with compensation.

Contents Page 176 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

Turning:

N20 T1 D1
N30 G0 X100 Z20
N40 G42 X20 Z1
N50 G1 Z-20 F0.2

Only tool length compensation is activated in block N20. X100 Z20 is approached without compensation in
block N30. In block N40, the radius compensation is activated, point X20/Z1 is approached with compensation.

Contents Page 177 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Changing

Changing the direction of compensation


G41/G42, G42/G41 can be programmed without an intermediate G40.
Changing the working plane
It is not possible to change the working plane G17 to G19 when G41/G42 is active.
Changing the offset number D
The offset number D can be changed in compensation mode. A modified tool radius is active with effect
from the block in which the new D number is programmed.
The radius change or compensation movement is performed across the entire block and only reaches the new
equidistance at the programmed end point.
With linear movements, the tool travels along an inclined path between the starting point and end point;
with circular interpolation spiral movements are produced.

Contents Page 178 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Changing the tool radius


This can be achieved, for example, using system variables. The execution is the same as for changes in the
D number.
The modified values only take effect the next time T or D is programmed. The change only applies with effect
from the next block.

Machine manufacturer (MH 8.14)


The number of consecutive blocks or M commands can be set in machine data 20250 (see machine manu-
facturer). A block with a path distance of zero also counts as an interruption!
Programming example
The conventional approach: Call tool, load tool, activate working plane and tool radius compensation.

Milling:

N10 G0 Z100 Retract to tool change point


N20 G17 T1 M6 Tool change
N30 G0 X0 Y0 Z1 M3 S300 D1 Call tool offset values, select length compensation

Contents Page 179 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N40 Z-7 F500 Tool infeed


N50 G41 X20 Y20 Approach tool radius compensation, tool operates on
left-hand side of contour
N60 Y40 Mill contour
N70 X40 Y70
N80 X80 Y50
N90 Y20
N100 X20
N110 G40 G0 Z100 M30 Retract tool, end of program

Turning:

% N 1001 MPF ;Program name


N5 G0 G53 X280 Z380 D0 ;Start point
N10 TRANS X0 Z250 ;Zero offset
N15 LIMS=4000 ;Speed limitation (G96)
N20 G96 S250 M3 ;Select constant feed
N25 G90 T1 D1 M8 ;Select tool and offset
Contents Page 180 of 286 Go Back
Fundamentals of CNC Machining Full Screen

N30 G0 G42 X-1.5 Z1 ;Activate tool with tool radius compensation


N35 G1 X0 Z0 F0.25
N40 G3 X16 Z-4 I0 K-10 ;Rotate radius 10
N45 G1 Z-12
N50 G2 X22 Z-15 CR=3 ;Rotate radius 3
N55 G1 X24
N60 G3 X30 Z-18 I0 K-3 ;Rotate radius 3
N65 G1 Z-20
N70 X35 Z-40
N75 Z-57
N80 G2 X41 Z-60 CR=3 ;Rotate radius 3
N85 G1 X46
N90 X52 Z-63
N95 G0 G40 G97 X100 Z50 M9 ;Deselect tool radius compensation and approach
tool change location
N100 T2 D2 ;Call up tool and select offset
N105 G96 S210 M3 ;Select constant cutting speed
N110 G0 G42 X50 Z-60 M8 ;Activate tool with tool radius compensation
N115 G1 Z-70 F0.12 ;Rotate diameter 50
N120 G2 X50 Z-80 I6.245 K-5 ;Rotate radius 8
N125 G0 G40 X100 Z50 M9 ;Retract tool and deselect tool radius compensation
N130 G0 G53 X280 Z380 D0 M5 ;Move to tool change location
N135 M30 ;End of program

Contents Page 181 of 286 Go Back


Fundamentals of CNC Machining Full Screen

7. MISCELLANEOUS FUNCTION
7.1. Auxiliary function outputs
7.1.1. M functions

Programming
M... Possible values 0 to 9999 9999, integers (Max. INT value in SW 5 and higher)
Function
M functions initiate, for example, switching operations such as Coolant ON/OFF and other operations
on the machine. Permanent functions have already been assigned to some of the M functions by the control
manufacturer (see following list).
List of predefined M functions

M0* Programmed stop


M1* Optional stop
M2* End of main program with return to beginning of program
M30* End of program, same effect as M2
M17* End of subprogram
M3 Spindle clockwise
M4 Spindle counterclockwise
M5 Spindle stop
M6 Tool change (default setting)
M70 Spindle is switched to axis mode
M40 Automatic gear change
M41 Gear step 1
M42 Gear step 2
M43 Gear step 3
M44 Gear step 4

Contents Page 182 of 286 Go Back


Fundamentals of CNC Machining Full Screen

M45 Gear step 5

Extended address notation cannot be used for the functions marked with *.
Machine manufacturer (MH9.2)
All free M function numbers can be assigned by the machine manufacturer, e.g. with switching functions
for controlling clamping fixtures or for activating/ deactivating other machine functions, etc.
Machine manufacturer (MH9.3)
See machine manufacturers specifications.
The commands M0, M1, M2, M17 and M30 are always initiated after the traversing movement.

Predefined M commands
Certain important M functions for program execution are supplied as standard with the control.
Programmed stop, M0
Machining stops in the NC block with M0. You can now, for example, remove swarf, remeasure, etc.
Optional stop, M1
M1 can be set with:
MMC/dialog Program Control,

or the VDI interface.

End of program, M2, M17, M30


A program is terminated with M2, M17 or M30 and reset to the beginning of the program. If the main
program is called from another program (as a subroutine), M2/M30 has the same effect as M17 and vice versa,
i.e. M17 has the same effect in the main program as M2/M30.

Contents Page 183 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The extended address notation with spindle number is used for all spindle functions.

Example:
M2=3 means CW spindle rotation for the second spindle. If no address extension is programmed, the
function applies to the master spindle.
Programming example

N10 S...
N20 X... M3 M function in the block with axis movement, spindle
accelerates before the X axis movement
N180 M789 M1767 M100 M102 M376 Max. of 5 M functions in the block

Contents Page 184 of 286 Go Back


Fundamentals of CNC Machining Full Screen

8. TURNING CYCLES
8.1. General information
The following sections describe how turning cycles are programmed. This section is intended to guide you in
selecting cycles and assigning them with parameters. In addition to a detailed description of the function of
the individual cycles and the corresponding parameters, you will also find a programming example at the end
of each section to familiarize you with the use of cycles.
The sections are structured as follows:

programming,

parameters,

function,

sequence of operations,

explanation of parameters,
additional notes,

programming example.
Programming and Parameters explain the use of cycles sufficiently for the experienced user, whereas
beginners can find all the information they need for programming cycles under Function, Sequence of oper-
ations, Explanation of parameters, Additional notes and the Programming example.

8.2. Preconditions

Data block for turning cycles


The turning cycles require module GUD7.DEF. It is supplied on diskette together with the cycles.

Contents Page 185 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Call and return conditions


The G functions active before the cycle is called and the programmable frame remain active beyond the
cycle.
Plane definition

The machining plane must be defined before the cycle is called. In the case of turning, this is usually the
G18 (ZX) plane. The two axes of the turning plane are referred to below as the longitudinal axis (first axis of
this plane) and the plane axis (second axis of this plane). If diameter programming is active, the second axis of
the plane is always taken as facing axis (see Programming Guide).
Spindle handling
The turning cycles are written in such a way that the spindle commands always refer to the active master
spindle of the control. If you want to use a cycle on a machine with several spindles, the active spindle must
first be defined as the master spindle (see Programming Guide).

Contents Page 186 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Machining status messages


Status messages are displayed on the control monitor during processing of the turning cycles.
The following messages can be displayed:

Thread start <No.>- longitudinal thread machining,


Thread start <No.>- face thread machining.

In each case <No.>stands for the number of the figure that is currently being machined. These messages do
not interrupt program processing and continue to be displayed until the next message is displayed or the cycle
is completed.
Cycle setting data
For the stock removal cycle CYCLE95, Software Release 4 and higher has provision for setting data that
is stored in module GUD7.DEF. Cycle setting data ZSD[0] can be used to vary the calculation of the depth
infeed MID in CYCLE95. If it is set to zero, the parameter is calculated as before.

ZSD[0]=1 MID is a radius value

ZSD[0]=2 MID is a diameter value

For the groove cycle CYCLE93, software release 4 and higher has provision for setting data in module
GUD7.DEF. This cycle setting data ZSD[4] can affect the retraction after the 1st groove.

ZSD[4]=1 Retraction with G0

ZSD[4]=0 Retraction with G1 (as before)


From SW 6.2 onwards, there is an option for setting mirroring behavior in ZSD[6] for grooving cycle
CYCLE93.
ZSD[6]=0 The tool offsets are exchanged in the cycle when mirroring is active (for use without orientatable
toolholder)

Contents Page 187 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ZSD[6]=1 The tool offsets are not exchanged in the cycle with active mirroring (for use with orientatable
toolholder)

Contour monitoring with respect to tool clearance angle

Some turning cycles in which travel movements with relief cutting are generated monitor the tool clearance
angle of the active tool for possible contour violation. This angle is entered as a value in the tool offset (under
parameter P24 in the D offset). An angle between 0 and 90 degrees is entered without a sign. When entering
the tool clearance angle, remember that this depends on whether machining is longitudinal or facing. If a tool
is to be used for longitudinal and face machining, two tool offsets must be applied if the tool clearance angles
are different. A check is made in the cycle to determine whether the programmed contour can be machined
with the selected tool.
If machining is not possible with this tool, then:
the cycle is terminated with an error message (while cutting) or
contour machining continues and a message is output (in undercut cycles). The tool nose geometry then
determines the contour.

Contents Page 188 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Note that active scale factors or rotations in the current plane modify the relationships at the angles, and
that this cannot be allowed for in the contour monitoring that takes place within the cycle. If the tool clearance
angle is specified as zero in the tool offset, this monitoring function is deactivated. The precise reactions are
described in the various cycles.
Turning cycles with active adapter transformation
From NCK SW 6.2 onwards, turning cycles can also be executed with an active adapter transformation.
The transformed tool offset data for the tool point direction and clearance angle are always read.

8.3. Grooving cycle - CYCLE93

Programming
CYCLE93 (SPD, SPL, WIDG, DIAG, STA1, ANG1, ANG2, RCO1, RCO2, RCI1, RCI2, FAL1, FAL2,
IDEP, DTB, VARI, VRT)
Parameters

SPD real Starting point in the facing axis (enter without


sign)
SPL real Starting point in the longitudinal axis
WIDG real Width of groove (enter without sign)
DIAG real Depth of groove (enter without sign)
STA1 real Angle between contour and longitudinal axis
Value range: 0=STA1=180 degrees
ANG1 real Flank angle 1: on the side of the groove de-
fined by the starting point (enter without sign)
Value range: 0=ANG189.999 degrees
ANG2 real Flank angle 2: on the other side (enter without
sign) Value range: 0<= ANG2 >89.999
RCO1 real Radius/chamfer 1, outside: on the side defined
by the starting point

Contents Page 189 of 286 Go Back


Fundamentals of CNC Machining Full Screen

RCO2 real Radius/chamfer 2, outside


RCI1 real Radius/chamfer 1, inside: on the starting
point side
RCI2 real Radius/chamfer 2, inside
FAL1 real Final machining allowance on the base of the
groove
FAL2 real Final machining allowance on the flanks
IDEP real Infeed depth (enter without sign)
DTB real Dwell time at base of groove
VARI int Type of machining Value range 1 . . . 8 and 11
...8
VRT from SW 6.2 or higher real Variable retraction distance from contour, in-
cremental (enter without sign)

Function

Contents Page 190 of 286 Go Back


Fundamentals of CNC Machining Full Screen

With the grooving cycle you can make symmetrical and asymmetrical grooves for longitudinal and traverse
machining on straight contour elements. You can machine both external and internal grooves.
Sequence of operations
The depth infeed (towards the base of the groove) and infeed across the width (from groove to groove) are
distributed evenly and with the greatest possible value. If the groove is being machined on an inclined surface,
travel from one groove to the next follows the shortest path, i.e. parallel to the cone on which the groove is
being machined. The safety distance to the contour is calculated in the cycle.
1st step

Paraxial roughing to the base of the groove in single infeed steps. After each infeed, the tool is retracted for
chip breaking.

Contents Page 191 of 286 Go Back


Fundamentals of CNC Machining Full Screen

2nd step

The groove is machined perpendicular to the infeed direction in one or more cuts. Each cut is again divided
up according to the infeed depth. From the second cut along the groove width the tool is withdrawn by 1 mm
before it is fully retracted.

Contents Page 192 of 286 Go Back


Fundamentals of CNC Machining Full Screen

3rd step

Cutting of the flanks in one step, if angles are programmed under ANG1 or ANG2. The infeed along the
groove width is performed in several steps if the flank width is larger.

Contents Page 193 of 286 Go Back


Fundamentals of CNC Machining Full Screen

4th step

Cutting of final machining allowance parallel to the contour from the edge to the center of the groove. The
tool radius compensation is automatically selected and deselected by the cycle.

Contents Page 194 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Description of parameters

SPD and SPL (starting point)

You define the starting point of the groove from where the cycle calculates the shape with these coordinates.
The cycle itself determines the starting point to be approached at the beginning. In the case of an external
groove, the longitudinal axis direction is first traversed and in the case of an internal groove, the facing axis
direction is first traversed. Grooves on curved surfaces can be created in a variety of ways. Depending on the
shape and radius of the curve, either a paraxial straight line can be placed on the maximum of the curve or a
tangential oblique line can be placed on one of the edge points of the groove. Radii and chamfers on the groove
edge of a curved surface should only be programmed if the edge point in question is positioned on the straight
line defined for the cycle.

Contents Page 195 of 286 Go Back


Fundamentals of CNC Machining Full Screen

WIDG and DIAG (groove width and groove depth)

The shape of the groove is defined with the parameters groove width (WIDG) and groove depth (DIAG).
The cycle always starts its calculation from the point programmed with SPD and SPL. If the groove is wider
than the active tool, the groove is machined in several steps. The total width is divided into equal sections
in the cycle. The maximum infeed is 95 percent of the tool width after subtracting the tool nose radii. This
ensures a cut overlap.
If the programmed groove width is less than the actual tool width, the error message 61602 Tool width
incorrectly defined is output, the cycle is not started and machining is aborted. The alarm is also output if
the value zero has been entered for the tool nose width.

Contents Page 196 of 286 Go Back


Fundamentals of CNC Machining Full Screen

STA1 (angle)

The angle of the oblique surface on which the groove is to be machined is programmed with parameter
STA1. The angle can have any value between 0 and 180 degrees and always refers to the longitudinal axis.

Contents Page 197 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ANG1 and ANG2 (flank angle)

Asymmetrical grooves can be described by separate flank angles. The angles can be assigned any value
between 0 and 89.999 degrees.
RCO1, RCO2 and RCI1, RCI2 (radius/chamfer)
The shape of the groove can be modified by entering radii/chamfers for the edge or base of the groove. The
values for the radii must always be positive, the values for the chamfers must always be negative. You can use
the tens setting for the VARI parameter to determine the type of calculation for programmed milling.

With VARI <10 (tens=0) the absolute value of this parameter is regarded as chamfer length (chamfering
with CHF programming).

With VARI >10, it is regarded as path length (chamfering with CHR programming).

Contents Page 198 of 286 Go Back


Fundamentals of CNC Machining Full Screen

FAL1 and FAL2 (machining allowance)

You can program separate final machining allowances for the groove base and the flanks. Roughing is
performed to this final machining allowance. Then, the same tool is used to machine a contour-parallel cut
along the final contour.
IDEP (infeed depth)
By programming an infeed depth you can divide the paraxial grooving action into several depth infeeds.
After every infeed, the tool is retracted for chipbreaking by 1 mm or, from SW 6.2 or higher onwards, by the
distance programmed under VRT. Parameter IDEP, anyway, is to be programmed.
DTB (dwell time)
A dwell time at the base of the groove should be chosen that allows at least one spindle revolution. The
dwell time is programmed in seconds.

Contents Page 199 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI (type of processing)

The units digit of the VARI parameter determines the type of processing for the groove. This parameter
can be assigned any of the values shown in the figure.
The tens value of the VARI determines the type of calculation for the chamfer.
VARI 1 . . . 8: Chamfers are calculated as CHF

Contents Page 200 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI 11 . . . 18: Chamfers are calculated as CHF


Input of the ones position in cycle support is distributed among three selection fields:
1. Field: longitudinal/plane
2. Field: external/internal
3. Field: starting point left/right (for longitudinal) or top/bottom (for plane)
If the parameter is assigned another value, the cycle is aborted and alarm 61002 Machining type incorrectly
programmed. is output. The contour monitoring performed by the cycle ensures that a realistic groove contour
results. This is not the case if the radii/chamfers touch each other at the base of the groove or overlap or if
an attempt at face grooving is made on a section of the contour that runs parallel to the longitudinal axis. In
these cases, the cycle is aborted with alarm 61603 Groove form incorrectly defined.
VRT (variable retraction path)
From SW 6. onward, the retraction path can be programmed on the basis of the outside or inside diameter
of the groove in parameter VRT. If VRT=0 (parameter not programmed), lift off is 1 mm. The retraction
path is always measured in the programmed system of units inch or metric. The same retraction path is also
used for chipbreaking after each depth infeed into the groove.
Further notes
You must activate a double-edged tool before calling the grooving cycle. You must enter the offset values
for the two tool edges in two successive D numbers of the tool, the first of which must be activated before the
cycle is called. The cycle determines itself which of the two tool offsets it requires for which machining step and
activates them automatically. After the cycle is completed, the offset number programmed before the cycle call
becomes active again. If no D number has been programmed for a tool offset when the cycle is called, the cycle
is aborted with alarm 61000 No tool offset active and the cycle is aborted.
For SW 5.1 and higher, cycle setting data ZSD[4] can be used to influence the retraction after the 1st
groove.
ZSD[4]=0 means retraction with G1 as before,
ZSD[4]=1 means retraction with G0.

Contents Page 201 of 286 Go Back


Fundamentals of CNC Machining Full Screen

From SW 6.2 or higher onward, cycle data ZSD[6] can be set to define how the tool offset is handled in the
cycle.

ZSD[6]=0 TO is exchanged internally in the cycle (without orientatable toolholder)

ZSD[6]=1 TO is not exchanged internally in the cycle (with orientatable toolholder)

Programming example

Grooving

This program machines a groove on an oblique surface (longitudinal, outside). The starting point is at X35
Z60. The cycle uses tool offsets D1 and D2 of tool T1. The grooving tool must be defined correspondingly.

DEF REAL SPD=35, SPL=60, WIDG=30,>> Definition of parameters with value assign-
ments
>>DIAG=25, STA1=5, ANG1=10, ANG2=20,>>
>>RCO1=0, RCI1=-2, RCI2=-2, RCO2=0,>>

Contents Page 202 of 286 Go Back


Fundamentals of CNC Machining Full Screen

>>FAL1=1, FAL2=1, IDEP=10, DTB=1


DEF INT VARI=5
N10 G0 G90 Z65 X50 T1 D1 S400 M3 Starting point before the beginning of the cy-
cle
N20 G95 F0.2 Specification of technology values
N30 CYCLE93 (SPD, SPL, WIDG, DIAG,>> Cycle call
>>STA1, ANG1, ANG2, RCO1, RCO2,>>
>>RCI1, RCI2, FAL1, FAL2, IDEP,>>
>>DTB, VARI)
N40 G0 G90 X50 Z65 Next position
N50 M02 End of program

>>Must be programmed in a single block

8.4. Undercut cycle - CYCLE94

Programming
CYCLE94 (SPD, SPL, FORM, VARI)
Parameters

SPD real Starting point in the facing axis (enter without


sign)
SPL real Starting point of the contour in the longitudi-
nal axis (enter without sign)
FORM char Definition of the form
Values: E (for form E)
F (for form F)
VARI (from SW 6.2 or higher) int Specification of undercut position
Values: 0 according to tool point direction
1 . . . 4 define position
Contents Page 203 of 286 Go Back
Fundamentals of CNC Machining Full Screen

Function

With this cycle you can machine undercuts of form E and F in accordance with DIN509 with the usual load
on a finished part diameter of >3mm.
Sequence of operations

Position reached prior to cycle start:


The starting position can be any position from which the undercut can be approached without collision.
The cycle implements the following motion sequence:

approach to the starting point calculated in the cycle with G0,

selection of tool nose radius compensation according to active tool point direction and traversal of undercut
contour at feedrate programmed prior to cycle call,

retraction to the starting point with G0 and deselection of the tool nose radius compensation with G40.

Contents Page 204 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Description of parameters

SPD and SPL (starting point)

The finished part diameter for the undercut is entered in parameter SPD. With parameter SPL you define
the finished part dimensions in the longitudinal axis. If the value programmed for SPD results in a final diameter
that is <3 mm, the cycle is aborted with the alarm 61601 Finished part diameter too small is output.

Contents Page 205 of 286 Go Back


Fundamentals of CNC Machining Full Screen

FORM (definition)

Form E and Form F are defined in DIN509 and determined by this parameter. If the parameter is assigned
a value other than E or F, the cycle is aborted and alarm 61609 Form incorrectly defined is output.

Contents Page 206 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI (undercut position)

The position of the undercut can be either specified directly or derived from the tool point direction with
parameter VARI.
VARI=0: According to tool point direction
The cycle automatically determines the tool point direction from the active tool offset. The cycle can then
only work with tool point directions 1 to 4. If the cycle recognizes a tool point direction 5 . . . 9, alarm 61608
Wrong tool point direction programmed is output and the cycle is aborted.
VARI=1 . . . 4: Definition of undercut position
The cycle determines the starting point automatically. This lies 2 mm from the final diameter and 10
mm from the final dimension in the longitudinal axis. The position of this starting point in relation to the
programmed coordinate values is determined by the tool point direction of the active tool. The cycle monitors
the clearance angle of the active tool if a value has been assigned to the relevant parameter of the tool offset.
If the cycle ascertains that the undercut form cannot be machined with the selected tool because the clearance
angle is too small, the message Altered undercut form appears on the control, but machining is continued.
When VARI<>0 the following applies:

Contents Page 207 of 286 Go Back


Fundamentals of CNC Machining Full Screen

the actual tool point direction is not checked, i.e. all directions can be used if this is meaningful techno-
logically,

no special consideration is given to functions such as adapter transformation, orientatable toolholder in


the cycle. It is assumed that the user is familiar with the conditions on the machine and has specified the
position correctly,

similarly, mirroring is not specially treated either, the user must be responsible for making the correct
settings.

Further notes
You must activate a tool offset before you call the cycles. Otherwise alarm 61000 No tool offset active is
output and the cycle is aborted.
Programming example

Contents Page 208 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Undercut form E
You can machine an undercut of form E with this program.

N10 T25 D3 S300 M3 G95 F0.3 Specification of technology values


N20 G0 G90 Z100 X50 Selection of starting position
N30 CYCLE94 (20, 60, E) Cycle call
N40 G90 G0 Z100 X50
Approach next position N50 M02 End of program

8.5. Stock removal cycle - CYCLE95

Programming
CYCLE95 (NPP, MID, FALZ, FALX, FAL, FF1, FF2, FF3, VARI, DT, DAM, VRT)
Parameters

NPP string Name of the contour subroutine


MID real Infeed depth (enter without sign)
FALZ real Final machining allowance in the longitudinal
axis (enter without sign)
FALX real Final machining allowance in the facing axis
(enter without sign)
FAL real Final machining allowance along contour (en-
ter without sign)
FF1 real Feedrate for roughing without relief cut
FF2 real Feedrate for insertion into relief cut elements
FF3 real Feedrate for finishing
VARI int Type of machining, Value range: 1 . . . 12,
HUNDREDS DIGIT (from SW 6.2 or higher):

Contents Page 209 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Values: 0 . . . with rounding at the contour No


residual corners will remain, the contour is
rounded overlapping. meaning that the con-
tours are rounded over several points of inter-
section.
2 . . . without rounding at the contour The ma-
chine always rounds to the previous roughing
intersection and then retracts. Depending on
the ratio of tool radius to infeed depth (MID),
residual corners might be left.
DT real Dwell time for chip breaking during roughing
DAM real Path length after which each roughing cut is
interrupted for chip breaking
VRT With SW 4.4 and higher real Retraction distance from contour for rough-
ing, incremental (enter without sign)

Contents Page 210 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

With this stock removal cycle you can machine a contour programmed in a subroutine from a blank with
paraxial stock removal. Relief cut elements can be included in the contour. With this cycle, contours can
be machined in the longitudinal and facing directions, inside and outside. The technology is freely selectable
(roughing, finishing, complete machining). During roughing, paraxial cuts are generated from the maximum
programmed infeed depth and when a point of intersection with the contour is reached, the residual corners
are immediately removed cutting parallel to the contour. Roughing is performed to the programmed final
machining allowance. Finishing is performed in the same direction as roughing. The tool radius compensation
is automatically selected and deselected by the cycle.
Sequence of operations

Position reached prior to cycle start:


The starting position can be any position from which the starting point of the contour can be approached
without collision.

Contents Page 211 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The cycle implements the following motion sequence:


The cycle starting point is calculated in the cycle and then approached in both axes simultaneously with
G0.
Roughing without relief cut elements:

paraxial infeed to the actual depth is calculated internally and then approached with G0,

approach roughing point paraxially with G1 and feedrate FF1,

machine parallel to the contour at contour + final machining allowance to the last roughing intersection
point with G1/G2/G3 and FF1,

lift off contour by the amount programmed in VRT in every axis and retraction with G0,

this procedure is repeated until the total depth of the section to the machining step has been reached,

when roughing without relief cut elements, retraction to the cycle starting point is effected axis by axis.

Contents Page 212 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Roughing the relief cut elements:

approach the starting point for the next relief cut axis by axis with G0. An additional safety distance is
calculated internally,

infeed parallel to the contour + final machining allowance with G1/G2/G3 and FF2,
approach roughing point paraxially with G1 and feedrate FF1,

machine to the last roughing point. Lift and retract as in the first machining section,
if further relief cut elements are to be machined, repeat the above procedure for each relief cut element.

Finishing:

the calculated cycle starting point is approached in both axes simultaneously with G0 and tool nose radius
compensation is selected,

Contents Page 213 of 286 Go Back


Fundamentals of CNC Machining Full Screen

both axes then continue to move; with G0 up to an amount final machining allowance + tool nose radius +
1 mm safety distance ahead of the contour starting point, and from there with G1 to the contour starting
point,

finish cutting along the contour with G1/G2/G3 and FF3,

retraction to starting point with both axes and G0.

Description of parameters

NPP (name)

Enter the name of the contour subroutine under this parameter. This contour subroutine must not be a
subroutine with a parameter list. Please use the name conventions described in the Programming Guide when
naming the contour subroutine. In SW 5.2 and later, the machining contour can also be a section of the calling
routine or from any other program. The section is identified by start or end labels or by block numbers. In this
case, the program name and labels/block number are identified by an :.

Contents Page 214 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example:

NPP=CONTOUR 1 The machining contour is the complete


program Contour 1.
NPP=START:END The machining contour is defined as the
section starting from the block labeled
START to the block labeled END in the
calling routine.
NPP=/ N SPF DIR/ N CONTOUR 1 SPF:N130:N2 10 The machining contour is defined in
blocks N130 to N210 in program CON-
TOUR 1.

If the section is defined by block numbers, it must be noted that these block numbers for the section in NPP
must be correspondingly adjusted if the program is modified and subsequently renumbered.

MID (infeed depth)


Under parameter MID you define the maximum possible infeed depth for the roughing operation. The
interpretation of this parameter depends on the cycle setting data for software release 4 and higher ZSD[0].
The cycle automatically calculates the actual infeed depth for roughing. Where contours with relief cut elements
are to be machined, the cycle divides up the roughing operation into single roughing steps. The cycle recalculates
the actual infeed depth for every roughing step. This actual infeed depth always lies between the programmed
infeed depth and half its value. The number of required roughing cuts is derived from the total depth of a
roughing section and the programmed maximum infeed depth. The total depth to be machined is then divided
equally amongst these roughing cuts. This method ensures optimum cutting conditions. The machining steps
shown in the figure above are used for roughing this contour.

Contents Page 215 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Example for the calculation of the actual infeed depths:


Machining section 1 has a total depth of 39 mm. If the maximum infeed depth is 5 mm, 8 roughing cuts are
required. These are performed with an infeed of 4.875 mm. In machining section 2, 8 roughing cuts, each with
an infeed of 4.5 mm are also executed (total difference 36 mm). Machining section 3 is roughed twice with an
actual infeed of 3.5 (total difference 7 mm).
FAL, FALZ and FALX (final machining allowance)
The final machining allowance for the roughing operation is either defined in parameters FALZ and FALX if
you wish to enter different final machining allowances for each axis or in parameter FAL if you wish to enter a
final machining allowance that follows a contour. In this case, this value is used for the final machining allowance
in both axes. The programmed values are not subjected to a plausibility check. If all three parameters are
assigned values, all the final machining allowances are calculated by the cycle. It is, however, advisable to decide
on one or the other form of final machining allowance definition. Roughing is always performed to these final
machining allowances. After each paraxial roughing operation the resulting residual corners are immediately cut
parallel to the contour so that these do not have to be removed after the roughing operation is completed. If no
final machining allowances have been programmed, roughing is performed to the final contour. The finish cut

Contents Page 216 of 286 Go Back


Fundamentals of CNC Machining Full Screen

machining mode does not consider programmed values. Turning always takes place down to finishing dimension.
FF1, FF2 and FF3 (feedrate)

You can define different feedrates for the different machining steps as is shown in the figure on the right.

Contents Page 217 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI (machining types)

You can call the machining types as follows:

Machining Roughing (Roughing/finishing/complete)

Contents Page 218 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Selection longitudinal (longitudinal/transverse)


Selection outside (outside/inside)

The machining types are shown in the table below.

Value Machining Selection Selection


1 Roughing long. outside
2 Roughing transv. outside
3 Roughing long. inside
4 Roughing transv. inside
5 Finishing long. outside
6 Finishing transv. outside
7 Finishing long. inside
8 Finishing transv. inside
9 Complete machining long. outside
10 Complete machining transv. outside
11 Complete machining long. inside
12 Complete machining transv. inside

Infeed is always performed in the facing axis with longitudinal machining and in the longitudinal axis with
face machining. Outside machining means that infeed is performed in the direction of the negative axis. In
inside machining, infeed is performed in the direction of the positive axis.
When roughing in CYCLE95, you can choose between with rounding or without rounding at the contour
from SW 6.2 or higher. For doing so, the HUNDREDS DIGIT is implemented in parameter VARI.
A plausibility check is performed on parameter VARI. If you select an invalid value, the cycle is aborted and
alarm 61002 Wrong machining type defined is put out.

Contents Page 219 of 286 Go Back


Fundamentals of CNC Machining Full Screen

DT and DAM (dwell time and path length)

With these two parameters you can program an interruption in the individual roughing cuts after a defined
path for the purposes of chip breaking. These parameters only apply to roughing. In parameter DAM you
define the maximum path after which chip breaking is to be performed. In DT you can also program a dwell
time to be included at each of the interruption points. If no path has been specified for cut interruption (DAM
= 0), then uninterrupted roughing cuts without dwell times are generated.
VRT (lift)
With SW 4.4. or higher, the amount by which the tool is lifted off the contour in both axes during roughing
operations can be programmed in parameter VRT. If VRT=0 (parameter not programmed), lift off is 1mm.
The retraction distance is always measured in inches or metric depending on the programmed system, i.e.
VRT=1 for inch >>programming produces a tool retract of 1 inch.

Contents Page 220 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Further notes

Contour definition
The contour is programmed in a subroutine whose name is defined as a parameter. The contour subroutine
must contain at least 3 blocks with movements in both axes of the machining plane. The machining plane (G17,
G18, G19) is set in the main program before the cycle is called or applied according to the basic setting of this
G group on the machine. It cannot be altered in the contour subroutine. If the contour subroutine is shorter,
alarms 10933 The contour subroutine contains too few contour blocks and 61606 Error in preprocessing
contour and the cycle is aborted. Relief cut elements can be programmed consecutively.
Blocks without movement in the plane are not subject to any limitations.
All the traversing blocks for the first two axes in the current plane are preprocessed in the cycle as only
these axes are involved in the machining operation. Movements for other axes can be included in the contour
subroutine but their travel paths are suppressed during the cycle run.
The only geometry permitted in the contour are straight line and circular programming with G0, G1,
G2 and G3. Commands for fillets and chamfers can also be programmed. If any other motion commands
are programmed in the contour, it is aborted with alarm 10930 Illegal interpolation type in the machining
contour.
The first block containing a traversing movement in the current machining plane must contain a travel
command G0, G1, G2 or G3, otherwise the cycle is aborted with the alarm 15800 Wrong starting conditions
for CONTPRON. This alarm is also activated when G41/G42 is active. The starting point of the contour is
the first position on the machining plane programmed in the contour subroutine.
The maximum possible number of blocks for the contour containing travel commands for the current plane
depends on the type of contour. In principle, there is no limit to the possible number of relief cuts. If a contour
contains more contour elements than the cycle memory can hold, the cycle is aborted with the alarm 10934
Overflow contour table.
Machining must then be divided into several machining sections each of which is represented by its own
contour subroutine and each cycle called separately.
If the maximum diameter in one contour subroutine is not within the programmed end point or starting
point of the contour, the cycle automatically extends a paraxial straight line to the maximum point of the
contour at the end of the machining operation and this part of the contour is then removed as a relief cut.

Contents Page 221 of 286 Go Back


Fundamentals of CNC Machining Full Screen

If any of the following are programmed in the contour subroutine:


radius compensation plane with G17/G18/G19,
frames,
an axis of the plane in which machining is performed is traversed as a positioning axis,
selection of tool radius compensation with G41/G42.
Alarm 10931 Incorrect machining contour is activated and aborts the cycle.
Contour direction
With SW 4.4 and later, the direction in which the stock removal contour can be programmed is freely
selectable. The machining direction is automatically defined in the cycle. With complete machining operations,
the contour is finished in the same direction in which rough cutting took place. If only finishing is selected, the
contour is always traversed in the programmed direction. The first and last programmed contour points are the
criteria for selecting the machining direction. For this reason, both coordinates must always be programmed in
the first block of the contour subroutine.

Contents Page 222 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Contour monitoring
The cycle performs contour monitoring of the following:
clearance angles of the active tool,

programming of arcs with an aperture angle of >180 degrees.

In the case of relief cut elements, the cycle checks whether machining is possible with the active tool. If
the cycle detects that this machining operation will lead to a contour violation, it is aborted after alarm 61604
Active program violates programmed contour is output.
Contour monitoring is not performed if the clearance angle has been defined as zero in the tool offset.
If the arcs in the offset are too large, alarm 10931 Incorrect machining contour is output.
Starting point

The cycle determines the starting point of the machining operation automatically. The starting point is
positioned on the axis in which infeed is performed at a distance from the contour corresponding to final
machining allowance + lift off distance (parameter VRT). In the other axis, it is positioned at a distance

Contents Page 223 of 286 Go Back


Fundamentals of CNC Machining Full Screen

corresponding to final machining allowance + VRT in front of the contour starting point. The tool noise radius
compensation is selected internally in the cycle when the starting point is approached. The last point before the
cycle is called must therefore be selected such that it can be approached without risk of collision and adequate
space is available for the compensating movement.
Approach strategy of the cycle
The starting point calculated by the cycle is always approached in the two axes simultaneously for roughing
and one axis at a time for finishing. In finishing, the infeed axis is the first to travel.
Programming example 1

Stock removal cycle

The contour illustrated in the figure explaining the assignment parameters must be machined completely
(longitudinal, outside). Axis-specific final machining allowances have been defined. No interruption between
cuts has been programmed. The maximum infeed is 5 mm. The contour is stored in a separate program.

DEF STRING[8] UPNAME Definition of a variable for the contour name

Contents Page 224 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N10 T1 D1 G0 G95 S500 M3 Z125 X81 Approach position before cycle call
UPNAME=CONTOUR 1 Assignment of subroutine name
N20 CYCLE95 (UPNAME, 5, 1.2, 0.6, , >> Cycle call
>>0 .2, 0.1, 0.2, 9, , , 0.5)
N30 G0 G90 X81 Reapproach to starting position
N40 Z125 Traverse in each axis separately
N50 M30 End of program
PROC CONTOUR 1 Beginning of contour subroutine
N100 G1 Z120 X37 Traverse in each axis separately
N110 Z117 X40
N120 Z112 RND=5 Rounding with radius 5
N130 G1 Z95 X65 Traverse in each axis separately
N140 Z87
N150 Z77 X29
N160 Z62
N170 Z58 X44
N180 Z52
N190 Z41 X37
N200 Z35
N210 G1 X76
N220 M17 End of subroutine

>>Must be programmed in a single block

Contents Page 225 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example 2

Stock removal cycle

The machining contour is defined in the calling program and traversed directly after the finishing cycle call.

N110 G18 DIAMOF G90 G96 F0.8


N120 S500 M3
N130 T11 D1
N140 G0 X70
N150 Z60
N160 CYCLE95 (START:END,2.5,0.8,0.8,0,0.8,0.75,0.6,1) Cycle call
START:
N180 G1 X10 Z100 F0.6
N190 Z90
N200 Z=AC(70) ANG=150
N210 Z=AC(50) ANG=135

Contents Page 226 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N220 Z=AC(50) X=AC(50)


END:
N230 M02

8.6. Thread undercut - CYCLE96

Programming
CYCLE96 (DIATH, SPL, FORM, VARI)
Parameters

DIATH Real Nominal diameter of the thread


SPL Real Starting point on the contour of the longitu-
dinal axis
FORM Char Definition of the form
Values: A (for Form A)
Values: B (for Form B)
Values: C (for Form C)
Values: D (for Form D)
VARI (from SW 6.2 or higher) Int Specification of undercut position
Values: 0 according to tool point direction
Values: 1 . . . 4 Define position

Contents Page 227 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

This cycle is for machining thread undercuts in accordance with DIN 76 on parts with a metric ISO thread.
Sequence of operations

Position reached prior to cycle start:


The starting position can be any position from which any thread undercut can be approached without
collision.
The cycle implements the following motion sequence:

approach to the starting point calculated in the cycle with G0,

selection of the tool radius compensation for the active tool point direction. Retraction along the undercut
contour at the feedrate programmed before cycle call,

retraction to the starting point with G0 and deselection of tool radius compensation with G40.

Contents Page 228 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Description of parameters

DIATH (nominal diameter)

With this cycle you can machine thread undercuts for metrical ISO threads from M3 to M68. If the value
programmed in DIATH results in a final diameter of <3 mm, the cycle is aborted and alarm 61601 Finished
part diameter too small is output. If the parameter is assigned a value other than that defined by DIN76 Part
1, again the cycle is aborted and the alarm 61001 Thread pitch incorrectly defined is output.
SPL (starting point)
With parameter SPL you define the final dimension in the longitudinal axis.

Contents Page 229 of 286 Go Back


Fundamentals of CNC Machining Full Screen

FORM (definition)

Thread undercuts of forms A and B are defined for external threads, form A for normal thread run-outs,
form B for short thread run-outs. Thread undercuts of forms C and D for used for internal threads, form C for
normal thread runouts, form D for short thread run-outs. If the parameter is assigned a value other than A
. . . D, the cycle is aborted and alarm 61609 Form incorrectly defined is output. The tool radius compensation
is automatically selected by the cycle.

Contents Page 230 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI (undercut position)

The position of the undercut can be either specified directly or derived from the tool point direction with
parameter VARI.
See VARI with CYCLE94
The cycle automatically determines the starting point that is defined by the tool point direction of the active
tool and the thread diameter. The position of this starting point in relation to the programmed coordinate
values is determined by the tool point position of the active tool. The cycle monitors the clearance angle of
the active tool if forms A and B are being machined. If the cycle detects that the undercut form cannot be
machined with the selected tool, the message Changed undercut form is output by the control but machining
is continued.
Further notes
You must activate a tool offset before the cycle is called. Otherwise error message 61000 No tool offset
active is output and the cycle is aborted.

Contents Page 231 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example

Thread undercut Form A

You can machine a thread undercut of form A with this program.

N10 D3 T1 S300 M3 G95 F0.3 Specification of technology values


N20 G0 G90 Z100 X50 Selection of starting position
N30 CYCLE96 (40, 60, A) Cycle call
N40 G90 G0 X30 Z100 Approach next position
N50 M30 End of program

8.7. Thread cutting - CYCLE97

Programming
CYCLE97 (PIT, MPIT, SPL, FPL, DM1, DM2, APP, ROP, TDEP, FAL, IANG, NSP, NRC, NID, VARI,

Contents Page 232 of 286 Go Back


Fundamentals of CNC Machining Full Screen

NUMT, VRT)
Parameters

PIT Real Thread pitch as value (enter without sign)


MPIT Real Thread pitch as thread size, Value range 3 (for M3)
. . . 60 (for M60)
SPL Real Starting point of the thread in the longitudinal axis
FPL Real End point of the thread in the longitudinal axis
DM1 Real Diameter of the thread at the starting point
DM2 Real Diameter of the thread at the end point
APP Real Arc-in section (enter without sign)
ROP Real Arc-out section (enter without sign)
TDEP Real Thread depth (enter without sign)
FAL Real Final machining allowance (enter without sign)
IANG Real Infeed angle
Value range
+ (for flank infeed on flank)
- (for alternating flank infeed)
NSP Real Starting point offset for the first thread (enter with-
out sign)
NRC Int Number of rough cuts (enter without sign)
NID Int Number of noncuts (enter without sign)
VARI Int Definition of the machining type for the thread
Value range: 1 . . . 4
NUMT Int Number of threads (enter without sign)
VRT from SW 6.2 or higher Real Variable retraction distance based on initial diame-
ter, incremental (enter without sign)

Contents Page 233 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

With this cycle you can machine cylindrical and tapered outside and inside threads with constant lead in
longitudinal or face machining. Both single threads and multiple threads can be cut. In multiple thread cutting,
the threads are cut one after the other.
Infeed is automatic. You can select either constant infeed per cut or constant cross-section of cut. A right-
hand or left-hand thread is determined by the direction of rotation of the spindle programmed before the cycle
call. Feedrate and spindle override both have no effect in thread travel blocks.
A speed-controlled spindle with a position measuring system is required to operate this cycle.

Sequence of operations

Position reached prior to cycle start:


The starting position is any position from which the programmed thread starting point + arc-in section can
be approached without collision.

Contents Page 234 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The cycle implements the following motion sequence:

approach to the starting point determined by the cycle at the beginning of the arc-in section for the first
thread with G0,
infeed for roughing according to the infeed type defined under VARI,
thread cutting is repeated according to the number of roughing cuts programmed,
in the next cut with G33 the final machining allowance is removed,
this cut is repeated according to the number of programmed noncuts,
the total motion sequence is repeated for each additional thread.

Description of parameters

PIT and MPIT (value and thread size)

Contents Page 235 of 286 Go Back


Fundamentals of CNC Machining Full Screen

The thread pitch is a paraxial value and entered without a sign. If metric cylindrical threads are being
machined it is also possible to define the thread pitch in parameter MPIT as a thread size (M3 to M60). These
two parameters should be used as alternatives. If they contain conflicting values, the cycle generates alarm
61001 Thread pitch wrong and is aborted.
DM1 and DM2 (diameter)
This parameter is set to program the thread diameter of the start and end points of the thread. With an
inside thread, this corresponds to the tap hole diameter.
Connection between SPL, FPL, APP and ROP (starting point, end point, arc-in section and arc-out section)
The programmed starting point (SPL) and end point (FPL) are the basis of the thread. However, the
starting point used in the cycle is the starting point brought forward by the arc-in section APP and, in the
same way, the end point is the programmed end point brought back by the arc-out section ROP. The starting
point defined by the cycle always lies 1 mm outside the programmed thread diameter in the facing axis. This
retraction plane is automatically generated by the control.
Connection between TDEP, FAL, NRC and NID (thread depth, final machining allowance, number of cuts)
The programmed final machining allowance has an effect parallel to the axis and is subtracted from the
preset thread depth TDEP and the remainder is divided into roughing cuts. The cycle automatically calculates
the individual actual infeed depths depending on the parameter VARI. The thread depth to be machined is
divided into infeeds with the same cross-section of cut so that the cutting pressure remains constant for all rough
cuts. Infeed is then performed with differing values for the infeed depth. In a second method, the total thread
depth is divided into constant infeed depths. The cross-section of cut gets larger from cut to cut. However, if
the values for the thread depth are small, this method can create better cutting conditions. The final machining
allowance FAL is removed in one cut after roughing. After this, the noncuts programmed under parameter NID
are executed.

Contents Page 236 of 286 Go Back


Fundamentals of CNC Machining Full Screen

IANG (infeed angle)

With parameter IANG you define the infeed angle. If infeed is to be performed at right angles to the cutting
direction in the thread this parameter must be assigned the value zero. I.e., this parameter can also be omitted
from the parameter list as it is then automatically assigned the default value zero. If infeed is to be performed
along the flank, the absolute value of this parameter must be no more than half the flank angle of the tool.
The sign entered for this parameter defines how this infeed is performed. If a positive value is entered, infeed
is always performed on the same flank, if a negative value is entered, infeed is performed alternately on both
flanks. The infeed type on both flanks alternately can only be used for cylindrical threads. However, if a
negative value is assigned to parameter IANG for a tapered thread, the cycle automatically performs a flank
infeed along one flank.
NSP (starting point offset)
Under this parameter you can program the angular value that defines the point of the first cut for the first
thread turn on the circumference on the turned part. This value is a starting point offset. The parameter can
be assigned any value between 0.0001 and +359.9999 degrees. If no starting point offset has been entered or the
parameter has been omitted from the parameter list, the first thread automatically starts at the zero degrees

Contents Page 237 of 286 Go Back


Fundamentals of CNC Machining Full Screen

mark.
VARI (machining type)

With parameter VARI, you define if machining is to be internal or external and with which technology the
infeed will be machined during roughing. The parameter VARI can be one of the values between 1 and 4 with
the following meaning:

Value Outside/inside Const. infeed/const. cross-section of cut


1 Outside Constant infeed
2 Inside Constant infeed
3 Outside Constant cross-section of cut
4 Inside Constant cross-section of cut

If another value has been programmed for parameter VARI, the cycle is aborted after alarm 61002 Machining
type incorrectly defined is output.

Contents Page 238 of 286 Go Back


Fundamentals of CNC Machining Full Screen

NUMT (number of thread starts)

With parameter NUMT you specify the number of thread starts for a multiple thread. If you require a
single thread, either assign the value zero to the parameter or omit it from the parameter list. The thread starts
are distributed uniformly around the circumference of the turned part, the first thread is defined in parameter
NSP. If a multiple-start thread with a non-uniform distribution of threads around the circumference is to be
machined, the cycle must be called for every thread start and the corresponding starting point offset must be
programmed.
VRT (variable retraction path)
From SW 6. onward, the retraction path can be programmed on the basis of the initial thread diameter in
parameter VRT. When VRT = 0 (parameter not programmed), the retraction path is 1 mm. The retraction
path is always measured in the programmed system of units inch or metric.

Contents Page 239 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Further notes

Difference between a longitudinal thread and a face thread

The cycle automatically calculates whether a longitudinal or face thread is to be machined. This depends
on the angle of the taper on which the thread is to be machined. If the angle at the taper =45 degrees, the
longitudinal axis thread is machined, otherwise it will be the face thread.

Contents Page 240 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example

Thread cutting

With this program you can cut a metric outside thread M42x2 with flank infeed. The infeed is performed
with a constant cross-section of cut. 5 roughing cuts are made to a thread depth of 1.23 mm without final
machining allowance. After machining has been completed, 2 noncuts are performed.

DEF REAL MPIT=42, SPL=0, FPL=-35, Definition of parameters with value as-
signments
DM1=42, DM2=42, APP=10, ROP=3,
TDEP=1.23, FAL=0, IANG=30, NSP=0
DEF INT NRC=5, NID=2, VARI=3, NUMT=1
N10 G0 G90 Z100 X60 Selection of starting position
N20 G95 D1 T1 S1000 M4 Specification of technology values
N30 CYCLE97 ( , MPIT, SPL, FPL, DM1, >> Cycle call
>>DM2, APP, ROP, TDEP, FAL, IANG,>>

Contents Page 241 of 286 Go Back


Fundamentals of CNC Machining Full Screen

>>NSP, NRC, NID, VARI, NUMT)


N40 G90 G0 X100 Z100 Approach next position
N50 M30 End of program

>>Must be programmed in a single block

8.8. Thread chaining - CYCLE98

Programming
CYCLE98 (PO1, DM1, PO2, DM2, PO3, DM3, PO4, DM4, APP, ROP, TDEP, FAL, IANG, NSP, NRC,
NID, PP1, PP2, PP3, VARI, NUMT, VRT)
Parameters

PO1 real Starting point of the thread in the longitudinal


axis
DM1 real Diameter of the thread at the starting point
PO2 real First intermediate point in the longitudinal
axis
DM2 real Diameter at the first intermediate point
PO3 real Second intermediate point
DM3 real Diameter at the second intermediate point
PO4 real End point of the thread in the longitudinal
axis
DM4 real Diameter at the end point
APP real Arc-in section (enter without sign
ROP real Arc-out section (enter without sign)
TDEP real Thread depth (enter without sign)
FAL real Final machining allowance
(enter without sign)

Contents Page 242 of 286 Go Back


Fundamentals of CNC Machining Full Screen

IANG real Infeed angle


Value range
+ (for flank infeed on flank)
v. (for alternat-
ing flank infeed)
NSP real Starting point offset for the first thread (enter
without sign)
NRC int Number of rough cuts (enter without sign)
NID int Number of noncuts (enter without sign)
PP1 real Thread pitch 1 as value (enter without sign)
PP2 real Thread pitch 2 as value (enter without sign)
PP3 real Thread pitch 3 as value (enter without sign)
VARI int Definition of the machining type for the thread
Value range 1 ... 4
NUMT int Number of threads (enter without sign)
VRT from SW 6.2 or higher real Variable retraction distance based on initial
diameter, incremental (enter without sign)

Contents Page 243 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Function

With this cycle you can produce several concatenated cylindrical or tapered threads with a constant lead in
longitudinal or face machining, all of which can have different thread leads.
Sequence of operations

Position reached prior to cycle start:


The starting position is any position from which the programmed thread starting point + arc-in section can
be approached without collision.
The cycle implements the following motion sequence:

approach to the starting point determined by the cycle at the beginning of the arc-in section for the first
thread with G0,
infeed to commence roughing according to the infeed type defined under VARI,
thread cutting is repeated according to the number of roughing cuts programmed,

Contents Page 244 of 286 Go Back


Fundamentals of CNC Machining Full Screen

in the next cut with G33 the final machining allowance is cut,

this cut is repeated according to the number of programmed noncuts,

the total motion sequence is repeated for each additional thread.

Description of parameters

PO1 and DM1 (starting point and diameter)

With these parameters you define the original starting point of the thread chain. The starting point calcu-
lated by the cycle that is approached at the beginning with G0 is the length of the arc-in section in front of the
programmed starting point (starting point A).
PO2, DM2 and PO3, DM3 (intermediate point and diameter)
With these parameters you define two intermediate points in the thread.

Contents Page 245 of 286 Go Back


Fundamentals of CNC Machining Full Screen

PO4 and DM4 (endpoint and diameter)


The original end point of the thread is programmed under parameters PO4 and DM4. With an inside thread,
DM1 . . . DM4 corresponds to the tap hole diameter.
Connection between APP and ROP (arc-in, arc-out sections)
The starting point used in the cycle is the starting point brought forward by the arc-in section APP and,
in the same way, the end point is the programmed end point brought back by the arc-out section ROP. The
starting point defined by the cycle always lies 1 mm outside the programmed thread diameter in the facing axis.
This retraction plane is automatically generated by the control.
Connection between TDEP, FAL, NRC and NID (thread depth, final machining allowance, number of rough
cuts and noncuts)
The programmed final machining allowance is subtracted from the defined thread depth TDEP and the
remainder divided into rough cuts. The cycle automatically calculates the individual actual infeed depths
depending on the parameter VARI. The thread depth to be machined is divided into infeeds with the same
cross-section of cut so that the cutting pressure remains constant for all rough cuts. Infeed is then performed
with differing values for the infeed depth.
In a second method, the total thread depth is divided into constant infeed depths. The cross-section of cut
gets larger from cut to cut. However, if the values for the thread depth are small, this method can create better
cutting conditions. The final machining allowance FAL is removed in one cut after roughing. After this, the
noncuts programmed under parameter NID are executed.

Contents Page 246 of 286 Go Back


Fundamentals of CNC Machining Full Screen

IANG (infeed angle)

With parameter IANG you define the infeed angle. If infeed is to be performed at right angles to the cutting
direction in the thread this parameter must be assigned the value zero. I.e., this parameter can also be omitted
from the parameter list as it is then automatically assigned the default value zero. If infeed is to be performed
along the flank, the absolute value of this parameter must be no more than half the flank angle of the tool.
The sign entered for this parameter defines how this infeed is performed. If a positive value is entered, infeed
is always performed on the same flank, if a negative value is entered, infeed is performed alternately on both
flanks. The infeed type on both flanks alternately can only be used for cylindrical threads. However, if a
negative value is assigned to parameter IANG for a tapered thread, the cycle automatically performs a flank
infeed along one flank.
NSP (starting point offset)
Under this parameter you can program the angular value that defines the point of the first cut for the first
thread turn on the circumference on the turned part. This value is a starting point offset. The parameter can
be assigned any value between 0.0001 and +359.9999 degrees. If no starting point offset has been entered or the
parameter has been omitted from the parameter list, the first thread automatically starts at the zero degrees

Contents Page 247 of 286 Go Back


Fundamentals of CNC Machining Full Screen

mark.
PP1, PP2 and PP3 (thread pitch)
With these parameters you determine the thread pitch from the three sections of the thread chain. The
pitch value must be entered as a paraxial value without a sign.
VARI (machining type)

With parameter VARI, you define if machining is to be internal or external and with which technology the
infeed will be machined during roughing. The parameter VARI can be one of the values between 1 and 4 with
the following meaning:

Value Outside/inside Const. infeed/const. cross-section of cut


1 Outside Constant infeed
2 Inside Constant infeed
3 Outside Constant cross-section of cut
4 Inside Constant cross-section of cut

Contents Page 248 of 286 Go Back


Fundamentals of CNC Machining Full Screen

If another value is assigned to parameter VARI, the cycle is aborted and alarm 61002 Machining type
incorrectly programmed is output.
NUMT (number of thread starts)

With parameter NUMT you specify the number of thread starts for a multiple thread. If you require a
single thread, either assign the value zero to the parameter or omit it from the parameter list. The thread starts
are distributed uniformly around the circumference of the turned part, the first thread is defined in parameter
NSP. If a multiple-start thread with a non-uniform distribution of threads around the circumference is to be
machined, the cycle must be called for every thread start and the corresponding starting point offset must be
programmed.
VRT (variable retraction path)
From SW 6. onward, the retraction path can be programmed on the basis of the initial thread diameter in
parameter VRT. When VRT = 0 (parameter not programmed), the retraction path is 1 mm. The retraction
path is always measured in the programmed system of units inch or metric.

Contents Page 249 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example

Thread chain

With this program you can produce a chain of threads starting with a cylindrical thread. Infeed is perpen-
dicular to the thread. Neither a final machining allowance nor a starting point offset have been programmed. 5
roughing cuts and one noncut are performed. The machining type defined is longitudinal, outside, with constant
cross-section of cut.

N10 G95 T5 D1 S1000 M4 Specification of technology values


N20 G0 X40 Z10 Approach starting position
N30 CYCLE98 (0, 30, -30, 30, -60, >> Cycle call
>>36, -80, 50, 10, 10, 0.92, , , , >>
>>5, 1, 1.5, 2, 2, 3, 1)
N40 G0 X55 Traverse in each axis separately
N50 Z10
N60 X40
N70 M30 End of program

Contents Page 250 of 286 Go Back


Fundamentals of CNC Machining Full Screen

>>Must be programmed in a single block

8.9. Thread recutting


SW version 5.3 contains thread cutting cycles CYCLE97 and CYCLE98 which allow threads to be recut.
Function
The angular offset of a thread start resulting from tool breakage or remeasurement is taken into account and
compensated for by the Thread recut function. This function can be executed in JOG mode in the Machine
operating area.
The cycles calculate an additional offset angle for each thread, which is applied in addition to the programmed
starting point offset, from the data stored in the thread start during synchronization.
Preconditions
The channel in which the thread recutting program must be executed is already selected; the relevant axes
must already be referenced. The channel is in the Reset state, the spindle is stationary.
Sequence of operations:

select JOG in Machine operating area,

press softkey Finish thread,

open screen form for this function,

Contents Page 251 of 286 Go Back


Fundamentals of CNC Machining Full Screen

thread into thread start using the threading tool,


select softkey Sync Point when the cutting tool is positioned exactly in the thread start,

press softkey Cancel to return to the next-higher softkey menu without activating the function (no data
are then stored in the NC),

select softkey OK to transfer all values to the GUD in the NC,

then retract the tool and move it to its starting position,

select Automatic and position the program pointer using block search in front of the thread cycle call,

start the program with NC start.

Special functions
You can delete values stored earlier by selecting another softkey labeled Delete.
If several spindles are operating in the channel, another box is displayed in the screenform in which you can
select a spindle to machine the thread.

Contents Page 252 of 286 Go Back


Fundamentals of CNC Machining Full Screen

8.10. Extended stock removal cycle - CYCLE950


The extended stock removal cycle is an option. It requires SW 5.3 in the NCK and MMC.
Programming
CYCLE950 ( NP1, NP2, NP3, NP4, VARI, MID, FALZ, FALX, FF1, FF2, FF3, FF4, VRT,
ANGB, SDIS, NP5, NP6, NP7, NP8, APZ, APZA, APX, APXA, TOL1)
Parameters

NP1 String Name of the contour subroutine for the fin-


ished part contour
NP2 String Label / block number start of finished part
contour, optional (this can be used to define
contour sections)
NP3 String Label / block number end of finished part con-
tour, optional (this can be used to define con-
tour sections)
NP4 String Name of the stock removal program to be gen-
erated
VARI Int Type of machining : (enter without sign)
ONE DIGIT:
Values: 1 . . . Longitudinal
Values: 2 . . . Face
Values: 3 . . . Parallel to contour
TEN DIGIT:
Values: 1 . . . Programmed infeed direction X-
Values: 2 . . . Programmed infeed direction X+
Values: 3 . . . Programmed infeed direction Z-
Values: 4 . . . Programmed infeed direction Z+
HUNDRED DIGIT:
Values: 1 . . . Roughing

Contents Page 253 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Values: 2 . . . Finishing
Values: 3 . . . Complete
THOUSAND DIGIT:
Values: 1 . . . With rounding
Values: 2 . . . Without rounding (lift off)
TEN THOUSAND DIGIT:
Values: 1 . . . Machine relief cuts
Values: 2 . . . Do not machine relief cuts
HUNDRED THOUSAND DIGIT:
Values: 1 . . . Programmed machining direc-
tion X-
Values: 2 . . . Programmed machining direc-
tion X+
Values: 3 . . . Programmed machining direc-
tion Z-
Values: 4 . . . Programmed machining direc-
tion Z+
MID Real Infeed depth (enter without sign)
FALZ Real Final machining allowance in the longitudinal
axis (enter without sign)
FALX Real Final machining allowance in the facing axis
(enter without sign)
FF1 Real Feedrate for longitudinal roughing
FF2 Real Feedrate for face roughing
FF3 Real Feedrate for finishing
FF4 Real Feedrate at contour transition elements (ra-
dius, chamfer)
VRT Real Lift off distance for roughing, incremental (en-
ter without sign)
ANGB Real Lift off angle for roughing

Contents Page 254 of 286 Go Back


Fundamentals of CNC Machining Full Screen

SDIS Real Safety distance for avoiding obstacles, incre-


mental
NP5 String Name of contour program for blank contour
NP6 String Label / block number start of blank contour,
optional (this can be used to define contour
sections)
NP7 String Label / block number end of blank contour,
optional (this can be used to define contour
sections)
NP8 String Name of contour program for updated blank
contour
APZ Real Axial value for defining blank for longitudinal
axis
APZA Int Absolute or incremental evaluation of param-
eter APZ 90=absolute, 91=incremental
APX Real Axial value for defining blank for facing axis
APXA Int Absolute or incremental evaluation of param-
eter APX 90=absolute, 91=incremental
TOL1 Real Blank tolerance

Function
With the extended stock removal cycle CYCLE950 you can machine a contour programmed with paraxial or
parallel-contour stock removal. Any blank can be defined and is considered during stock removal. The finished
part contour must be continuous and may contain any number of relief cut elements. You can specify a blank
as a contour or by means of axial values.
Contours can be machined in the longitudinal and facing directions with this cycle. You can freely select a
technology (roughing, finishing, complete machining, machining and infeed directions). It is possible to update
a blank.
For roughing, the programmed infeed depth is observed precisely; the last two roughing steps are divided
equally. Roughing is performed to the programmed final machining allowance.

Contents Page 255 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Finishing is performed in the same direction as roughing.


The tool radius compensation is automatically selected and deselected by the cycle.

Contents Page 256 of 286 Go Back


Fundamentals of CNC Machining Full Screen

New functions compared to CYCLE95:

you can define a blank either by programming a contour, specifying an allowance on the finished-part

Contents Page 257 of 286 Go Back


Fundamentals of CNC Machining Full Screen

contour or entering a blank cylinder (or hollow cylinder in the case of internal machining) from which
stock must be removed,

it is possible to detect residual material that cannot be machined with the current tool. The cycle can
generate an updated blank, which is stored as a program in the part program memory,

you can specify the contours for stock removal:

in a separate program,

in the calling main program or

as section of any given program,

during roughing, it is possible to choose between paraxial and contour-parallel machining,

during roughing, you have the option of machining along the contour so that no corners are left over, or
removing stock immediately at the roughing intersection,

the angle for stock removal at the contour during roughing is programmable,

optionally, relief cuts can be machined or skipped during roughing.

Sequence of operations

Position reached prior to cycle start:


The initial position can be any position from which the blank contour can be approached collision-free. The
cycle calculates collision-free approach movements to the starting point for machining but does not consider the
tool holder data.
Movement for paraxial roughing:

the starting point for roughing is calculated internally in the cycle and approached with G0,

Contents Page 258 of 286 Go Back


Fundamentals of CNC Machining Full Screen

the infeed to the next depth, calculated in accordance with the specifications in parameter MID, is carried
out with G1, and paraxial roughing then performed with G1. The feedrate during roughing is calculated
internally in the cycle according to the path as the feedrate that results from the values specified for
longitudinal and face feed ( FF1 and FF2),
for Rounding along contour, the previous intersection is approached parallel to the contour,
when the previous intersection is reached or for machining Without rounding along contour, the tool is
lifted off at the angle programmed in ANGB and then retracted to the starting point for the next infeed
with G0. If the angle is 45 degrees, the programmed lift off path VRT is also followed precisely; it is not
exceeded for other angles,
this procedure is repeated until the full depth of the machining section has been reached.

Sequence of motions for roughing in parallel with contour:

the starting point for roughing and the individual infeed depths are calculated as for paraxial roughing
and approached with G0 or G1,
roughing is carried out in contour-parallel paths,
lift off and retraction is carried out in the same way as for paraxial roughing.

Description of parameters

NP1, NP2, NP3 (contour programming finished part)


The finished part contour can be programmed optionally in a separate program or in the current main
program that calls the routine. The data are transferred to the cycle via parameters NP1 . Name of the
program or NP2, NP3. ID of program section from ... to using block numbers or labels.
So there are three options for contour programming:
the contour is defined in a separate program in which case only NP1 need be programmed; (see program-
ming example 1),

Contents Page 259 of 286 Go Back


Fundamentals of CNC Machining Full Screen

the contour is defined in the calling program in which case only NP2 and NP3 have to be programmed;
(see programming example 2),

the stock removal contour is part of a program but not part of the program that calls the cycle in which
case all three parameters must be programmed.

When the contour is programmed as a program section, the last contour element (block with label or block
number end of blank contour) must not contain a radius or chamfer. Write the program name in NP1 with
path name and program type.
Example:
NP1=/ N SPF DIR/ N PART1 SPF
NP4 (name of the stock removal program)
The stock removal cycle generates a program for the travel blocks that are required for stock removal between
the blank and the finished part. This program is stored in the same directory as the calling program in the part
program memory if no other path is specified when it is generated. If a path is entered, it is stored accordingly
in the file system. The program is a main program (type MPF) if no other type is specified.
Parameter NP4 defines the name of this program.

Contents Page 260 of 286 Go Back


Fundamentals of CNC Machining Full Screen

VARI (machining type)

Contents Page 261 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Parameter VARI defines the type of machining. Possible values are:

Unit digit: 1=Longitudinal


2=Face
3=Parallel to the contour

Ten digit: 1=Programmed infeed direction X-


2=Programmed infeed direction X+
3=Programmed infeed direction Z-
4=Programmed infeed direction Z+

Hundred digit: 1=Roughing


2=Finishing
3=Complete

Thousand digit: 1=With rounding


2=Without rounding (lift off)
The selection with or without rounding along the contour deter-
mines whether or stock removal starts at the roughing intersection
immediately or whether machining is performed along the contour
up to the previous intersection so that there are no residual cor-
ners.

Ten thousand digit: 1=Machine relief cuts


2=Do not machine relief cuts

Contents Page 262 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Hundred thousand digit: 1=Programmed machining direction X-


2=Programmed machining direction X+
3=Programmed machining direction Z-
4=Programmed machining direction Z+

Example:
VARI=312311 means machining: longitudinal, infeed direction X- (i.e. external), complete; the workpiece
is not rounded along the contour, relief cuts are machined machining direction Z-.
MID (infeed depth for roughing)
The infeed depth for roughing is programmed with the parameter MID. Roughing steps are generated with
this infeed until the remaining depth is less than twice the infeed depth. Then two steps are performed each at
half of the remaining depth. MID is interpreted as a radius or diameter depending on the value of cycle setting
data ZSD[0] if the facing axis is involved in the infeed for roughing.

ZSD[0]=0: MID is interpreted according to the G group for radius/diameter program-


ming, as a radius with DIAMOF, otherwise as a diameter.
ZSD[0]=1: MID is a radius value
ZSD[0]=2: MID is a diameter value

When rough cutting parallel to contour, the infeed depth does not act in relation to the specified infeed axis
but vertically to the contour. This always results in more cuts than in paraxial rough-cutting with the same
value for infeed depth.
FALZ, FALX (machining allowance)
The default for a final machining allowance for roughing is provided by the parameters FALZ (for Z axis)
and FALX (for X axis). Roughing always takes place down to theses final machining allowances. If no machin-
ing allowances are programmed, stock removal is performed up to the end contour during roughing. If final
machining allowances are programmed, these are applied correspondingly.

Contents Page 263 of 286 Go Back


Fundamentals of CNC Machining Full Screen

FF1, FF2, FF3 and FF4 (feedrate)

Separate feedrates can be specified for roughing and finishing, as shown in the figure opposite. Separate
feedrates apply for longitudinal ( FF1) and face ( FF2) during roughing. If inclined or circular path sections are
traversed when machining the contour, the appropriate feedrate is calculated automatically inside the cycle. The
feedrates programmed at the contour are active during finishing. If none are programmed there, the finishing
feedrate in FF3 and the feedrates at radii and chamfers in FF4 apply to these contour transition elements.
VRT (lift off ) and ANGB (lift angle)
The parameter VRT can be used to program the amount of lift off during roughing in both axes. If VRT=0
(parameter not programmed), lift off is 1 mm. It is also possible to program the angle at which the axis is

Contents Page 264 of 286 Go Back


Fundamentals of CNC Machining Full Screen

retracted from the contour in parameter ANGB. If nothing is programmed, the angle is 45.
SDIS (safety distance)
Parameter SDIS determines the amount of clearance for obstructions. This clearance is active for retraction
from a relief cut and approach to the next relief cut, for example. If no value is programmed, the clearance is
1 mm.
NP5, NP6, NP7 (contour programming blank)
If a blank is programmed as a contour, it can be programmed as a program name using parameter NP5 or
as a program section with parameters NP6 and NP7. Otherwise, programming is carried out as for finished
parts (see NP1, NP2, NP3).
NP8 (name of contour program for updated blank contour)
Cycle CYCLE950 can detect residual material that cannot be removed with the active tool. To continue
this machining with a different tool, it is possible to generate an updated blank contour automatically. This is
stored as a program in the part program memory. You can specify the program name in parameter NP8 with
or without path details (see sample program 3). An updated blank contour is always generated when a travel
program is generated.

Contents Page 265 of 286 Go Back


Fundamentals of CNC Machining Full Screen

APZ, APZA, APX, APXA (blank definition)

Contents Page 266 of 286 Go Back


Fundamentals of CNC Machining Full Screen

You can also define a blank by entering the dimensions of a blank cylinder (or hollow cylinder) or as an
allowance on the finished-part contour in parameters APZ and APX. You can enter the cylinder dimensions as
either absolute or incremental values, although an allowance on the finished-part contour is always interpreted
incrementally. Absolute or incremental values are selected via parameters APZA and APXA ( APZA, APXA:
90 - absolute 91 - incremental).
TOL1 (blank tolerance)
Since a blank does not always correspond exactly to the blank definition when it is cast or forged for example,
it makes sense not to travel to the blank contour with G0 for roughing and for the infeed but to activate G1
shortly beforehand to compensate for any tolerances. Parameter TOL1 defines the distance from the blank at
which G1 becomes active. Traversing is started with G1 at this incremental amount before the blank. If the
parameter is not programmed, it has the value 1 mm.
Further notes

Contour definition
Unlike CYCLE95, one block that contains a link to the current plane is sufficient for contour programming.
For further details of contour definition, see CYCLE95.

Contents Page 267 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Blank contour definition

A blank contour must either be a closed contour (starting point=end point) which encompasses the finished-
part contour either partially or fully, or a contour section between the starting and end points of the finished-part
contour. The programmed direction is irrelevant.
Blank contours always must be described in a way that they are not partly identical with the finished-part
contours, i.e. the machined materials are not combined.

Contents Page 268 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Explanation of the cycle structure


CYCLE950 is used to solve very complex problems during stock removal, which require high processing
power in the control. For best timing, the calculation is carried out in the MMC. The calculation is started
in the cycle and a program with traversing blocks for stock removal generated in its result and stored in the
file system of the control, where it is called and executed immediately. This structure means that it is only
necessary to perform the calculation the first time a program is executed with CYCLE950 call. When called a
second time, the traversing program is available and can be called by the cycle.
Recalculation is performed when:
a finished contour has been modified,
a transfer parameter of the cycle has changed,
a tool with different tool offset data has been activated before the cycle call.

Program storage in the file system


If the contours for CYCLE950 are programmed outside the program that makes the call, the following
applies for the search in the file system of the control:
if the calling program is stored in a workpiece directory, then the programs which define the finished-part
or blank contour must also be stored in the same workpiece directory, or at least programmed with path
information,
if the invoked program is located in the Part Program directory (MPF.DIR), a search is also made there
for the programs is no path is specified.
The cycle creates a program that contains the traversing blocks for stock removal and, optionally, an updated
blank contour. These are either stored in the same directory as the cycle-calling program or in accordance with
the specified path.
Note on simulation
In the simulation of the extended stock removal cycle CYCLE950, the generated programs are saved to the
NCU file system. Therefore, only the NC Active Data setting is practical since tool offset data are included
in program calculation.

Contents Page 269 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Blank updating

The extended stock removal cycle CYCLE950 detects residual material during roughing and is able to
generate an updated blank contour outside the machining process, which can be used in a further machining
step.
To do this, the cycle internally considers the angle at the tool point. The relief cut angle of the tool must
be entered in the tool offset data (parameter 24). The cycle defines the main cutting edge angle automatically
according to the tool point position. For tool point positions 1 to 4, the blank update is calculated with a main
cutting edge angle of 90. For tool point positions 5 to 9, the main cutting angle is assumed to be identical to
the relief cut angle. If CYCLE950 is called more than once, each time with blank update, in the same program,
different names for the generated blank contours must be assigned; it is not permissible to use the program
name (parameter NP8) more than once.
Extended stock removal cannot be performed in m:n configurations.

Contents Page 270 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Programming example 1

From a preshaped blank, the contour saved in program PART1.MPF is to be machined. The type of
machining for the stock removal process is:
only roughing,
longitudinal,
outside,
with rounding (so that no corners are left over),
relief cuts are to be machined.
The blank contour is specified in program BLANK1.MPF. A turning steel with tool point position 3 and a
radius of 0.8 mm is used.
Machining program:

Contents Page 271 of 286 Go Back


Fundamentals of CNC Machining Full Screen

% N EXAMPLE 1 MPF
;$PATH=/ N WKS DIR/ N STOCK REMOVAL NEW W PD
; Example 1: Stock removal with blank
; Sca, 01.04.99
;
; Tool offset data
N10 TC DP1[3,1]=500 $TC DP2[3,1]=3 $TC DP6[3,1]=0.8 $TC DP24[3,1]=60
N15 G18 G0 G90 DIAMON
N20 T3 D1
N25 X300
N30 Z150
N35 G96 S500 M3 F2
N45 CYCLE950(Part1,,,Machine Part1,
311111,1.25,1,1,0.8,0.7,0.6,0.3,0.5,45,2, Blank1,,,,,,,,1)
N45 G0 X300
N50 Z150
N60 M2

% N PART1 MPF
;$PATH=/ N WKS DIR/ N STOCK REMOVAL NEW W PD
; Finished part contour Example 1
;
N100 G18 DIAMON F1000
N110 G1 X0 Z90
N120 X20 RND=4
N130 X30 Z80
N140 Z72
N150 X34

Contents Page 272 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N160 Z58
N170 X28 Z55 F300
N180 Z50 F1000
N190 X40
N200 X60 Z46
N210 Z30
N220 X76 CHF=3
N230 Z0
N240 M17

Blank contour:

% N BLANK1 MPF ;$PATH=/ N WKS DIR/ N STOCK REMOVAL NEW W PD


; Blank contour Example 1
;
N100 G18 DIAMON F1000
N110 G0 X0 Z93
N120 G1 X37
N130 Z55
N140 X66
N150 Z35
N160 X80
N170 Z0
N180 X0
N190 Z93 *
N200 M17

* End point=Starting point, Blank contour must be closed


After machining, a new program called
MACHINING PART1.MPF is present in the workpiece

Contents Page 273 of 286 Go Back


Fundamentals of CNC Machining Full Screen

STOCK REMOVAL NEW.WPD. BEARBEITE TEIL1.MPF.


This program is created during the first program call and contains the traversing motions for machining the
contour in accordance with the blank.
Programming example 2

A simple inside contour is to be machined on the same part as in sample program 1. A center bore is made
first using a diameter-10 drill. Then, the inside contour is roughed parallel to the contour, since the hole roughly
corresponds to the end contour. This is done by defining a blank contour again for inside machining. The stock
removal contour is located in the same program as the cycle call in the blocks N400 to N420, the blank contour
in blocks N430 to N490.
Machining program:

% N EXAMPLE 2 MPF
;$PATH=/ N WKS DIR/
N STOCK REMOVAL NEW W PD
; Example 1: inside stock removal, parallel to contour

Contents Page 274 of 286 Go Back


Fundamentals of CNC Machining Full Screen

; Sca, 01.04.99
;
; Tool offset data for turning tool, inside
N100 $TC DP1[2,1]=500 $TC DP2[2,1]=6
$TC DP6[2,1]=0.5 $TC DP24[2,1]=60
N105 $TC DP1[1,1]=200 $TC DP3[1,1]=100
$TC DP6[1,1]=5
N110 G18 G0 G90 DIAMON
N120 X300
N130 Z150
N140 T1 D1 Change drill with diameter 10
N150 X0 Center drilling in three steps
N160 Z100
N170 F500 S400 M3
N175 G1 Z75
N180 Z76
N190 Z60
N200 Z61
N210 Z45
N220 G0 Z100
N230 X300 Approach tool change point
N240 Z150
N250 T2 D1 Insert turning tool for inside ma-
chining
N260 G96 F0.5 S500 M3
N275 CYCLE950(,N400,N420,Machine Part1 Inside,
311123,1.25,0,0,0.8,0.5,0.4,0.3,0.5,45,1,,N430,N490,,,,,,,,1)
N280 G0 X300
N290 Z150
N300 GOTOF END Skip contour definition

Contents Page 275 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N400 G0 X14 Z90 N400 to N420 finished part con-


tour
N410 G1 Z52
N420 X0 Z45
N430 G0 X10 Z9 N430 to N490 blank contour
N440 X16
N450 Z40
N460 X0
N470 Z47
N480 X10 Z59
N490 Z90
N500 END:M2

Programming example 3
The same part as in sample program 1 should now be machined in two steps.
In the first machining step (N45), roughing is carried out using a tool with tool point position 9 and a large
radius with deep infeed depth and no blank specified. The result to be generated is an updated blank with the
name blank3.MPF.
The type of machining for this step is:
only roughing,
longitudinal,
outside,
with rounding,
relief cuts are not be machined.
In the second machining step (N70), the residual material on this blank is machined with a different tool
and then finished.
The type of machining for this step is:

Contents Page 276 of 286 Go Back


Fundamentals of CNC Machining Full Screen

complete machining (roughing and finishing),

longitudinal,

outside,

with rounding (so that there are no residual corners),

relief cuts are to be machined.

Machining program:

% N EXAMPLE 3 MPF
;$PATH=/ N WKS DIR/ N STOCK REMOVAL NEW W PD
; Example 3: stock removal in two steps with blank update
; Sca, 09.04.99
;
; Tool offset data
; T3: Roughing steel for rough machining, tool point position 9, radius 5
N05 $TC DP1[3,1]=500 $TC DP2[3,1]=9
$TC DP6[3,1]=5 $TC DP24[3,1]=80
; T4: Turning steel for residual material and finishing
; Tool point position 3, radius 0.4
N10 $TC DP1[4,1]=500 $TC DP2[4,1]=3
$TC DP6[4,1]=0.4 $TC DP24[4,1]=80
N15 G18 G0 G90 DIAMON
N20 T3 D1 Tool for roughing
N25 X300
N30 Z150
N35 G96 S500 M3 F2
N45 CYCLE950(Part1,,,Machine Part3,
321111,8,1,1,0.8,0.7,0.6,0.5,1,45,6,DEFAULT,,,Blank3,0,91,0,91,1)

Contents Page 277 of 286 Go Back


Fundamentals of CNC Machining Full Screen

N50 G0 X300
N55 Z150
N60 T4 D1 Tool for roughing
residual material
and finishing
N65 G96 S500 M3 F2
N75
CYCLE950(Part1,,,Finish Part3,
311311,0.5,0.25,0.25,0.8,0.7,0.6,0.5,1,45,6,Blank3,,,,,,,,1)
N160 M2

Finished part contour: as for sample program 1

Explanation

Alarm source CYCLE950

Contents Page 278 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Alarm num- Alarm text Explanation, remedy


ber
61701 Error in contour description of finished part Either none of parameters NP1, NP2
or NP3 is assigned or error in program-
ming of finished-part contour
61702 Error in contour description of blank Either none of parameters NP5, NP6
or NP7 is assigned or error in program-
ming of blank contour
61703 Internal cycle error while deleting file
61704 Internal cycle error while writing file
61705 Internal cycle error while reading file
61706 Internal cycle error during checksum forma-
tion
61707 Internal cycle error during ACTIVATE at
MMC
61708 Internal cycle error during READYPROG at
MMC
61709 Timeout for contour calculation
61720 Illegal input
61721 Error: unable to determine contour direc-
tion
61722 System error
61723 Unable to perform machining Use a tool with a larger clearance angle
61724 No material available
61725 Out of memory, error in contour generation
61726 Internal error: Out of memory
FILECTRL INTERNAL ERROR
61727 Internal error: Out of memory
FILECTRL EXTERNAL ERROR
61728 Internal error: Out of memory

Contents Page 279 of 286 Go Back


Fundamentals of CNC Machining Full Screen

ALLOC P INTERNAL ERROR


61729 Internal error: Out of memory
ALLOC P EXTERNAL ERROR
61730 Internal error: Invalid Memory
61731 Internal error: Floating-point exception
61732 Internal error: Invalid instruction
61733 Internal error: Floating Point Error
61734 Tool point position not compatible with cut-
ting direction
61735 Finished part lies outside blank contour Check definition of blank contour
61736 Tool insert length <machining depth
61737 Machining Depth Of Cut
>Max. Tool Cutting Depth
61738 Machining Cutting Depth
<Min. Tool Cutting Depth
61739 Incorrect position of tool for this type of ma-
chining
61740 Blank must be a closed contour Blank contour must be closed, starting
point = end point
61741 Out of memory
61742 Collision during approach, offset not possi-
ble

Contents Page 280 of 286 Go Back


Fundamentals of CNC Machining Full Screen

9. APPENDIX
9.1. Excersises & Problems of CNC Machining
9.1.1. Geometrical Definitions
Describe the surfaces on the workpiece in terms according to the standard ISO 4287-1 and main charac-
teristics of the roughness (Ra, Rz). On the base of data label calculate the relationship Ra = f (Rz ) for a
reaming technology.

Describe the selected cutting tools (turning knife, screw drill, milling cutter) and their parts in terms
according to the standard ISO 3002/1.

Describe the cutting geometry of the selected cutting tool (recommended turning knife for outer turning)
in terms according to the standard ISO 3002/2.

According to the standard ISO 3002/3 describe the cutting conditions, cross-section of the chip for turning,
milling and drilling operations.

According to the standard ISO 3002/3 describe the cutting conditions, cross-section of the chip for turning,
milling and drilling operations.

ISO coding of tool holders and inserts.


According to the standard ISO 3002/4 describe the forces acting on a cutting tool when machining, their
relation to the cross section of the chip and cutting conditions.

9.1.2. Cutting Conditions, Time Consumption


Calculate the cutting speed of a wheel that has diameter 120 mm when rotating at 602 rev/min.

Calculate the feed speed vf when turning a wheel of diameter 120 mm with cutting speed vc = 120 m/min
and feed is 0.25 mm/rev. Calculate the resultant cutting speed ve and resultant cutting angle .

Contents Page 281 of 286 Go Back


Fundamentals of CNC Machining Full Screen

A metal disc has inner and outer radii for its machined surface of 25 mm and 58 mm. The disc is turned
at a constant cutting speed 130 m/min, starting from its inner edge and moving outward. What are the
angular speeds (number of rotations per minute) at the (a) inner radius and (b) outer radius? Is the
angular acceleration constant? The cutting tool makes spiraled lines 0.2 mm apart; what is the total
length of the tool pass? What is the machining time? Rework the problem assuming that the number of
rotations rather the cutting speed is held constant.

Overhanging part of a tube (200 / 100 mm) is going to be machined by facing from the outside diameter
to the inside diameter at a NC machine. Recommended cutting speed for the selected indexable insert
belongs to the interval 200-300 m/min, feed speed 0.25 mm/rev. Calculate the diameters for increasing
speed of spindle to meet the cutting speed limitations and find the time of facing regarding that one gear
change takes about 1.6 seconds. Run-in and run-out distances let be 2 mm.

9.1.3. Physical Phenomena


A constant horizontal force of 500 N and vertical feed force 100 N force are applied to a cutting tool as
shown in Fig.1. What are the magnitude and direction of the total cutting force ? Draw a sketch of the
problem.

Calculate (a) the cutting force exerted on the single tip turning tool, and (b) the average cutting power Pc
required to turning of steel when Fc = 1980 ap f 0.78 , ap = 2.5 mm, f = 0.25 mm/rev, vc = 140 m/min.
Further more, for the length of cylindrical workpiece 180 mm calculate average temperature of chips after
machining, regarding that density of steel is 7,800 kg/m3 , specific heat 0.461 kJkg1 K1 , and a ratio of
heat conducted by the chips is 80 %.

The simplest theory of tool life relation is so called T -vc relation proposed by Taylor in 1907. For the
given experimental data derive the Taylors constants using linear regression statistical method and draw
the Taylors relation in cartesian coordinates and in logarithmic scale. How does machinability of material
influence the relation ?

vc [m/min] 162 150 141 125 110 100


T [min] 25 45 69 128 220 280

Contents Page 282 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Material: steel C45


Sintered carbide ISO P20, o = 6 , r = 45 , r = 90 , s = 5 , r = 0.8 mm.
Cutting conditions: f = 0.3 mm/rev, ap = 3 mm.
Criterion: VB = 0.8 mm.
Machine: lathe SU 50 SP.
Cooling: emulsion 5%.

Consider outer interrupted longitudinal roughing operation of a cylindrical ingot. For given cutting condi-
tions derive the following criteria: tool life, volume of metal removed, cutting forces/energy requirements,
chip disposability, roughness of surface. (Individual tests).
Compute a value of kc , cutting force and power requirement when milling carbon steel 180 HB with a
milling head R245-125Q40-12M, 8 inserts R245-12 T3 M-PM, GC 4030 (Sandvik Coromant), ap = 4 mm,
ae = 85 mm (p.390).
Given steel 0.8% C, (HB 170), sintered carbide GC 4025 (ISO P15-35, o = 6 , r = 90 , r = 6 , s =
6 , r = 0.8 mm), cutting conditions: longitudinal turning by cutting speed 275 m/min, f = 0.4 mm/rev,
ap = 3.0 mm. Specific cutting force kc = 2180 MPa. Calculate the spindle power requirement.
Compare the power transmission in drilling of hardened steel with HSS screw drill 6.00 mm, when the
following data of cutting force and torque moment were experimentally found (cutting speed vc = 35
m/min both, feed 0.2 mm/rev): Ff = 1608 N, Mc = 3.21 Nm.
Let the outer diameter of workpiece be 100 mm, the depth of cut 3 mm and feed 0.3 mm/rev. Assume
that no wear occurs while machining. Determine function of spindle power consumption when the surface
is being faced with constant angular speed 400 rev/min and the relation of cutting force has a formula
Fc = 2100 ap f 0.8 .

9.1.4. CNC Programming


Basics of CNC programming - SINUMERIK 810D. Basic composition of CNC programme. Make a general
CNC work schedule and sequence of cutting operations and working instructions. Find optimal allowances
for machining operations relating dimensions and tolerances from the drawing.

Contents Page 283 of 286 Go Back


Fundamentals of CNC Machining Full Screen

Basic descriptions of lathe SPN 12 CNC and its facilities. Study rules for workpiece orientation, clamping
and allowed loading.

Learn how to handle the main menu of SINUMERIK 810 - controlling panels, split screen layouts, hori-
zontal and vertical soft keys, pop-up menus. Learn how to work with workpiece files, tool files, edit menu,
graphical simulation, protection of programmes, setting data, dowloading and copying of files.

On the base of translations, rotations and transformations of coordinate systems make CNC programme for
the machined part. Main programs and sub-programmes. Methods of programme generation. Graphical
simulation of a programme.

Workshop - CNC machining. Tool management. Data operations. Miscellaneous and drive instructions.
Machine control keys (spindle rotations, tool release, manual operation, manual operations with tools,
clamping of workpiece). Cooling.

Draw in the x and z axes of a workpiece coordinate system. In all of our turning problems it made sense
to choose the z axis horizontal a x axis vertical. Choose them so that z axis axis is identical with the axes
of symmetry. Resolve into components the coordinates that do not lie along one of the axes. Solve the
appropriate dimensional chains if needed.

Given different cutting tools, you are asked to assign tool compensations for T1 (outer cranked left hand
knife), T2 (light turning knife), T3 (parting off tool), T4 (threading ) and make the setting data sheet.

When 100 workpieces have been machined by T1, the diameter of the machined cylinder has increased
from 100.000 mm to 100.012 mm. Make decision how to correct the situation (adjustment of setting data).

Learn the CNC machining cycle sand machining of complex curves and surfaces. Import of data from
CAD/CAM. Learn how to write macro and self-made cycles. Study diagnostics and inspection of machine
and drive units.
Suggest ways in which a very complicated shape of workpiece could be machined and measured experi-
mentally (calipers, micrometers, indicators with magnetic stands, dial gauges, external dial snap gauges,
adjustable snap gauges, plug gauges, plain ring gauges, screw plug and ring gauges), supposing single-part

Contents Page 284 of 286 Go Back


Fundamentals of CNC Machining Full Screen

CNC production, lot CNC production and mass production. Modify the solutions of problem by time
analysis.

Draw a sketch of metric thread and describe all parameters of the surfaces. Assume that the bolt is made
from hardened steel. Use CYCLE97 to the sequence of operations.

You have been assigned to make a CNC programme for machining of the workpiece according to the
sketch. Assume lot production of 1,000 pieces per two months. Write down operating instructions of the
process of manufacture, in successive order, including the checks of quality and measurement.

9.2. Example

Technology of the shaft production with the semiautomatic lathe SPN 12 CNC and CNC controlling
system SINUMERIK 810 D

9.3. Vocabulary

Broaching
Contour band sawing.Power hacksaws. Circular saw
Drilling. Boring
Grinding and polishing
Machining of metals
Milling
Planing
Reaming. Countersinking. Counterboring
Shaping
Some other machining processes
Turning
Mathematical symbols
Symbols of physical quantities

Contents Page 285 of 286 Go Back


Fundamentals of CNC Machining Full Screen

10. REFERENCES
[1] ELMAN, J., MICHALICEK, V. Anglicko-cesky technicky slovnik. 1.vyd. Praha: Sobotales, 1998. 1328 s.
ISBN 80-85920-50-6.

[2] ELMAN, J., MICHALICEK, V. Cesko-anglicky technicky slovnik. 1.vyd. Praha: Sobotales, 2002. 1520 s.
ISBN 80-85920-85-9.

[3] HORNBY, A. S. Oxford Advanced Learners Dictionary of Current English. 6th ed. Oxfor New York:
Oxford University Press, 2000. 1539 p. ISBN 0-19-431585-1.

[4] JANATA, P. Anglictina ve strojirenstvi. 1.vyd. Praha: Nakladatelstvi technicke literatury, 1981. 536 s.

[5] SANDVIK COROMANT Die and Mould Making. 1th ed. Sweden: Sandviken, 2000. 208 p.

[6] SIEMENS Programming Guide Fundamentals. http://www.siemens.com.br/upfiles/1034.pdf

[7] SIEMENS Users Guide Measuring Cycles. http://www.siemens.com.br/upfiles/1040.pdf

Contents Page 286 of 286 Go Back

You might also like