You are on page 1of 286

Fundamentals of CNC Machining Brno University of Technology Faculty of Mechanical Engineering The Institute of Manufacturing Technology

Full Screen

Fundamentals of CNC Machining

Technical Collaborator:

Ing. Petra CIHLAROVA


cihlarova@ust.fme.vutbr.cz

Narrator: Responsible Person:

Mr. Michael HILL (U.K.) Ing. Miroslav PISKA, PhD. Associate Professor
piska@ust.fme.vutbr.cz

Contents

Page 1 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

Contents
1 FUNDAMENTAL GEOMETRICAL PRINCIPLES 1.1 Description of workpiece points . . . . . . . . . . . . . . . . . . . . . 1.1.1 Workpiece coordinate systems . . . . . . . . . . . . . . . . . . 1.1.2 Denition of workpiece positions . . . . . . . . . . . . . . . . 1.1.3 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.4 Absolute dimensions . . . . . . . . . . . . . . . . . . . . . . . 1.1.5 Incremental dimensions . . . . . . . . . . . . . . . . . . . . . 1.1.6 Plane designation . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Position of zero points . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Position of coordinate system . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Overview of various coordinate systems . . . . . . . . . . . . 1.3.2 Machine coordinate system . . . . . . . . . . . . . . . . . . . 1.3.3 Basic coordinate system . . . . . . . . . . . . . . . . . . . . . 1.3.4 Workpiece coordinate system . . . . . . . . . . . . . . . . . . 1.3.5 Frame system . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.6 Assignment of workpiece coordinate system to machine axes . 1.3.7 Current workpiece coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 5 5 9 10 12 14 15 16 16 18 21 22 23 26 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 3.1 Absolute/incremental dimensions, G90/G91 . . . . . 3.1.1 G91 extension (SW 4.3 and higher) . . . . . . 3.2 Absolute dimensions for rotary axes, DC, ACP, ACN 3.3 Metric/imperial dimension, G70/G71/G700/G710 . 3.4 Settable zero oset/frame, G54 to G599 . . . . . . . 3.5 Selecting the working plane, G17 to G 19 . . . . . . 51 51 55 57 60 63 69

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

Contents

Page 2 of 286

Go Back

Fundamentals of CNC Machining


3.6

Full Screen

Programmable working area limitation, G25/G26 . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 77 77 79 85 91 94 115 119 119 120 122 122 127 130 142 143 148 154 154 158 159 159 163 164 167 168 169

4 PROGRAMMING MOTION COMMANDS 4.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Traversing commands with polar coordinates, G110, G111, G112, 4.3 Rapid traverse movement, G0 . . . . . . . . . . . . . . . . . . . . 4.4 Linear interpolation, G1 . . . . . . . . . . . . . . . . . . . . . . . 4.5 Circular interpolation, G2/G3, CIP . . . . . . . . . . . . . . . . . 4.6 Helical interpolation, G2/G3 TURN . . . . . . . . . . . . . . . .

. . . . . AP, RP . . . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

5 FRAMES 5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Frame instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Programmable zero oset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 TRANS, ATRANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.2 G58, G59: Axial programmable ZO (SW 5 and later) . . . . . . . . . . 5.4 Programmable rotation, ROT, AROT . . . . . . . . . . . . . . . . . . . . . . . 5.5 Programmable frame rotations with solid angles, ROTS, AROTS and CROTS 5.6 Programmable scale factor, SCALE, ASCALE . . . . . . . . . . . . . . . . . . . 5.7 Programmable mirroring, MIRROR, AMIRROR . . . . . . . . . . . . . . . . . 6 TOOL OFFSETS 6.1 General information . . . . . . . . . . . . . . . 6.2 List of tool types . . . . . . . . . . . . . . . . . 6.3 Tool selection/tool call T . . . . . . . . . . . . 6.3.1 Tool change with M06 (mill) . . . . . . 6.3.2 Tool change with T command (rotate) . 6.4 Tool oset D . . . . . . . . . . . . . . . . . . . 6.5 Tool selection T with tool management . . . . 6.5.1 Turning machine with circular magazine 6.5.2 Milling machine with chain magazine . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

Contents

Page 3 of 286

Go Back

Fundamentals of CNC Machining


6.6 6.7 6.8 Tool oset call D with tool management . . . . 6.6.1 Turning machine with circular magazine Make active tool oset operative immediately . Tool radius compensation, G40, G41, G42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Full Screen
. . . . . . . . . . . . . . . . . . . . . . . . 170 170 171 171

7 MISCELLANEOUS FUNCTION 182 7.1 Auxiliary function outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 7.1.1 M functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 8 TURNING CYCLES 8.1 General information . . . . . . . . . . . . . 8.2 Preconditions . . . . . . . . . . . . . . . . . 8.3 Grooving cycle - CYCLE93 . . . . . . . . . 8.4 Undercut cycle - CYCLE94 . . . . . . . . . 8.5 Stock removal cycle - CYCLE95 . . . . . . 8.6 Thread undercut - CYCLE96 . . . . . . . . 8.7 Thread cutting - CYCLE97 . . . . . . . . . 8.8 Thread chaining - CYCLE98 . . . . . . . . 8.9 Thread recutting . . . . . . . . . . . . . . . 8.10 Extended stock removal cycle - CYCLE950 185 185 185 189 203 209 227 232 242 251 253 281 281 281 281 282 283 285 285 286

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

9 APPENDIX 9.1 Excersises & Problems of CNC Machining . . . 9.1.1 Geometrical Denitions . . . . . . . . . 9.1.2 Cutting Conditions, Time Consumption 9.1.3 Physical Phenomena . . . . . . . . . . . 9.1.4 CNC Programming . . . . . . . . . . . . 9.2 Example . . . . . . . . . . . . . . . . . . . . . . 9.3 Vocabulary . . . . . . . . . . . . . . . . . . . . 10 REFERENCES

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

Contents

Page 4 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

1.
1.1.
1.1.1.

FUNDAMENTAL GEOMETRICAL PRINCIPLES


Description of workpiece points
Workpiece coordinate systems

Milling: Turning: In order for the machine or control to operate with the specied 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. Denition 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


Example:

Full Screen

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 P2 P3 P4 corresponds corresponds corresponds corresponds to to to to X100 X-50 X-105 X70 Y50 Y100 Y-115 Y-75

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

Contents

Page 6 of 286

Go Back

Fundamentals of CNC Machining


Example:

Full Screen

Points P1 to P4 are dened by the following coordinates: P1 P2 P3 P4 corresponds corresponds corresponds corresponds to to to to X25 X40 X40 X60 Z-7.5 Z-15 Z-25 Z-35

Contents

Page 7 of 286

Go Back

Fundamentals of CNC Machining


Example:

Full Screen

Points P1 and P2 are dened by the following coordinates: P1 P2 corresponds to corresponds to X-20 X13 Y-20 Y-13 Z23 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


Example:

Full Screen

Points P1 to P3 are dened by the following coordinates: P1 P2 P3 1.1.3. Polar coordinates corresponds to corresponds to corresponds to X10 X30 X45 Y45 Y60 Y20 Z-5 Z-20 Z-15

The coordinates used up to this point to specify points in the coordinate system are called Cartesian coordinates. 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


Example:

Full Screen

The points P1 and P2 can then be described - with reference to the pole - as follows: P1 P2 1.1.4. Absolute dimensions corresponds to radius corresponds to radius =100 =60 plus angle plus angle =30 =75

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


Example for milling:

Full Screen

The positional parameters for points P1 to P3 in absolute dimensions referring to the zero point are the following: P1 P2 P3 corresponds to corresponds to corresponds to X20 X50 X70 Y35 Y60 Y20

Contents

Page 11 of 286

Go Back

Fundamentals of CNC Machining


Example for turning:

Full Screen

The positional parameters for points P1 to P4 in absolute dimensions referring to the zero point are the following: P1 P2 P3 P4 1.1.5. Incremental dimensions corresponds corresponds corresponds corresponds to to to to X25 X40 X40 X60 Z-7.5 Z-15 Z-25 Z-35

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


Example for milling:

Full Screen

The positional data for points P1 to P3 in incremental dimensions are: P1 P2 P3 corresponds to corresponds to corresponds to X20 X30 X20 Y35 Y20 -35 ;(with reference to the zero point) ;(with reference to P1) ;(with reference to P2)

Contents

Page 13 of 286

Go Back

Fundamentals of CNC Machining


Example for turning:

Full Screen

