info base englisch

65
Fundamentals of the Programming of CNC Machine Tools Program Technological Fundamentals Mathematical Fundamentals Fundamentals of the CNC Machine Tool Geometrical Fundamentals

Upload: hecherm

Post on 16-Oct-2014

956 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Info Base Englisch

Fundamentals of the Programming of CNC Machine Tools

Program

Technological Fundamentals

Mathematical Fundamentals

Fundamentalsof the CNC

Machine Tool

Geometrical Fundamentals

Page 2: Info Base Englisch

1st edition 2001

All rights reserved.

No part of this publication may be copied or distributed, transmitted, transcribed, stored in a retrieval system, or translated into any human or computer language, in any form or by any means, electronic, mechanical, magnetic, manual, or otherwise, or disclosed to any third parties without the express written permission of the authors.

Publication no.: 60973

Page 3: Info Base Englisch

1

Preface

The present Manual provides important basic information with regard to CNC programming acc. to DIN 66025. The information contained herein is accordingly dependent on the particular control system used.

Whereas the fundamentals of the CNC machine tool and also the technological fundamentals will be discussed relatively briefly, the geometrical fundamentals, as the main topic of this Manual, will be dealt with in detail with appropriate exercises.

Computational fundamentals finally - such as the calculation of contour points - will then only be discussed in brief, since this topic is losing more and more in importance as graphical programming comes increasingly to the fore (see ShopMill, ShopTurn, plus systems etc.).

Nevertheless, despite the development mentioned above (graphical programming), it is important that the principals of DIN programming, as technological and geometrical fundamentals, are part of the user’s basic knowledge.

Sauerlach, in summer 2001

Page 4: Info Base Englisch

2

Table of Contents

1 Fundamentals of NC Programming ....................................................................... 41.1 Design features of CNC machines............................................................................................ 4

1.1.1 CNC milling machine ........................................................................................................ 41.1.2 CNC turning machine ....................................................................................................... 5

1.2 Control types using the example of drilling / milling .................................................................. 6

1.3 Measuring systems ................................................................................................................... 8

2 Technological Fundamentals ............................................................................... 102.1 Technological fundamentals of milling .................................................................................... 10

2.1.1 Cutting rate and speeds.................................................................................................. 102.1.2 Feed per tooth and feedrates ......................................................................................... 11

2.2 Technological fundamentals of turning ................................................................................... 122.2.1 Cutting rate and speeds.................................................................................................. 122.2.2 Feed................................................................................................................................ 13

3 Geometrical Fundamentals................................................................................... 143.1 Coordinate Systems................................................................................................................ 14

3.2 Reference points..................................................................................................................... 15

3.3 Workpiece contours in the coordinate system (milling)........................................................... 163.3.1 Absolute dimensions G90............................................................................................... 163.3.2 Incremental dimensions G91 .......................................................................................... 173.3.3 Geometry exercises with regard to G1 in absolute dimensions...................................... 183.3.4 Geometry exercises with regard to G1 in increment dimensions ................................... 193.3.5 Circular interpolation G2 / G3 ......................................................................................... 203.3.6 Geometry execises with regard to G2 and G3................................................................ 22

3.4 Workpiece contours in the coordinate system (turning).......................................................... 243.4.1 Absolute dimensions G90............................................................................................... 243.4.2 Incremental dimensions G91 .......................................................................................... 253.4.3 Geometry exercises with regard to G1 in absolute dimensions...................................... 263.4.4 Geometry exercises with regard to G1 in incremental dimensions................................. 273.4.5 Circular interpolation G2 / G3 ......................................................................................... 283.4.6 Geometry execises with regard to G2 and G3 ............................................................... 30

Page 5: Info Base Englisch

3

4 Programming......................................................................................................... 324.1 Program structure ................................................................................................................... 32

4.1.1 Program structure to DIN 66025..................................................................................... 324.1.1.1 Block structure...................................................................................................... 324.1.1.2 Word structure...................................................................................................... 324.1.1.3 G functions ........................................................................................................... 344.1.1.4 Miscellaneous functions ....................................................................................... 35

4.1.2 Overview of the most important G and M functions........................................................ 36

4.2 Programming examples and programming exercises ............................................................ 374.2.1 Milling ............................................................................................................................. 37

4.2.1.1 Programming example with regard to G0 and G1 ............................................... 374.2.1.2 Programming exercise with regard to G0, G1 und G3 ......................................... 384.2.1.3 Cutter radius path compensation (G41 / G42 - G40) ........................................... 394.2.1.4 Programming example with regard to the cutter radius path compensation ........ 404.2.1.5 Programming exercise 1: Cutter radius path compensation ................................ 414.2.1.6 Programming exercise 2: Cutter radius path compensation ................................ 42

4.2.2 Turning ........................................................................................................................... 434.2.2.1 Programming example with regard to G0 and G1* .............................................. 434.2.2.2 Programming exercise with regard to G0 and G1 ................................................ 444.2.2.3 Tool nose radius compensation (G41 / G42 - G40) ............................................ 454.2.2.4 Programming example with regard to the tool nose radius compensation .......... 464.2.2.5 Programming exercise 1: Tool nose radius compensation ................................. 474.2.2.6 Programming exercise 2: Tool nose radius compensation ................................. 48

5 Mathematical Fundamentals ................................................................................ 495.1 The theorem of Pythagoras .................................................................................................... 49

5.2 Angle functions ....................................................................................................................... 50

5.3 Exercises for calculating coordinates ..................................................................................... 515.3.1 Calculating coordinates in milled parts ........................................................................... 515.3.2 Calculating coordinates in turned parts .......................................................................... 52

6 Solutions................................................................................................................ 53

7 Index....................................................................................................................... 60

Page 6: Info Base Englisch

4

1.1.1 CNC milling machine

For CNC milling machines, it is most commonly d.c. motors or variable-frequency three-phase motors (a.c. motors) which are used for the main drive. Uncontrolled three-phase motors with a connected gearbox are also found. The main advantages compared with d.c. motors are:

- No collectors and no collector rings- Increased power and higher speeds- Speed-independent torque- Smaller dimensions at higher power

For feed drives, it is only possible to use computer-controlled d.c. motors. Each axis is driven individually, thus enabling continuous path control. With feed drives, it must be possible, in particular, to control the speed from the lowest feedrates up to rapid traverse rate.

On the CNC milling machine, the conversion of the motor movement into the translatory slide movement is carried out via leadscrews. Compared with the acme-screw spindle, they have the following advantages:- High efficiency through low friction, i.e. low drive power- Low heat dissipation, i.e. high positioning accuracy- Low wear, i.e. long service life- Backlash compensation through the control

1 Fundamentals of NC Programming

1.1 Design features of CNC machines

Screen

Main drive(d.c. motors)

Control panel

1 Column base2 Column3 Slide (mounting plate)4 Headstock

Axis single drives(d.c. feed motors)

Linear measuring systems(on the guideways)

Leadscrew

Page 7: Info Base Englisch

5

A linear measuring system is installed on each axis for position measurement. It consists of a glass scale with a graduated index providing a digital measured data acquisition at a measuring resolution of 0.001 mm. The glass scale is sensed by a photocell providing a pulse to the counter with each field change. The count corresponds to the actual value of the distance traversed, which is then compared with the setpoint entered in the setpoint-actual value comparator.

The size of the measuring step should not be mixed up with the machining accuracy.

1.1.2 CNC turning machine

The main drive is usually either an infinitely variable d.c. motor or a variable-frequency three-phase motor (a.c. motor). This kind of drive allows working at constant cutting speed; the workspindle is driven either via a few or even without preceding gear stages.

CNC turning machines require axis single drives since the traversing along unlimited paths is only provided by separate control in each axis. For the feed motors, d.c. motors, variable-frequency three-phase motors or stepper motors are used.

A shaft encoder (resolver) is installed on each axis as the measuring system for position measurement. The shaft encoder acquires the traversing path directly, i.e. the measured angle of rotation is converted by the computer to a distance, taking into account the leadscrew pitch. The incremental shaft-angle encoder is required for thread cutting. It allows the exact positioning of a tool in a defined angular position.

