Milling Programming

download Milling Programming

of 149

Transcript of Milling Programming

  • 8/9/2019 Milling Programming

    1/149

    D. ELECTRONdal 1977 Alta Tecnologiaper la Macchi na Utensi le

    Z32

    CNC

    Programming guide (Milling Machines)

    Read thoroughly before installation

    Contains important information on:programming

    This manual contains information exclusively devoted to the user of D.Electron products to allow a correct usage of delivered

    devices. No part of this manual can be duplicated or delivered to third parties for an usage not corresponding to that indicated.

    All information here contained have been accurately checked to be exact and reliable, but D.Electron doesnt assume any

    responsibility for possible inaccuracies. D.Electron reserves the right to make all modifications necessary to improve the

    performance and reliability of its products.

    D.Electron - Via R. Giuliani 140 - 50141 Firenze ITALY Internet: www.delectron.itTel ++39 - 055 - 416927 Fax ++39 - 055 - 434220 email [email protected]

    Document M323

    C0 31.01.07

  • 8/9/2019 Milling Programming

    2/149

  • 8/9/2019 Milling Programming

    3/149

    CNC Z32 - Programming guide (Milling Machines)

    i

    CONTENTS

    1. INTRODUCTION ........................................................ ........................................................... ................................. 1

    2. BASE PROGRAMMING ..................................................... ........................................................... ....................... 2

    2.1 INTRODUCTION........................................................ ........................................................... ................................. 22.1.1 Machine behavior at reset......................................................... ........................................................... ... 22.1.2 Line number .................................................. ........................................................... ................................. 32.1.3 The standard ISO line...................................................... ........................................................... ............. 32.1.4 Comment lines ........................................................ ........................................................... ....................... 42.1.5 G functions (modals and with stop) ........................................................ .................................................... 4

    1.1. F PARAMETER AND FEED MANAGEMENT (G93 G94 G95) .................................................. ................................. 52.2 S PARAMETER AND SPEED MANAGEMENT (G96 G97) ........................................................ ................................. 52.3 M FUNCTIONS......................................................... ........................................................... ................................. 62.4 AUXILIARY FUNCTIONS MA, MB, MC ............................................................ .................................................... 7

    2.5 END OF PROGRAM AND END OF SUBPROGRAM (M2 G26).............................................................. ....................... 72.6 ORIGIN RECALL FUNCTIONS........................................................ ........................................................... ............. 82.7 T PARAMETER AND TOOL CHANGE ....................................................... ........................................................... . 102.8 TOOL LENGTH AND RADIUS ......................................................... ........................................................... ........... 11

    2.8.1 Tool length and radius modification (DDL DDR).... ........................................................... ..................... 112.9 CANCELLATION AND SUSPENSION OF ORIGINS AND LENGTHS (G53 G54 G45) .................................................. 122.10 WORKING TERN (G25), TOOL AXIS (G43 - G44) AND CONTOURING PLANE ...................................................... . 132.11 MOVEMENT PROGRAMMING (G0 G1 G2 G3) ............................................................ ........................................ 14

    2.11.1 Rapid movement (G0) ..................................................... ........................................................... ........... 142.11.2 Linear interpolation (G1) ........................................................... ........................................................... . 152.11.3 Circular interpolation (G2 G3)............................... ........................................................... ..................... 152.11.4 Helical interpolation (G12 G13) .......................................................... .................................................. 15

    2.12 INCREMENTAL COORDINATES PROGRAMMING (G90 G91).................................................. ............................... 16

    2.13 THREADING AND RIGID TAPPING ........................................................... ........................................................... . 172.13.1 Fixed pitch threading (G33) ...................................................... ........................................................... . 172.13.2 Variable pitch threading (G34, G35) ...................................................... .................................................. 182.13.3 Rigid tapping (G63) .......................................................... ........................................................... ........... 18

    2.14 ROTATION, TRANSLATION, MIRRORING, SCALE FACTOR..................................................... ............................... 202.14.1 Machining rotation (IR JR QR) .................................................... ........................................................... . 202.14.2 Machining translation (DA DB DC)....................................................... .................................................. 202.14.3 Mirroring on the working plane (G56 G55)............................................................ ............................... 212.14.4 Scale factor ................................................... ........................................................... ............................... 212.14.5 Other correction parameters..................................................... ........................................................... . 222.14.6 Typical transformations examples: ......................................................... .................................................. 22

    2.15 G116 MACHINING ON SLOPING PLANES (ROTO-TRANSLATION) ..................................................... ..................... 232.16 OTHER FUNCTIONS ........................................................... ........................................................... ..................... 25

    2.16.1 Dwell (G4 TT..) ....................................................... ........................................................... ..................... 252.16.2 Axes change (G16) .......................................................... ........................................................... ........... 252.16.3 Alive axes management (G28, G29)....................................................... .................................................. 262.16.4 Suspending and resuming Tool change (G38, G39) .................................................. ............................... 272.16.5 Mounted tool reading (G104).................................................... ........................................................... . 272.16.6 Real positions reading (G105) ...................................................... ........................................................... . 272.16.7 Radial programming (G106) ..................................................... ........................................................... . 272.16.8 Diametrical programming (G107) .......................................................... .................................................. 282.16.9 Axis movement with alarm CNxx12 (G119)............ ........................................................... ..................... 282.16.10Working field limits (G123)........................................................ ........................................................... . 28

    3. TOOL RADIUS CORRECTION................................................... ........................................................... ........... 30

    3.1 INCOMPATIBLE PROFILE ERROR ............................................................ .................................................. 31

    3.2 APPROACH TO PROFILE .................................................... ........................................................... ..................... 32

  • 8/9/2019 Milling Programming

    4/149

    CNC Z32 - Programming guide (Milling Machines)

    ii

    3.2.1 G41/G42 circular approach with final positions and slope (G41/G42 X.. Y.. QF..) .............................. 323.2.2 G41 /G42 linear approach without positions (G41/G42) ................................................... .................... 333.2.3 G41 /G42 linear approach with final positions (G41/G42) .......................................................... .......... 33

    3.3 RETRACT FROM PROFILE ................................................... ........................................................... .................... 343.3.1 G40 circular tangent retract (G40 X.. Y..).................................................................................... .......... 34

    3.3.2 G40 retract without positions (G40).................................. ........................................................... .......... 353.4 FEED MANAGEMENT WITH RADIUS CORRECTION (G109V, G109U).................. ................................................. 353.5 NULL OR NEGATIVE RADIUS ......................................................... ........................................................... .......... 363.6 CONNECTING RADIUS ON EXTERNAL EDGES (G109S, G109T) ....................................................... .................... 36

    4. RTCP (ROTATING TOOL CENTRE POINT) .......................................................... ....................................... 37

    4.1 G117 RTCP FOR ROTATING HEADS ..................................................... ........................................................... 374.1.1 Static G117 (G117 KA2) ................................................... ........................................................... .......... 374.1.2 Dynamic G117 (G117 KA1) ....................................................... ........................................................... 394.1.3 G117 usage .................................................... ............................................................ ............................. 394.1.4 Handwheel enable on rotating axes in G117 (G124) ................................................... ............................. 40

    4.2 RTCP FOR TURNTABLES ................................................... ........................................................... .................... 414.2.1 G118 simple ................................................... ............................................................ ............................. 41

    4.2.2 G118 HR1....................................................... ............................................................ ............................. 434.2.3 G118 usage .................................................... ............................................................ ............................. 44

    4.3 WORKPIECE MOUNTING ERRORS COMPENSATION ON TILTING TABLES (G122)......................................... .......... 454.4 TOOL TIP CONSTANT VELOCITY WITH RTCP ACTIVE (G131)......................................................... .................... 46

    5. PARAMETRIC PROGRAMMING ........................................................... ........................................................... 47

    5.1 PARAMETER MANAGEMENT.......................................................... ........................................................... .......... 475.1.1 Parameter assignment...................................................... ........................................................... .......... 495.1.2 Parameter assignment through a formula........................................................... ....................................... 495.1.3 Axis movement programming with parameters ........................................................... ............................. 505.1.4 System parameters programming....................................................... ................................................. 505.1.5 Axes programming through parameters AA, AB, AC .......................................................... .................... 51

    5.2 PROGRAMMING WITH ADVANCED LINES ( ! ... ! )........................................................................ .................... 525.2.1 Assigning values to parameters and computing expressions..................................................................... 525.2.2 Executing jumps without return (!GON..!) ........................................................ ....................................... 525.2.3 Executing jumps with return (!GON....!) ......................................................... ....................................... 535.2.4 Executing conditioned jumps (!IF .. ; GON.. !) ........................................................... ............................. 535.2.5 Controlling more than one condition on the same advanced line.............................................................. 545.2.6 Structuring conditioned jumps ................................................... ........................................................... 545.2.7 Jump to a CMOS subprogram (! GOP.. !).................................................................... ............................. 555.2.8 Jump to a CMOS subprogram with label (! GOP.. N..!) ..................................................... .................... 555.2.9 Jump to a CMOS subprogram with two labels (! GOP.. N.. N..!)......................................................... 56

    5.3 CONDITIONING BLOCKS OF PROGRAMS (--IF)................................ ........................................................... .......... 565.4 PROGRAM BLOCK REPETITION (--DO --LOOP)........................................................... ....................................... 58

    5.4.1 Specifying the repetition number (LOOP {N}) ........................................................... ............................. 585.4.2 Repetition condition........................................................... ........................................................... .......... 585.4.3 Anticipated exit condition --DO --LOOP (--EXIT DO)..................................... ....................................... 59

    5.5 WRITING CMOS PROGRAMS (--DEFINE P..) ................................................... ................................................. 605.6 WRITING A TEMPORARY SUBPROGRAM SUBTEMP (--DEFINE S..) ....................................................... .......... 60

    6. Z32 FIXED CYCLES AND MACROS..................................................... ........................................................... 62

    6.1 Z32 FIXED CYCLES (G800) ......................................................... ........................................................... .......... 626.1.1 G800K1: Drilling....................................................... ........................................................... .................... 646.1.2 G800K2: Deep drilling with chip breakage ....................................................... ....................................... 646.1.3 G800K3: Deep drilling with chip extraction........................ ........................................................... .......... 656.1.4 G800K4: Tapping .................................................... ........................................................... .................... 656.1.5 G800K5: Reaming ................................................... ........................................................... .................... 656.1.6 G800K6: Boring ....................................................... ........................................................... .................... 656.1.7

    G800K7: Deep drilling with chip breakage and extraction................................................... .................... 66

    6.1.8 G800K8: Two zones drilling with gap..................................................... ................................................. 67

  • 8/9/2019 Milling Programming

    5/149

    CNC Z32 - Programming guide (Milling Machines)

    iii

    6.1.9 G800K9: Three zones drilling ........................................................... .................................................... 676.1.10 G800K10: Internal spiral milling-boring .......................................................... ........................................ 686.1.11 G800K11: External spiral milling-boring ......................................................... ........................................ 68

    6.2 Z32 POSITIONING MACROS (G801) ..................................................... ........................................................... . 696.2.1 G801K1: Line - starting point and increments.............................. ........................................................... . 71

    6.2.2 G801K2: Line starting point, angle and point distance..................................................... ..................... 716.2.3 G801K3: Line - starting and end point ................................................... .................................................. 716.2.4 G801K4: Grid row and column increments............................................................ ............................... 726.2.5 G801K5: Grid starting point, distances and angles........................................ ........................................ 726.2.6 G801K6: Grid row and column starting and end points ................................................... ..................... 726.2.7 G801K7: Circle initial angle and total increment ................................................... ............................... 736.2.8 G801K8: Circle initial angle and angular distance ........................................................... ..................... 736.2.9 G801K9: Circle initial and final angle ........................................................... ........................................ 746.2.10 G801K10: Rectangle center and pitch ........................................................... ........................................ 746.2.11 G801K11: Rectangle center and sides ........................................................... ........................................ 746.2.12 G801K12: Rectangle corner and pitch........................................................... ........................................ 756.2.13 G801K13: Rectangle corner and sides........................................................... ........................................ 75

    6.3 Z32 MACHINING MACROS (G802) ........................................................ ........................................................... . 76

    6.3.1 G802K1: Circular pockets roughing ....................................................... .................................................. 786.3.2 G802K2: Rectangular pocket roughing pocket center ...................................................... ..................... 796.3.3 G802K3: Rectangular pocket roughing - corner ........................................................ ............................... 806.3.4 G802K4: Circular pockets finishing ....................................................... .................................................. 816.3.5 G802K5: Rectangular pocket finishing pocket center ...................................................... ..................... 826.3.6 G802K6: Rectangular pocket finishing - corner ........................................................ ............................... 836.3.7 G802K7: Linear eyelet..................................................... ........................................................... ........... 846.3.8 G802K8: Circular eyelet eyelet center........................................................... ........................................ 856.3.9 G802K9: Circular eyelet curvature center ..................................................... ........................................ 866.3.10 G802K10: Hole thread milling with a single flute end mill................................................. ..................... 876.3.11 G802K11: Hole thread milling with a comb end mill....................................... ........................................ 886.3.12 G802K12: Stud thread milling with a single flute end mill ........................................................... ........... 896.3.13 G802K13: Stud thread milling with a comb end mill .......................................................... ..................... 90

    6.3.14 G802K14: Face milling .................................................... ........................................................... ........... 916.4 MACHINE TOOL BUILDERS FIXED CYCLES (G27C..).................... ........................................................... ........... 92

    7. PROFILES ON THE PLANE ........................................................ ........................................................... ........... 93

    7.1 CLOSED LINES......................................................... ........................................................... ............................... 957.1.1 Line end point (G1 X.. ; G1 Y.. ; G1 X.. Y..) ......................................................... ............................... 957.1.2 Line end coordinate and slope (G1 X..QF.. ; G1 Y..QF..) .......................................................... ........... 957.1.3 Line two coordinates end point and slope (G1 X.. Y.. QF..).................................................................. 96

    7.2 OPEN LINES (G1 ; G1 QF..) ...................................................... ........................................................... ........... 977.3 CLOSED CIRCLES .................................................... ........................................................... ............................... 98

    7.3.1 Circle center and end point (G2/G3 I..J..X..Y..) ..................................................... ............................... 987.3.2 Circle end point and radius (G2/G3 X..Y..RA..)............................................ ........................................ 997.3.3 Circle center, radius and end slope (G2/G3 I..J..RA..QF..).................................................................. 1007.3.4 Circle center and end slope (G2/G3 I..J..QF..)................. ........................................................... ......... 1007.3.5 Circle radius and end slope (G2/G3 RA..QF..) ....................................................... ............................. 1017.3.6 Circle end point (G2/G3 X..Y..)........................................................... ................................................ 1027.3.7 Circle center and end arc length (G2/G3 I..J..QA..)....................................... ...................................... 102

    7.4 OPEN CIRCLES ........................................................ ........................................................... ............................. 1037.4.1 Circle center and radius (G2/G3 I..J..RA..).................................................... ...................................... 1037.4.2 Circle center (G2/G3 I..J..)..................................................... .......................................................... 1047.4.3 Circle radius (G2/G3 RA..)..................................................... .......................................................... 104

    7.5 LINE-CIRCLE COMBINATIONS ...................................................... ........................................................... ......... 1057.6 AUTOMATIC FILLETS (RR..) ........................................................ ........................................................... ......... 1077.7 CHAMFERS.................................................... ............................................................ ...................................... 111

    8. DISK FILES RECALL......................................................... ........................................................... ................... 112

    8.1 MACHINING OF FILES GENERATED BY CAD-CAM SYSTEMS ........................................................ ................... 112

  • 8/9/2019 Milling Programming

    6/149

    CNC Z32 - Programming guide (Milling Machines)

    iv

    8.2 DNC DISK PROGRAM RECALL ( !:L254 ! )................................................................................................... 1128.3 SOME NOTE ON THE DNC PART-PROGRAM ....................................................... ............................................... 113

    9. HIGH SPEED SETTING ....................................................... ........................................................... .................. 114

    9.1 HIGH SPEED ACTIVATION: G114 RA..K..J..I..HY..HR................................................ ..................................... 114

    9.2 MOVEMENT CONTROL FUNCTION: G113X (KA1)............................................. ............................................... 1169.3 RECOMPOSING CURVES FROM A SERIES OF POINTS: G113A (OR G113B).............................. ........................... 1169.4 CAM SETTINGS FOR POINT PROGRAMS GENERATION ............................................................ ........................... 1179.5 CURVE DECELERATION REDUCTION: G135 I HX .......................................................... ........................... 1189.6 HIGH SPEED PARAMETERS SETTINGS (SUMMARY TABLE).................................................................................1199.7 HIGH SPEED PARAMETERS - EXAMPLES .......................................................... ............................................... 120

    10. PROGRAMMING EXAMPLES...................................................... ........................................................... ........ 121

    10.1 PROFILE 1 ...................................................... ............................................................ ..................................... 12110.2 PROFILE 2 ...................................................... ............................................................ ..................................... 12210.3 ROTATION ...................................................... ............................................................ ..................................... 12310.4 TRANSLATION........................................................... ............................................................ ........................... 12410.5 ROTO-TRANSLATION 1 ....................................................... ........................................................... .................. 12510.6 ROTO-TRANSLATION 2 ....................................................... ........................................................... .................. 12610.7 MIRRORING 1 ........................................................... ............................................................ ........................... 12710.8 MIRRORING 2 ........................................................... ............................................................ ........................... 12810.9 THIRD AXIS TURNOVER ...................................................... ........................................................... .................. 12910.10 ANGULAR REPETITION OF A PROFILE....................................................... ......................................................... 13010.11 LINEAR REPETITION OF A PROFILE......................................................... ......................................................... 13110.12 PROFILE 1 REPETITION WITH VARIOUS DEPTHS ........................................................... ..................................... 13210.13 FINISHING OF A SPHERICAL SURFACE ...................................................... ......................................................... 13310.14 ELLIPSE .......................................................... ............................................................ ..................................... 13410.15 ROTO-TRANSLATION IN THE SPACE (SPHERICAL SURFACE) ................................................... ........................... 13510.16 REVOLUTION SOLID.................................................. ............................................................ ........................... 13610.17 MACHINING OF A X-Z PROGRAMMED PROFILE ........................................................... ..................................... 13710.18 SLANTED HEAD DRILLING ................................................... ........................................................... .................. 13810.19 CIRCUMFERENCE POSITIONING AND DRILLING FIXED CYCLE.......................................................... .................. 13910.20 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITH ROTATION ................................................ 14010.21 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITHOUT ROTATION ..........................................14110.22 CIRCULAR POCKET ROUGHING .................................................... ........................................................... ........ 14210.23 CIRCULAR POCKET ROUGHING POSITIONED ON A CIRCUMFERENCE ..................................................... ........ 143

  • 8/9/2019 Milling Programming

    7/149

    CNC Z32 - Programming guide (Milling Machines)

    1

    1. INTRODUCTION

    This manual contains a simplified description of Z32 control programming.

    This document doesnt contain a detailed description of all functionalities available, focusing only on the mostcommon and useful for the programming of milling machines or machining centers.

    For a complete and detailed description of all functionalities available in the Z32 numerical control, please consultProgramming Manual M96.

    This manual is valid for SIS T109-8version or later.

  • 8/9/2019 Milling Programming

    8/149

    CNC Z32 - Programming guide (Milling Machines)

    2

    2. BASE PROGRAMMING

    2.1 Introduction

    The base programming Z32 numerical controls follows the indications of ISO directions.The program for a workpiece (or part-program) is a text file composed by a series of instructions stored insequential way.The ISO lines are composed by a line number (not mandatory) and by a series of elementary instructions.

    2.1.1 Machine behavior at reset

    The machine behavior at reset is defined as the condition assumed by the machine when the pushbutton Reset ispressed on the console. This behavior is important because it determines the machine functionality in its basecondition.

    The reset condition is activated in the following ways:

    - At CNC power up- At the start of a program execution- After pressing the pushbutton Reset

    Offset behavior at resetThe behavior of the zero offset at reset, is function of machine setup.Depending on the setup, the following can happens:

    - The machine sets its base origin (axis positions related to machine zero)- The machine sets as active the origin (zero offset) number 1 on all continuous axes- The machine leaves as active the last programmed offset

    Please consult the machine tool builder for further information.

    Parameter behavior at reset

    All parameters used for the parametric programming of part-program are set to zero after reset.The following parameters behaves differently:- Tool parameters. After reset all parameter values contained in the active tool description are

    assigned. The active tool is the tool actually inserted on the spindle. If the tool parameters containtechnological parameters, like parameter F (feed) or parameter S (speed), these values are set atreset with the corresponding values in the tool table. Parameters normally contained in the tooldescription, are length L and radius R.

    Behavior of working plane at resetAs described later on, there are functions which allow to set the working plane of the machine and to definethe tool length correction. These functions are G25, G43 and G44.At reset the machine switches to the configuration defined by setup made by the machine tool builderAs an example, in a standard machine with three axes, the working plane is the plane X-Y, and the tool

    length correction is assigned to Z axis.Please consult the machine tool builder for further information.

    Axes behavior at reset (alive axes at reset)After reset the axes can be alive or not. An alive axis is an axis whose position is controlled by thenumerical control. A non alive axis is an axis without control. A machine setup data defines the behavior atreset. During part-program execution an axis can be switched alive or not alive through instructions G28and G29.

    - If the alive axes are defined as reset-transparent, the reset will not alter the actual map of aliveaxes.

    - If the alive axes are defined as non reset-transparent, the reset restores the map of alive axesdefined in the setup.

    Please consult the machine tool builder for further information.

  • 8/9/2019 Milling Programming

    9/149

    CNC Z32 - Programming guide (Milling Machines)

    3

    All geometric transforms, translations, mirroring, rotations, scale factors, etc. are disabled at reset.

    All functions and settings related to RTCP (rotating tool centre point) are disabled at reset.

    At reset, all high speed settings are restored with the corresponding parameters contained in the machine

    setup. Please consult the machine tool builder for further information.

    Warning: it is important to remember that at the beginning of a part-program execution, a resetcondition is forced. Thus the machine initiates the execution starting from the reset state, and everymodification to be made on this state must be expressly programmed in the part-program.

    2.1.2 Line numberThe line number is composed by the letter N followed by a number (also decimal). The line number programmingis not mandatory. As an example, all following syntaxes are equivalent:

    G0 Z100

    andN10 G0Z100

    Line number format: The line number can be an integer or decimal number, with the decimal positionindicated either with a point or a comma. It is possible to insert some space characters between the letterN and the number. As an example, it is possible to write:

    N100N 100.2N100,34

    The only limitation is the total number of numeric characters before and after the decimal delimiter, whichcannot be more than 9 characters.

    Line number as jump destination: The line number may be used as jump destination in the logic-mathematic programming. For a description of this functionality, please consult this manual in the logic-mathematic programming section.

    2.1.3 The standard ISO line

    After the optional line number N, the ISO line is composed by a sequence of elementary instructions. Eachinstruction is composed by two parts:

    - ADDRESS- VALUE

    The address is composed by alphabetic characters and specifies the type of operation desired.The value, normally numeric, specifies the operation to be executed.Between address and value, an arbitrary number of spaces can be inserted.The same line may contain more than one couple address-value.

    The followings are all valid ISO lines:N10 G0 Z100N20 G0 X 100 Y200G0Z0X0Y0

  • 8/9/2019 Milling Programming

    10/149

    CNC Z32 - Programming guide (Milling Machines)

    4

    Format of numeric values:- At least one number must be programmed (the zero value is programmed with one or more 0

    characters)- The division between integer and decimal part may be indicated either with . (point) and with ,

    (comma).

    All following sample programming are valid ISO lines:X.1X .1X,1X0,1X 0.1X00000,1000

    - All numbers cannot have more than 9 significant digits before or after the decimal delimiter.All following sample programming are valid ISO lines:X123456789X0.123456789X0.0000123456789X12345.6789

    Invalid programming samples:

    X1234567.12345X12345.67890000X1.00000001234

    - A number cannot contain space characters.

    2.1.4 Comment lines

    A part-program may contain comment lines.A comment is contained between parenthesis.Example:

    G0 Z100 (initial approach)

    2.1.5 G functions (modals and with stop)

    The G functions are preparatory functions responsible to prepare the CNC to interpret the following functions.

    The number following the G letter identifies the particular function for which the Z32 must be prepared. The valuefollowing the G letter must always be a numeric value (CANNOT be an expression result).

    Only some G functions (i.e. only some numeric values) are interpreted and executed from Z32. If a notimplemented G function is programmed, Z32 issues the related alarm.

    The functions are those contained in the ISO regulations, with some adaptations. In particular:

    The initial zero digits of G codes can be omitted (G0 is equivalent to G00)

    More than one G function can be programmed in the same block: in this case the G functions arerecognized and executed by the CNC as they are encountered in the programmed line: if contrasting

    G functions are programmed, the last programmed G function remains active. Some particular G functions require additional data to complete their definition.

    MODAL functions are those G functions whose effect will be maintained also in the blocks following theone where they were programmed: modal G functions are normally deactivated by other special Gfunctions.

    Some G functions require the machine STOP: the profile must be completely defined when they areexecuted. In this case no contouring with open profile, or contouring with radius compensation can beactive.

  • 8/9/2019 Milling Programming

    11/149

    CNC Z32 - Programming guide (Milling Machines)

    5

    1.1. F parameter and Feed management (G93 G94 G95)

    The F parameter defines the feed velocity during machining and it is programmed writing the letter F followed bythe desired feed value (numeric value with a maximum of 9 significant digits).

    Programmed after G94it defines the F velocity in units per minute. Example:With linear axes measured in millimeters, F100 means 100 mm/min.With linear axes measured in inches, F100 means 100 in/min.With round axes measured in degrees, F100 means 100 deg/min.

    G94 is active after reset and it is thus the normal mode if not otherwise specified.

    Programmed after G95 it defines the feed velocity as units per spindle round. Units can be millimeters, inches ordegrees, depending on the axis type.

    Programmed after G93 it defines the velocity as the inverse of time (expressed in minutes) necessary to executethe programmed movement. In this case the F value to be programmed is equal to the velocity desired on thetrajectory, divided by the length of the trajectory itself:

    F = Velocity (mm/min or in/min) / Space (mm or inches)

    2.2 S parameter and Speed management (G96 G97)

    The S parameter defines the spindle rotational speed and is programmed writing the letter S followed by thedesired speed value (numeric value with a maximum of 9 significant digits). The S function doesnt activate thespindle rotation, activated through the auxiliary functions M3 or M4.

    Programmed after G97it defines the spindle rotational speed in rpm.

    G97 is active after reset and it is thus the normal mode if not otherwise specified.

    Programmed after G96 it sets the mode Constant cutting speed". This is a typical functionality of lathes: thespindle rotational speed is computed in such a way that the cutting speed is equal to the programmed S value(expressed in m/min), considering the tool distance from the rotation centre of the spindle.

    Note on G96: In order to avoid excessive speed when the distance from spindle center is very small, asideG96 the parameter MS is activated (programmable also before the S value) which sets the maximum spindlerotational speed (in rpm) allowed. The active MS value is that present at the moment of last programmed S: ifthe parameter MS is newly programmed, the limit doesn't change until a new programming of S value.

    The tool may jump over the rotation centre: the speed is in every case determined by the absolute value ofthe distance from spindle center, while the center crossing is limited by the programmed MS. It is possible toprogram:

    MS 4000G96 S100 M3

    This programming imposes a cutting speed of 100 m/min.With a maximum speed limit of 4000 rpm.

  • 8/9/2019 Milling Programming

    12/149

    CNC Z32 - Programming guide (Milling Machines)

    6

    2.3 M Functions

    The M functions (miscellaneous) are mainly related to the machine tool behavior and their functionality is mostlydefined by the machine tool builder.All M functions require a machine stop.The ISO standards indicate the functionality of many M codes: only some M codes are decoded and managed bythe Z32, and only these codes will be discussed.The numeric value (two integer digits) following the letter M, indicates the programmed M function. All leadingzeros can be omitted (G0 = G00).

    ISO M codesM0 - stop

    It stops the program execution; program resuming trough Start pushbutton. This function also stopsspindle and coolants.

    M1 conditioned stop

    Same behavior as M0, but M1 activity is conditioned by a dedicated logic input: for further details, pleaseconsult the machine tool builder. This function also stops spindle and coolants.

    M2 End of program

    Exits the control EXECUTION mode and terminates all automatic operations.M3 Spindle clockwise

    Requests a clockwise rotation of the spindle, with the previously programmed S (speed).M3 Spindle counterclockwise

    Requests a counterclockwise rotation of the spindle, with the previously programmed S (speed).M5 Spindle stop

    Requests the spindle stop. It stops also the coolants.M6 Tool change

    Requests the mounting of last programmed T (in the same or preceding blocks) on the spindle. It alsostops spindle and coolants. After the M6 execution, the CNC takes into account the description of the toolmounted on the spindle, updating accordingly all parameters.

    M7 coolant #1 delivery

    Requests delivery of coolant #1.M8 coolant #2 delivery

    Requests delivery of coolant #2.M9 Coolant stop

    Requests stop of coolants delivery.M19 Spindle orientation

    Requests the spindle orientation.

    This function also stops spindle and coolants.

    The machine tool builder can define other M functions for particular usage and purposes of the machine. Forfurther details, please consult the machine tool builder.

    Special M codes

    A category of M functions is defined as Special M. Unlike normal M functions, interpreted exclusively by themachine PLC, every special M code is associated with a service part-program. A typical example of special M isthe M6 for tool changing.The definition and programming of subprograms associated with special M codes, are activities reserved to themachine tool builder.During the execution of the subprogram associated to a special M, the progressive block number counting issuspended (in block search the special M appears as a single block, not searchable in an intermediate point).The subprogram associated to the special M may be executed as a single block.

  • 8/9/2019 Milling Programming

    13/149

    CNC Z32 - Programming guide (Milling Machines)

    7

    2.4 Auxiliary functions MA, MB, MC

    Besides M auxiliary functions, the Z32 control offers to the machine tool builder three more auxiliary functionscategories (MA, MB, MC) sent to the machine logic.The MA, MB and MC functions may be programmed with 9 significant digits, before or after the decimal delimiter.The MA, MB and MC functions provoke the machine stop.For further details, please consult the machine tool builder.

    2.5 End of program and end of subprogram (M2 G26)

    The end of program instruction is the M2 code.

    When the Z32 control decodes the M2 instruction, the execution will be terminated.

    The G26 instructions represents the end of a subprogram.When the Z32 control decodes the G26 instruction, the execution of the actual subprogram is aborted and theexecution of calling program is restored.

    If the instruction G26 is found in the main program (not in a subprogram), the instruction has the same meaning ofM2, i.e. the part-program execution is aborted.

  • 8/9/2019 Milling Programming

    14/149

    CNC Z32 - Programming guide (Milling Machines)

    8

    2.6 Origin recall functions

    Two types of origins are defined for the machine:- Base origins: set by the machine tool builder, they define the fixed reference system of the machine. These

    origins normally doesnt require modifications during machine usage.- Supplementary origins: defined by the user, they define the position of working area with respect to the base

    origins. When a supplementary origin is activated, all positions programmed in the part-program are related tothe active supplementary origin.

    The setup of supplementary origins isgenerally an activity to be done on theworkpiece mounted on the machine.The program will then recall the desiredsupplementary origins.

    The address O indicates an origin recallto the Z32.

    The syntax for an origin recall is as follows:

    - programming of letter O

    - name of desired axis

    - character indicating the origin.

    The character indicating the origin may be composed from:- characters from 1 to 9

    Warning: it is not possible to define as supplementary origin the origin 0, because thisorigin is the base origin setup by the machine tool builder

    - alphabetic letters, lower and upper case- other characters (not recommended)

    Warning: upper and lower case characters refer to different origins, i.e. OXA and OXa are twodifferent origins

    Example:OX1 (activates origin 1 on axis X)

    OX2 OY2 (activates origin 2 on axes X and Y)

    OX1 OYA (activates origin 1 on axis X and origin A on axis Y)Erroneous programming example:

    OX10 (the origin must be indicated by a single character)

    To deactivate the supplementary origin it is possible to program the origin 0.

    Example, the programming:OX0 OY0

    deactivates the supplementary origins on axes X and Y. After this instruction, all CNC positions are related to themachine base origin setup by the machine tool builder.

    In this example, the supplementary origins on X and Y axes (OX1and OY1) define the reference point for the positionsprogrammed in the part-program:

    OX1 OY1

    G0 X20 Y25

    G1 X55

    Y40

    X20

    Y25

  • 8/9/2019 Milling Programming

    15/149

    CNC Z32 - Programming guide (Milling Machines)

    9

    Note: The supplementary origins are stored in the CNC CMOS memory.Depending on the process the origins belong, the files are the following:

    Process: 0 1 2 3 4 5

    Origin file: 126 123 120 117 114 111

    In single process machines, the file containing the origins is the file 126(the file related to process 0).The syntax of an origin file is as follows:

    :OS

    X1=123.4

    Y1=-231.5

    The file begins with the header :OS which indicates the start of the section specific for the originsIn the following lines, the values of the various origins are stored.In the example:The origin number 1 on X axis determines a translation of 123.4 with respect to the base origin.

  • 8/9/2019 Milling Programming

    16/149

    CNC Z32 - Programming guide (Milling Machines)

    10

    2.7 T parameter and tool change

    The T parameter is devoted to the tool change, together with the M6 function. The digits following the T letterindicate the tool number to recall.The T parameter has the purpose to prepare the machine for the tool changing (i.e. to prepare the axes of toolmagazine for the change), while the function M6 starts the actual change.For further details, please consult the machine tool builder.

    Warning: At the moment of tool change all parameters present in the tool table for the desired tool arerecalled and assigned.The values for tool length (L) and radius (R) are assigned, together with every other parameter stored in thetable. It is thus possible to save in the table also the S and F values (Speed and Feed) related to thetool interested. In this mode, after tool change, also these values will be assigned.

    Note: The tool table is stored in the CNC CMOS memory.Depending on the process the tool tables belong, the files are the following:

    Process: 0 1 2 3 4 5

    Tool table: 127 124 121 118 115 112

    In single process machines, the file containing the tool descriptions is the file 127(the file related to process 0).The syntax of a tool table file is as follows:

    T1P127

    :TL

    T0#0R0L,000

    T1#1L10,000R2(CENTER DRILL)

    The file starts with the tool actually mounted on the spindle. In the above example, it is the tool number 1,contained in the file number 127.The :TL label specifies the start of the section describing the tools.

    In the following lines, the descriptions of the various tool are stored.- The T parameter indicates the tool number- The # parameter indicates the position of the tool in the tool magazine.- The various parameters describing the tool are inserted in the line through the parameter name and

    its numeric value.- The line may have a comment inserted between parenthesis.

    In the above example:The tool T1 is positioned at place #1, has a length L10 and radius R2

  • 8/9/2019 Milling Programming

    17/149

    CNC Z32 - Programming guide (Milling Machines)

    11

    2.8 Tool length and radius

    2.8.1 Tool length and radius modification (DDL DDR)

    Through the parameters DDL and DDR it is possible to modify length and radius of the active tool.

    To compute the correction related to the tool length, the Z32 numerical control considers the sum betweenparameters L and DDL.

    The correction set through the parameter DDL is not incremental; to cancel its effect it is necessary to programDDL0.

    Example:

    N10 T1M6

    N20 L100 (imposes a tool length of 100)

    N30 DDL1(tool correction equals L + DDL, i.e. 101)

    N40 DDL0(cancels DDL, tool correction equals 100)

    The correction of tool radius happens through the parameter DDR.

    The correction set through the parameter DDR is not incremental; to cancel its effect it is necessary to programDDR0.

    Example:

    N10 T1M6

    N20 R5 (imposes a tool radius of 5)

    N30 DDR0.1(tool radius equals R + DDR, i.e. 5.1)

    N40 DDR0(cancels DDR, tool radius equals 5)

    The tool lengthis the value of parameter L.The length can be set inserting the tool length value in the tool table(in this case the length will be updated on tool change), or expressly

    programming the "L" parameter in a program line:N10 L10.23 (tool length 10.23)

    The tool length L may be a positive or negative value.The correction of tool length is automatically done by the controltaking into account the L length along the axis defined as toolaxis, without need to modify the part-program positions.

    The tool radiusis the value of parameter R.The radius can be set inserting the tool radius value in the tool table(in this case the radius will be updated on tool change), or expresslyprogramming the "R" parameter in a program line:

    N10 R3 (tool radius 3)

    The value of tool radius is used by the control during the contouring ofplane profiles with radius correction, through the functions G40, G41and G42.

    L

    R

  • 8/9/2019 Milling Programming

    18/149

    CNC Z32 - Programming guide (Milling Machines)

    12

    2.9 Cancellation and suspension of origins and lengths (G53 G54 G45)

    These functions must be used by expert programmers.

    To cancel an originit is necessary to program the base origin, for example:OX0 OY0 OZ0

    To cancelthe tool length correctionsit is necessary to program a null length:L0

    To suspendthe corrections introduced by supplementary origins and tool length it is possible to program theG53 function. By programming the G53 function, all roto-translations, mirroring and scale factors aresuspended, in order to reference all movements to the base origin. After programming the G53 function, allmovements are related to the base origin (origin 0)

    The restoringof corrections due to supplementary origins and tool length happens by programming the G54function. After programming the G54 function, the situation of origins, lengths, roto-translations, mirroring and

    scale factors existing before the G53 programming is restored.

    To suspendonly the correction due to the tool length it is possible to use the G45function. After programmingof the G45 function, all movements of the tool axis dont take into account the tool length. The correction canbe restoredby programming the G43or G44function.

  • 8/9/2019 Milling Programming

    19/149

    CNC Z32 - Programming guide (Milling Machines)

    13

    Z Y

    X

    Z Y

    X

    Z Y

    X

    2.10 Working tern (G25), tool axis (G43 - G44) and contouring planeThe function allowing the definition of the machine working tern and the contouring plane is the G25function.The G25 code must be followed by three characters representing three axis names defined as continuous on themachine.As example: G25XYZdefine the working tern composed by the three axes X, Y, Z.The first two axes of the working tern define the contouring plane(where circular interpolations are allowed). Thethird axis is an additional axis coordinated to the first two (may be used for fixed cycles and for other machinefunctions).At power on and after each program start, the working tern defined by the machine tool builder setup is activated.

    The axis along which the tool length is considered is defined from G43 (positive correction) or G44 (negativecorrection) as shown in the figure:

    Z

    G43Z

    L

    X

    Z L

    G44X

    X

    G43X

    L

    X

    Z

    Typical situations for three axis machine are the followings:

    1) Working plane XYand positive tool length correction along axis ZThis configuration can be programmed with:

    G25 XYZG43Z

    2) Working plane ZXand positive tool length correction along axis YThis configuration can be programmed with:

    G25 ZXY

    G43Y

    3) Working plane YZand positive tool length correction along axis XThis configuration can be programmed with:

    G25 YZX

    G43X

    The default machine tern is normally set by the machine tool builder, together with the default axis for toollength correction. This situation is always restored after a reset.

  • 8/9/2019 Milling Programming

    20/149

    CNC Z32 - Programming guide (Milling Machines)

    14

    2.11 Movement programming (G0 G1 G2 G3)

    The programming of machine movements happens through the functions:G0: rapid movementG1: linear interpolationG2: circular CW interpolationG3: circular CCW interpolation

    The ISO standard states that all G functions for the movement must be MODAL. That means, for instance, thatafter programming a G0 movement, all successive movements will be in G0 mode, unless a different move type willbe programmed.Example:

    (behavior with MODALG movement functions)F1000

    G0Z100 (G0 movement)

    X100 (G0 movement)

    Y100 (G0 movement)

    G1X0 (G1 movement)

    Y0 (G1 movement)

    X10 (G1 movement)

    It is possible to define a different machine behavior through the setup, setting all G movement functions as NOTMODAL.In this case all movement without an explicit G function indication are assumed as programmed in G1 mode.

    (behavior with NOT MODALG movement functions)F1000

    G0Z100 (G0 movement)

    X100 (G1 movement)

    Y100 (G1 movement)

    G1X0 (G1 movement)

    Y0 (G1 movement)

    X10 (G1 movement)

    2.11.1 Rapid movement (G0)

    The G0 function specifies a rapid movement. Only linear movements can be

    programmed in rapid mode, allowing the programming of more than one axis.Up to ten axes can be simultaneously programmed.Example:

    G0 Z100G0 X0 Y0

    The G0 velocity is defined in the setup.The G0 function can be modal or not, depending on machine setup.If the function is modal, after the first positioning in G0 mode, all successive positioning without explicit specificationof G0, will be also executed in G0 mode.If the function is not modal, all movements without an explicit motion function will be executed in G1 mode.

    Z Y

    X

    G0 X..Y..Z..

  • 8/9/2019 Milling Programming

    21/149

    CNC Z32 - Programming guide (Milling Machines)

    15

    2.11.2 Linear interpolation (G1)

    Up to five axes can be simultaneously programmed. The trajectory followed by

    the axis group to reach the programmed end point is linear: all programmedaxes arrive together to the programmed point.

    The velocity in G1 mode is defined through the programmed feed (address F).

    Warning: programming only G1 on a line (without positions) is allowed, but it has a special meaning(OPEN linear move, see the chapter describing the profile programming) and doesnt have the purposeto prepare for a G1 movement.

    Example:...

    N10 G1

    N11 X0 Y0

    ...

    not allowed: block 11 issues the error CN3414

    2.11.3 Circular interpolation (G2 G3)

    The functions G2 and G3 specify clockwise circular interpolation(G2) or counterclockwise circular interpolation (G3).The movement must be programmed on the first two axes of thecontouring plane, defined with the G25.The circular interpolation must be preceded by a positioning onthe circle starting point.

    The movement velocity corresponds to the programmed F (feed)value.

    The circular interpolation programming happens through:

    - G2 or G3 which defines the interpolation direction- The circle end point coordinates- The circle center point coordinates indicated by the address I for the first axis of the contouring plane, and

    address Jfor the second axis.Example:

    G2 X..Y..I..J..

    Warning: If the contouring plane is different from XY plane, but is for instance the ZX plane, the syntaxbecomes:

    G3 Z.. X.. I.. J..where I indicates the first axis of the contouring plane (Z) and J the second axis (X)

    2.11.4 Helical interpolation (G12 G13)

    The function G12allow the execution of helical interpolations.The function G13disables this mode.

    The position programmed for the third axis is reached at end movement, together with the two axes of the plane.The velocity when G12 is active is the programmed F value.G12 can be activated also if the radius correction is active (G41 or G42 active): it thus allow the motion of the thirdaxis, always coordinated with that of the first two.

    G12 may remain active, in radius correction mode, also in shortened or deleted segments.

    Z Y

    X

    G1 X..Y..Z..

    X

    YI,J

    X,Y

    G3

    I,JY

    X

    X,Y

    G2

  • 8/9/2019 Milling Programming

    22/149

    CNC Z32 - Programming guide (Milling Machines)

    16

    20 30

    35

    15

    10

    0

    0 10

    X

    Y

    80

    80

    Warning: If a segment shortened or deleted due to the radius correction, contains a movement onthe third axis, this movement will be completely executed together with the next valid movement.

    Because the function G12 poses some limitations (slope, radius correction, etc.) it is a good programming practiceto program it only when necessary and disable it (G13) when not.

    Example:G12G3 X..Y..I..J..Z..G13

    It is not possible to program an helicoids more than one complete turn in a single block. To program more than oneturn, a repeating cycle must be used.

    2.12 Incremental coordinates programming (G90 G91)

    The programming of incremental positions happens through the G91 function.

    The syntax is as follows:

    HX.. G91 Starts the incremental programming in micron

    The parameter HX defines the scale of increment expressed in thousandth of display units.To get programmed increments in display units (millimeters, inches or degrees) it is necessary to program HX1000

    In the normal practice it is common to program:HX1000 G91

    The G91 function is modal and can be deactivated by programming G90.

    Example:

    Warning: The HX parameter must be programmed before the G91 programming:Correct:

    HX1000 G91

    Erroneous:G91 HX1000

    F1000G0 X10 Y10(activates incremental programming:)HX1000 G91G1 X20Y35X30Y15(deactivates incremental programming:)

    G90X80 Y80

  • 8/9/2019 Milling Programming

    23/149

    CNC Z32 - Programming guide (Milling Machines)

    17

    2.13 Threading and rigid tapping

    2.13.1 Fixed pitch threading (G33)

    Modal in automatic execution, active only on the block in semiauto.

    Typical function for lathes, can be used also in milling machines.After G33 programming, G1 is automatically activated.The G33 function has the purpose to synchronize the axes movement with the spindle rotational speed.The threading movements must be programmed after the G33 and they can be linear or circular movements.The end of G33 movements is obtained by programming G0, G93, G94, G95, G96.

    The syntax is as follows:G33 K..

    The parameter K determines the pitch along the threading direction.The threading can be done through circular or linear segments on the plane, however oriented.More than one threading movements can be executed in sequence: the threading pitch remain constant, unlessaccelerations or speed exceeding the setup values are requested.

    Warning:- If the first threading segment is a circular one, it is necessary to program G33G2 or G33G3. Please note that G33must precede G2/G3 in the line: if G2 or G3 are programmed before G33 (i.e. G2G33) they are canceled from G33which forces G1.

    - During the G33 movements it is not allowed the programming of functions requiring a stop of the CNC or theprogramming of not alive axes.

    - While G33 is active, the progressive operation number is not incremented: in block search with progressivenumber is thus only possible to search the first G33 block.

    - During the G33 the following are not active:

    axes overridespindle override

    single block

    - In case of taper threading, the pitch along the longitudinal axis is shorter due to the presence of the slope,because the parameter K is evaluated along the thread direction.

    Example:

    G25 XZY

    M3 S500

    G0 X30 Z100

    (first threading movement:)

    G33 Z5 K1.25

    G3 I35 J5 X35 Z0

    G0 Z100 (end of threading)

    It is possible to execute a threading in more than one pass with different depths, because the start of themovement is synchronized with the spindle zero crossing.

  • 8/9/2019 Milling Programming

    24/149

    CNC Z32 - Programming guide (Milling Machines)

    18

    2.13.2 Variable pitch threading (G34, G35)

    The term variable pitch threading indicates a threading whose pitch is not constant, but varies continuouslyaccording to a determined variation quantity.The variable pitch threading is programmed through two different G functions:

    G34 K.. I.. increasingpitch threadingG35 K.. I.. decreasing pitch threading

    All descriptions related to the fixed pitch threading (G33) remain valid also for the variable pitch threading (G34 andG35).

    K= initial threading pitch (mm or inches) This parameter can be programmed in the same block of G34/G35, or inpreceding blocks.

    Warning: if the K parameter is newly programmed in subsequent blocks, when G34/G35 is active, anabrupt pitch variation is encountered.

    I= pitch increment expressed in mm/round or in/round. This parameter can only be programmed in the same line of

    G34/G35. The parameter is always positive and assumed as absolute value if programmed as a negativenumber.In G34 mode, it expresses the increment in mm or inches imposed on pitch K at every round.In G35 mode, it expresses the decrement in mm or inches imposed on pitch K at every round.

    Warning: if the continuous decrement of K brings to a negative value, the alarm CN1F13 will be issued(in real time).

    Threading movements with a fixed or variable pitch may be executed in sequence: the threading pitch willcontinuously vary or remain constant, or it will have a discontinuity, depending on the threading function andparameters programmed.

    2.13.3 Rigid tapping (G63)

    G63 activates a tapping movement composed by:

    advance with pitch K up to the programmed position

    on-the-fly spindle inversion

    return to the starting position.

    The movement of programmed axes (normally only Z axis) is rigidly connected to that of the spindle for thecomplete duration of the cycle (one K increment for every spindle turn).

    Example:

    ...N10 G0 X0 Y0 Z10 S300 M3N11 G63 K1.25 Z-50N12 G0 X-10N13 G63 Z-50...

    N10: rapid positioning to hole start position and spindle on.

    N11: tapping cycle. It is necessary that the spindle reaches its nominal speed before tapping start.Cycle composition:

    wait for spindle zero crossing

    start of Z axis. It is necessary to leave an adequate margin for the axis acceleration, in orderto reach complete synchronization while still in air.

    tapping with a pitch of 1.25 and Z axis synchronized with the spindle up to position Z-50

  • 8/9/2019 Milling Programming

    25/149

    CNC Z32 - Programming guide (Milling Machines)

    19

    spindle inversion. During the inversion time, the Z axis, still connected to the spindle,

    continues to advance overriding the -50 programmed position, in order not to lose thethread: if the axis go beyond its final point of an excessive quantity (setup definable,normally 10 mm), the alarm CN0713 will be issued. It is however necessary to leavesufficient space at hole end.

    return, still with Z axis connected to the spindle, up to starting position (Z10)

    positioning of Z axis to starting position (Z10). Because the axis requires a braking space,the synchronization Z axis/spindle is broken at a certain distance from the end point: theprogrammer is in charge to leave an adequate safety space.

    N12: spindle inversion (returns in M3 direction) and rapid movement up to X-10

    N13: another tapping cycle. Please note that the spindle must have completed its inversion beforethe start of N13. If the spindle inversion is not terminated, the initial sign will be erroneously acquired,provoking the axis to go rearward when the spindle has finally inverted, up to the issuing of alarmCN0713.

    It is possible to repeat an already executed thread (only if the tap has not been turned in the spindle!)because the movement start is synchronized with the spindle zero crossing.

    - During the G63 the following are not active:

    axes override

    spindle override

    feed-hold

    - In order to use the rigid tapping function, the machine must be equipped with a transducer on the spindle andthe spindle inversion must be properly managed in the machine logic.

  • 8/9/2019 Milling Programming

    26/149

    CNC Z32 - Programming guide (Milling Machines)

    20

    2.14 Rotation, translation, mirroring, scale factor

    With these functions it is possible to translate, rotate, mirror and scale a workpiece program.Please note that all these transformations are made on programmed positions, instead of measured positions.

    2.14.1 Machining rotation (IR JR QR)

    Through the rotation functions it is possible to rotate the machining of an angle QR, around a point of coordinatesIR and JR.

    The rotation activation happens automatically after programmingthe QR parameter.

    It is possible to execute rotations only on the working plane, setby the function G25. The definition of point (IR, JR) follows therule:IR is the rotation center coordinate related to the first axis ofcontouring plane, while JR is the rotation center coordinate

    related to the second axis.For example, in G25XYZ: IR is the X coordinate, while JR is the Ycoordinate of rotation center.

    At Reset IR=0 JR=0 QR=0, all rotations are canceled

    Warning: the rotation center (IR JR) is defined with respect to the active origin, without considering activetranslations (DA DB DC), mirroring (G56) or scale factors.

    2.14.2 Machining translation (DA DB DC)

    The functions DA DB and DC allow to translate the program along the axis defined by the G25 function.DA executes a translation along the first axisDB executes a translation along the second axisDC executes a translation along the third axis

    For example, if the configuration G25XYZ is active:DA translates the machining along X axisDB translates the machining along Y axisDC translates the machining along Z axis

    The translation activation happens automatically after programming the DA DB DC parameters.

    At Reset DA=0 DB=0 DC=0, all translations are canceled

    For example, to execute a translation of 10 along the first axis and of 14 along the second axis:

    14

    10In order to execute a roto-translation it is necessary to combine translations and rotations:

    X

    Y

    IR

    JR

    QR

    (IR, JR)

    DA10 DB14

  • 8/9/2019 Milling Programming

    27/149

    CNC Z32 - Programming guide (Milling Machines)

    21

    QR

    DA

    DB

    2.14.3 Mirroring on the working plane (G56 G55)

    The programmed figure is transformed in the mirror figure with respect to the mirroring axis defined by the point ofcoordinates (IS, JS) and by the slope QS.

    The mirroring must be enabled with G56 (modal). G55 cancelsG56 and thus the mirroring.

    It is possible to activate the mirroring only on the first two axes ofcontouring plane, defined by G25. The definition of point (IS, JS)follows the rule:IS is the coordinate related to the first axis of working plane, while

    JS is the coordinate related to the second axis.For example, in G25XYZ: IS is the X coordinate, while JS is the Ycoordinate of rotation center.

    No more than one mirroring can be activated.

    At reset IS = JS = QS = 0 and G55 active (mirroring not active)

    2.14.4 Scale factor

    The parameters KP and KT define the scale factors on the working plane (KP) and on third axis (KT), as defined by

    G25.For example, in the configuration G25XYZ, KP applies the scale factor on the plane XY, while KT applies the scalefactor on the positions of Z axis.

    The scale factors are automatically applied after programming theparameters KP and KT.

    At Reset KP=1 KT=1

    DA100 DB50IR0 JR0 QR45

    IS

    JS

    QS

    X

    Y

    (IS, JS)

    Y

    X

    KP = 2

  • 8/9/2019 Milling Programming

    28/149

    CNC Z32 - Programming guide (Milling Machines)

    22

    2.14.5 Other correction parameters

    It is possible to define further parameters as additive and multiplicative factors of the programmed positions.

    multiplicative factor on a single axis: KM {+axis name}additive factor on a single axis: KD {+axis name}

    Example:KMX 1.2 (scale factor of 1.2 only on X axis)KDZ 10 (additive factor of 10 only on Z axis)

    The additive and multiplicative factors are automatically applied after programming the parameters KM.. and KD...

    At reset all effects related to these parameters are canceled.

    Warning: Unlike all other translation, rotation, mirroring and scale factors, the additive and multiplicativeparameters on a single axis cannot be used in programs containing circular interpolations.

    2.14.6 Typical transformations examples:

    Translation on working plane (plane XY in G25XYZ).The translation of the first axis of the plane is programmed as DA, while the translation of the second axisis programmed as DB. Example:

    DA100 DB50

    Translation along the third axis defined by G25 (Z axis in G25XYZ)Can be useful to maintain an offset with respect to the workpiece surface during a part-program test.The translation for the third axis of the working tern must be programmed with DC. Example:

    DC1

    Mirroring along the first axis of working plane (X axis in G25XYZ)IS0 JS0 QS0 G56

    Mirroring along the second axis of working plane (Y axis in G25XYZ)IS0 JS0 QS90 G56

    Mirroring along the third axis of working plane (Z axis in G25XYZ)In this case it is necessary to use the scale factor KT for the positions of third axis:

    KT-1

    Combined mirroring with respect to both first and second axis of working plane (axes X and Y inG25XYZ)

    In this case it is necessary to use a 180 degrees rotation with respect to zero point:IR0 JR0 QR180

  • 8/9/2019 Milling Programming

    29/149

    CNC Z32 - Programming guide (Milling Machines)

    23

    2.15 G116 machining on sloping planes (roto-translation)

    The function G116 allows to roto-translate a machining.It is possible to program G116 (working plane roto-translation) on three axes.G116 acts on all programmed movements, rapid or feed, linear or circular.The displayed position is always referred to the roto-translated coordinate system.

    The syntax of G116 is as follows:

    G116 KA... X... Y... Z... I... J... K...Note: only one address among I, Jand Kmay be programmed on the same line

    KAis the parameter used to select the G116 mode:KA0disables G116KA1enables G116KA2 without further parameters, generates automatically the angles necessary to orient the working planeorthogonally to the spindle. This feature is possible only in conjunction with generalized G117, otherwisethe error CN2C14 (Incompatible parameters) will be issued.If KA is not programmed, and one address among X Y Z I J K is programmed, it is equivalent to KA1.

    X Y Z I J Kdetermine the roto-translation to be made.X Y Zindicate the origin of the new axes system.I(or Jor K), which may be programmed alternatively, indicate the rotation of the new axes system, aroundthe X axis (or Y or Z) in the active axis system, which may in turn be rotated by preceding G116 withrespect to the base situation.In other words, G116 introduces a machining translation through the parameters X, Y, Z, and a rotationangle I (or J or K).I J K must be expressed in degrees.

    The possibility to program only one rotation axis at a time is a necessary limitation to obtain the maximum

    of clarity on the order of applications in case of multiple rotations: in fact, we doesnt get the same resultprogramming for instance at first a rotation around X and then a rotation around Y, or at first around Y andthen around X.Rotations around more than one axis may be obtained by cascaded programming (in subsequent lines) thevarious rotations in the desired order.

    Note: if G116 is programmed without additional parameters:G116

    it will be activated the last programmed G116 with the same parameters, also if the control has been shutdown.In case of a machine stop during an active G116, for example with a drilling bit inserted in a sloping hole, it isthus possible power on the machine, program G116 in semiauto without parameters, switch to Jog mode andextract the tool, driving the jog movements by means of pushbuttons.

    Warning:In order to avoid erroneous movements, the first positioning after the G116 programming, containing areference system translation, must contain the positions of all three axes with logical numbers 0, 1, 2(normally X, Y, Z).

    Warning: The G116 function affects only the first three continuous axes defined for the machine, i.e. on theaxes with logical number 0, 1 and 2. In all examples shown, the G116 operates properly only if axis X hasthe logical number 0, Y the logical number 1 and Z the logical number 2. Please consult the machine toolbuilder for further details.

  • 8/9/2019 Milling Programming

    30/149

    CNC Z32 - Programming guide (Milling Machines)

    24

    40

    40

    40

    40

    30

    30

    30

    30

    30

    30

    30

    3

    4 5

    2

    1

    X

    X

    X

    X

    X

    YY

    Y

    Y Y

    Z

    Z

    Z

    Z Z

    Example:Usage of G116 to machine the surfaces of a parallelepiped with an associative composition of the rotations.

    1) Vertical head:Standard configurationG116KA0

    2) Right side face:G116 X40 Z-30 K90G116 I90

    3) Rear face:G116 Y30 Z-30 I-90G116 K180

    4) Left side face:G116 X-40 Z-30 K-90G116 I90

    5) Front face:

    G116 Y-30 Z-30 I90

  • 8/9/2019 Milling Programming

    31/149

    CNC Z32 - Programming guide (Milling Machines)

    25

    Desired axis names

    Logical axis number

    2.16 Other functions

    2.16.1 Dwell (G4 TT..)

    The dwell value, expressed in seconds, is indicated by the parameter TT which can be programmed on the sameline of G4 function, or in a preceding line.

    Example:G4 TT2.5 (dwell of 2.5 seconds)

    This function stops the machine:The machine stops also if the function is programmed with a null dwell time.

    2.16.2 Axes change (G16)

    Through the function G16 it is possible to exchange the axes of the machine.The exchange of axes names is executed starting from the axis definition in the machine setup, following thediagram below:

    G16 must be programmed according to the following rules:

    - The desired axis names must be single uppercase alphabetic characters, excluding FGIJKLMNORST.- The desired axis names must follow the G16 without any blank character.- If the characters following the G16 are less than the machine axes, the remaining axes will be not

    affected.

    Example:

    Logical axis number 0 1 2 3 4

    Desired axis names Z X Y A B

    Setup axis names X Y Z A B

    The above example can be programmed:G16ZXY

    Warning:- The axis change will be suspended by G53.- The axis change is valid also for the functions G25, G28, G29, G43, G44, KM, KD- The axis change is valid for all programmed positions, but doesnt change the contouring plane set byG25. In order to change also the contouring plane, it is necessary to program a corrected G25.

    0 1 2 3 ...

    ...

    ...G16

  • 8/9/2019 Milling Programming

    32/149

    CNC Z32 - Programming guide (Milling Machines)

    26

    2.16.3 Alive axes management (G28, G29)

    One axis is defined as alive when its position is controlled by the CNC, also if it is stand still.

    The function G28(modal, with stop) asks the CNC to maintain under control the axis also when it is notinterested by the current move (alive axis).After G28 the axis name (i.e. X) desired as alive must be specified, for instance:

    G28X

    Only one axis can be specified, choosing among those defined as continuous in the machine setup.If more than one axis are desired as alive axes, it is possible to program G28 more than once, in the sameor subsequent lines. Example:

    G28Z G28A

    asks to maintain always under control the axes Z and A.Some axes (defined in the machine setup) may be defined as alive since power on: at every program start(or after a reset) the alive/not alive axes situation defined in the machine setup is restored.

    Note:Depending on machine setup, it is possible to define the axes as alive at reset. With this setupall axes programmed as alive (with G28) or abandoned (with G29) restore their alive/not alive axesstate also after a reset or next power on.

    It is allowed, without effect, the request to activate one already alive axis.

    The function G29(modal, with stop) asks the CNC to abandon the specified axis.After G29 the axis name (i.e. X) to be abandoned must be specified, for instance:

    G29 XOnly one axis can be specified, choosing among those defined as continuous in the machine setup.If more than one axis have to be abandoned, it is possible to program G29 more than once, in the same orsubsequent lines. Example:

    G29X G29A

    asks the CNC to abandon the axes X and A.

    It is allowed, without effect, the request to deactivate one already not alive axis.

    Note on programming not alive axes If the part-program contains a movement for a not alive axis, the axis is automatically activated,

    moved and then abandoned, but only if its physical position doesnt coincide with the programmedone.

    The CNC considers the physical position coincident with the programmed position if the error isless than the positioning error defined in the setup (normally some hundredth of millimeter).

    Some problem may arise if the error is very close to the tolerance. If the measured position of thenot alive axis (which shouldnt move) changes a little, bringing the error over the setup threshold,an alarm CN1513 may be issued.

    The measured position may oscillate by some transducer count, still remaining inside thepositioning threshold; the threshold override may thus happen if the position is already close to thetolerance limit. Typical examples are:

    a turntable (or other axis) during the mechanical lock may have a little movement bringing the axisvery close to the maximum setup error allowed

    programming a little movement for a not alive axis, corresponding to a space very close to thepositioning threshold

    In these cases it is recommended to not use the automatic activation of a not alive axis, but toforce it alive or not, directly with part-program instructions.

  • 8/9/2019 Milling Programming

    33/149

    CNC Z32 - Programming guide (Milling Machines)

    27

    2.16.4 Suspending and resuming Tool change (G38, G39)

    By programming G39it is possible to suspend the automatic execution of tool change.When the function G39 is active, the M6 (tool change) is no more automatically executed, provoking instead amachine STOP to allow the operator to manually change the tool. When the operator, after changing the tool,

    presses the pushbutton START, the program will resume from the interrupt point, and the tool change isconsidered as done.The programmed tool is thus considered in all its effects as already mounted on the spindle, with related acquisitionof its description, etc.Example:

    N10 G39

    N12 T10 M6 (MANUALLY CHANGE WITH MILL R=10)

    N13 G38

    The function G39 is modal and it is deactivated by G38, which restores the automatic execution of tool change.The function G38 is activated at reset.

    2.16.5 Mounted tool reading (G104)

    This function transfers the T value of the tool actually mounted on the spindle in the parameter HX.The function is active only in the block where programmed.Example:

    N10 T101 M6

    N11 G104

    After execution of line N11, HX contains the value 101 (the tool actually mounted on the spindle is T101). If themanagement for replacement tools is installed, and the tool actually mounted is a replacement for T101, theparameter HX will contain the T code related to the tool actually mounted.

    2.16.6 Real positions reading (G105)

    The function G105transfers the physical measured positions in the axes position parameters, for all machine axes.The function is active only in the block where programmed, with stop.

    With G105 the measured positions (referred to the active origins and corrections) are transferred in the axesposition parameters. The positions transfer happens only for all continuous axes, including those not alive.

    Warning:The position transferred is the actual measured position, not the reference position. These two positions may differdue to positioning errors (however very small to remain inside the positioning threshold).For example, if X10 is commanded and the axis moves to position 9,998, G105 acquire the position 9,998 and not10.

    2.16.7 Radial programming (G106)

    Modal, always active at reset for milling machines, canceled by G107.This function is used in lathe machines when radial programming is desired. On milling machines the function is notused, because automatically active at reset. After G106 the X axis and J parameter programming are considered

    as radial. For an example, see G107,

  • 8/9/2019 Milling Programming

    34/149

    CNC Z32 - Programming guide (Milling Machines)

    28

    2.16.8 Diametrical programming (G107)

    Specific function for lathes.Modal, active at reset for lathes, cancels and is canceled by G106.After G107 the X position and the associated J parameter are considered as diameters (i.e. the physical movement

    is the half). Example (valid for lathes):

    N1 G107

    N2 G0 X10 (X axis goes to pos. 5, diameter 10)

    N3 G106 (radial programming)

    N4 X10 (X axis goes to pos. 10, diameter 20)

    N5 G107 X10 (X axis goes to pos. 5, diameter 10)

    2.16.9 Axis movement with alarm CNxx12 (G119)

    In order to allow for the semiauto or jog movement of axes with transducer alarms (type CNxx12), the G119

    function has been introduced, with the following characteristics: Valid only if programmed in a semiauto line (MDI)

    Modal, transparent to reset

    If G119 is active, all transducer alarms type 12 are ignored.

    The function is automatically reset if an auto program is started or after an attempt to execute asubprogram (also related to a special M) from semiauto.

    The axes with alarm type 12 can be moved in jog or semiauto, proceeding as follows:

    Enter in semiauto

    Digit G119, press ENTER and then START

    Press RESET (all transducer alarms disappear)

    Operate normally in semiauto or jog

    Warning:When G119 is active, the software limits are disabled on all axes, because the transducers may measurenot significant positions, possibly disabling the movement. The operator is in charge to have the maximumawareness in order to avoid collisions and damages.In every case, as safety precaution, the Z32 automatically enables the TEST condition (rapid reduction to1/5) when G119 is active.

    2.16.10 Working field limits (G123)

    With G123 it is possible to limit the working field through the programmed positions of continuous axes (logicalnumber from 0 to 12).

    WARNINGG123 is only active on the final programmed positions of linear movements. The intersection between movementand limit position is not estimated, but only the substitution (or the test depending on the mode) of the finalprogrammed position.

    For each continuous axis it is possible to define a working field, defined through an upper and a lower limit, whichlimits the programmed positions after the processing of all transformations (G121, scale factors, etc.).

    At machine power on, all limits related to G123 are disabled.

    Limits setup:The functions G123 KA1 and G123 KA-1 allow to program the positive (KA1) and negative (KA-1) limits:

    G123 KA1 [X...] [Y...]

  • 8/9/2019 Milling Programming

    35/149

    CNC Z32 - Programming guide (Milling Machines)

    29

    Sets the positive limits on the continuous axes X.., Y.. and activates the positive limits.G123 KA-1 [X...] [Y...]

    Sets the negative limits on axes X.., Y.. and activates the