The positional data for points P1 to P4 in incremental dimensions are: G90 G91 G91 G91 P1 P2 P3 P4 corresponds corresponds corresponds corresponds to to to to X25 X15 Z-10 X20 Z-7.5 Z-7.5 Z-10 ;(with ;(with ;(with ;(with reference reference reference reference to to to to the zero point) P1) P2) 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 dened 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 oset 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 specied as follows in the NC program with G17, G18 and G19: Plane X/Y Z/X Y/Z Identier G17 G18 G19 In feed direction Z Y X

1.2.

Position of zero points

The various origins and reference positions are dened 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 A W B R

Machine zero Blocking point. Can coincide with the workpiece zero (turning machines only) Workpiece zero = Program zero Start point. Can be dened for each program. Start point of the rst tool for machining. 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.
1.3.1.

Position of coordinate system


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 oset workpiece zero Wa.

Contents

Page 16 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

In cases where various dierent 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 identiers are explained in the subsection headed Axis types in this section.

Contents

Page 17 of 286

Go Back

Fundamentals of CNC Machining


1.3.2. Machine coordinate system

Full Screen

The machine coordinate system comprises all the physically existing machine axes. Reference points and tool and pallet changing points (xed machine points) are dened 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-nger rule of the right hand (in accordance with DIN 66217). Standing in front of the machine, the middle nger 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 nger points in the +Y direction, the middle nger points in the +Z direction. In practice, this can look quite dierent on dierent 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


1.3.3. Basic coordinate system

Full Screen

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 diers 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 oset, scaling, etc. are always executed in the basic coordinate system. The coordinates also refer to the basic coordinate system when specifying the working eld 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 specic workpiece.

Contents

Page 22 of 286

Go Back

Fundamentals of CNC Machining


1.3.5. Frame system

Full Screen

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 oset, 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 xtures 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 dierent angles, perform multiside machining operations.

Contents

Page 25 of 286

Go Back

Fundamentals of CNC Machining


1.3.6. Assignment of workpiece coordinate system to machine axes

Full Screen

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


1.3.7. Current workpiece coordinate system

Full Screen

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 osets are possible in the same program.

Contents

Page 27 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

2.
2.1.

FUNDAMENTAL PRINCIPLES OF NC PROGRAMMING


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 Block Block Block Block Block Word N10 N20 N30 N40 N50 Word G0 G2 G91 ... M30 Word X20 Z37 ... ... ... ... ... ... ... ... ... ;Comment ;1st block ;2nd block ; ... ... ;End of program (last block)

Program names Each program has a dierent name; the name can be chosen freely during program creation (except for punchtape format), taking the following conditions into account: the rst 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


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

Full Screen

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 identier ( xxx). 3. Data in punchtape format can be created externally or modied using an editor. The name of a le which is stored internally in the NC memory begins with N . A le in punchtape format begins with %name, % must appear in the rst column of the rst line. Example: % N SHAFT123 MPF %ange3 MPF part program SHAFT123 or part program ange3

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 dierentiate 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


Numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 No distinction is made between upper and lower case letters. Special characters % ( ) [ ] : = / * + $ ? ! . , ; & LF

Full Screen

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 sux, chain operator Assignment, part of equation Division, block suppression Multiplication Addition Subtraction, minus sign Double quotation marks, identier for character string Single quotation marks, identier for spec. numerical values: hexadec., binary System variable identiers Underscore, belonging to letters Reserved Reserved Decimal point Comma, parameter separator Comment start Format character, same eect as space character Block end

Contents

Page 30 of 286

Go Back

Fundamentals of CNC Machining


Tab character Space character Words Separator Separator (blank)

Full Screen

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


you change lines. Block length A block may contain (up to SW 3.x) a maximum of 242 characters,

Full Screen

(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 N 10 G X,Y,Z F S T D M H Denition Address of block number Block number Preparatory function Positional data Feed Speed Tool Tool oset number Miscellaneous function Auxiliary function

Contents

Page 32 of 286

Go Back

Fundamentals of CNC Machining


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.

Full Screen

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 identication 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 identied 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 identied 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 xed or variable identiers for axes (X, Y, . . . ) spindle speed (S), feed (F), circle radius (CR), etc. Example: N10 X100 Important addresses Address A=DC( . . . ) A=ACP( . . . ) A=ACN( . . . ) ADIS B=DC( . . . ) B=ACP( . . . ) B=ACN( . . . ) C=DC( . . . ) C=ACP( . . . ) C=ACN( . . . ) CHR= . . . D ... F ... FA[axis]= . . . or FA[spindle]= . . . or [SPI(spindle)]= G ... H ... Meaning (default setting) Rotary axis Remarks variable

Rounding clearance for path functions Rotary axis

xed variable

Rotary axis

variable

Chamfer the contour corner Tool number Feed Axial feed only if spindle no. dened by variable) Preparatory function Auxiliary function

xed xed xed xed

xed xed

Contents

Page 34 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen
variable variable variable xed xed xed xed xed xed xed xed xed variable xed variable xed xed xed xed variable variable variable variable

variable

Contents

Page 35 of 286

Go Back

Fundamentals of CNC Machining


Y=AC( . . . ) Y=IC( . . . ) Z ... Z=AC( . . . ) Z=IC( . . . ) AR+= . . . AP= . . . CR= . . . RP= . . . : ...:

Full Screen

Axis

variable

Aperture angle Polar angle Circle radius Polar radius Main block

variable variable variable variable xed

xed 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 eective 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-specic 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 identier enclosed in square brackets and an arithmetic expression assigned with an = sign. Example: X7 X4=20 CR=7.3 S1=470 M3=5 ;No = required, 7 is a value, but the = ;character is also possible here ;Axis X4 (= required) ;2 letters (= required) ;Speed for 1st spindle 470 rpm ;Spindle stop for 3rd spindle

The extended address notation is only permitted for the following direct addresses: X, Y, Z, . . . I, J, K S SPOS, SPOSA M H T F Axis addresses Interpolation parameters Spindle speed Spindle position Miscellaneous functions Auxiliary functions Tool number 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 identier is enclosed in square brackets. Example: S[SPINU]=47 0 ;Speed for the spindle whose number is stored in the variable SPINU

Contents

Page 37 of 286

Go Back

Fundamentals of CNC Machining


M[SPINU]=3 T[SPINU]=7

Full Screen

;Clockwise rotation for the spindle whose number is stored in the variable SPINU ;Selection of the tool for the spindle whose number is stored in the variable SPINU

Fixed addresses The following addresses are set permanently: Address D F G H L M N P R S T : Example for programming: N10 G54 T9 D2 Fixed addresses with axis extension: Address AX ACC FA FDA Meaning (default setting) Axis value (variable axis programming) Axial acceleration Axial feed Axis feedrate for handwheel override Meaning (default setting) Tool edge number Feed Preparatory function Auxiliary function Subprogram call Special function Subblock Number of program passes Arithmetic parameter Spindle speed Tool number Main block

Contents

Page 38 of 286

Go Back

Fundamentals of CNC Machining


FL IP OVRA PO POS POSA Axial feed limit Interpolation parameter (variable axis programming) Axial override Polynomial coecient Positioning axis Positioning axis across block boundary

Full Screen

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 dened either as an address letter (with numerical extension if necessary) or as freely selected identiers. Variable addresses must be unique within the control, i.e. the same identier name may not be used for dierent 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


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 identier: The address notation can be expanded by adding further letters. Example: CR XPOS Operators/mathematical functions + * / DIV MOD : Sin() COS() TAN() e.g. for circle radius

Full Screen

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

Contents

Page 40 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

Comparison and logic operators == <> > < >= <= << AND OR NOT XOR 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 OR Negation Exclusive OR

In arithmetic expressions, the execution order of all the operators can be specied 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


identier. An = sign must be inserted between the address identier and the value if: the address identier consists of more than one letter or the value consists of more than one constant.

Full Screen

The =-sign can be omitted if the address identier 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 X1=10 FGROUP(X1, Y2) AXDATA[X1] AX[X1]=10 X=10*(5+SIN(37.5)) ;Value assignment (10) to address X, = not required ;Value assignment (10) to address (X) with numeric extension (1), = required ;Axis names from passed parameters ;Axis name as an index when accessing axis data ;Indirect axis programming ;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. Identiers Identiers can also be used to describe words (in compliance with DIN 66025). The identiers have the same meaning as the words within an NC block. Identiers must be unique. Identical identiers must not be used for dierent objects. Identiers can stand for: variables, system variables, user variables, subprograms,

Contents

Page 42 of 286

Go Back

Fundamentals of CNC Machining


vocabulary words, DIN addresses with several letters, jump labels. Structure The identiers are composed of up to 32 characters. The following characters may be used: letters, underscores, numerals.

Full Screen

The rst 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: Axis identiers: Variable identiers: 24 characters 3 characters 32 characters

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

Contents

Page 43 of 286

Go Back

Fundamentals of CNC Machining


user compile cycles begin with CC,

Full Screen

we recommend that users select identier 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 identiers: the identier RL is reserved for conventional turning machines, all identiers beginning with E are reserved for EASYSTEP programming. Variable identiers In variables used by the system, the rst letter is replaced by the $ character. This character may not be used for user-dened 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 identiers The rules for elementary variables also apply to array identiers. 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 dened. The data type for system variables and predened variables is xed.

Contents

Page 44 of 286

Go Back

Fundamentals of CNC Machining


Elementary variable types/data types are: Type INT REAL BOOL CHAR STRING AXIS FRAME Denition Integers with leading sign Real numbers (fractions with decimal point, LONG REAL according to IEEE) Boolean values: TRUE (1) and FALSE (0) 1 ASCII character specied by the code Character string, number of characters in [], maximum of 200 characters Axis names (axis addresses) only Geometrical parameters for translation, rotation, scale and mirror Value range (231 - 1) (10-300 10+300)

Full Screen

1, 0 0 255 Sequence of values with 0 255 Any axis identiers in the channel

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 X-100 ;Assignment of the value +100 to address X ;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


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

Full Screen

If, in an address which permits decimal point input, more decimal places are specied than actually provided for the address, then they are rounded to t 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


Example for machine data: $MN AUXFU GROUP SPEC=B10000001

Full Screen

;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 /N20 N30 /N40 N70 ;is executed ;skipped ;is executed ;skipped ;is executed

SW 5 and later Up to 8 skip levels can be programmed. Only 1 skip level can be specied per NC block: / ... /0 . . . /1 N010 . . . /2 N020 . . . ;Block ;Block ;Block ;Block is is is is skipped skipped skipped skipped (1st skip level) (1st skip level) (2nd skip level) (3rd skip level)

Contents

Page 48 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 N10 N20 N50 ; ; ; ; Comments to explain the NC block or G&S Co., order no. 12A71 Program written by Bob Miller, Dept. TV 4, on 21.11.94 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 after vocabulary word MSG in round parentheses () and quotation marks. A message can be cleared by programming MSG (). Example: N10 MSG (Roughing the contour) N20 X . . . Y . . . N ... N90 MSG () ;Activate message

;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] N20 MSG (check position of X axis<<R12<<) N ... N90 MSG () N20 MSG (check position of X axis<<$AA IW[X]<<) ;Current position of the X axis in R12

;Clear message from N20 or

Setting alarms You can also set alarms in addition to messages in an NC program. Alarms are displayed in a separate eld 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) The alarm text must be congured in the MMC. ;Set alarm no. 65,000

Contents

Page 50 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

3.
3.1.

POSITIONAL DATA
Absolute/incremental dimensions, G90/G91

Programming: Absolute dimensioning Incremental dimensioning G90 X=AC() Y=AC() Z=AC() G91 or X=IC() Y=IC() Z=IC()

Explanation of the parameters XYZ =AC =IC Axis identiers of the axes to be traversed Absolute dimensions (non-modal) Incremental dimensions (non-modal)

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

Contents

Page 51 of 286

Go Back

Fundamentals of CNC Machining


Sequence

Full Screen

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 specic block. When G90 is active, IC can be used to allow entry of incremental dimensions for individual axes in a specic block.

Contents

Page 52 of 286

Go Back

Fundamentals of CNC Machining


Additional notes

Full Screen

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 specied 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 N20 N30 or N30 N40 N50

G90 G0 X45 Y60 Z2 T1 S2000 M3 G1 Z-5 F500 G2 X20 Y35 I=AC(45) J=AC(35) G2 X20 Y35 I0 J-25 G0 Z2 M30

Absolute dimensioning, rapid traverse to YZ, tool, spindle on clockwise Tool infeed Circle center point in absolute dimensions Circle center point in incremental dimensions Retract End of block

Contents

Page 54 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

N5 N10 N20 N30 or N30 N40 N50 3.1.1.

T1 D1 S2000 M3 G0 G90 X11 Z1 G1 Z-15 F0.2 G3 X11 Z-27 I=AC(-5) K=AC(-21) G3 X11 Z-27 I-8 K-6 G1 Z-40 M30 G91 extension (SW 4.3 and higher)

Tool, spindle on clockwise Absolute dimensioning, rapid traverse to XYZ Tool infeed Circle center point in absolute dimensions Circle center point in incremental dimensions Retract End of block

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

Contents

Page 55 of 286

Go Back

Fundamentals of CNC Machining


without traversing through the active tool oset SD 42442 SD 42442 TOOL OFFSET INCR PROG = 0 without traversing through the active zero oset SD 42440 SD 42440 FRAME OFFSET INCR PROG = 0 Explanation of the parameters: SD 42440 FRAME OFFSET INCR PROG = 0 SD 42442 TOOL OFFSET INCR PROG = 0

Full Screen

The active zero oset is not traversed. The active tool oset 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 oset or tool oset is not traversed. This can be set separately via SDs FRAME OFFSET INCR PROG (zero point) and TOOL OFFSET INCR PROG (tool oset). Programming example: G54 contains an oset of 25 in X SD 42440 FRAME OFFSET INCR PROG = 0 (no retraction of the active zero oset) N10 N20 N30 G90 G0 G54 X100 G1 G91 X10 G90 X50

traverse X by 10 mm, the oset is not traversed traverse to position X75, the oset is traversed

Contents

Page 56 of 286

Go Back

Fundamentals of CNC Machining 3.2. Absolute dimensions for rotary axes, DC, ACP, ACN

Full Screen

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 DC ACP ACN Axis identier for rotary axis to be traversed Absolute dimensions, approach position directly Absolute dimensions, approach position in positive direction Absolute dimensions, approach position in negative direction

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