On CNC milling machines, the conversion of the rotating motor movement into the slide movement is carried out via leadscrews. The advantages of the leadscrew compared with the acme-screw spindle have been described in Section 1.1.1.

Incremental shaft-angle encoder

Main drive

Axis single driveof Z axis

Axis single driveof X axis

Resolver of X axis(measuring system)

LeadscrewsResolver of Z axis (measuring system)

Control panel

Page 8: Info Base Englisch

6

With regard to the sequence of motions, there are three types of controlling (DIN 66257):

Point-to-point control

With the point-to-point control, the tool is brought to a certain position with reference to the workpiece (or vice versa), as defined by numbers. The individual positions are approached at maximum speed (rapid traverse) whereby the axis movements are carried out either simultaneously or separately. During this process, the tool is not in mesh. Only after the position setpoint is reached in all axes, is the machining started.

Application: Drilling machines, spot-welding machines, robots

Linear path control

The workpiece machining on a machine tool with linear path control is carried out longitudinally at the programmed feedrate along straight lines located paraxially to the coordinate system. The order and the length of the traversing paths of the individual axes will result in the appropriate workpiece form.

Linear path controls include point-to-point control properties. Meanwhile, linear path control has been replaced to a large degree by continuous path control. Linear path controls are therefore no longer used on modern CNC milling machines (and CNC turning machines).

Application: Milling work in longitudinal and transversal direction

1.2 Control types using the example of drilling / milling

Page 9: Info Base Englisch

7

Continuous path controlContinuous path controls allow several axes to be traversed simultaneously during the machining. The traversing movements must be matched to one another in order to obtain the desired (linear or curved) path. To this end, the control system is provided with an electronic computing unit (interpolator) that controls the movement in the axis directions relative to one another so that the desired contour with the programmed feedrate is created.

Application: Milling machines, turning machines, flame cutting machines, grinding machines, spark erosion machines, ...

The continuous path control, in turn, is divided into the following types:

2D continuous path control

2D continuous path controls provide linear and circular tool movements in a fixed plane. An existing third axis can only be controlled independently of the remaining two axes.

2½D continuous path control

When generating linear and circular tool movements using 2½D continuous path controls, it is possible to switch to the three main planes one after the other. The third axis can only be fed independently.

3D continuous path control

A 3D continuous path control provides linear and circular tool movements, i.e. the movement of three axes can be matched to one another.

Page 10: Info Base Englisch

8

With numerically controlled machine tools, each axis requires its own distance measuring system to return the current actual position to the position controller.

There are the following possibilities:

With CNC machine tools, digital, incremental position measuring methods predominate.Incremental direct position measurement

A capacitor converts the beams emitted by a light source into parallel light beams. These beams hit a glass scale with a defraction grating that possesses both spaces that are pervious to light and lines that are impervious to light. The light beams are then passed on to a scan plate with an offset defraction grating, which is connected to a machine tool. The light beams will then land on four silicon photoelements creating a sinusoidal signal as a result of the movement of the glass scale.

These signals are then converted by a pulse former electronics into rectangular pulse signals (digitized). The counter generates counting pulses with a measuring resolution of 0.001 mm from the periodical sampling signals. These pulses are counted to determine the current actual position and the result passed to the position controller.

When the machine is turned on, the incremental measuring system cannot determine the existing actual position. Therefore, the reference point of the position measuring system must be approached first. The reference mark signal is converted to a reference pulse and assigned exactly to a certain counting step.

1.3 Measuring systems

Incremental Absolute

Direct DirectIndirect Indirect

Miniature lamp

Scale gratingCapacitor DIADUR scale

Reference markScan plate

Defraction Silicon photoelements

Page 11: Info Base Englisch

9

Incremental indirect position measurement

With indirect incremental position measurement, a rotating encoder provides the counting pulses to the comparator. The measuring principle corresponds to that of the direct position measurement. The graduated scale with the radial grating marks rotates so that the scanning photoelements generate sinuousoidal signals acquiring the angle of rotation. Measuring resolutions of up to 0.0005° can be achieved.

With this kind of position measurement, the leadscrew error of the spindle and the backlash between spindle and spindle nut have negative effects on the measurement result. It is advantageous, however, that compared with direct position measuring systems, little space is required even in case of long distances traversed. The costs are thus also lower.

Absolute direct position measurementWith absolute position measurement, the encoder provides an umambiguous position with reference to zero at each position. The display is independent of the previous position.

Absolute position measurement is possible by measuring the distances using a scale referred to zero. Depending on the single step, the encoder provides a signal combination following the dual number principle, thus allowing an unambiguous statement with regard to the slide location. In conjunction with an actual-value display, this provides the advantage that the dimension is kept in case of a program interruption (e.g. due to a power failure) and that the machining can be continued from this point.

Miniature lamp

Graduated scale with radial grating

Condensor lens

Encoder shaft

Reference mark(reference pulse graduation)

Defraction Sanning elements(silicon photoelements)

Page 12: Info Base Englisch

10

2.1.1 Cutting rate and speedsThe optimum speed of a tool in each individual case depends on the cutting tool material grade, the material of the workpiece and the tool diameter. In the practice, this speed is also often entered immediately without any calculations, based on many years of experience. The better way, however, is to calculate the speed from the cutting rate specified in the appropriate tables.

Determination of the cutting rate:First, determine the optimum cutting rate on the basis of the manufacturer catalogs or a table book.

Calculating the speed:Use this cutting rate and the known tool diameter to calculate the speed n.

The example below shows how to calculate the speed for two tools:

The NC coding uses the acronym "s" for the speed.In this case, the inputs will be S580 and S900.With these speeds, the cutting rate of 115 m/min is achieved.

2 Technological Fundamentals

2.1 Technological fundamentals of milling

Cutting tool material grade:Hard metal

Workpiece material:C45

vc = 80 ... 150 m/min:The mean value vc = 115 m/min should be selected.

nvc 1000⋅

d π⋅-------------------------=

d1 = 63mm d2 = 40mm

n1 580 1min----------≈ n2 900 1

min----------≈

n1115mm 1000⋅

63mm π min⋅ ⋅--------------------------------------------= n2

115mm 1000⋅40mm π min⋅ ⋅--------------------------------------------=

(in the workshop also often referredto as r.p.m.)

Page 13: Info Base Englisch

11

2.1.2 Feed per tooth and feedratesOn the previous page, you have learned how to determine the cutting rate and how to calculate speeds. To make sure that the tool cuts, a tool feedrate must be assigned to this cutting rate or speed.

The basic value of the feedrate is the characteristic quantity "feed per tooth".

Determining the feed per tooth:

Like the cutting rate, the value for the feed per tooth is also determined using either the table book or the appropriate documents of the tool manufacturer.

Determination of the feedrate:The feedrate vf is calculated using the feed per tooth, the number of teeth and the known speed.

The example below shows how to calculate the feedrate for two tools with a different number of teeth:

The NC coding uses the acronym "F" for the feedrate.

In this case, the inputs will be rounded off F340 and F780.

With these feedrates, the feed per tooth of 0.15 mm is achieved.

Cutting tool material grade:Hard metal

Workpiece material:C45

Feed per tooth fz = 0.1 ... 0.2 mm:

The mean value fz = 0.15 mm should be selected.

vf fz z n⋅ ⋅=

vf1 0 15mm, 4 580 1min----------⋅ ⋅= vf2 0 15mm, 9 580 1

m-----⋅ ⋅=

vf1 348mmmin----------= vf2 783mm

min----------=

d1 = 63mm, z1 = 4 d2 = 63mm, z2 = 9

Page 14: Info Base Englisch

12

2.2.1 Cutting rate and speedsUnlike milling, turning generally calls for the desired cutting rate to be programmed directly, namely when roughing, finishing and plunge-cutting.

Only when drilling, and (in most cases) when thread cutting, is the desired speed programmed. Determining the cutting rate:First, determine the optimum cutting rate on the basis of the manufacturer catalog or a table book.

Constant cutting rate vc (G96) when roughing, finishing and plunge-cutting:To make sure that the selected cutting rate is observed on each workpiece diameter, the appropriate speed is adapted by the control system using the command G96 = constant cutting rate. This is carried out using either d.c. motors or variable-frequency three-phase motors.

With reduced diameter, the speed theoretically increases infinitely. To avoid hazards from exceesive radial forces, a speed limit, e.g. of 2,000 r.p.m. must be programmed.In this case, the inputs will be G96 S180 LIMS=3000.Constant speed n (G97) when drilling and thread cutting:

Since the speed is constant when drilling, the command G97 = constant speed must be used here.The speed is dependent on the desired cutting rate (120 m/min is selected in this case) and the tool diameter.

In this case, the inputs will be G97 S1900.

2.2 Technological fundamentals of turning

Cutting tool material grade:Hard metal

Workpiece material:Free-cutting steel

vc = 180 m/min:

nvc 1000⋅

d π⋅-------------------------=

n 1900 1min----------≈

n 120mm 1000⋅20mm π min⋅ ⋅--------------------------------------------=

d = 20mm (tool diameter)

Page 15: Info Base Englisch

13

2.2.2 FeedOn the previous page, you have learned how to determine the cutting rate and how to calculate speeds. To make sure that the tool cuts, a tool feedrate must be assigned to this cutting rate or speed.

The basic value of the feedrate is the characteristic quantity "feed per tooth".

Determining the feed:

Like the cutting rate, the value for the feed is also determined using either the table book or the appropriate documents of the tool manufacturer or else is based on empirical knowledge.

Interrelation between feed and feedrate:The constant feed f and the appropriate speed results in the feedrate vf.

Since the speed is different, the feedrate on the different diameters is also different (despite the same program-med feed).

Feed f = 0.2 ... 0.4 mm:The mean value f = 0.3 mm should be selected (in the workshop often referred to as mm per rev.).

In this case, the input will be F0.3.

Cutting tool material grade:

Hard metalWorkpiece material:

Free-cutting steel

vf2 710 1min---------- 0 3mm,⋅= vf1 2800 1

min---------- 0 3m,⋅=

vf2 210mmmin----------≈ vf1 840mm

min----------=

vc 180 mmin----------=vc 180 m

min----------=

d2 80mm=n2 710 1

min----------≈

d1 20mm=n1 2800 1

min----------≈

vf f n⋅=

Page 16: Info Base Englisch

14

With numerically controlled machine tools, the distances traversed by the tool are described by specifying the individual tool positions. The unambiguous determination of the tool positions is carried out using numbers that refer to a coordinate system defined in DIN 66217.

Extract from DIN 66217

A right-handed, right-angled coordinate system with the axes X, Y and Z is used which is aligned towards the main guideway of the machine and is referred to the workpiece clamped on the machine. A, B and C are rotary movements around the axes X, Y and Z. The direction of the rotation is positive if the rotary motion is carried out clockwise, viewed in the positive direction of the coordinate system.

The Z axis is parallel to the workspindle or coincides with it, running from the workpiece to the tool.

The X axis is the main axis in the positioning plane. Generally, it lies parallel to the workpiece clamping area and runs horizontally.

The positions and the directions of the Z axis and the X axis produce the position and the direction of the Y axis from the coordinate system.Based on these conventions, the following applies to ...

... milling machines

... turning machinesWith turning machines, the X axis is radially to the workpiece axis. Its positive direction is from the workpiece axis towards the main toolholder.

3 Geometrical Fundamentals

3.1 Coordinate Systems

Vertical milling machine

Horizontal milling machine

If the Z axis lies vertically, then the positive X axis will run to the right when looking from the main spindle to the machine column.

If the Z axis lies horizontally, then the positive X axis will run to the right when looking from the main spindle to the workpiece.

Tool is behind the turning center Tool is in front of the turning center

Page 17: Info Base Englisch

15

To enable a CNC, such as the SINUMERIK 840D, to orient itself in the existing work area, there are some important reference points.

Machine zero M

The machine zero M is defined by the manufacturer and cannot be changed. When milling, it is in the origin of the machine coordinate system, and when turning, on the contact surface of the spindle nose.

Workpiece zero W

The workpiece zero W, also referred to as the program zero, is the origin of the workpiece coordinate system. It can also be freely selected and when milling, it should be located at a position in the drawing from which most dimensions are measured. When turning, the workpiece zero is always located on the axis of rotation and in most cases on the plane face.

Reference point R

The reference point R is approached when setting the measuring system zero, since in most cases the machine zero cannot be approached. The control system will thus find its reference point in the position measuring system.

Toolholder reference point T

The toolholder reference point T is important for setting up with default tools. The lengths L and Q shown in the diagram below are used as tool calculation values and are entered in the tool memory of the control system.

3.2 Reference points

Page 18: Info Base Englisch

16

3.3.1 Absolute dimensions G90 Absolute dimensions always refer to the workpiece zero. With most control systems, the G function G90 is the default condition when starting the machine; it is therefore no longer necessary to specify G90 in the program.

Advantages of absolute dimensioning:- A single incorrect dimension input does not result in sequential errors.- Any tolerances are not accumulated.- After an interruption, the program can be continued from any point.- The tracing of the program steps becomes considerably easier, since the absolute coordinates specify the

current position of the tool.- Any changes in individual dimensions of the workpiece do not influence the following blocks in the program.

3.3 Workpiece contours in the coordinate system (milling)

G90means

GOTO

GOTOpositionX30 Y10

GOTOpositionX60 Y30

Input

X30 Y10

Input

X60 Y30

Page 19: Info Base Englisch

17

3.3.2 Incremental dimensions G91 Incremental dimensions always refer to the current tool position.

Even if programming with incremental dimensions has certain disadvantages (sequential errors), it is not posible to do without it. This kind of programming is preferred if

- parts of the contour on a workpiece are to be repeated;- inside calmers are indicated on a drawing.

However, it is not absolutely necessary to use only absolute dimensions or only incremental dimensions in a program, since with the recent control systems, it is possible to change between absolute dimensions G90 and incremental dimensions G91 within the program.

G91means

Go BY

Go BY

X20 mm in the + directionY30 mm in the - direction

Input

X20 Y-30

Input

X30 Y20

Go BY

X30 mm in the + directionY20 mm in the + direction

Page 20: Info Base Englisch

18

3.3.3 Geometry exercises with regard to G1 in absolute dimensions

Exercise 1

Exercise 2

G1 = linear interpolationG90

N G X YN1

N2

N3

N4

N5

N6

N7

N8

Starting position: X Y

N G X YN1

N2

N3

N4

N5

N6

N7

N8

N9

N10

N11

Starting position: X Y

Page 21: Info Base Englisch

19

3.3.4 Geometry exercises with regard to G1 in increment dimensions

Exercise 1

Exercise 2

G1 = linear interpolationG91

N G X YN1 G91*N2N3N4N5N6N7N8N9N10 G90*

Starting position: X Y

*Note:

When using G91, switch back to G90 in an appropriate place.

N G X YN1 G91N2

N3

N4

N5

N6

N7

N8

N9

N10

N11

N12

N13 G90

Starting position: X Y

Page 22: Info Base Englisch

20

3.3.5 Circular interpolation G2 / G3Arcs are programmed using the functions G02 and G03.

Since the coordinates X and Y are already used for the circle end point, the "auxiliary coordinates" I and J are used to program the circle center point.

Please note:- The coordinates of the circle end points X and Y are programmed in absolute dimensions.- The auxiliary coordinates I and J of the circle center point are in most cases programmed in incremental

dimensions. In this case, they refer to the starting point of the arc.

Important note: With some control systems, the circle center point can also be programmed in absolute coordinates. Instead of the center point coordinates, with some control systems, it is also possible to specify the circle radius. This will facilitate the programming (e.g. SINUMERIK 810D/840D).

MillingCW

G02CCW

G03

Direction of movement

End point coordinates of the arc (absolute)

Center point coordinatesI belongs to XJ belongs to Y(in most cases incremental)

Direction of movement

Page 23: Info Base Englisch

21

To determine the lengths for I and J, draw an arrow from the circle starting point A to the circle center point M.

Two cases are distinguished:

1. A -> M is paraxial to X or Y:In this case, one of the auxiliary coordinates has the value zero.

2. A -> M is not paraxial to X or Y:In this case, the arrow AM must be divided into a horizontal and a vertical direction.