Contents

Page 57 of 286

Go Back

Fundamentals of CNC Machining


Sequence:

Full Screen

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


360 in a block. You will nd more information on the previous pages. The positive direction of rotation (clockwise or counterclockwise) is set in the machine data.

Full Screen

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 N20

SPOS=0 G90 G0 X-20 Y0 Z2 T1

Spindle in position control Absolute, infeed in rapid traverse

Contents

Page 59 of 286

Go Back

Fundamentals of CNC Machining


N30 N40 N50 G1 Z-5 F500 C=ACP(270) G0 Z2 M30

Full Screen
Reduce feed The table rotates through 270 in clockwise direction, the tool mills a circular groove 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 G71 G700 G710 Imperial measure (length [inches]) Metric measure (length [mm]) Imperial measure (length [inch]; feedrate [inch/min]) 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


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

Full Screen

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 oset (TRANS), polar radius RP. All other parameters such as feedrates, tool osets or settable zero osets 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 programmed 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 N20 N30 N40 N50

G0 G90 X20 Y30 Z2 S2000 M3 T1 G1 Z-5 F500 X90 G70 X2.75 Y3.22 X1.18 Y3.54

Basic setting metric At feed in Z [mm/min] Enter destination positions in inches, G70 is active until deselected by G71 or end of program

Contents

Page 62 of 286

Go Back

Fundamentals of CNC Machining


N60 N70 G71 X 20 Y30 G0 Z2 M30 Enter positions in mm Retract in rapid traverse, end of program

Full Screen

3.4.

Settable zero oset/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 G54 to G57 G153 G500 Non-modal deactivation of current settable zero oset and programmable zero oset Call the second to fth settable zero oset/frame Non-modal suppression of settable, programmable and total basic frame - G500 = zero frame, default setting, (contains no oset, rotation, mirroring or scaling) a) Deactivation of settable zero osets / frames (G54 to G599) until the next call, b) Activation of the total basic frame ($P ACTBFRAME). - G500 is not 0 a) Activation of rst settable zero oset/frames ($P UIFR[0]) b) Activation of total basic frame ($P ACTBFRAME), or a modied basic frame is activated. Non-modal deactivation, including programmed osets, handwheel osets (DRF), external zero oset and PRESET oset. Call the 6th to the 99th settable zero oset

SUPA G505 . . . G599

Contents

Page 63 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

Function The settable zero oset 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 dierent xtures with a G command.

Milling: For turning, e.g. the oset 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


Sequence: Setting the oset values

Full Screen

On the operator panel or universal interface, enter the following values in the internal control zero oset table: coordinates for the oset, angle for rotated clamping and scale factors if necessary.

Contents

Page 66 of 286

Go Back

Fundamentals of CNC Machining


Activating the zero oset

Full Screen

In the NC program, the zero oset 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 osets 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 osets, G505 to G599 Command numbers G505 to G599 are available for this purpose. This enables you to create up to 100 settable zero osets in total, in addition to the four default zero osets G54 to G57, by using the machine data. They are stored in the zero point memory. Deactivating a zero oset Command G500 activates the rst settable zero oset including basic oset, i.e. when zero frame is selected as the default, the current settable zero oset is deactivated. G53 suppresses the programmable and settable

Contents

Page 67 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

oset non-modally. G153 has the same eect as G53 and also suppresses the total basic frame. SUPA has the same eect as G153 and also suppresses the DRF oset, overlaid motions and external ZOs. You will nd more information on programmable zero osets 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 oset values G54 to G56, are machined successively. The machining sequence is programmed in subprogram L47.

N10 N20 N30 N40 N50 N60

G0 G90 X10 Y10 F500 T1 G54 S1000 M3 L47 G55 G0 Z200 L47 G56

Approach Call the rst zero oset, spindle clockwise Run program, in this case as a subprogram Call the second zero oset Z via obstacle Run program as subprogram Call third zero oset

Contents

Page 68 of 286

Go Back

Fundamentals of CNC Machining


N70 N80 L47 G53 X200 Y300 M30 Run program as subprogram Suppress zero oset, end of program

Full Screen

3.5.

Selecting the working plane, G17 to G 19

Programming: Call G17 or G18 or G19 Explanation of the commands G17 G18 G19 Working plane X/Y Working plane Z/X Working plane Y/Z Infeed direction Z Infeed direction Y Infeed direction X

The axis assignment for G17, G18, G19 specied 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 specication of the working plane, in which the contour is to be machined also denes 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 dene the working plane at the beginning of the program. The working plane must be specied when the tool path compensation G41/G42 (see Section Tool osets) is called so that the control can correct the tool length and radius. In the initial setting, G17 (X/Y plane) is dened for milling and G18 (Z/X plane) is dened 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 oset) 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 xed, 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 denition of the working plane. Programming example The conventional approach: Dene the working plane, call up the tool type and tool oset 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. The radius compensation is performed in the X/Y plane. Circular interpolation / tool radius compensation in the X/Y plane.

N20 N30

G1 G41 X10 Y30 Z-5 F500 G2 X22.5 Y40 I50 J40

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


G26 WALIMON, WALIMOF Explanation of the commands: G25 X Y Z G26 X Y Z WALIMON WALIMOF X ...Y ...Z ...

Full Screen
(Programmed in a separate NC block)

Lower working area limitation, value assignment in the channel axes* Upper working area limitation, value assignment in the channel axes* Working area limitation: activate 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

dene 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 specied 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 dened 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-specic machine data $MC WORKAREA WITH TOOL RADIUS.

Contents

Page 74 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 dened 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


N20 N30 N40 N50 N60 N70 N80 N90 N100 N110 G25 X-80 Z30 G26 X80 Z330 L22 G0 G90 Z102 T2 X0 WALIMOF G1 Z-2 F0.5 G0 Z200 WALIMON X70 M30

Full Screen
Dene the lower limit for the individual coordinate axes Dene the upper limit Cutting program To tool change location Deactivate working area limitation Boring Back Activate working area limitation End of program

Contents

Page 76 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

4.
4.1.

PROGRAMMING MOTION COMMANDS


General information

Motion commands

In this section you will nd 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 conguration, 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 4.2.

Full Screen

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

Programming Dene pole: G110, G111, G112 X . . . Y . . . Z . . . G110, G111, G112 AP= . . . RP= . . . Traversing commands with polar coordinates: G0 G1 G2 G3 AP= AP= AP= AP= . . . RP= . . . RP= . . . RP= . . . RP= ... ... ... ...

The new end point is dened in relation to a pole. Explanation of the commands and parameters G110 G111 G112 AP= RP= Pole parameter, with reference to the last approached position Pole parameter, absolute in the workpiece coordinate system Pole parameter, with reference to the last valid pole Polar angle, value range 0360, angle refers to horizontal axis of the working plane Polar radius in mm or inches

Contents

Page 79 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 specied 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


Cylindrical coordinates

Full Screen

The 3rd geometry axis, which lies perpendicular to the working plane, can also be specied 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


Dening the pole G110, G111, G112

Full Screen

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

Contents

Page 82 of 286

Go Back

Fundamentals of CNC Machining


If no pole is specied, the origin of the active workpiece coordinate system applies. Polar angle AP

Full Screen

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 dened or the working plane is changed. Polar radius RP The polar radius is specied 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 denition 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 dierence between the current position and pole in workpiece coordinates, then this dierence is applied as the polar radius and stored modally. If the dierence = 0, the pole coordinates are specied 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 specied 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


subprogram. N10 N20 N30 N40 N50 G17 G54 G111 X43 Y38 G0 RP=30 AP=18 Z5 L10 G91 AP=72

Full Screen

N60 N70 N80 N90 N100 N110 N120 N130

L10 AP=IC(72) L10 AP=IC(72) L10 AP=IC(72) L10 G0 X300 Y200 Z100 M30

Working plane X/Y, workpiece zero Dene pole Approach starting point, position in cylindrical coordinates Subprogram call 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 specied Subprogram call ... ... ... ... 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


AP= RP= RTLIOF with G0 RTLION with G0

Full Screen

End point in polar coordinates, in this case the polar angle End point in polar coordinates, in this case the polar radius Nonlinear interpolation (each path axis interpolates as a single axis) 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 dened 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


Additional notes G0 is modal. Function

Full Screen

SW 6.1 and later Traversing path axes as positioning axes with Path axes can travel in one of two dierent 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 dierent 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


Milling:

Full Screen

N10 N20 N30 N40 N50 N60

G90 S400 M3 G0 X30 Y20 Z2 G1 Z-5 F1000 X80 Y65 G0 Z2 G0 X-20 Y100 Z100 M30

Absolute dimensioning, spindle clockwise Approach start position Tool infeed Travel on straight line Retract tool, end of program

Contents

Page 89 of 286

Go Back

Fundamentals of CNC Machining


Turning:

Full Screen

N10 N20 N30 N40 N50 N60 N70 N80 N90

G90 S400 M3 G0 X25 Z5 G1 G94 Z0 F1000 G95 Z-7.5 F0.2 X60 Z-35 Z-50 G0 X62 G0 X80 Z20 M30

Absolute dimensioning, spindle clockwise Approach start position Tool infeed Travel on straight line

Retract tool End of program

G0 cannot be replaced with G.

Contents

Page 90 of 286

Go Back

Fundamentals of CNC Machining 4.4. Linear interpolation, G1

Full Screen

Programming G1 X . . . Y . . . Z . . . F . . . G1 AP= . . . RP= . . . F . . . Explanation of the parameters XYZ AP= RP= F End point in Cartesian coordinates End point in polar coordinates, in this case the polar angle End point in polar coordinates, in this case the polar radius Feedrate in mm/min

Contents

Page 91 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

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 specied for

Contents

Page 92 of 286

Go Back

Fundamentals of CNC Machining


machining. FGROUP can be used to dene groups of axes to which the path feed F applies.

Full Screen

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 N20 N30 N40 N50

G17 S400 M3 G0 X20 Y20 Z2 G1 Z-2 F40 X80 Y80 Z-15 G0 Z100 M30

Select working plane, spindle clockwise Approach start position Tool infeed Travel along inclined straight line Retract to tool change location

Contents

Page 93 of 286

Go Back

Fundamentals of CNC Machining


Turning:

Full Screen

N10 N20 N30 N40 N50

G17 S400 M3 G0 X40 Y-6 Z2 G1 Z-3 F40 X12 Y-20 G0 Z100 M30

Select working plane, spindle clockwise Approach start position Tool infeed Travel along inclined straight line Retract to tool change location

4.5.

Circular interpolation, G2/G3, CIP

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

Contents

Page 94 of 286

Go Back

Fundamentals of CNC Machining


G2/G3 AR= . . . X . . . Y . . . Z . . . CIP X . . . Y . . . Z . . . I1= . . . J1= . . . K1= . . . CT X . . . Y . . . Z . . . Explanation of the commands and parameters G2 G3 CIP CT XYZ IJK AP= RP= CR= AR= I1= J1= K1=

Full Screen

Travel on a circular path in clockwise direction Travel on a circular path in counterclockwise direction Circular interpolation through intermediate point Circle with tangential transition End point in Cartesian coordinates Circle center point in Cartesian coordinates (in X, Y, Z direction) End point in polar coordinates, in this case the polar angle End point in polar coordinates, in this case polar radius corresp. to circle radius Circle radius Arc angle Intermediate points in Cartesian coordinates (in X, Y, Z direction)