A -> Mparaxial

Sign: -

Sign: +

Block format

Block format

Tool movement

A -> MNOTparaxial

Block format

Page 24: Info Base Englisch

22

3.3.6 Geometry execises with regard to G2 and G3Program the appropriate blocks for the polylines shown in the diagrams below.

Exercise 1

Exercise 2

G2/G3 = circular interpolationG90

N G X Y I JN1N2N3N4N5N6

Starting position: X Y

N G X Y I JN1N2N3N4N5N6N7N8N9N10

Starting position: X Y

Page 25: Info Base Englisch

23

Notes

Page 26: Info Base Englisch

24

3.4.1 Absolute dimensions G90 Absolute dimensions always refer to the workpiece zero. With most control systems, the G function G90 is the default condition when starting the machine; it is therefore no longer necessary to specify G90 in the program.

Advantages of absolute dimensioning:

- A single incorrect dimension input does not result in sequential errors.- Any tolerances are not accumulated.- After an interruption, the program can be continued from any point.- The tracing of the program steps becomes considerably easier, since the absolute coordinates specify the

current position of the tool.- Any changes in individual dimensions of the workpiece do not influence the following blocks in the program.

3.4 Workpiece contours in the coordinate system (turning)

Actual position: X40 Z0

G90means

GOTO

GOTOpositionX50 Z-40

GOTOpositionZ1

Input

X50 Z-40

Input

Z1

Page 27: Info Base Englisch

25

3.4.2 Incremental dimensions G91 Incremental dimensions always refer to the current tool position.

Even if programming with incremental dimensions has certain disadvantages (sequential errors), it is not posible to do without it. This kind of programming is used preferably if

- parts of the contour on a workpiece are to be repeated;- inside calmers are indicated on a drawing.However, it is not absolutely necessary to use only absolute dimensions or only incremental dimensions in a program, since with the recent control systems, it is possible to change between absolute dimensions G90 and incremental dimensions G91 within the program.

Actual position: X40 Z0

G91means

BY

Go BY

X5 mm in the + directionZ40 mm in the - direction

Go BY

Z41 mm in the + direction

Input

X5 Z-40CAUTION:Radius value

Input

Z41

Page 28: Info Base Englisch

26

3.4.3 Geometry exercises with regard to G1 in absolute dimensions

Exercise 1

Exercise 2

G1 = linear interpolationG90

N G X ZN1N2N3N4N5

Starting position: X Z

N G X ZN1

N2

N3

N4

N5

N6

N7

N8

N9

Starting position: X Z

Page 29: Info Base Englisch

27

3.4.4 Geometry exercises with regard to G1 in incremental dimensions

Exercise 1

Exercise 2

G1 = linear interpolationG91

N G X ZN1 G91N2N3N4N5N6N7 G90

Starting position: X Z

N G X ZN1 G91N2

N3

N4

N5

N6

N7

N8

N9

N10

N11 G90

Starting position: X Z

Page 30: Info Base Englisch

28

3.4.5 Circular interpolation G2 / G3Arcs are programmed using the functions G02 and G03.

Since the coordinates X and Z are already used for the circle end point, the "auxiliary coordinates" I and J are used to program the circle center point.

Please note:- The coordinates of the circle center points X and Z are programmed in absolute dimensions.- The auxiliary coordinates I and J of the circle center point are in most cases programmed in incremental

dimensions. In this case, they refer to the starting point of the arc.Important note: With some control systems, the circle center point can also be programmed in absolute coordinates. Instead of the center point coordinates, with some control systems, it is also possible to specify the circle radius. This will facilitate the programming (e.g. SINUMERIK 810D/840D).

TurningCW

G02CCW

G03

Direction of movement

End point coordinates of the arc (absolute)

Center point coordinates I belongs to XK belongs to Z(in most cases incremental)

Direction of movement

Page 31: Info Base Englisch

29

To determine the lengths for I and K, draw an arrow from the circle starting point A to the circle center point M.

Two cases are distinguished:

1. A -> M is paraxial to X or Z:In this case, one of the auxiliary coordinates has the value zero.

2. A -> M is not paraxial to X or Z:In this case, the arrow AM must be divided into a horizontal and a vertical direction.

A -> Mparaxial

Sign: +

Block format

Tool movement

Sign: -

Block format

A -> MNOTparaxial

Block format

Page 32: Info Base Englisch

30

3.4.6 Geometry exercises with regard to G2 and G3

Program the appropriate blocks for the polylines shown in the diagram below.

Exercise 1

Exercise 2

G2/G3 = circular interpolationG90

N G X Z I KN1N2N3N4N5N6N7N8

Starting position: X Z

N G X Z I KN1N2N3N4N5N6N7

Starting position: X Z

Page 33: Info Base Englisch

31

Exercise 3

N G X Z I KN1N2N3N4N5N6N7N8N9N10

Starting position: X Z

Page 34: Info Base Englisch

32

4.1.1 Program structure to DIN 66025The basis used to manufacture a workpiece is the technical drawing. The programmer has to "presimulate" the whole sequence of operations theoretically and enter an appropriate command (information) into the machine for each and every job or activity, even for the smallest and apparently secondary job. With numerically controlled machine tools, these commands are entered in the control system in coded form (code = composition of abbreviations). This ordered sequence of commands constitutes the program. Acc. to DIN 66257, it is called part program. In other words: The part program describes the sequence of the machining process.

Acc. to DIN 66025, a part program consists of

- the start-of-program character- a sequence of blocks and- the program end.The start-of-program character (%) precedes the first block.

4.1.1.1 Block structureA block consists of individual words that can contain geometrical, technological or program-technical information. Acc. to DIN 66025, the words of a block must be arranged in a certain order:

1. Word for the block number (N word)2. Word for the G function (G word)

3. Words for the coordination (X, Y, Z...)

4. Words for the interpolation parameters (I, J, K...)5. Word for the feed (F word)

6. Word for the spindle speed (S word) / when turning also for the cutting rate

7. Word for the tool (T word)8. Word for the miscellaneous function (M word)

The first word of a block is the block number. Each block number may only be used once; they can, however, be arranged in any order. The program is executed in the order as the blocks were entered (input-oriented). This is advantageous when adding blocks.

4.1.1.2 Word structureA word consists of an address letter and a sequence of digits with or without sign. The address letters have a certain fixed meaning acc. to DIN 66025.

4 Programming

4.1 Program structure

Example:

Program-technical commands

Geometrical commands

Technological commands

1 2 3

Page 35: Info Base Englisch

33

The address letters F, S and T have a special meaning; these words contain technological instructions.

F:The feed is entered with the address letter F (feed). The sequence of digits in the word for the feed are numbers whose meaning and unit are defined by a G function.When turning, in most cases, the feed is entered in mm per revolution (G95). The specification F0.1 means a feedrate of 0.1 mm per revolution. When milling, the feedrate is usually programmed in mm/min (G94). In this case, F100 corresponds to a feedrate of 100 mm/min.The appropriate G function need not be contained in the program, since it is often the default condition after turning on.

Spindle speed / cutting rate S:The spindle speed or a constant cutting rate are programmed with the address letter S (spindle speed). The meaning and unit of the sequence of digits in the word for the spindle speed are defined by a G function.When turning, in most cases, a constant cutting rate is programmed in m/min (G96), and when milling, the spindle speed is specified in min-1 (G97).The appropriate G function need not be contained in the program, since it is often the default condition after turning on.Tool call T:The tool is called with the address letter T (tool) and a key number (e.g. T1). The key number determines the tool selection and (if applicable) the selection of the tool offset memory.

Letter MeaningABCDEFGHIJKLMNOPQRSTUVWXYZ

Rotation around the X axisRotation around the Y axisRotation around the Z axisTool offset memory (or free)Second feed (or free)FeedG functionfreeInterpolation parameter or thread pitch parallel to the X axisInterpolation parameter or thread pitch parallel to the Y axisInterpolation parameter or thread pitch parallel to the Z axisfreeMiscellaneous functionBlock no.freeThird movement parallel to the X axisThird movement parallel to the Y axisThird movement parallel to the Z axisSpindle speedTool no.Second movement parallel to the X axisSecond movement parallel to the Y axisSecond movement parallel to the Z axisMovement in the direction of the X axisMovement in the direction of the Y axisMovement in the direction of the Z axis