Contents

Page 95 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

Circular interpolation enables machining of full circles or arcs.

Contents

Page 96 of 286

Go Back

Fundamentals of CNC Machining


Sequence

Full Screen

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 dierent 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


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 identiers have the following meanings: I: J: K: Coordinate of the circle center point in the X direction Coordinate of the circle center point in the Y direction Coordinate of the circle center point in the Z direction

Full Screen

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 N20 Example for absolute dimensions: N10 N20 G0 X67.5 Y80.211 G3 X17.203 Y38.029 I=AC(50) J=AC(50) G0 X67.5 Y80.211 G3 X17.203 Y38.029 I17.5 J30.211 F500

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


always be specied.

Full Screen

Turning: Example for incremental dimensions: N120 N125 N130 N135 Example for absolute dimensions: N120 N125 N130 N135 G0 G1 G3 G1 X12 Z0 X40 Z-25 F0.2 X70 Z-75 I=AC(33.33) K=AC(-54.25) Z-95 G0 G1 G3 G1 X12 Z0 X40 Z-25 F0.2 X70 Z-75 I-3.335 K-29.25 Z-95

Contents

Page 100 of 286

Go Back

Fundamentals of CNC Machining


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.

Full Screen

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 identiers 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


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

Full Screen

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


the end point in Cartesian coordinates X, Y, Z or the circle center point at addresses I, J, K.

Full Screen

The identiers 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 N130 or N130 or N130 N135 G1 X40 Z-25 F0.2 G3 X70 Z-75 AR=135.944 G3 I-3.335 K-29.25 AR=135.944 G3 I=AC(33.33) K=AC(-54.25) AR=135.944 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 N130 N135 N140 G1 X40 Z-25 F0.2 G111 X33.33 Z-54.25 G3 RP=30 AP=142.326 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 N20 N30 or N30 or N30 or N30 or N30 N40 G0 G90 X133 Y44.48 S800 M3 G17 G1 Z-5 F1000 G2 X115 Y113.3 I-43 J25.52 Approach starting point Tool infeed Circle end point, center point in incremental dimensions Circle end point, center point in absolute dimensions Circle end point, circle radius Arc angle, center point in incremental dimensions Arc angle, circle end point End of program

G2 X115 Y113.3 I=AC(90) J=AC(70) G2 X115 Y113.3 CR=-50 G2 AR=269.31 I-43 J25.52 G2 AR=269.31 X115 Y113.3 M30

Contents

Page 107 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

Turning: N ... N120 N125 N130 or N130 or N130 or N130 or N130 or N130 ... G0 X12 Z0 G1 X40 Z-25 F0.2 G3 X70 Y-75 I-3.335 K-29.25

Circle end point, center point in incremental dimensions Circle end point, center point in absolute dimensions

G3 X70 Y-75 I=AC(33.33) K=AC(54.25) G3 X70 Z-75 CR=30 G3 X70 Z-75 AR=135.944 G3 I-3.335 K-29.25 AR=135.944 G3 I=AC(33.33) K=AC(-54.25)

Circle end point, circle radius Arc angle, circle end point Arc angle, center point in incremental dimensions Arc angle, center point in absolute dimensions

Contents

Page 108 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 identiers have the following meanings:

Contents

Page 109 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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


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

Full Screen

Turning: Example: N125 N130 or N130 N135 G1 X40 Z-25 F0.2 CIP X70 Z-75 I1=IC(26.665) K1=IC(-29.25) CIP X70 Z-75 I1=93.33 K1=-54.25 G1 Z-95

Contents

Page 111 of 286

Go Back

Fundamentals of CNC Machining


Programming a circle with tangential transition

Full Screen

The Tangential transition function is an expansion of the circle programming. The circle is dened 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 dened. 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 dened 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 dened as for A or C splines and active ETAN. Frame change If a frame change takes place between the block dening 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 innite 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 N20 N30 N40 N50 N60 N70 G0 X0 Y0 Z0 G90 T1 D1 G41 X30 Y30 G1 F1000 CT X50 Y15 X60 Y-5 G1 X70 G0 G40 X80 Y0 Z20 M30

Activate tool radius compensation Program circle with tangential transition

Contents

Page 114 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

Turning: N110 N115 N120 N125 G1 X23.293 Z0 F10 X40 Z-30 F0.2 CT X58.146 Z-42 G1 X70

Program circle with tangential transition

4.6.

Helical interpolation, G2/G3 TURN

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

Contents

Page 115 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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


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 specied by the working plane.

Full Screen

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


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

Full Screen

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 N20 N30 N40

G17 G0 X27.5 Y32.99 Z3 G1 Z-5 F50 G3 X20 Y5 Z-20 I=AC(20) J=AC (20) TURN=2 M30

Approach start position Tool infeed Helix with following parameters: Execute 2 full circles from start position, then approach end point End of program

Contents

Page 118 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

5.
5.1.

FRAMES
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 oset), settable frames (G54...G599), programmable frames. Machine manufacturer (MH6.1) Settable frames: See machine manufacturers specications

Contents

Page 119 of 286

Go Back

Fundamentals of CNC Machining


Frame components

Full Screen

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


Basic Zero System (BZS) and has the same eect as for settable frames.

Full Screen

Settable instructions Settable instructions are the zero osets which can be called from any NC program with the commands G54 to G599. The oset values are predened by the user and stored in the zero oset memory on the control. This is used to dene 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 dene 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 oset G54 to G599 is used as the reference.

Contents

Page 121 of 286

Go Back

Fundamentals of CNC Machining


Additive instructions

Full Screen

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 dened 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.
5.3.1.

Programmable zero oset


TRANS, ATRANS

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

Contents

Page 122 of 286

Go Back

Fundamentals of CNC Machining


ATRANS X . . . Y . . . Z . . . (programmed in a separate NC block) Explanation of the commands and parameters TRANS ATRANS XYZ Function

Full Screen

Absolute zero oset, with reference to the currently valid workpiece zero set with G54 to G599 as TRANS, but with additive zero oset Oset value in the direction of the specied geometry axis

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

Contents

Page 123 of 286

Go Back

Fundamentals of CNC Machining


Sequence Substituting instruction, TRANS X Y Z

Full Screen

Translation through the oset values programmed in the specied axis directions (path, synchronized axes and positioning axes). The last specied settable zero oset (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 oset values programmed in the specied axis directions. The currently set or last programmed zero point is used as the reference. Deactivate programmable zero oset 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 N20 N30 N40 N50 N60 N70 G1 G54 G0 X0 Y0 Z2 TRANS X10 Y10 L10 TRANS X50 Y10 L10 M30 Working plane X/Y, workpiece zero Approach starting point Absolute oset Subprogram call Absolute oset Subprogram call End of program

Contents

Page 126 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

Turning: N ... N10 N15 N20 N25 N30 N35 N ... 5.3.2. ... TRANS X0 Z150 L20 TRANS X0 Z140 (or ATRANS Z-10) L20 TRANS X0 Z130 (or ATRANS Z-10) L20 ...

Absolute oset Subprogram call Absolute oset Subprogram call Absolute oset Subprogram call

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


Explanation of the commands and parameters G58

Full Screen

G59 XYZ Function

Replaces the absolute translation component of the programmable zero oset for the specied axis, but the programmed additive oset remains valid, (in relation to the workpiece zero set with G54 to G599) Replaces the absolute translation component of the programmable zero oset for the specied axis, but the programmed absolute oset remains valid Oset value in the direction of the specied geometry axis

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

Contents

Page 128 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

These functions can only be used when the ne oset is congured. If G58 or G59 is used without a congured ne oset, alarm 18312 channel %1 block %2 frame: Fine oset not congured is output. Machine manufacturer (MH6.2) The ne oset must be congured 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 modied by the following commands: TRANS, G58, CTRANS, CFINE, $P PFRAME[X,TR]. The additive translation component is modied by the following commands: ATRANS, G59, CTRANS, CFINE, $P PFRAME[X,FI]. The table below describes the eect of various program commands on the absolute and additive osets. Eect of the additive/absolute oset:

Contents

Page 129 of 286

Go Back

Fundamentals of CNC Machining


Command TRANS X10 G58 X10 $P PFRAME[X,TR] = 10 ATRANS X10 G59 X10 $P PFRAME[X,FI] = 10 CTRANS(X,10) CTRANS() CFINE(X,10) Programming example N ... N50 TRANS X10 Y10 Z10 N60 ATRANS X5 Y5 N70 G58 X20 N80 G59 X10 Y10 N ... Rough or absolute oset 10 10 10 Unchanged Unchanged Unchanged 10 0 0 Fine or additive oset Unchanged Unchanged Unchanged Fine (old) + 10 10 10 0 0 10 Comment

Full Screen

Absolute oset for X Overwrites absolute oset for X Progr. oset in X Additive oset for X Overwrites additive oset for X Progr. ne oset in X oset for X Deselection of oset(including ne oset component) Fine oset in X

; absolute translation component X10 Y10 Z10 ; additive translation component X5 Y5 = total oset X15 Y15 Z10 ; absolute translation component X20 + addit. X5 Y5 = total oset X25 Y15 Z10 ; additive translation component X10 Y10 + absolute. X20 Y 10 = total oset X30 Y20 Z10

5.4.

Programmable rotation, ROT, AROT

Programming

Contents

Page 130 of 286

Go Back

Fundamentals of CNC Machining


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 AROT XYZ RPL

Full Screen

Absolute rotation with reference to the currently valid workpiece zero set with G54 to G599 Additive rotation with reference to the currently valid set or programmed zero point Rotation in space: geometry axes around which the rotation takes place 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


Function

Full Screen

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


Sequence: Rotation in space Substituting instruction, ROT X Y Z

Full Screen

The coordinate system is rotated through the programmed angle around the specied axes. The center of rotation is the last specied settable zero oset (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


Direction of rotation

Full Screen

The following is dened 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


Order of rotation

Full Screen

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 dened in machine parameters. RPY notation is the default setting. This denes 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


Rotation around 2nd geometry axis: 90 to +90 Rotation around 3rd geometry axis: 180 to +180

Full Screen

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 dene the order of the rotations individually, program the desired rotation successively for each axis with AROT. The working plane also rotates

The working plane dened 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


In both cases, all frame components of the previously programmed frame are reset. Programming example: Rotation in the plane

Full Screen

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 N20 N30 N40 N50 N60 N70 N80 N90 N100 G17 G54 TRANS X20 Y10 L10 TRANS X55 Y35 AROT RPL=45 L10 TRANS X20 Y40 AROT RPL=60 L10 G0 X100 Y100 Working plane X/Y, workpiece zero Absolute oset Subprogram call Absolute oset Rotation of the coordinate system through 45 Subprogram call Absolute oset (cancels all previous osets) Additive rotation through 60 Subprogram call Retraction

Contents

Page 139 of 286

Go Back

Fundamentals of CNC Machining


N110 M30 End of program

Full Screen

Programming example: 3D rotation

N10 N20 N30 N40 N50 N60 N70 N80

G17 G54 TRANS X10 Y10 L10 ATRANS X35 AROT Y30 ATRANS X5 L10 G0 X300 Y100 M30

Working plane X/Y, workpiece zero Absolute oset Subprogram call Additive oset Rotation through the Y axis Additive oset Subprogram call Retraction, end of program

Contents

Page 140 of 286

Go Back

Fundamentals of CNC Machining


Programming example: Multi-face machining

Full Screen

In this example, identical shapes on two perpendicular workpiece surfaces are machined by using subprograms. 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 N20 N30 N40 N50 N60 N70 G17 G54 L10 TRANS X100 Z-100 AROT Y90 AROT Z90 L10 G0 X300 Y100 M30 Working plane X/Y, workpiece zero Subprogram call Absolute oset Rotation of the coordinate system through Y Rotation of the coordinate system through Z Subprogram call Retraction, end of program

Contents

Page 141 of 286

Go Back

Fundamentals of CNC Machining 5.5.

Full Screen

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 AROTS CROTS XYZ RPL 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. Frame rotations with solid angles for spatial orientation of a plane additive, referred to the currently valid frame with set or programmed zero point. Frame rotations with solid angles for spatial orientation of a plane, referred to the valid frame in the data management with rotation in the specied axes. A maximum of two solid angles may be specied Rotation in the plane: Angle through which the coordinate system is rotated (plane set with G17-G19)

Function Spatial orientations can be dened via frame rotations with solid angles ROTS, AROTS, CROTS. Programming commands ROTS and AROTS behave analogously to ROT and AROT.

Contents

Page 142 of 286

Go Back

Fundamentals of CNC Machining 5.6. Programmable scale factor, SCALE, ASCALE

Full Screen

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 ASCALE XYZ Absolute enlargement/reduction with reference to the currently valid coordinate system set with G54 to G599 Additive enlargement/reduction with reference to the currently valid set or programmed coordinate system Scale factor in the direction of the specied geometry axis

Function SCALE/ASCALE enables you to program scaling factors in the direction of the axis specied 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 dierent sizes.

Contents

Page 143 of 286

Go Back

Fundamentals of CNC Machining


Sequence

Full Screen

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


Additional notes

Full Screen

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

Contents

Page 146 of 286

Go Back

Fundamentals of CNC Machining


Programming example

Full Screen

With this workpiece, the two pockets occur twice, but in dierent sizes and at dierent 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 N20 N30 N40 N50 N60 N70 N80 G17 G54 TRANS X15 Y15 L10 TRANS X40 Y20 AROT RPL=35 ASCALE X0.7 Y0.7 L10 G0 X300 Y100 M30 Working plane X/Y, workpiece zero Absolute oset Machine large pocket Absolute oset Rotation in the plane through 35 Scale factor for the small pocket Machine small pocket Retraction, end of program

Contents

Page 147 of 286

Go Back

Fundamentals of CNC Machining 5.7. Programmable mirroring, MIRROR, AMIRROR

Full Screen

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 AMIRROR XYZ Absolute mirror image with reference to the currently valid coordinate system set with G54 to G599 Additive mirror image with reference to the currently valid set or programmed coordinate system Geometry axis whose direction is to be changed. The value specied 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


Sequence

Full Screen

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


The MIRROR command cancels all previously set programmable frames. Additive instruction, AMIRROR X Y Z

Full Screen

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


Additional notes

Full Screen

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 directions of rotation (positive/negative or negative/positive). Mirrors on the geometry axes are converted automatically by the control into rotations and, where appropriate, mirrors on the mirror axis specied in the machine data. This also applies to settable zero osets. 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 specic 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 dene 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 N20 N30 N40 N50 N60 N70 G17 G54 L10 MIRROR X0 L10 AMIRROR Y0 L10 MIRROR Y0 Working plane X/Y, workpiece zero Machine rst contour, top right. Mirror X axis (the direction is changed in X). Machine second contour, top left. Mirror Y axis (the direction is changed in Y). Machine third contour, bottom left MIRROR cancels previous frames. Mirror Y axis (the direction is changed in Y).

Contents

Page 152 of 286

Go Back

Fundamentals of CNC Machining


N80 N90 N100 L10 MIRROR G0 X300 Y100 M30 Machine fourth contour, bottom right. Deactivate mirroring. Retraction, end of program

Full Screen

Turning: N10 N ... N30 N40 N50 N ... TRANS X0 Z140 ... TRANS X0 Z600 AMIRROR Z0 ATRANS Z120 ... Zero oset to W Machine rst side with spindle 1 Zero oset to spindle 2 Mirroring of the Z axis Zero oset to W1 Machine second side with spindle 2

Contents

Page 153 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

6.
6.1.

TOOL OFFSETS
General information

Why use tool osets?

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


The control corrects the traverse path

Full Screen

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 oset data in the program. During program execution, the control fetches the oset data from the tool les and corrects the tool path individually for dierent tools.

Contents

Page 155 of 286

Go Back

Fundamentals of CNC Machining


Which tool osets are stored in the controls compensation memory?

Full Screen

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 eective 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 elds 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 dierences 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 denable 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


tool orientation and tool length compensation for more information. Tool radius compensation

Full Screen

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 510 520 530 540 Roughing tool Finishing tool Grooving tool Parting tool Threading tool

6.3.
6.3.1.

Tool selection/tool call T


Tool change with M06 (mill)

Programming Tx or T=x or

Contents

Page 159 of 286

Go Back

Fundamentals of CNC Machining


Ty=X T0 M06 Explanation of the parameters Tx or T=x or Ty=x x T0 M06 Tool selection with T No.

Full Screen

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

Comment: Tool change command can be modied 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. (at D No.) relative to cutting edges

Contents

Page 160 of 286

Go Back

Fundamentals of CNC Machining


T ... [8-digit]

Full Screen

1D

2D

3D

...

D32000

Tabular D No.: D1 . . . D8

Tool selection with tool management Free selection of D No. (at 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 eect of the T number call is dened in machine data. See machine manufacturers conguration.

Contents

Page 161 of 286

Go Back

Fundamentals of CNC Machining


Explanation SW 4 and higher

Full Screen

The free selection of the D No. at 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


Sequence

Full Screen

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 dened in the machine data. There are two settings available for programming D numbers in the at D number structure: at D number structure with direct programming, at 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 x T0 Tool selection with T No. including tool change (active tool), tool oset is active x stands for T No.: 0-32000 Tool deselection Number of tools: 600, as of SW 5: 1200 (depending on the machine manufacturers conguration)

Contents

Page 163 of 286

Go Back

Fundamentals of CNC Machining


Function A direct tool change takes place when the T word is programmed. Tool selection without TOOLMAN Free selection of D No. (at D No.) relative to cutting edges Tabulare D No.: D1 . . . D8 Tool selection with tool management Free selection of D No. (at D No.) relative to cutting edges Fixed assignment of D No. to the cutting edges

Full Screen

Machine manufacturer (MH 8.1) The eect of the T number call is dened in machine data. See machine manufacturers conguration.

6.4.

Tool oset D

Programming D ... D0 Explanation of the parameters Dx Tool oset number: - without T - with T (as of SW5) x stands for the D No.: 0-32000

18 or 112

Contents

Page 164 of 286

Go Back

Fundamentals of CNC Machining


D0 Function Deselect tool oset, no osets active

Full Screen

It is possible to assign between 1 and 8 (12) tool noses with dierent tool compensation blocks to a specic tool. This allows you to dene various cutting edges for one tool, which you can call as required in the NC program. Dierent oset 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 specic tool nose is activated. When D0 is programmed, osets for the tool are ineective. If no D word is programmed, the default setting from the machine data is valid for tool change. Tool length compensations take immediate eect if the D number is programmed. A tool radius oset 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 specications). The compensation is performed with the rst programmed traversing of the respective tool

Contents

Page 165 of 286

Go Back

Fundamentals of CNC Machining


length compensation axis.

Full Screen

The required D number must always be programmed before the tool length compensation can be selected. The tool length compensation is also eective if the compensation is set in the machine data. Working without tool osets, 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 oset. The modied values do not become active until the T or D number is next programmed. Programming example (turning: tool change with T command) N10 N11 N50 ... N70 T1 D1 G0 X . . . Z . . . T4 D2 G0 Z . . . D1 Tool T1 is replaced and activated with associated D1 The length osets are traversed Load tool T4, D2 from T4 is active Other cutting edge D1 is activated for tool T4

Contents

Page 166 of 286

Go Back

Fundamentals of CNC Machining 6.5. Tool selection T with tool management

Full Screen

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. Identier 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 rst available tool from group, T10 is loaded because T15 is disabled. 4. On completion of tool search strategy Take the rst 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 = identier T triggers the tool change D . . . Tool oset number: 1 . . . 32000 (max., see machine manufacturers specications) D0: no oset active! Sequence The following procedure usually applies: T = slot, T triggers the tool change D = osets 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 oset 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 eect 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


Machine manufacturer (MH 8.2) Tool management: See machine manufacturers conguration. 6.5.2. Milling machine with chain magazine

Full Screen

Sequence The following procedure usually applies: T = Ident or T = No. or T=Duplo no., M06 triggers the tool change D = oset 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) at D no. structure without internal reference to associated tools. . Machine manufacturer (MH 8.3) Tool management: See machine manufacturers conguration. 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 osets apply. Note: When calling the tool, the:

Contents

Page 169 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 eect as T0. Selection of the unoccupied magazine location can be used for positioning the empty location.

6.6.

Tool oset call D with tool management

Machine manufacturer (MH 8.4) See machine manufacturers conguration. 6.6.1. Turning machine with circular magazine

Programming The following procedure usually applies: T = slot or T = identier or T=Duplo no., T triggers the tool change D . . . Tool oset number: 1 . . . 32000 (max., see machine manufacturers specications) D0: no oset 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 specic tool does not take place in the NC kernel. Machine manufacturer (MH 8.7) Direct programming is dened by MD.

Contents

Page 170 of 286

Go Back

Fundamentals of CNC Machining


Programming example $MC TOOL CHANGE MODE=0 ... D92 ... T17 ... D16 ... D32000 ... T29000500 ... 1D MD20270 CUTTING EDGE DEFAULT = 1 Traverse with tool osets from D92 Select T17, traverse with tool osets from D92 Traverse with tool osets from D16 Traverse with tool osets from D32000

Full Screen

Select T29000500, traverse with tool osets from D32000 Traverse with tool osets from D1

6.7.

Make active tool oset operative immediately

Function MD $MM ACTIVATE SEL USER DATA can be used to dene that the active tool oset can be activated immediately if the part program is in stop mode. Danger The oset 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


G41 G42 OFFN= Explanation of the commands G40 G41 G42 OFFN= Function

Full Screen

Deactivate tool radius compensation Activate tool radius compensation; tool operates in machining direction to the left of the contour. Activate tool radius compensation, tool operates in machining direction to the right of the contour. Allowance on the programmed contour (normal contour oset)

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


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

Full Screen

The control requires the following information in order to calculate the tool paths: 1. Tool number T/edge number D Where appropriate, a tool oset 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 at 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


Example: Milling cutters N10 G17 G41 . . .

Full Screen

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


Tool length compensation

Full Screen

Turning: The wear parameter assigned to the diameter axis on tool selection can be dened 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


Example:

Full Screen

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


Example:

Full Screen

Turning: N20 N30 N40 N50 T1 D1 G0 X100 Z20 G42 X20 Z1 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


Changing

Full Screen

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 oset number D The oset number D can be changed in compensation mode. A modied tool radius is active with eect 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 modied values only take eect the next time T or D is programmed. The change only applies with eect 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 manufacturer). 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 N20 G17 T1 M6 N30 G0 X0 Y0 Z1 M3 S300 D1 Retract to tool change point Tool change Call tool oset values, select length compensation

Contents

Page 179 of 286

Go Back

Fundamentals of CNC Machining