Page 36: Info Base Englisch

34

4.1.1.3 G functionsThe G functions (G = geometric), together with the words for the coordinates, define mainly the geometric part of the program.

DIN 66025 differentiates 3 types of G functions:

1. Stored G functions (e.g. G0 = rapid traverse rate)2. Non-modal G functions (e.g. G4 = dwell time)

3. Free G functions

The stored G functions are stored in the control system and remain effective until they are overwritten or canceled (i.e. reset to their initial position) by another G function of the same group. For example, G2 will overwrite G1, or G40 will cancel G41.The non-modal G functions are only effective in the block where they are programmed.

The free G functions are divided into those for which standard definitions are still possible in the future (called "preliminarily free") and those that will also not be occupied by the standard even in the future (called "permanently free"). This explains the differences in the G functions (e.g. with cycles) of the control systems of different manufacturers.

The G functions defined to DIN constitute the basis of the CNC programming, while the freely available commands have promoted the development of individually different control systems by the various manufac-turers. This, however, requires increased attention even from the qualified worker when operating different controls.

G function Meaning Stored Non-modalG0 Point-to-point control response XG1 Linear interpolation XG2 Circular interpolation arc CW XG3 Circular interpolation arc CCW XG4 Dwell time, duration predetermined X

G17 Plane selection XY XG18 Plane selection ZX XG19 Plane selection YZ XG33 Thread cutting, constant pitch XG40 Cancelation of tool compensation XG41 Cutter path compensation, left XG42 Cutter path compensation, right XG43 Tool compensation, positive XG44 Tool compensation, negative XG70 Dimensions in inches XG71 Dimensions in mm XG74 Reference point approach XG90 Absolute dimensions XG91 Incremental dimensions XG92 Set memory XG94 Specification of the feedrate in mm/min XG95 Specification of the feed in mm/rev. XG96 Constant cutting rate XG97 Specification of the spindle speed in 1/min X

Page 37: Info Base Englisch

35

4.1.1.4 Miscellaneous functionsThe miscellaneous functions contain mainly technological information insofar as this is not programmed in the appropriate addresses with the address letters F, S and T.

Acc. to DIN 66025, the miscellaneous functions are subdivided by:

1. Moment of effect1.1 The miscellaneous function will come into effect together with the remaining block information

(e.g. M3 = spindle rotation CW).1.2 The miscellaneous function will come into effect after the remaining block information has been executed

(e.g. M9 = coolant (lubricant) OFF)

2. Duration of the effect2.1 Miscellaneous functions that are stored and remain effective until they are overwritten by a miscellaneous

function of the same kind (e.g. M3).

2.2 Miscellaneous functions that are only effective in the block in which they are programmed (e.g. M0 = programmed stop).

3. Miscellaneous functions with no or no fixed meanings (e.g. M12 = preliminarily freely available). These miscellaneous functions remain freely available for the control manufacturer for the time being and can be used for special functions.

Miscella-neous

function

Meaning immediately effective

effective at the end of the block

stored effec-tive

non-modal

M0 Programmed stop X XM1 Optional stop X XM2 End of program X XM3 Spindle CW X XM4 Spindle CCW X XM5 Spindle stop X XM6 Tool change XM7 Coolant (lubricant) no. 2 ON X XM8 Coolant (lubricant) no. 1 ON X XM9 Coolant (lubricant) OFF X XM13 Spindle CW and coolant (lubricant) ON X XM14 Spindle CCW and coolant (lubricant) ON X XM30 End of program with reset X X

Page 38: Info Base Englisch

36

4.1.2 Overview of the most important G and M functions

Point-to-point control responseApproach to the programmed point at the maximum velocity (e.g. rapid traverse rate). The feedrate previously programmed will be ignored, but not cleared. The movements in the axis directions can be carried out without any functional interrelation.

Linear interpolationThe target point on a straight line is approached with the programmed feed.

Circular interpolation arc CWThe tool moves to the target point along a circular path CW with the programmed feed.

Circular interpolation arc CCWThe tool moves to the target point along a circular path CCW with the programmed feed.

The following applies acc. to DIN:The specifications CW or CCW apply when viewing the path plane in the negative direction of the coordinate axis standing perpendicularly on this plane.Spindle CWStarts the spindle rotation; with CW rotation, a right-handed screw moves into the workpiece.

Spindle CCWStarts the spindle rotation; with CCW rotation, a right-handed screw moves off the workpiece.

End of program with resetStops the machine after the last program block has been executed, including the coolant (lubricant) supply feature and the spindle speed; resets the control system and/or the machine tool to its/their initial position.

Milling Turning

Page 39: Info Base Englisch

37

4.2.1 Milling4.2.1.1 Programming example with regard to G0 and G1

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 F80 S696 T3 M3N2 G0 X0 Y-10N3 Z-2 M8N4 G1 Y70N5 X100N6 Y0N7 X-10N8 G0 Z100 M9N9 X150 Y-50

N10 F80 S1392 T4 M6N11 G0 X19 Y16N12 Z1 M8N13 G1 Z-2N14 Y54N15 Z1N16 G0 X32N17 G1 Z-2N18 Y16N19 Z1N20 G0 X50N21 G1 Z-2N22 Y54N23 Y35N24 X32N25 Z1N26 G0 X63 Y16N27 G1 Z-2N28 Y54N29 Z1N30 G0 X82 Y54N31 G1 Z-2N32 X63 Y35N33 X82 Y16N34 G0 Z100 M9N35 X150 Y150N36 M30

4.2 Programming examples and programming exercises

Note: In the sample program, the cutter center path is programmed for the tools T3 and T4 each.

Material:Tools:

Werkzeugwechselpunkt:

Milling depth = 2 mm:

Page 40: Info Base Englisch

38

4.2.1.2 Programming exercise with regard to G0, G1 und G3Create the program for the cutter center path for the workpiece shown below.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 T2N2 G0 X0 Y-12N3 Z-2,5N4 G1 Y105N5N6N7N8N9

N10 T4N11 G0 X62,321 Y75N12 Z1N13 G1 Z-2,5N14N15N16N17N18N19N20N21N22N23N24N25N26N27N28N29N30N31

Material:

Tools:

Tool change point:

Milling depth = 2,5

Page 41: Info Base Englisch

39

4.2.1.3 Cutter radius path compensation (G41 / G42 - G40)Thanks to the cutter radius path compensation, it is possible to program the workpiece dimensions.

The workpiece dimensions are programmed, and the control system will calculate the cutter center path using the appropriate radius value R.To enable the control system to calculate the cutter center path from the program data and the tool magazine, it must be told where the tool is to mill.

To this end, 3 G functions are provided:

Using the cutter radius path compensation, it is possible to use different tools for the same workpiece contour. The called tool will follow the contour along a tool path offset by the tool radius (=equidistant).

Please note:- The command (selection) of the G41 or G42 function must always be provided before approaching the contour

and is only effective if the tool traverses with feed.- The command "Cancel G41 or G42 by G40" must always be provided outside the contour.- When using G40, G41 and G42, the distance of the cutter to the workpiece should be at least

1 x cutter radius.

Tool magazine:

G41 = cutter radius path compensation left of the milling contourG42 = cutter radius path compensation right of the milling contour

G40 = cancelation of the cutter radius path compensation

Direction of movement = viewing direction

Memory aid:

G41 = left

Tool center point path

Page 42: Info Base Englisch

40

4.2.1.4 Programming example with regard to the cutter radius path compensation

Program structureN1 F80 S477 T2 M3 Feed, speed, tool T2, speed ONN2

N3

G0 X112 Y-2

Z-5

Approach to the insertion pointThe movement to the manufactu-ring depth is programmed prior to the command of the cutter radius path compensation.

N4 G41 Call of the cutter radius path com-pensation

N5 G1 X95 Y8 M8 Approach to the first contour point, coolant lubricant ON

N6N7N8N9

N10N11N12

G2

G1G3G1

X32X5 Y15

Y52X15 Y62 I10 J0

X83X95 Y50 I12 J0

Y-12

Programming of the workpiece con-tour