N40 Z-7 F500 N50 G41 X20 Y20 N60 Y40 N70 X40 Y70 N80 X80 Y50 N90 Y20 N100 X20 N110 G40 G0 Z100 M30

Full Screen
Tool infeed Approach tool radius compensation, tool operates on left-hand side of contour Mill contour

Retract tool, end of program

Turning: % N 1001 MPF N5 G0 G53 X280 Z380 D0 N10 TRANS X0 Z250 N15 LIMS=4000 N20 G96 S250 M3 N25 G90 T1 D1 M8 ;Program name ;Start point ;Zero oset ;Speed limitation (G96) ;Select constant feed ;Select tool and oset

Contents

Page 180 of 286

Go Back

Fundamentals of CNC Machining


N30 N35 N40 N45 N50 N55 N60 N65 N70 N75 N80 N85 N90 N95 G0 G42 X-1.5 Z1 G1 X0 Z0 F0.25 G3 X16 Z-4 I0 K-10 G1 Z-12 G2 X22 Z-15 CR=3 G1 X24 G3 X30 Z-18 I0 K-3 G1 Z-20 X35 Z-40 Z-57 G2 X41 Z-60 CR=3 G1 X46 X52 Z-63 G0 G40 G97 X100 Z50 M9 T2 D2 G96 S210 M3 G0 G42 X50 Z-60 M8 G1 Z-70 F0.12 G2 X50 Z-80 I6.245 K-5 G0 G40 X100 Z50 M9 G0 G53 X280 Z380 D0 M5 M30

Full Screen
;Activate tool with tool radius compensation ;Rotate radius 10 ;Rotate radius 3 ;Rotate radius 3

;Rotate radius 3

N100 N105 N110 N115 N120 N125 N130 N135

;Deselect tool radius compensation and approach tool change location ;Call up tool and select oset ;Select constant cutting speed ;Activate tool with tool radius compensation ;Rotate diameter 50 ;Rotate radius 8 ;Retract tool and deselect tool radius compensation ;Move to tool change location ;End of program

Contents

Page 181 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

7.
7.1.
7.1.1.

MISCELLANEOUS FUNCTION
Auxiliary function outputs
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 predened M functions M0* M1* M2* M30* M17* M3 M4 M5 M6 M70 M40 M41 M42 M43 M44 Programmed stop Optional stop End of main program with return to beginning of program End of program, same eect as M2 End of subprogram Spindle clockwise Spindle counterclockwise Spindle stop Tool change (default setting) Spindle is switched to axis mode Automatic gear change Gear step 1 Gear step 2 Gear step 3 Gear step 4

Contents

Page 182 of 286

Go Back

Fundamentals of CNC Machining


M45 Gear step 5

Full Screen

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 xtures or for activating/ deactivating other machine functions, etc. Machine manufacturer (MH9.3) See machine manufacturers specications. The commands M0, M1, M2, M17 and M30 are always initiated after the traversing movement. Predened 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 eect as M17 and vice versa, i.e. M17 has the same eect in the main program as M2/M30.

Contents

Page 183 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

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 N20 N180 S... X... M3 M789 M1767 M100 M102 M376

M function in the block with axis movement, spindle accelerates before the X axis movement Max. of 5 M functions in the block

Contents

Page 184 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

8.
8.1.

TURNING CYCLES
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 nd 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 suciently for the experienced user, whereas beginners can nd all the information they need for programming cycles under Function, Sequence of operations, 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 denition

The machining plane must be dened 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 (rst 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 rst be dened 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 gure 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 aect 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 osets 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 osets 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 oset (under parameter P24 in the D oset). 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 osets must be applied if the tool clearance angles are dierent. 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 specied as zero in the tool oset, 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 oset 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 SPL WIDG DIAG STA1 ANG1 real real real real real real Starting point in the facing axis (enter without sign) Starting point in the longitudinal axis Width of groove (enter without sign) Depth of groove (enter without sign) Angle between contour and longitudinal axis Value range: 0=STA1=180 degrees Flank angle 1: on the side of the groove dened by the starting point (enter without sign) Value range: 0=ANG189.999 degrees Flank angle 2: on the other side (enter without sign) Value range: 0<= ANG2 >89.999 Radius/chamfer 1, outside: on the side dened by the starting point

ANG2 RCO1

real real

Contents

Page 189 of 286

Go Back

Fundamentals of CNC Machining


RCO2 RCI1 RCI2 FAL1 FAL2 IDEP DTB VARI VRT from SW 6.2 or higher real real real real real real real int real

Full Screen
Radius/chamfer 2, outside Radius/chamfer 1, inside: on the starting point side Radius/chamfer 2, inside Final machining allowance on the base of the groove Final machining allowance on the anks Infeed depth (enter without sign) Dwell time at base of groove Type of machining Value range 1 . . . 8 and 11 ...8 Variable retraction distance from contour, incremental (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


2nd step

Full Screen

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


3rd step

Full Screen

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

Contents

Page 193 of 286

Go Back

Fundamentals of CNC Machining


4th step

Full Screen

Cutting of nal 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


Description of parameters SPD and SPL (starting point)

Full Screen

You dene 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 rst traversed and in the case of an internal groove, the facing axis direction is rst 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 dened for the cycle.

Contents

Page 195 of 286

Go Back

Fundamentals of CNC Machining


WIDG and DIAG (groove width and groove depth)

Full Screen

The shape of the groove is dened 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 dened 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


STA1 (angle)

Full Screen

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


ANG1 and ANG2 (ank angle)

Full Screen

Asymmetrical grooves can be described by separate ank 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 modied 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


FAL1 and FAL2 (machining allowance)

Full Screen

You can program separate nal machining allowances for the groove base and the anks. Roughing is performed to this nal machining allowance. Then, the same tool is used to machine a contour-parallel cut along the nal 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


VARI (type of processing)

Full Screen

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


VARI 11 . . . 18: Chamfers are calculated as CHF Input of the ones position in cycle support is distributed among three selection elds: 1. Field: longitudinal/plane 2. Field: external/internal 3. Field: starting point left/right (for longitudinal) or top/bottom (for plane)

Full Screen

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 dened. 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 o 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 oset values for the two tool edges in two successive D numbers of the tool, the rst of which must be activated before the cycle is called. The cycle determines itself which of the two tool osets it requires for which machining step and activates them automatically. After the cycle is completed, the oset number programmed before the cycle call becomes active again. If no D number has been programmed for a tool oset when the cycle is called, the cycle is aborted with alarm 61000 No tool oset active and the cycle is aborted. For SW 5.1 and higher, cycle setting data ZSD[4] can be used to inuence 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 dene how the tool oset 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 osets D1 and D2 of tool T1. The grooving tool must be dened correspondingly. DEF REAL SPD=35, SPL=60, WIDG=30,>> >>DIAG=25, STA1=5, ANG1=10, ANG2=20,>> >>RCO1=0, RCI1=-2, RCI2=-2, RCO2=0,>> Denition of parameters with value assignments

Contents

Page 202 of 286

Go Back

Fundamentals of CNC Machining


>>FAL1=1, FAL2=1, IDEP=10, DTB=1 DEF INT VARI=5 N10 G0 G90 Z65 X50 T1 D1 S400 M3 N20 G95 F0.2 N30 CYCLE93 (SPD, SPL, WIDG, DIAG,>> >>STA1, ANG1, ANG2, RCO1, RCO2,>> >>RCI1, RCI2, FAL1, FAL2, IDEP,>> >>DTB, VARI) N40 G0 G90 X50 Z65 N50 M02 >>Must be programmed in a single block

Full Screen

Starting point before the beginning of the cycle Specication of technology values Cycle call

Next position End of program

8.4.

Undercut cycle - CYCLE94

Programming CYCLE94 (SPD, SPL, FORM, VARI) Parameters SPD SPL FORM real real char Starting point in the facing axis (enter without sign) Starting point of the contour in the longitudinal axis (enter without sign) Denition of the form Values: E (for form E) F (for form F) Specication of undercut position Values: 0 according to tool point direction 1 . . . 4 dene position

VARI (from SW 6.2 or higher)

int

Contents

Page 203 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

With this cycle you can machine undercuts of form E and F in accordance with DIN509 with the usual load on a nished 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


Description of parameters SPD and SPL (starting point)

Full Screen

The nished part diameter for the undercut is entered in parameter SPD. With parameter SPL you dene the nished part dimensions in the longitudinal axis. If the value programmed for SPD results in a nal 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


FORM (denition)

Full Screen

Form E and Form F are dened 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 dened is output.

Contents

Page 206 of 286

Go Back

Fundamentals of CNC Machining


VARI (undercut position)

Full Screen

The position of the undercut can be either specied 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 oset. 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: Denition of undercut position The cycle determines the starting point automatically. This lies 2 mm from the nal diameter and 10 mm from the nal 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 oset. 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 technologically, 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 specied 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 oset before you call the cycles. Otherwise alarm 61000 No tool oset active is output and the cycle is aborted. Programming example

Contents

Page 208 of 286

Go Back

Fundamentals of CNC Machining


Undercut form E You can machine an undercut of form E with this program. N10 T25 D3 S300 M3 G95 F0.3 N20 G0 G90 Z100 X50 N30 CYCLE94 (20, 60, E) N40 G90 G0 Z100 X50 Approach next position N50 M02 Specication of technology values Selection of starting position Cycle call End of program

Full Screen

8.5.

Stock removal cycle - CYCLE95

Programming CYCLE95 (NPP, MID, FALZ, FALX, FAL, FF1, FF2, FF3, VARI, DT, DAM, VRT) Parameters NPP MID FALZ FALX FAL FF1 FF2 FF3 VARI string real real real real real real real int Name of the contour subroutine Infeed depth (enter without sign) Final machining allowance in the longitudinal axis (enter without sign) Final machining allowance in the facing axis (enter without sign) Final machining allowance along contour (enter without sign) Feedrate for roughing without relief cut Feedrate for insertion into relief cut elements Feedrate for nishing 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 contours are rounded over several points of intersection. 2 . . . without rounding at the contour The machine 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. Dwell time for chip breaking during roughing Path length after which each roughing cut is interrupted for chip breaking Retraction distance from contour for roughing, incremental (enter without sign)

DT DAM VRT With SW 4.4 and higher

real real real

Contents

Page 210 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

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, nishing, 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 nal 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 + nal machining allowance to the last roughing intersection point with G1/G2/G3 and FF1, lift o 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 eected axis by axis.

Contents

Page 212 of 286

Go Back

Fundamentals of CNC Machining


Roughing the relief cut elements:

Full Screen

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 + nal 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 rst 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 nal 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, nish 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 identied by start or end labels or by block numbers. In this case, the program name and labels/block number are identied by an :.

Contents

Page 214 of 286

Go Back

Fundamentals of CNC Machining


Example: NPP=CONTOUR 1 NPP=START:END

Full Screen

NPP=/ N SPF DIR/ N CONTOUR 1 SPF:N130:N2 10

The machining contour is the complete program Contour 1. The machining contour is dened as the section starting from the block labeled START to the block labeled END in the calling routine. The machining contour is dened in blocks N130 to N210 in program CONTOUR 1.

If the section is dened by block numbers, it must be noted that these block numbers for the section in NPP must be correspondingly adjusted if the program is modied and subsequently renumbered. MID (infeed depth) Under parameter MID you dene 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 gure 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 dierence 36 mm). Machining section 3 is roughed twice with an actual infeed of 3.5 (total dierence 7 mm). FAL, FALZ and FALX (nal machining allowance) The nal machining allowance for the roughing operation is either dened in parameters FALZ and FALX if you wish to enter dierent nal machining allowances for each axis or in parameter FAL if you wish to enter a nal machining allowance that follows a contour. In this case, this value is used for the nal machining allowance in both axes. The programmed values are not subjected to a plausibility check. If all three parameters are assigned values, all the nal machining allowances are calculated by the cycle. It is, however, advisable to decide on one or the other form of nal machining allowance denition. Roughing is always performed to these nal 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 nal machining allowances have been programmed, roughing is performed to the nal contour. The nish 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 nishing dimension. FF1, FF2 and FF3 (feedrate)

You can dene dierent feedrates for the dierent machining steps as is shown in the gure on the right.

Contents

Page 217 of 286

Go Back

Fundamentals of CNC Machining


VARI (machining types)

Full Screen

You can call the machining types as follows: Machining Roughing (Roughing/nishing/complete)

Contents

Page 218 of 286

Go Back

Fundamentals of CNC Machining


Selection Selection longitudinal outside (longitudinal/transverse) (outside/inside)

Full Screen

The machining types are shown in the table below. Value 1 2 3 4 5 6 7 8 9 10 11 12 Machining Roughing Roughing Roughing Roughing Finishing Finishing Finishing Finishing Complete machining Complete machining Complete machining Complete machining Selection long. transv. long. transv. long. transv. long. transv. long. transv. long. transv. inside Selection outside outside inside inside outside outside inside inside outside outside 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 dened is put out.

Contents

Page 219 of 286

Go Back

Fundamentals of CNC Machining


DT and DAM (dwell time and path length)

Full Screen

With these two parameters you can program an interruption in the individual roughing cuts after a dened path for the purposes of chip breaking. These parameters only apply to roughing. In parameter DAM you dene 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 specied 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 o the contour in both axes during roughing operations can be programmed in parameter VRT. If VRT=0 (parameter not programmed), lift o 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


Further notes

Full Screen

Contour denition The contour is programmed in a subroutine whose name is dened 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 rst 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 llets 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 rst 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 rst 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 Overow 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 dened in the cycle. With complete machining operations, the contour is nished in the same direction in which rough cutting took place. If only nishing is selected, the contour is always traversed in the programmed direction. The rst and last programmed contour points are the criteria for selecting the machining direction. For this reason, both coordinates must always be programmed in the rst block of the contour subroutine.

Contents

Page 222 of 286

Go Back

Fundamentals of CNC Machining


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.

Full Screen

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 dened as zero in the tool oset. If the arcs in the oset 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 nal machining allowance + lift o 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 nal 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 nishing. In nishing, the infeed axis is the rst to travel. Programming example 1 Stock removal cycle

The contour illustrated in the gure explaining the assignment parameters must be machined completely (longitudinal, outside). Axis-specic nal machining allowances have been dened. 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 Denition of a variable for the contour name

Contents

Page 224 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

End of subroutine

Contents

Page 225 of 286

Go Back

Fundamentals of CNC Machining


Programming example 2 Stock removal cycle

Full Screen

The machining contour is dened in the calling program and traversed directly after the nishing 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) START: N180 G1 X10 Z100 F0.6 N190 Z90 N200 Z=AC(70) ANG=150 N210 Z=AC(50) ANG=135

Cycle call

Contents

Page 226 of 286

Go Back

Fundamentals of CNC Machining


N220 Z=AC(50) X=AC(50) END: N230 M02

Full Screen

8.6.

Thread undercut - CYCLE96

Programming CYCLE96 (DIATH, SPL, FORM, VARI) Parameters DIATH SPL FORM Real Real Char Nominal diameter of the thread Starting point on the contour of the longitudinal axis Denition of the form Values: A (for Form A) Values: B (for Form B) Values: C (for Form C) Values: D (for Form D) Specication of undercut position Values: 0 according to tool point direction Values: 1 . . . 4 Dene position

VARI (from SW 6.2 or higher)

Int

Contents

Page 227 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

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


Description of parameters DIATH (nominal diameter)

Full Screen

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 nal 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 dened by DIN76 Part 1, again the cycle is aborted and the alarm 61001 Thread pitch incorrectly dened is output. SPL (starting point) With parameter SPL you dene the nal dimension in the longitudinal axis.

Contents

Page 229 of 286

Go Back

Fundamentals of CNC Machining


FORM (denition)

Full Screen

Thread undercuts of forms A and B are dened 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 dened is output. The tool radius compensation is automatically selected by the cycle.

Contents

Page 230 of 286

Go Back

Fundamentals of CNC Machining


VARI (undercut position)

Full Screen

The position of the undercut can be either specied directly or derived from the tool point direction with parameter VARI. See VARI with CYCLE94 The cycle automatically determines the starting point that is dened 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 oset before the cycle is called. Otherwise error message 61000 No tool oset active is output and the cycle is aborted.

Contents

Page 231 of 286

Go Back

Fundamentals of CNC Machining


Programming example Thread undercut Form A

Full Screen

You can machine a thread undercut of form A with this program. N10 N20 N30 N40 N50 D3 T1 S300 M3 G95 F0.3 G0 G90 Z100 X50 CYCLE96 (40, 60, A) G90 G0 X30 Z100 M30 Specication of technology values Selection of starting position Cycle call Approach next position 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


NUMT, VRT) Parameters PIT MPIT SPL FPL DM1 DM2 APP ROP TDEP FAL IANG Real Real Real Real Real Real Real Real Real Real Real

Full Screen

NSP NRC NID VARI NUMT VRT from SW 6.2 or higher

Real Int Int Int Int Real

Thread pitch as value (enter without sign) Thread pitch as thread size, Value range 3 (for M3) . . . 60 (for M60) Starting point of the thread in the longitudinal axis End point of the thread in the longitudinal axis Diameter of the thread at the starting point Diameter of the thread at the end point Arc-in section (enter without sign) Arc-out section (enter without sign) Thread depth (enter without sign) Final machining allowance (enter without sign) Infeed angle Value range + (for ank infeed on ank) - (for alternating ank infeed) Starting point oset for the rst thread (enter without sign) Number of rough cuts (enter without sign) Number of noncuts (enter without sign) Denition of the machining type for the thread Value range: 1 . . . 4 Number of threads (enter without sign) Variable retraction distance based on initial diameter, incremental (enter without sign)

Contents

Page 233 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

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 righthand 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 eect 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


The cycle implements the following motion sequence:

Full Screen

approach to the starting point determined by the cycle at the beginning of the arc-in section for the rst thread with G0, infeed for roughing according to the infeed type dened under VARI, thread cutting is repeated according to the number of roughing cuts programmed, in the next cut with G33 the nal 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 dene the thread pitch in parameter MPIT as a thread size (M3 to M60). These two parameters should be used as alternatives. If they contain conicting 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 dened 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, nal machining allowance, number of cuts) The programmed nal machining allowance has an eect 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 diering 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 nal 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


IANG (infeed angle)

Full Screen

With parameter IANG you dene 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 ank, the absolute value of this parameter must be no more than half the ank angle of the tool. The sign entered for this parameter denes how this infeed is performed. If a positive value is entered, infeed is always performed on the same ank, if a negative value is entered, infeed is performed alternately on both anks. The infeed type on both anks 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 ank infeed along one ank. NSP (starting point oset) Under this parameter you can program the angular value that denes the point of the rst cut for the rst thread turn on the circumference on the turned part. This value is a starting point oset. The parameter can be assigned any value between 0.0001 and +359.9999 degrees. If no starting point oset has been entered or the parameter has been omitted from the parameter list, the rst thread automatically starts at the zero degrees

Contents

Page 237 of 286

Go Back

Fundamentals of CNC Machining


mark. VARI (machining type)

Full Screen

With parameter VARI, you dene 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 1 2 3 4 Outside/inside Outside Inside Outside Inside Const. infeed/const. cross-section of cut Constant infeed Constant infeed Constant cross-section of cut Constant cross-section of cut

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

Contents

Page 238 of 286

Go Back

Fundamentals of CNC Machining


NUMT (number of thread starts)

Full Screen

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 rst thread is dened 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 oset 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


Further notes Dierence between a longitudinal thread and a face thread

Full Screen

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


Programming example Thread cutting

Full Screen

With this program you can cut a metric outside thread M42x2 with ank 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 nal machining allowance. After machining has been completed, 2 noncuts are performed. DEF REAL MPIT=42, SPL=0, FPL=-35, 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 N20 G95 D1 T1 S1000 M4 N30 CYCLE97 ( , MPIT, SPL, FPL, DM1, >> >>DM2, APP, ROP, TDEP, FAL, IANG,>> Denition of parameters with value assignments

Selection of starting position Specication of technology values Cycle call

Contents

Page 241 of 286

Go Back

Fundamentals of CNC Machining


>>NSP, NRC, NID, VARI, NUMT) N40 G90 G0 X100 Z100 N50 M30 >>Must be programmed in a single block Approach next position End of program

Full Screen

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

Contents

Page 242 of 286

Go Back

Fundamentals of CNC Machining


IANG real Infeed angle Value range + (for ank infeed on ank)

Full Screen

NSP NRC NID PP1 PP2 PP3 VARI NUMT VRT from SW 6.2 or higher

v. (for alternating ank infeed) real int int real real real int int real

Starting point oset for the rst thread (enter without sign) Number of rough cuts (enter without sign) Number of noncuts (enter without sign) Thread pitch 1 as value (enter without sign) Thread pitch 2 as value (enter without sign) Thread pitch 3 as value (enter without sign) Denition of the machining type for the thread Value range 1 ... 4 Number of threads (enter without sign) Variable retraction distance based on initial diameter, incremental (enter without sign)

Contents

Page 243 of 286

Go Back

Fundamentals of CNC Machining


Function

Full Screen

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 dierent 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 rst thread with G0, infeed to commence roughing according to the infeed type dened 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


in the next cut with G33 the nal 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)

Full Screen

With these parameters you dene the original starting point of the thread chain. The starting point calculated 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 dene 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 dened 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, nal machining allowance, number of rough cuts and noncuts) The programmed nal machining allowance is subtracted from the dened 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 diering 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 nal 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


IANG (infeed angle)

Full Screen

With parameter IANG you dene 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 ank, the absolute value of this parameter must be no more than half the ank angle of the tool. The sign entered for this parameter denes how this infeed is performed. If a positive value is entered, infeed is always performed on the same ank, if a negative value is entered, infeed is performed alternately on both anks. The infeed type on both anks 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 ank infeed along one ank. NSP (starting point oset) Under this parameter you can program the angular value that denes the point of the rst cut for the rst thread turn on the circumference on the turned part. This value is a starting point oset. The parameter can be assigned any value between 0.0001 and +359.9999 degrees. If no starting point oset has been entered or the parameter has been omitted from the parameter list, the rst thread automatically starts at the zero degrees

Contents

Page 247 of 286

Go Back

Fundamentals of CNC Machining


mark.

Full Screen

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 dene 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 1 2 3 4 Outside/inside Outside Inside Outside Inside Const. infeed/const. cross-section of cut Constant infeed Constant infeed Constant cross-section of cut 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 rst thread is dened 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 oset 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


Programming example Thread chain

Full Screen