N13 G40 Cancelation of the cutter radius path compensation

N14N15

G0 Z100 M9X150 Y150

Leaving the workpiece contour, coolant lubricant OFF

N16 M30 End of program

Material:Tools:

Insertion point

A = contour starting point

E = contour end point

Page 43: Info Base Englisch

41

4.2.1.5 Programming exercise 1: Cutter radius path compensationCreate the milling program with cutter radius path compensation for the workpiece shown below.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 T2N2 G0 X112 Y-5N3 Z-5 M08N4 G41N5N7N8N9

N10N11N12N13N14N15 G40N16 G0 Z100 M09N17 X150 Y150N18

Material:Tools:

A = contour starting point

E = contour end point

Page 44: Info Base Englisch

42

4.2.1.6 Programming exercise 2: Cutter radius path compensationCreate the milling program with cutter radius path compensation for the workpiece shown below.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 T2N2 G0 X112 Y-5N3N4 G41N5N7N8N9

N10N11N12N13N14 G40N15N16N17

Material:Tools:

A = contour starting point

E = contour end point

Page 45: Info Base Englisch

43

4.2.2 Turning4.2.2.1 Programming example with regard to G0 and G1*When roughing, the workpiece is to be rough-turned in the diameter up to 0.1 mm above nominal dimension. For the overall length, a finishing allowance of 0.1 mm must be provided, and for all the other lengths an allowance of 0.2 mm.

* In practice, the program for this workpiece would be considerably shorter (use of cycles). The tool paths, however, should be programmed separately.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R M

Tool change point approach

N1 G0 X150 Z250N2 G92 S2500

FacingN3 G96 F0,4 S160 T101 M4N4 G0 X52 Z1 M8N5 G1 X-1,6N6 Z2N7 G0 X52N8 G1 Z0,1N9 X-1,6

N10 Z1N11 G0 X46

RoughingN12 G1 Z-74,8N13 X51N14 G0 Z1N15 X41N16 G1 Z-49,8N17 X47N18 G0 X150 Z50 M9

FinishingN19 T303 M0N20 G96 F0,15 S180 M4N21 G0 X-0,8 Z1 M8N22 G1 Z0N23 X40N24 Z-50N25 X45N26 Z-75N27 X52N28 G0 X150 Z50 M9N29 M30

Material:Tools:Roughing

Finishing

Page 46: Info Base Englisch

44

4.2.2.2 Programming exercise with regard to G0 and G1Create the program for facing, roughing and finishing for the workpiece shown below. When roughing, the workpiece is to be rough-turned in the diameter up to 1.0 mm above nominal dimension. For the overall length, a finishing allowance of 1.0 mm must be provided, and for all the other lengths an allowance of 0.2 mm.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 G0 X150 Z50N2 G92 S2500N3 G96 T101N4 G0 X62 Z1 M8N5 G1N6N7N8N9

N10N11 G0 X56N12 G1 Z-69,8N13N14N15N16N17N18 G0 X150 Z50N19 T303N20 G96N21N22N23N24N25N26N27N28N29

Material::Roughing

Finishing

Page 47: Info Base Englisch

45

4.2.2.3 Tool nose radius compensation (G41 / G42 - G40)To increase the life time and to improve the surface quality of the workpiece, the cutting edge of a turning tool is chamfered. The tool nose radii range between 0.2 and 2 mm.

The tool nose radius influences the created contours as follows:

With longitudinal and face turning, the programmed contour and the created contour are identical. No geometrical error will result.With taper turning and radius turning, the created contour differs from the programmed contour due to the chamfered tool nose. Whereas with taper turning, the geometrical error is always the same, with radius turning, a geometrical error results whose size ranges between zero and a maximum value. The size of the geometrical error depends on the tool nose radius.

To avoid any geometrical errors, the tool position must be corrected such that the programmed contour results also when taking into account the real tool nose.The correction must be carried out such that the tool nose center is always at the same distance from the programmed contour (equidistant). The calculation of this path is carried out by the computer of the control system. To this end, the computer must be told how the tool moves with regard to the programmed contour.

To this aim, 3 G functions are provided:

The cutter radius path compensation is canceled by G40. After this command, the control system will refer the traversing paths to the theoretical tool nose again.

Please note:- The G41 or G42 function must always be selected before the contour is reached.- The command "Cancel G41 or G42 by G40" must always be carried out outside the contour.- When using the commands G40, G41 and G42, the distance of the turning tool to the contour must be at least

twice the tool nose radius.- The F41 or G42 function must be canceled by calling G40 both prior to each tool change and with thread

cutting.

EquidistantEquidistant

Correctedtool position

Correctedtool position

G41 = cutter radius path compensation, leftG42 = cutter radius path compensation, rightG40 = cancelation of the cutter radius path compensation

Page 48: Info Base Englisch

46

4.2.2.4 Programming exercise with regard to the tool nose radius compensationWhen manufacturing turned parts, the exact workpiece dimensions are achieved by the finishing operation. The TNRC is therefore also only activated when finishing, since an allowance is used both in the diameter and in the turning length when rough-turning.

Create the finishing program with TNRC for the rough-turned workpiece. The finishing tool (T303) has a tool nose radius of R = 0.4 mm

Program structureN1 G0 X150 Z50 Approach to the tool change pointN2 G0 T303 M0 Call of the finishing tool for the pro-

grammed stop

N3 G96 F0,15 S180 M4 Feed and cutting rate for finishingN4N5

G42G0 X-0,8 Z1 M8

Call of the TNRC Approach to the contour with safety clearance, coolant lubricant ON

N6N7N8N9N10N11N12N13

G1

G3G1

Z0X26X30 Z-2

Z-30X39X45 Z-33 I0 K-3

Z-60X62 Z-71,333

Programming of the workpiece contour

N14 G40 Cancellation of the TNRCN15 G0 X150 Z150 M9 Approach to the tool change point,

coolant lubricant OFFN16 M30 End of program

Material:

End

poin

tdi

amet

er

Page 49: Info Base Englisch

47

4.2.2.5 Programming exercise 1: Tool nose radius compensationCreate the finishing program with TNRC for the rough-turned workpiece. The finishing tool (T303) has a tool nose radius of R = 0.4 mm. The cutting rate is 180m/min. To achieve the mean surface roughness Rz= 6.3 µm, the feed must be programmed with F = 0.07 mm.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 G0 X150 Z50 M9N2 T303 M0N3 G96N4 G42N5 G0 X-0,8 Z1 M8N6N7N8N9

N10N11N12N13N14N15N16 G40N17N18

Material:

End

poin

tdi

amet

er

Page 50: Info Base Englisch

48

4.2.2.6 Programming exercise 2: Tool nose radius compensationCreate the program (facing, roughing, finishing) with TNRC for the workpiece shown below.

For the technological data, please refer to the previous exercises.

Block No. G function Coordinates Interpolation parameters Feed Speed Tool Misc. functions for cycles and dwell time

N G X Y Z I J K F S T D H R MN1 G0 X150 Z50N2 G92 S2500N3 G96 T101N4 G0 X62 Z1 M8N5N6N7N8N9

N10N11 G0 X56N12N13N14N15N16N17N18N19N20N21N22 G0 X150 Z50 M9N23 T303N24 G96N25 G42N26N27N28N29N30N31N32N33N34N35 G40N36N37

Material:

End

poin

tdi

amet

er

Page 51: Info Base Englisch

49

To describe the distances to be traversed by the tools in a CNC program, the coordinates of the workpiece contour are specified. These coordinates should where possible be determined unambiguously by a CNC-oriented dimensioning of the workshop drawing. Workshop drawings, however, are often not dimensioned with CNC orientation, meaning that mathematical basic knowledge is required to calculate contour points.Using the theorem of Pythagoras, the third side in a right-angled triangle can be calculated from two known sides. In a right-angled triangle, the two short sides that constitute the right angle are called "legs of the right angle" or "small sides" (a and b); the long side that lies opposite to the right angle is called hypotenuse (c).

By rearranging the equation a² + b² = c², the third side can be calculated from two given sides of a right-angled triangle.

Please complete the Table:

Determine the coordinate values for the points P1 and P2 for the turned part shown below. Since the circle end point deviations with the control systems may only amount to approx. 10 ... 60 µm, the calculation results must be specified with three decimals.

Calculation example:

5 Mathematical Fundamentals

5.1 The theorem of Pythagoras

Theorem of PythagorasIn a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

a² + b² = c²

hypotenuse

Result:

(read "delta Z") means a part or a sublength of Z

Page 52: Info Base Englisch

50

Using the angle functions sine, cosine and tangens, sides and angles of right-angled triangles can be calculated - if two sides are known- if one side and an angle (a or b) are known.

When performing any arithmetic operations with angle functions, a distinction should be made between the opposite side and the adjacent side, as far as the small sides are concerned. The opposite side is opposite to the viewed angle, and the adjacent side is adjacent to the viewed angle.

The side conditions of the individual angle functions are shown in the diagram below.

Calculation example:For the turned part shown in the drawing below, calculate the coordinate z for the point P1.

Please note:

- The X coordinates of turned parts always refer to the diameter.- In the case of diameters with tolerance specifications, always start from the centerline.

5.2 Angle functions

in relation to angle in relation to angle

adjacent side

oppositesid

e

adjacent side

opposite side

hypotenuse hypotenuse

hypotenuse

hypotenuse

adjacent side

hypotenuse

hypotenuseadjacent side adjacent side

adjacent sideopposite side

opposite side

opposite side

opposite side

Size of fit Dimension

Page 53: Info Base Englisch

51

5.3.1 Calculating coordinates in milled partsCalculate the missing coordinates of the points P1 ... Pn for the milled and turned parts shown below.

Exercise 1

Exercise 2

Exercise 3

5.3 Exercises for calculating coordinates

Page 54: Info Base Englisch

52

5.3.2 Calculating coordinates in turned partsExercise 1

Exercise 2

Exercise 3

End

poin

tdi

amet

er

Sizes of fit Dimension

End

poin

tdi

amet

er

* For the dimensions, see

Page 55: Info Base Englisch

53

3.3.3, page 18Exercise 1Starting point: X40 Y30

Exercise 2Starting point:X30 Y40

3.3.4, page 19Exercise 1Starting point: X40 Y30

Exercise 2Starting point: X30 Y40

N1 G1 Y120N2 G1 X210N3 G1 Y30N4 G1 X160N5 G1 Y70N6 G1 X90N7 G1 Y30N8 G1 X40

N1 G1 Y110N2 G1 X60 Y130N3 G1 X80N4 G1 Y70N5 G1 X130N6 G1 Y130N7 G1 X180N8 G1 X220 Y110N9 G1 Y60N10 G1 X200 Y40N11 G1 X30

N1 G91N2 G1 Y90N3 G1 X170N4 G1 Y-90N5 G1 X-50N6 G1 Y40N7 G1 X-70N8 G1 Y-40N9 G1 X-50N10 G90

N1 G91N2 G1 Y70N3 G1 X30 Y20N4 G1 X20N5 G1 Y-60N6 G1 X50N7 G1 Y60N8 G1 X50N9 G1 X40 Y-20N10 G1 Y-50N11 G1 X-20 Y-20

6 Solutions

Page 56: Info Base Englisch

54

Exercise 2

3.3.6, page 22Exercise 1Starting point: X20 Y20

Exercise 2Starting point: X40 Y40

3.4.3, page 26Exercise 1Starting point: X50 Z1

Exercise 2Starting point: X25 Z1

N12 G1 X-170N13 G90

N1 G3 X60 Y60 I0 J40N2 G2 X90 Y90 I30 J0N3 G3 X110 Y110 I0 J20N4 G2 X170 Y110 I30 J0N5 G3 X210 Y70 I40 J0N6 G2 X230 Y50 I0 J-20

N1 G1 Y95N2 G2 X65 Y120 I25 J0N3 G1 X195N4 G2 X220 Y95 I0 J-25N5 G1 Y40N6 G3 X205 Y25 I0 J-15N7 G1 X160N8 G3 X90 Y25 I-35 J0N9 G1 X55N10 G3 X40 Y40 I-15 J0

N1 G1 Z-25N2 G1 X75N3 G1 X100 Z-75N4 G1 Z-100N5 G1 X101

N1 G1 Z-12.5N2 G1 X37.5 Z-25N3 G1 X50N4 G1 Z-50N5 G1 X75 Z-62.5N6 G1 Z-75N7 G1 X100 Z-87.5N8 G1 Z-100N9 G1 X101

Page 57: Info Base Englisch

55

3.4.4, page 27Exercise 1Starting point: X50 Z1

Exercise 2Starting point: X25 Z1

3.4.6, page 30Exercise 1Starting point: X25 Z1

Exercise 2Starting point: X25 Z1

Exercise 3, page 31Starting point: X0 Z1

N1 G91N2 G1 Z-26N3 G1 X12.5N4 G1 X12.5 Z-50N5 G1 Z-25N6 G1 X0.5N7 G90

N1 G91N2 G1 Z-13.5N3 G1 X6.25 Z-12.5N4 G1 X6.25N5 G1 Z-25N6 G1 X12.5 Z-12.5N7 G1 Z-12.5N8 G1 X12.5 Z-12.5N9 G1 Z-12.5N10 G1 X0.5N11 G90

N1 G1 Z-25N2 G2 X50 Z-37.5 I12.5 K0N3 G1 Z-50N4 G2 X75 Z-62.5 I12.5 K0N5 G1 Z-75N6 G3 X100 Z-87.5 I0 K-12.5N7 G1 Z-100N8 G1 X101

N1 G1 Z0N2 G2 X25 Z-25 I12.5 K-12.5N3 G1 Z-50N4 G2 X50 Z-62.5 I12.5 K0N5 G3 X100 Z-87.5 I0 K-25N6 G1 Z-100N7 G1 X101

N1 G1 Z0N2 G3 X24 Z-12 I0 K-12N3 G1 Z-22N4 G2 X44 Z-32 I10 K0N5 G1 Z-45N6 G2 X56 Z-55.392 I12 K0

Page 58: Info Base Englisch

56

Exercise 3, page 31

4.2.1.2, page 38

4.2.1.5, page 41

N7 G1 X85 Z-63.764N8 G3 X100 Z-76.754 I-7.5 K-12.990N9 G1 Z-85N10 G1 X102

N1 F80 S477 T2 M3N2 G0 X0 Y-12N3 Z-2.5 M8N4 G1 Y105N5 X190N6 Y0N7 X-12N8 G0 Z100 M9N9 X150 Y-50N10 F80 S1392 T4 M6N11 G0 X62.321 Y75N12 Z1 M8N13 G1 Z-2.5N14 G3 X25 Y65 I-17.321 J-10N15 G1 Y40N16 G3 X62.321 Y30 I20 J0N17 G1 Z1N18 G0 X75 Y20N19 G1 Z-2.5N20 Y85N21 X115 Y20N22 Y85N23 Z1N24 G0 X167.321 Y75N25 G1 Z-2.5N26 G3 X130 Y65 I-17.321 J-10N27 G1 Z-2.5N28 G3 X167.321 Y30 I20 J0N29 G0 Z100 M9N30 X150 Y150N31 M30

N1 F80 S477 T2 M3N2 G0 X112 Y-5N3 Z-5 M8N4 G41N5 G1 X95 Y5N6 X17.5N7 G3 X5 Y17.5 I-12.5 J0N8 G1 Y52N9 X60 Y65N10 X82.5N11 G2 X95 Y52.5 I0 J-12.5N12 G1 Y17.5N13 X82.5 Y5N14 X73 Y-5N15 G40N16 G0 Z100 M9N17 X150 Y150N18 M30

Page 59: Info Base Englisch

57

4.2.1.6, page 42

4.2.2.2, page 44

N1 F80 S955 T2 M3N2 G0 X112 Y5N3 Z-5 M8N4 G41N5 G1 X90 Y15N6 X47 Y11N7 X15N8 G2 X15 Y59 I32 J24N9 G1 X47N10 X90 Y55N11 Y50N12 G3 X90 Y20 I25 J-25N13 G1 Y-12N14 G40N15 G0 Z100 M9N16 X150 Y150N17 M30