With this program you can produce a chain of threads starting with a cylindrical thread. Infeed is perpendicular to the thread. Neither a nal machining allowance nor a starting point oset have been programmed. 5 roughing cuts and one noncut are performed. The machining type dened is longitudinal, outside, with constant cross-section of cut. N10 G95 T5 D1 S1000 M4 N20 G0 X40 Z10 N30 CYCLE98 (0, 30, -30, 30, -60, >> >>36, -80, 50, 10, 10, 0.92, , , , >> >>5, 1, 1.5, 2, 2, 3, 1) N40 G0 X55 N50 Z10 N60 X40 N70 M30 Specication of technology values Approach starting position Cycle call

Traverse in each axis separately

End of program

Contents

Page 250 of 286

Go Back

Fundamentals of CNC Machining


>>Must be programmed in a single block

Full Screen

8.9.

Thread recutting

SW version 5.3 contains thread cutting cycles CYCLE97 and CYCLE98 which allow threads to be recut. Function The angular oset 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 oset angle for each thread, which is applied in addition to the programmed starting point oset, 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 8.10. Extended stock removal cycle - CYCLE950

Full Screen

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 NP2 String String Name of the contour subroutine for the nished part contour Label / block number start of nished part contour, optional (this can be used to dene contour sections) Label / block number end of nished part contour, optional (this can be used to dene contour sections) Name of the stock removal program to be generated Type of machining : (enter without sign) ONE DIGIT: Values: 1 . . . Longitudinal Values: 2 . . . Face Values: 3 . . . Parallel to contour Values: 1 . . . Programmed infeed direction XValues: 2 . . . Programmed infeed direction X+ Values: 3 . . . Programmed infeed direction ZValues: 4 . . . Programmed infeed direction Z+ HUNDRED DIGIT: Values: 1 . . . Roughing

NP3

String

NP4 VARI

String Int

TEN DIGIT:

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 o) TEN THOUSAND DIGIT: Values: 1 . . . Machine relief cuts Values: 2 . . . Do not machine relief cuts HUNDRED THOUSAND DIGIT: Values: 1 . . . Programmed machining direction XValues: 2 . . . Programmed machining direction X+ Values: 3 . . . Programmed machining direction ZValues: 4 . . . Programmed machining direction Z+ Infeed depth (enter without sign) Final machining allowance in the longitudinal axis (enter without sign) Final machining allowance in the facing axis (enter without sign) Feedrate for longitudinal roughing Feedrate for face roughing Feedrate for nishing Feedrate at contour transition elements (radius, chamfer) Lift o distance for roughing, incremental (enter without sign) Lift o angle for roughing

MID FALZ FALX FF1 FF2 FF3 FF4 VRT ANGB

Real Real Real Real Real Real Real Real Real

Contents

Page 254 of 286

Go Back

Fundamentals of CNC Machining


SDIS NP5 NP6 Real String String

Full Screen
Safety distance for avoiding obstacles, incremental Name of contour program for blank contour Label / block number start of blank contour, optional (this can be used to dene contour sections) Label / block number end of blank contour, optional (this can be used to dene contour sections) Name of contour program for updated blank contour Axial value for dening blank for longitudinal axis Absolute or incremental evaluation of parameter APZ 90=absolute, 91=incremental Axial value for dening blank for facing axis Absolute or incremental evaluation of parameter APX 90=absolute, 91=incremental Blank tolerance

NP7

String

NP8 APZ APZA APX APXA TOL1

String Real Int Real Int Real

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 dened and is considered during stock removal. The nished 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, nishing, 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 nal machining allowance.

Contents

Page 255 of 286

Go Back

Fundamentals of CNC Machining


Finishing is performed in the same direction as roughing. The tool radius compensation is automatically selected and deselected by the cycle.

Full Screen

Contents

Page 256 of 286

Go Back

Fundamentals of CNC Machining


New functions compared to CYCLE95:

Full Screen

you can dene a blank either by programming a contour, specifying an allowance on the nished-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 specications 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 specied 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 o 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 o 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 o and retraction is carried out in the same way as for paraxial roughing. Description of parameters NP1, NP2, NP3 (contour programming nished part) The nished 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 dened in a separate program in which case only NP1 need be programmed; (see programming example 1),

Contents

Page 259 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

the contour is dened 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 nished part. This program is stored in the same directory as the calling program in the part program memory if no other path is specied when it is generated. If a path is entered, it is stored accordingly in the le system. The program is a main program (type MPF) if no other type is specied. Parameter NP4 denes the name of this program.

Contents

Page 260 of 286

Go Back

Fundamentals of CNC Machining


VARI (machining type)

Full Screen

Contents

Page 261 of 286

Go Back

Fundamentals of CNC Machining


Parameter VARI denes the type of machining. Possible values are: Unit digit: 1=Longitudinal 2=Face 3=Parallel to the contour

Full Screen

Ten digit:

1=Programmed 2=Programmed 3=Programmed 4=Programmed

infeed infeed infeed infeed

direction direction direction direction

XX+ ZZ+

Hundred digit:

1=Roughing 2=Finishing 3=Complete

Thousand digit:

1=With rounding 2=Without rounding (lift o) The selection with or without rounding along the contour determines 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 corners.

Ten thousand digit:

1=Machine relief cuts 2=Do not machine relief cuts

Contents

Page 262 of 286

Go Back

Fundamentals of CNC Machining


Hundred thousand digit: 1=Programmed 2=Programmed 3=Programmed 4=Programmed machining machining machining machining direction direction direction direction XX+ ZZ+

Full Screen

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: ZSD[0]=1: ZSD[0]=2: MID is interpreted according to the G group for radius/diameter programming, as a radius with DIAMOF, otherwise as a diameter. MID is a radius value MID is a diameter value

When rough cutting parallel to contour, the infeed depth does not act in relation to the specied 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 nal 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 nal machining allowances. If no machining allowances are programmed, stock removal is performed up to the end contour during roughing. If nal machining allowances are programmed, these are applied correspondingly.

Contents

Page 263 of 286

Go Back

Fundamentals of CNC Machining


FF1, FF2, FF3 and FF4 (feedrate)

Full Screen

Separate feedrates can be specied for roughing and nishing, as shown in the gure 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 nishing. If none are programmed there, the nishing feedrate in FF3 and the feedrates at radii and chamfers in FF4 apply to these contour transition elements. VRT (lift o ) and ANGB (lift angle) The parameter VRT can be used to program the amount of lift o during roughing in both axes. If VRT=0 (parameter not programmed), lift o 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


retracted from the contour in parameter ANGB. If nothing is programmed, the angle is 45.

Full Screen

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 nished 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 dierent 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


APZ, APZA, APX, APXA (blank denition)

Full Screen

Contents

Page 266 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

You can also dene a blank by entering the dimensions of a blank cylinder (or hollow cylinder) or as an allowance on the nished-part contour in parameters APZ and APX. You can enter the cylinder dimensions as either absolute or incremental values, although an allowance on the nished-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 denition 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 denes 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 denition Unlike CYCLE95, one block that contains a link to the current plane is sucient for contour programming. For further details of contour denition, see CYCLE95.

Contents

Page 267 of 286

Go Back

Fundamentals of CNC Machining


Blank contour denition

Full Screen

A blank contour must either be a closed contour (starting point=end point) which encompasses the nishedpart contour either partially or fully, or a contour section between the starting and end points of the nished-part contour. The programmed direction is irrelevant. Blank contours always must be described in a way that they are not partly identical with the nished-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 le system of the control, where it is called and executed immediately. This structure means that it is only necessary to perform the calculation the rst 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 nished contour has been modied, a transfer parameter of the cycle has changed, a tool with dierent tool oset data has been activated before the cycle call. Program storage in the le system If the contours for CYCLE950 are programmed outside the program that makes the call, the following applies for the search in the le system of the control: if the calling program is stored in a workpiece directory, then the programs which dene the nished-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 specied. 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 specied path. Note on simulation In the simulation of the extended stock removal cycle CYCLE950, the generated programs are saved to the NCU le system. Therefore, only the NC Active Data setting is practical since tool oset data are included in program calculation.

Contents

Page 269 of 286

Go Back

Fundamentals of CNC Machining


Blank updating

Full Screen

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 oset data (parameter 24). The cycle denes 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, dierent 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 congurations.

Contents

Page 270 of 286

Go Back

Fundamentals of CNC Machining


Programming example 1

Full Screen

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 specied 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


% 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 oset 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

Full Screen

% 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


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

Full Screen

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 rst 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 rst 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 dening 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


; Sca, 01.04.99 ; ; Tool oset 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 N150 X0 N160 Z100 N170 F500 S400 M3 N175 G1 Z75 N180 Z76 N190 Z60 N200 Z61 N210 Z45 N220 G0 Z100 N230 X300 N240 Z150 N250 T2 D1 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

Full Screen

Change drill with diameter 10 Center drilling in three steps

Approach tool change point Insert turning tool for inside machining

Skip contour denition

Contents

Page 275 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen
N400 to N420 nished part contour

N430 to N490 blank contour

Programming example 3 The same part as in sample program 1 should now be machined in two steps. In the rst 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 specied. 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 dierent tool and then nished. The type of machining for this step is:

Contents

Page 276 of 286

Go Back

Fundamentals of CNC Machining


complete machining (roughing and nishing), 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 oset 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 nishing ; 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 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)

Full Screen

Tool for roughing

Contents

Page 277 of 286

Go Back

Fundamentals of CNC Machining


N50 G0 X300 N55 Z150 N60 T4 D1

Full Screen

Tool for roughing residual material and nishing

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


Alarm number 61701 Alarm text Error in contour description of nished part Explanation, remedy

Full Screen

61702

Error in contour description of blank

Either none of parameters NP1, NP2 or NP3 is assigned or error in programming of nished-part contour Either none of parameters NP5, NP6 or NP7 is assigned or error in programming of blank contour

61703 61704 61705 61706 61707 61708 61709 61720 61721 61722 61723 61724 61725 61726 61727 61728

Internal cycle error while deleting le Internal cycle error while writing le Internal cycle error while reading le Internal cycle error during checksum formation Internal cycle error during ACTIVATE at MMC Internal cycle error during READYPROG at MMC Timeout for contour calculation Illegal input Error: unable to determine contour direction System error Unable to perform machining No material available Out of memory, error in contour generation Internal error: Out of memory FILECTRL INTERNAL ERROR Internal error: Out of memory FILECTRL EXTERNAL ERROR Internal error: Out of memory

Use a tool with a larger clearance angle

Contents

Page 279 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

Check denition of blank contour

Blank contour must be closed, starting point = end point

Contents

Page 280 of 286

Go Back

Fundamentals of CNC Machining

Full Screen

9.
9.1.
9.1.1.

APPENDIX
Excersises & Problems of CNC Machining
Geometrical Denitions

Describe the surfaces on the workpiece in terms according to the standard ISO 4287-1 and main characteristics 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 nd 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 , specic 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 inuence the relation ? vc [m/min] T [min] 162 25 150 45 141 69 125 128 110 220 100 280

Contents

Page 282 of 286

Go Back

Fundamentals of CNC Machining


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

Full Screen

Consider outer interrupted longitudinal roughing operation of a cylindrical ingot. For given cutting conditions 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. Specic 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, horizontal and vertical soft keys, pop-up menus. Learn how to work with workpiece les, tool les, edit menu, graphical simulation, protection of programmes, setting data, dowloading and copying of les. 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 dierent cutting tools, you are asked to assign tool compensations for T1 (outer cranked left hand knife), T2 (light turning knife), T3 (parting o 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 experimentally (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