N1 G0 X150 Z50N2 G92 S2500N3 G96 F0.4 S160 T101 M4N4 G0 X62 Z1 M8N5 G1 X-1.6N6 Z2N7 G0 X62N8 G1 Z0.1N9 X-1.6N10 Z1N11 G0 X56N12 G1 Z-69.8N13 X61N14 G0 Z1N15 X51N16 G1 Z-39.8N17 X57N18 G0 X150 Z50N19 T303 M0N20 G96 F0.15 S180 M4N21 G0 X-0.8 Z1 M8N22 G1 Z0N23 X50N24 Z-40N25 X55N26 Z-70N27 X62N28 G0 X150 Z50 M9N29 M30

Page 60: Info Base Englisch

58

4.2.2.5, page 47

4.2.2.6, page 48

N1 G0 X150 Z50 M9N2 T303 M0N3 G96 F0.07 S180 M4N4 G42N5 G0 X-0.8 Z1 M8N6 G1 Z0N7 X27N8 X30 Z-1.5N9 Z-25N10 X36N11 G3 X42 Z-28 I0 K-3N12 G1 Z-40N13 X57 Z-50N14 Z-71N15 X67 Z-76N16 G40N17 G0 X150 Z50 M9N18 M30

N1 G0 X150 Z50N2 G92 S2500N3 G96 F0.4 S160 T101 M4N4 G0 X62 Z1 M8N5 G1 X-1.6N6 Z2N7 G0 X62N8 G1 Z0.1N9 X-1.6N10 Z1N11 G0 X56N12 G1 Z-69.8N13 X60 Z-71.8N14 G0 Z1N15 X51N16 G1 Z-29.8N17 X57N18 G0 Z1N19 X46N20 G1 Z-29.8N21 X57N22 G0 X150 Z50 M9N23 T303 M0N24 G96 F0.15 S180 M4N25 G42N26 G0 X-0.8 Z1 M8N27 G1 Z0N28 X41N29 X45 Z-2N30 Z-30N31 X49N32 G3 X55 Z-33 I0 K-3N33 G1 Z-70N34 X62 Z-72.8N35 G40N36 G0 X150 Z50 M9N37 M30

Page 61: Info Base Englisch

59

5.3.1, page 51Exercise 1

Exercise 2

Exercise 3

5.3.2, page 52Exercise 1

Exercise 2

Exercise 3

P1 P2 P3 P4 P5X 33,120 26,241 13,741Y 32,500 23,264 46,736

P1 P2 P3 P4 P5 P6X 15,441 23,114 76,886 84,559 60,000 40,000Y -------- -------- -------- -------- 17,679 17,679

P1 P2 P3 P4X -------- 18,637 81,363 --------Y 37,953 47,370 47,370 37,953

P1 P2 P3 P4X 19,800 39,975 57,963 --------Z -2,622 -34,179 -------- -72,232

P1 P2 P3X 19,970 31,410 49,963Z -2,006 -31,025 -66,466

P1 P2 P3 P4X 39,900 46,499 49,963 --------Z -41,298 -------- -66,252 -77,839

Page 62: Info Base Englisch

60

Page 63: Info Base Englisch

60

AAbsolute dimensions, milling ........................... 16Absolute dimensions, turning .......................... 24Absolute directe position measurement ............. 9Angle functions .............................................. 50Axis single drives ............................................. 4

CCircular interpolation ............................... 20, 28Circular interpolation, milling ........................... 20Circular interpolation, turning .......................... 28CNC machines ........................................... 4, 5Code ............................................................. 32Control panel .............................................. 4, 5Control types ................................................... 6Cosine .......................................................... 50Cutter center path .......................................... 37Cutter radius path compensation (G41 / G42 - G40) .......................................... 39Cutting rate S .................................. 10, 12, 33

DDefraction grating ............................................. 8DIN 66025 ..................................................... 32DIN 66217 ..................................................... 14

EEquidistant .................................................... 45

FFeed drive ....................................................... 4Feed F .......................................................... 13

GG functions .................................................... 34

HHard metal ..................................................... 10Horizontal milling machine .............................. 14Hypotenuse ................................................... 50

7 IndexIIncremental dimensions, milling 17Incremental dimensions, turning 25Incremental direct position measurement 8Incremental indirect position measurement 9Incremental shaft-angle encoder 5

LLeadscrew 4Linear interpolation 22, 26, 30Linear measuring system 5Linear path control 6

MMachine zero 15Machine zero M 15Main drive 4, 5Measuring systems 8Miscellaneous functions 35

OOpposite side 50

PPoint-to-point control 6Program structure 32Program structure to DIN 66025 32Pythagoras 49

RReference point R 15

SScan plate 8Shaft encoder (resolver) 5Sine 50Slide 4Speeds 12Spindle speed S 33

Page 64: Info Base Englisch

61

TTable book .................................................... 11Tangens ....................................................... 50Technological commands ............................... 10Technological data .......................... 10, 12, 13Tool call T ..................................................... 33Tool nose radius compensation (SRK) ............ 45Toolholder reference point T .......................... 15Turning tools ................................................. 12

VVertical milling machine ................................. 14

WWorkpiece zero ............................................. 15Workpiece zero W ......................................... 15

XX axis ........................................................... 14

G functionsG0 Point-to-point control responseG1 Linear interpolationG2 Circular interpolation arc CWG3 Circular interpolation CCWG4 Dwell time, predetermined in timeG17 Plane selection XYG18 Plane selection ZXG19 Plane selection YZG33 Thread cutting, constant pitchG40 Cancellation of tool compensationG41 Tool radius path compensation, leftG42 Tool radius path compensation, rightG43 Tool compensation, positiveG44 Tool compensation, negativeG70 Dimensions in inchesG71 Dimensions in mmG74 Reference point approachG90 Absolute dimensionsG91 Incremental dimensionsG92 Set memoryG94 Specification of the feedrate in mm/minG95 Specification of the feed in mm/rev.G96 Constant cutting rateG97 Specification of the spindle speed in 1/min

M functionsM0 Programmed stop M1 Optional stopM2 End of programM3 Spindle CWM4 Spindle CCWM5 Spindle stopM6 Tool changeM7 Coolant (lubricant) no. 2 ONM8 Coolant (lubricant) no. 1 ONM9 Coolant (lubricant) OFFM13 Spindle CW and

coolant (lubricant) ONM14 Spindle CCW and

coolant (lubricant) ONM30 End of program with reset

Page 65: Info Base Englisch

SPINNER Werkzeugmaschinenfabrik GmbHRudolf-Diesel-Ring 24

D-82054 Sauerlach / Germany

Tel: 0049/(0)8104/803-60Fax: 0049/(0)8104/803-19

www.spinner-wzm.de e-mail:[email protected]

SPINNER-China

Beijing Office • Room 109 Building A

No. A10, HuixinlLi, Chaoyang • 100029 BEIJING, P.R. of China

Tel. 0086/10/64951927, Fax 0086/10/64940906

SPINNER-India

Shri-Raj Heritage, Flat No 203 • Bhusari Colony, Kothrud • 411029 Pune, India

Tel. 0091/20/5282512, Fax 0091/20/5282512

SPINNER Takim Tezgahlari

Sanayi ve Ticaret Limited Sirketi

Kösklü Cesme Mahaillesi 552/6 No: 1 • Gebze - Turkey

Tel. 0090/262/6441432, Fax 0090/262/6441436

SPINNER AG

Rorschacherstraße 108a • CH-9424 Rheineck, Switzerland

Tel. 0041/71/8800590, Fax 0041/71/8800592

EUMA-SPINNER CORPORATION

No. 35, Lane 343, Sec. 1, Shen Lin Road • Ta-Ya, Taichung, Taiwan

Tel. 00886/4/2568-2386, Fax 00886/4/2567-3350

SPINNER UK

171 Vanner Road, Witney, Oxfordshire, QX28 1LQ

Tel. 0044/1993/771031, Fax. 0044/1993/771031

SPINNER Italia

Via Pomaro 16, 25064 Gussago (BS) Italien

Tel. 0039/030/2776028, Fax. 0039/030/2776029Publ

icat

ion

No.

609

73, a

s pe

r 09/

01