Sie sind auf Seite 1von 168

CNC

Z32

PROGRAMMING GUIDE (MILLING MACHINES)

Document M323
C2 01.03.15

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 srl - Via R. Giuliani 140 - 50141 Firenze - Internet: www.delectron.it


Tel: +39 055 416927 - Fax: +39 055 434220 - email: delectron@delectron.it
CNC Z32 M323 C2 - Programming guide (Milling Machines)

INDEX
1. INTRODUCTION...................................................................................6

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

2.1 INTRODUCTION ................................................................................7


2.2 MACHINE BEHAVIOR AT RESET .................................................................7
2.3 LINE NUMBER ..................................................................................8
2.4 THE STANDARD ISO LINE ......................................................................9
2.5 COMMENT LINES ...............................................................................9
2.6 G FUNCTIONS (MODALS AND WITH STOP) .................................................... 10
2.7 F PARAMETER AND FEED MANAGEMENT (G93 G94 G95) ................................... 10
2.8 S PARAMETER AND SPEED MANAGEMENT (G96 G97) ........................................ 11
2.9 M FUNCTIONS ............................................................................... 12
2.10 AUXILIARY FUNCTIONS MA, MB, MC........................................................ 13
2.11 END OF PROGRAM AND END OF SUBPROGRAM (M2 G26) .................................... 13
2.12 ORIGIN RECALL FUNCTIONS .................................................................. 14
2.13 T PARAMETER AND TOOL CHANGE ........................................................... 16
2.14 TOOL LENGTH AND RADIUS .................................................................. 17
2.14.1 Tool length and radius modification (DDL DDR) .......................................... 17
2.15 CANCELLATION AND SUSPENSION OF ORIGINS AND LENGTHS (G53 G54 G45) ............... 18
2.16 COORD. SYSTEM (G25), TOOL AXIS (G43 - G44) AND CONTOURING PLANE ................ 19
2.17 MOVEMENT PROGRAMMING (G0 G1 G2 G3) ................................................ 21
2.17.1 Rapid movement (G0) ........................................................................ 21
2.17.2 Linear interpolation (G1) .................................................................... 22
2.18 CIRCULAR INTERPOLATION (G2 G3) ....................................................... 22
2.18.1 Helical interpolation (G2 G3).............................................................. 23
2.19 INCREMENTAL COORDINATES PROGRAMMING (G90 G91) .................................... 24
2.20 THREADING AND RIGID TAPPING ............................................................. 25
2.20.1 Fixed pitch threading (G33) ................................................................. 25
2.20.2 Variable pitch threading (G34, G35) ....................................................... 26
2.20.3 Rigid tapping (G163) .......................................................................... 27
2.21 ROTATION, TRANSLATION, MIRRORING, SCALE FACTOR ...................................... 29
2.21.1 Machining rotation (IR JR QR) ............................................................... 29
2.21.2 Machining translation (DA DB DC) .......................................................... 30
2.21.3 Mirroring on the working plane (G56 G55) .............................................. 31
2.21.4 Scale factor .................................................................................... 31
2.21.5 Other correction parameters ................................................................ 31
2.21.6 Typical transformations examples: ......................................................... 32
2.22 G116 MACHINING ON SLOPING PLANES (ROTO-TRANSLATION) ............................... 33
2.23 OTHER FUNCTIONS .......................................................................... 35
2.23.1 Dwell (G4 TT..) ................................................................................ 35
2.23.2 Axes exchange (G16) ......................................................................... 35
1
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.23.3 Alive axes management (G28, G29) ........................................................ 36


2.23.4 Suspending and resuming Tool change (G38, G39) ....................................... 37
2.23.5 Reading Tool on spindle number (G104) ................................................... 37
2.23.6 Reading Real current axes positions (G105) .............................................. 37
2.23.7 Radial programming (G106) ................................................................. 37
2.23.8 Diametrical programming (G107) ........................................................... 38
2.23.9 Axis movement with alarm CNxx12 (G119)................................................ 38
2.23.10 Working field limits (G123) .................................................................. 38
3. TOOL RADIUS CORRECTION .................................................................. 40

3.1 INCOMPATIBLE PROFILE ERROR ......................................................... 42


3.2 APPROACH TO PROFILE ...................................................................... 42
3.2.1 Circular approach with final positions and slope (G41/G42 X.. Y.. QF..)............. 43
3.2.2 Linear approach without positions (G41/G42) ............................................ 44
3.2.3 Linear approach with final positions (G41/G42 X.. Y..) ................................. 45
3.3 END OF A PROFILE .......................................................................... 46
3.3.1 Circular retract, tangent to profile (G40 X.. Y..) ........................................ 46
3.3.2 G40 retract without positions (G40) ...................................................... 47
3.4 FEED MANAGEMENT WITH RADIUS CORRECTION (G109V, G109U).......................... 47
3.5 NULL OR NEGATIVE RADIUS .................................................................. 48
3.6 CONNECTING RADIUS ON EXTERNAL EDGES (G109S, G109T)............................... 48
4. RTCP (ROTATING TOOL CENTRE POINT) ................................................... 49

4.1 G117 RTCP FOR ROTATING / SWIVELING HEADS ............................................ 49


4.1.1 Static G117 (G117 KA2) ...................................................................... 49
4.1.2 Tilted working plane machining (G117KA2 + G116) ...................................... 50
4.1.3 Dynamic G117 (G117) ........................................................................ 51
4.1.4 G117 usage ..................................................................................... 52
4.1.5 Handwheel enable on rotating axes in G117 (G124) ..................................... 53
4.2 RTCP FOR ROTARY / TILTING TABLES ....................................................... 54
4.2.1 Static G118 (G118 HR2) ...................................................................... 54
4.2.2 Dynamic G118 (G118 HR1) ................................................................... 56
4.3 WORKPIECE MOUNTING ERRORS COMPENSATION ON ROTARY TABLES (G122) ................ 58
4.4 TOOL TIP VELOCITY CONTROL WITH DYNAMIC RTCP (G131) ............................... 59
5. PARAMETRIC PROGRAMMING................................................................. 60

5.1 PARAMETER MANAGEMENT ................................................................... 60


5.1.1 Parameter assignment ....................................................................... 62
5.1.2 Parameter assignment through a formula ................................................. 62
5.1.3 Axis movement programming with parameters........................................... 63
5.1.4 System parameters programming........................................................... 63
5.1.5 Axes programming through parameters AA, AB, AC ..................................... 64
5.2 PROGRAMMING WITH ADVANCED LINES ( ! ... ! ) .......................................... 65
5.2.1 Assigning values to parameters and computing expressions ............................ 65
5.2.2 Executing jumps without return (!GON..!) ................................................ 65
5.2.3 Executing jumps with return (!GON....!) ................................................. 66
5.2.4 Executing conditioned jumps (!IF .. ; GON.. !) ........................................... 66
5.2.5 Controlling more than one condition on the same advanced line ..................... 67
5.2.6 Structuring conditioned jumps .............................................................. 67
2
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.2.7 Jump to a CMOS subprogram (! GOP.. !) .................................................. 68


5.2.8 Jump to a CMOS subprogram with label (! GOP.. N..!) ................................. 68
5.2.9 Jump to a CMOS subprogram with two labels (! GOP.. N.. N..!) ..................... 68
5.3 CONDITIONING BLOCKS OF PROGRAMS (--IF) ................................................ 70
5.4 PROGRAM BLOCK REPETITION (--DO --LOOP) .............................................. 72
5.4.1 Specifying the repetition number (--LOOP N)............................................. 72
5.4.2 Repetition condition (--LOOP IF) ........................................................... 72
5.4.3 Exit condition --DO --LOOP (--EXIT DO IF) ................................................. 73
5.5 WRITING CMOS PROGRAMS (--DEFINE P..) ............................................... 74
5.6 WRITING A TEMPORARY SUBPROGRAM SUBTEMP (--DEFINE S..) ......................... 75
6. Z32 CANNED CYCLES AND MACROS......................................................... 76

6.1 Z32 CANNED CYCLES (G800) .............................................................. 76


6.1.1 G800K1: Drilling ............................................................................... 78
6.1.2 G800K2: Deep drilling with chip breakage ................................................ 78
6.1.3 G800K3: Deep drilling with chip extraction ............................................... 79
6.1.4 G800K4: Tapping .............................................................................. 79
6.1.5 G800K5: Reaming ............................................................................. 79
6.1.6 G800K6: Boring ................................................................................ 80
6.1.7 G800K7: Deep drilling with chip breakage and extraction .............................. 81
6.1.8 G800K8: Two zones drilling with gap ...................................................... 81
6.1.9 G800K9: Three zones drilling ................................................................ 82
6.1.10 G800K10: Internal spiral milling-boring.................................................... 83
6.1.11 G800K11: External spiral milling-boring ................................................... 83
6.2 Z32 POSITIONING MACROS (G801) ......................................................... 84
6.2.1 G801K1: Line - starting point and increments ............................................ 86
6.2.2 G801K2: Line starting point, angle and point distance ................................ 86
6.2.3 G801K3: Line - starting and end point ..................................................... 86
6.2.4 G801K4: Grid row and column increments .............................................. 87
6.2.5 G801K5: Grid starting point, distances and angles ..................................... 87
6.2.6 G801K6: Grid row and column starting and end points ................................ 87
6.2.7 G801K7: Circle initial angle and total increment....................................... 88
6.2.8 G801K8: Circle initial angle and angular distance...................................... 88
6.2.9 G801K9: Circle initial and final angle .................................................... 89
6.2.10 G801K10: Rectangle center and pitch.................................................... 89
6.2.11 G801K11: Rectangle center and sides .................................................... 90
6.2.12 G801K12: Rectangle corner and pitch.................................................... 90
6.2.13 G801K13: Rectangle corner and sides .................................................... 90
6.3 Z32 MACHINING MACROS (G802) ........................................................... 91
6.3.1 G802K1: Circular pocket roughing .......................................................... 93
6.3.2 G802K2: Rectangular pocket roughing pocket center ................................. 94
6.3.3 G802K3: Rectangular pocket roughing - corner .......................................... 95
6.3.4 G802K4: Circular pockets finishing ......................................................... 96
6.3.5 G802K5: Rectangular pocket finishing pocket center .................................. 97
6.3.6 G802K6: Rectangular pocket finishing - corner ........................................... 98
6.3.7 G802K7: Linear slot ........................................................................... 99
6.3.8 G802K8: Circular slot slot center ......................................................... 100
6.3.9 G802K9: Circular slot curvature center ................................................. 101
6.3.10 G802K10: Hole thread milling with a single tooth mill ................................. 102
6.3.11 G802K11: Hole thread milling with a multiple teeth mill .............................. 103
6.3.12 G802K12: Stud thread milling with a single tooth mill ................................. 104
6.3.13 G802K13: Stud thread milling with a multiple teeth mill .............................. 105
3
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.14 G802K14: Face milling ...................................................................... 106


6.4 MACHINE TOOL BUILDERS FIXED CYCLES (G27C..) ....................................... 107
7. PROFILE PROGRAMMING .................................................................... 108

7.1 CLOSED LINES ............................................................................. 110


7.1.1 Line end point (G1 X.. ; G1 Y.. ; G1 X.. Y..) ........................................... 110
7.1.2 Line end coordinate and slope (G1 X..QF.. ; G1 Y..QF..) ............................ 111
7.1.3 Line two coordinates end point and slope (G1 X.. Y.. QF..) ......................... 111
7.2 OPEN LINES (G1 ; G1 QF..) .............................................................. 113
7.3 CLOSED CIRCLES ........................................................................... 115
7.3.1 Circle center and end point (G2/G3 I..J..X..Y..) ...................................... 115
7.3.2 Circle end point and radius (G2/G3 X..Y..RA..) ....................................... 116
7.3.3 Circle center, radius and end slope (G2/G3 I..J..RA..QF..) ......................... 117
7.3.4 Circle center and end slope (G2/G3 I..J..QF..)........................................ 117
7.3.5 Circle radius and end slope (G2/G3 RA..QF..) ......................................... 118
7.3.6 Circle end point (G2/G3 X..Y..) .......................................................... 119
7.3.7 Circle center and end arc length (G2/G3 I..J..QA..) ................................. 119
7.4 OPEN CIRCLES ............................................................................. 120
7.4.1 Circle center and radius (G2/G3 I..J..RA..) ............................................ 120
7.4.2 Circle center (G2/G3 I..J..) .............................................................. 121
7.4.3 Circle radius (G2/G3 RA..) ................................................................ 122
7.5 LINE-CIRCLE COMBINATIONS ............................................................... 123
7.6 AUTOMATIC ROUNDINGS (RR..) ........................................................... 125
7.7 CHAMFERS ................................................................................. 129
8. DISK FILES RECALL........................................................................... 130

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


8.1.1 DNC disk program recall ( !:L254 ! ) .................................................... 130
8.1.2 Programming rules for DNC part-program ................................................ 131
9. HIGH SPEED SETTING ........................................................................ 132

9.1 MOVEMENT CONTROL FUNCTION: G113X KA2 ........................................... 132


9.1.1 Axes auto-tuning for G113X KA2 (G125 KA1) ............................................. 133
9.2 HIGH SPEED PARAMETERS: G114 RA..K..J..I..HY..HR................................. 134
9.3 SHORT-SEGMENTS CAM PART-PROGRAMS (G113B) ....................................... 137
9.3.1 Suggested CAM settings ..................................................................... 137
9.3.2 Short-segment part-program polishing (G113B) ...................................... 137
9.4 G135 I1: ADVANCED HIGH-SPEED SETTINGS .............................................. 138
9.5 G135 J1: ROTARY AXES SMOOTHING TOLERANCE IN RTCP .............................. 140
9.6 HIGH SPEED PARAMETERS SETTINGS (SUMMARY TABLE) .................................... 141
9.7 HIGH SPEED PARAMETERS - EXAMPLES ..................................................... 142
10. PROGRAMMING EXAMPLES .................................................................. 144

10.1 PROFILE 1 ................................................................................. 144


10.2 PROFILE 2 ................................................................................. 145

4
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.3 ROTATION ................................................................................. 146


10.4 TRANSLATION ............................................................................. 147
10.5 ROTO-TRANSLATION 1 .................................................................... 148
10.6 ROTO-TRANSLATION 2 .................................................................... 149
10.7 MIRRORING 1.............................................................................. 150
10.8 MIRRORING 2.............................................................................. 151
10.9 THIRD AXIS TURNOVER .................................................................... 152
10.10 ANGULAR REPETITION OF A PROFILE ....................................................... 153
10.11 154
10.12 PROFILE 1 REPETITION WITH VARIOUS DEPTHS ............................................ 155
10.13 FINISHING OF A SPHERICAL SURFACE ....................................................... 156
10.14 ELLIPSE ................................................................................... 157
10.15 ROTO-TRANSLATION IN THE SPACE (SPHERICAL SURFACE) ................................. 158
10.16 REVOLUTION SOLID ........................................................................ 159
10.17 MACHINING OF A X-Z PROGRAMMED PROFILE .............................................. 160
10.18 SLANTED HEAD DRILLING .................................................................. 161
10.19 CIRCUMFERENCE POSITIONING AND DRILLING FIXED CYCLE ................................. 162
10.20 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITH ROTATION ............... 163
10.21 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITHOUT ROTATION ........... 164
10.22 CIRCULAR POCKET ROUGHING ............................................................. 165
10.23 CIRCULAR POCKET ROUGHING POSITIONED ON A CIRCUMFERENCE .......................... 166

5
CNC Z32 M323 C2 - Programming guide (Milling Machines)

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 most
common 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
consult Programming Manual M96.

This manual is valid for SIS T113-5 version or later.

6
CNC Z32 M323 C2 - Programming guide (Milling Machines)

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 in
sequential way.
The ISO lines are composed by a line number (not mandatory) and by a series of elementary instructions.

2.2 MACHINE BEHAVIOR AT RESET


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

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 reset


The 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 contain technological
parameters, like parameter F (feed) or parameter S (speed), these values are set at reset with the
corresponding values in the tool table. Parameters normally contained in the tool description, are length
L and radius R.

Behavior of working plane at reset


As described later on, there are functions which allow to set the working plane of the machine and to
define the tool length correction axis. These functions are G25, G43 and G44.
The behavior of these functions when pressing RESET button, is function of machine setup settings.
Depending on the settings, it can happens:
- The machine sets its base configuration (for example G25XYZ and G43Z)
- The machine leaves as active the last programmed G25, G43, G44
A further option is to make last G25, G43, G44 settings memorized in permanent memory and restored also
after a CNC reboot.
Please refer to 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 the numerical
control. A non alive axis is an axis without control. A machine setup data defines the behavior at reset.
During part-program execution an axis can be switched alive or not alive through instructions G28 and G29.

7
CNC Z32 M323 C2 - Programming guide (Milling Machines)

If the alive axes are defined as reset-transparent, the reset will not alter the actual map of alive axes.
If the alive axes are defined as non reset-transparent, the reset restores the map of alive axes defined
in the setup.
Please consult the machine tool builder for further information.

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 reset condition
is forced. Thus the machine initiates the execution starting from the reset state, and every modification
to be made on this state must be expressly programmed in the part-program.

2.3 LINE NUMBER


The letter N followed by a number (also decimal) composes the line number. The line number programming
is not mandatory. As an example, all following syntaxes are equivalent:

G0 Z100
and
N10 G0Z100

Line number format: The line number can be an integer or decimal number, with the decimal position
indicated either with a point or with a comma. It is possible to insert some space characters between the letter
N and the number. As an example, it is possible to write:
N100
N 100.2
N100,34
The only limitation is the total number of numeric characters before and after the decimal delimiter, which
cannot 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.

8
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.4 THE STANDARD ISO LINE


After the optional line number N, the ISO line is composed by a sequence of elementary instructions. Each
instruction 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, you can insert an arbitrary number of spaces.
The same line may contain more than one couple address-value.

The followings are all valid ISO lines:


N10 G0 Z100
N20 G0 X 100 Y200
G0Z0X0Y0

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.1
X .1
X,1
X0,1
X 0.1
X00000,1000

All numbers cannot have more than 9 significant digits before or after the decimal delimiter.
All following sample programming are valid ISO lines:
X123456789
X0.123456789
X0.0000123456789
X12345.6789
Invalid programming:
X1234567.12345
X12345.67890000
X1.00000001234

A number cannot contains space characters.

2.5 COMMENT LINES


A part-program may contain comment lines.
A comment may be contained between round parenthesis.
Example:
G0 Z100 (initial approach)

Warning: inside a comment it is not possible to insert other round parenthesis:


G0 Z100 (initial approach (Z high) ) -> is an error

The character ; (semicolon) at the beginning of a line makes the whole line a comment

Warning: ; character must be programmed at the beginning of the line


; G0 Z100 -> the whole line is a comment
G0 Z100 ; Z alto -> its an error

9
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.6 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
value following the G letter must always be a numeric value (CANNOT be an expression result).

Z32 interpret and execute only some G functions (i.e. only some numeric values). If a not implemented 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 are
recognized 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 lasts also in the blocks following the one where
they were programmed: modal G functions are normally deactivated by other special G functions.

Some G functions require the machine STOP: is executing a profile, it must be completely defined
before executing these functions. In this case no contouring with open profile, or contouring with radius
compensation can be active.

2.7 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
by the desired feed value (numeric value with a maximum of 9 significant digits).

Programmed after G94 it 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 or degrees, depending on the axis type.

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


( , , )
=
(, , )

10
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.8 S PARAMETER AND SPEED MANAGEMENT (G96 G97)


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

Programmed after G97 it 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: the
spindle 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,
aside G96 the parameter MS is activated (programmable also before the S value) which sets the
maximum spindle rotational speed (in rpm) allowed. The active MS value is that present at the moment
of last programmed S: if the 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 of the distance from spindle center, while the center crossing is limited by the programmed MS.
It is possible to program:

MS 4000
G96 S100 M3

This programming imposes a cutting speed of 100 m/min.


With a maximum speed limit of 4000 rpm.

11
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.9 M FUNCTIONS
The M functions (miscellaneous) are mainly related to the machine tool behavior and their functionality is
mostly defined 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
by the Z32, and only these codes will be discussed.
The numeric value (two integer digits) following the letter M, indicates the programmed M function. All
leading zeros can be omitted (G0 = G00).

M0 - stop
It stops the program execution; program resuming trough Start pushbutton. This function also
stops spindle and coolants.
M1 conditioned stop
Same behavior as M0, but M1 activity is conditioned by a dedicated logic input: for further
details, please consult 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 also stops spindle and coolants. After the M6 execution, the CNC takes into account the
description of the tool mounted 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. For
further 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 the machine PLC, every special M code is associated with a service part-program. A typical example
of special M is the M6 for tool changing.
The definition and programming of subprograms associated with special M codes, are activities reserved
to the machine tool builder.
During the execution of the subprogram associated to a special M, the progressive block number
counting is suspended (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.

12
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.10 AUXILIARY FUNCTIONS MA, MB, MC


Besides M auxiliary functions, the Z32 control offers to the machine tool builder three more auxiliary functions
categories (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.11 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 the
execution 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
of M2, i.e. the part-program execution is aborted.

13
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.12 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 to the active supplementary origin.

Y'
Y In this example, the supplementary
origins on X and Y axes (OX1 and
OY1) define the reference point for the
positions programmed in the part-
Y40

program:
Y25

X' OX1 OY1


OX1 OY1 G0 X20 Y25
X20
G1 X55
X55
Y40
X20
Y25
X

OX0 OY0

The setup of supplementary origins is generally an activity to be done on the workpiece mounted on the
machine.
The program will then recall the desired supplementary origins.

The address O indicates an origin recall to the Z32.

Setting origin for a single axis:


Whit this function, the origin is activated only for a specific axis, all other axes keep the previous origin
setting

If the called origin doesn't exist, a programming alarm is returned

Syntax for single axis origin:


- program letter O
- axis name (X, Y, Z, ...)
- origin number (from 1 to 999)

For example:
OX1 (set origin 1 for X axis)
OX122 OY122 (set origin 122 for X axis and Y axis)
OX10 OY31 (set origin 10 for X axis and origin 31 for Y axis)

Setting origin for multiple axes:


A possibility is to program the single axis origin for all the wanted axes, for example:

OX1 OY1 OZ1 (set origin 1 for X axis, Y axis and Z axis)
14
CNC Z32 M323 C2 - Programming guide (Milling Machines)

As an alternative, it's possible to use a command to set an origin with a specific number for all the axes
that have that specific origin defined. Axes that don't have that origin defined, keep the previous origin
setting

Syntax for this alternative way of multiple axes origin setting:


- program letter O
- origin number (from 1 to 999)

For example:

O1 (set origin 1 for all that axes that have origin 1 defined)
if origin 1 is defined only for X and Y axes,
Origin 1 is set only for X and Y axes, while Z keeps the previous origin setting

O122 (set origin 122 for all that axes that have origin 122 defined)

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

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, axes coordinates are
referred to machine base origin (set by the machine tool builder).

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
CMOS 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 origins
In 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.

15
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.13 T PARAMETER AND TOOL CHANGE


The T parameter is devoted to the tool change, together with the M6 function. The digits following the T letter
indicate 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 tool
magazine 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 are
recalled and assigned.
The values for tool length (L) and radius (R) are assigned, together with every other parameter stored in
the table. It is thus possible to save in the table also the S and F values (Speed and Feed) related to
the tool 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:

Processo: 0 1 2 3 4 5
Tool Table CMOS File: 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 parentheses.

In the above example:


The tool T1 is positioned at place #1, has a length L10 and radius R2

16
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.14 TOOL LENGTH AND RADIUS

The tool length is 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 control
taking into account the L length along the axis defined as tool axis,
without need to modify the part-program positions.

The tool radius is the value of parameter R.


L 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 expressly
programming 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
R of plane profiles with radius correction, through the functions G40,
G41 and G42.

2.14.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 between
parameters L and DDL.
The correction set through the parameter DDL is not incremental; to cancel its effect it is necessary to program
DDL0.
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 program
DDR0.
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)

17
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.15 CANCELLATION AND SUSPENSION OF ORIGINS AND LENGTHS (G53 G54 G45)

These functions are reserved to expert programmers.

To cancel an origin it is necessary to program the base origin, for example:


OX0 OY0 OZ0

To cancel the tool length corrections it is necessary to program a null length:


L0

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

The restoring of corrections due to supplementary origins and tool length happens by programming
the G54 function. After programming the G54 function, the situation of origins, lengths, roto-
translations, mirroring and scale factors existing before the G53 programming is restored.

To suspend only the correction due to the tool length it is possible to use the G45 function. After
programming of the G45 function, movements of the tool axis dont take into account the tool length.

The tool length correction can be restored by programming the G43 or G44 function.

18
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.16 COORD. SYSTEM (G25), TOOL AXIS (G43 - G44) AND CONTOURING PLANE
The function allowing the definition of the machine coordinate system and the contouring plane is the G25
function.
The G25 code must be followed by three characters representing three axis names defined as continuous on
the machine.
As example: G25XYZ define the coordinate system composed by the three axes X, Y, Z.

The first two axes of the coordinate system define the contouring plane (where circular interpolations are
allowed). The third axis is an additional axis coordinated to the first two (may be used for fixed cycles and for
other machine functions).
At power on and after each program start, the coordinate system 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 (negative
correction) as shown in the figure:

Z Z L Z L

G43Z G43X G44X

X X X
Typical situations for three axis machine are the followings:
1. Working plane XY and positive tool length correction along axis Z
This configuration can be programmed with:
Y
Z

G25 XYZ
G43Z
X

2. Working plane ZX and positive tool length correction along axis Y


This configuration can be programmed with:
Y
Z

G25 ZXY
G43Y
X

3. Working plane YZ and positive tool length correction along axis X


This configuration can be programmed with:
Y
Z

G25 YZX
G43X
X

19
CNC Z32 M323 C2 - Programming guide (Milling Machines)

The machine tool builder normally setup the default machine coordinate system, together with the default
axis for tool length correction.

The behavior of these functions when pressing RESET button, is function of machine setup settings.
Depending on the settings, it can happens:
- The machine sets its base configuration (for example G25XYZ and G43Z)
- The machine leaves as active the last programmed G25, G43, G44
A further option is to make last G25, G43, G44 settings memorized in permanent memory and restored also
after a CNC reboot

20
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.17 MOVEMENT PROGRAMMING (G0 G1 G2 G3)


The programming of machine movements happens through the functions:
G0: rapid movement
G1: linear interpolation
G2: circular CW interpolation
G3: circular CCW interpolation

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

(behavior with MODAL G movement functions)


F1000
G0 Z100 (G0 movement)
X100 (G0 movement)
Y100 (G0 movement)

G1 X0 (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
NOT MODAL.
In this case all movement without an explicit G function indication are assumed as programmed in G1 mode.

(behavior with NOT MODAL G movement functions)


F1000
G0 Z100 (G0 movement)
X100 (G1 movement)
Y100 (G1 movement)

G1 X0 (G1 movement)
Y0 (G1 movement)
X10 (G1 movement)

2.17.1 Rapid movement (G0)

G0 X..Y..Z..

Z Y
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.
X Example:
G0 Z100
G0 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
specification of 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.

21
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.17.2 Linear interpolation (G1)

Y
Z

Up to ten axes can be simultaneously programmed. The trajectory followed


G1 X..Y..Z.. by the axis group to reach the programmed end point is linear: all
programmed axes arrive together to the programmed point.
X

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 purpose to prepare
for a G1 movement.

Example:
...
N10 G1
N11 X0 Y0
...

not allowed: block 11 issues the error CN3414

2.18 CIRCULAR INTERPOLATION (G2 G3)

Y X,Y Y
G2
The functions G2 and G3 specify clockwise circular
I,J I,J
interpolation (G2) or counterclockwise circular interpolation
G3
(G3).
X,Y The movement must be programmed on the first two axes of
the contouring plane, defined with the G25.
X X
The circular interpolation must be preceded by a positioning
on the 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 J for 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 syntax
becomes:
G3 Z.. X.. I.. J..

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

22
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.18.1 Helical interpolation (G2 G3)


With G2 and G3 functions, the position programmed for the third axis of the coordinate system is reached at
the end of movement, together with the two axes of the plane. The velocity of the resultant movement is the
programmed F value.
Helical interpolation if available also with radius correction (G41 or G42 active): it thus allow the motion of
the third axis, always coordinated with that of the first two.

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

Example:
G3 X..Y..I..J..Z..

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

--DO
G3 X..Y..I..J..Z<Z-1.2>
--LOOP 5

Total of 4 helicoids, with 1.2 Z increment for each complete circle

23
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.19 INCREMENTAL COORDINATES PROGRAMMING (G90 G91)


Warning:
From Z32 software version T113-2 a new G91 management is available
Note: previous management (still available in order to grant compatiliblty with old part-programs)
needed to program HX parameter together with G9. HX defined a scale factor applied to increments,
expressed as thousandths of visualized units.
For example, with previous G91 management, incremental programming was activated by
programming: HX1000 G91
New G91 management doesnt need HX parameter
The machine manufacturer configures the machine and choose the previous or new G91 management.

Description of the new G91 management

The syntax is as follows:

G91 Starts the incremental programming

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.


Y
Example:
80

F1000
15 G0 X10 Y10
(activates incremental programming:)
G91
35 G1 X20
Y35
X30
10 Y15
X
0
(deactivates incremental programming:)
20 30 G90
X80 Y80

0 10 80

24
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.20 THREADING AND RIGID TAPPING

2.20.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, unless
accelerations 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 G33 must precede G2/G3 in the line: if G2 or G3 are programmed before G33 (i.e. G2G33)
they are canceled from G33 which forces G1.

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

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

During the G33 the following are not active:


axes override
spindle 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 the
movement is synchronized with the spindle zero crossing.

25
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.20.2 Variable pitch threading (G34, G35)

The term variable pitch threading indicates a threading whose pitch is not constant, but varies continuously
according to a determined variation quantity.
The variable pitch threading is programmed through two different G functions:
G34 K.. I.. increasing pitch threading
G35 K.. I.. decreasing pitch threading
All descriptions related to the fixed pitch threading (G33) remain valid also for the variable pitch threading
(G34 and G35).

K = initial threading pitch (mm or inches) .


This parameter can be programmed in the same block of G34/G35, or in preceding blocks.
Warning: if the K parameter is newly programmed in subsequent blocks, when G34/G35 is
active, an abrupt 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 negative number.
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 will
continuously vary or remain constant, or it will have a discontinuity, depending on the threading function and
parameters programmed.

26
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.20.3 Rigid tapping (G163)

G163 activates a tapping movement composed by:


Tapping with K pitch up to the programmed position with optional chip breaking
spindle inversion
return to the starting position.
restore spindle rotation direction

The movement of programmed axes (normally only Z axis) is rigidly connected to that of the spindle for the
complete duration of the tapping cycle and backward movement

The CNC automatically calculates the right spindle inversion ramp in order to be as precise as possible on the
final coordinates of the tapping movement. Due to uncertainties on spindle motor behavior and mechanical
transmission it can be expected an error on final axes coordinates from 0.01mm to more than 0.2mm
Its thus highly suggested to keep a safety margin on final hole coordinates

Syntax of G163:
G163 XYZ K [I] [J] [HX]

XYZ = Final coordinate of tapping movement

K = tapping thread
Example:
G0 X0 Y0 Z10 S300 M3
G163 K1.25 Z-50
-> tapping movement from Z10 to Z-50 with S300 and pitch 1.25 (F375)
-> backward movement from Z-50 to Z10 with S300 and pitch 1.25 (F375)

I = optional parameter: multiplicative factor on spindle speed for backward movement


I should be limited between 0.5 and 4
Example:
G0Z1
S200 M3
G163 Z-20 K1.2 I3
-> tapping movement from Z1 to Z-20 with S200 and pitch 1.2 (F240)
-> backward movement from Z-20 to Z1 with S600 and pitch 1.2 (F720)

J = optional parameter: chip breaking


J represent the length of a single tapping forward movement
Backward movement has a length of 1.5 x J as default

HX = optional parameter: multiplicative factor on J for determining length of backward movement


when tapping with chip breaking
Example:
G0 Z1 S400 M3
G163 Z-100 K1.5 I2 J10 HX2
-> tapping movement from Z1 to Z-100 with S400 and pitch 1.5 (F600)
-> chip breaking composed of:
Forward movement of length = 10 (J10)
Backward movement of length = 20 (J x HX)
During backward movement spindle speed is multiplied by I factor, in the example
It is S800 with pitch 1.5 (F1200)
-> final backward movement from Z-100 to Z1 with S800 and pitch 1.5 (F1200)

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.

27
CNC Z32 M323 C2 - Programming guide (Milling Machines)

During the G163 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.

Note: as an option it is available a special management of STOP button while executing a rigid tapping:
spindle and axes will not stop immediately after button press, but:
- an immediate inversion of the spindle is commanded
- a rigid tapping backward movement is performed
- the machine axes are brought back to the tapping starting position
- once backward movement is completed the machine (spindle and axes) is stopped.

28
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.21 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.21.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
coordinates IR and JR.

Y
The rotation activation happens automatically after
programming the QR parameter.
QR
It is possible to execute rotations only on the working plane,
set by the function G25. The definition of point (IR, JR) follows
the rule:
IR is the rotation center coordinate related to the first axis of
(IR, JR) contouring plane, while JR is the rotation center coordinate
JR
related to the second axis.
X For example, in G25XYZ: IR is the X coordinate, while JR is the
IR Y coordinate 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 active
translations (DA DB DC), mirroring (G56) or scale factors.

29
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.21.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 axis
DB executes a translation along the second axis
DC executes a translation along the third axis

For example, if the configuration G25XYZ is active:


DA translates the machining along X axis
DB translates the machining along Y axis
DC 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:

DA10 DB14

14

10

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

DA100 DB50
QR IR0 JR0 QR45
DB

DA

30
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.21.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 of coordinates (IS, JS) and by the slope QS.

QS The mirroring must be enabled with G56 (modal). G55 cancels


G56 and thus the mirroring.

It is possible to activate the mirroring only on the first two


(IS, JS)
axes of contouring plane, defined by G25. The definition of
point (IS, JS) follows the rule:
JS
IS is the coordinate related to the first axis of working plane,
X
while JS is the coordinate related to the second axis.
IS For example, in G25XYZ: IS is the X coordinate, while JS is the
Y coordinate of rotation center.

No more than one mirroring can be activated.

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

2.21.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
scale factor on the positions of Z axis.

The scale factors are automatically applied after programming


KP = 2 the parameters KP and KT.

At Reset KP=1 KT=1

2.21.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:
KMX1.2 (scale factor of 1.2 only on X axis)
KDZ10 (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.

31
CNC Z32 M323 C2 - Programming guide (Milling Machines)

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

2.21.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
axis is programmed as DB. Example:
DA100 DB50 (XY translation )

DA0 DB0 (end translation)

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 coordinate system must be programmed with DC. Example:
DC1 (Z translation )

DA0 DB0 (end translation)

Mirroring along the first axis of working plane (X axis in G25XYZ)


IS0 JS0 QS0 G56 (mirroring of Y coordinates)

G55 (end mirroring)

Mirroring along the second axis of working plane (Y axis in G25XYZ)


IS0 JS0 QS90 G56 (mirroring of X coordinates)

G55 (end mirroring)

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 (mirroring of Z coordinates)

G55 (end mirroring)

Combined mirroring with respect to both first and second axis of working plane (axes X and Y in G25XYZ)
In this case it is necessary to use a 180 degrees rotation with respect to zero point:
IR0 JR0 QR180 (mirroring XY coordinates)

QR0 (end mirroring)

32
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.22 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, J and K may be programmed on the same line

KA is the parameter used to select the G116 mode:


KA0 disables G116
KA1 enables G116
KA2 without further parameters, generates automatically the angles necessary to orient the working
plane orthogonally to the spindle. This feature is possible only in conjunction with generalized G117,
otherwise the 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 K determine the roto-translation to be made.


X Y Z indicate the origin of the new axes system.
I (or J or K), which may be programmed alternatively, indicate the rotation of the new axes system,
around the X axis (or Y or Z) in the active axis system, which may in turn be rotated by preceding G116
with respect to the base situation.
In other words, G116 introduces a machining translation through the parameters X, Y, Z, and a rotation
angle I (or J or K).
I J K must be expressed in degrees.

The limit to program only one rotation axis at a time is a necessary limitation to obtain the maximum
of clarity in case of multiple rotations: in fact, we doesnt get the same result programming for instance
at first a rotation around X and then a rotation around Y, or at first around Y and then around X.

Rotations around more than one axis may be obtained by cascaded programming (in subsequent lines)
the various 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
shut down.
In case of a machine stop during an active G116, for example with a drilling bit inserted in a sloping
hole, it is thus possible power on the machine, program G116 in semiauto without parameters, switch
to Jog mode and extract 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 a
reference 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
the axes with logical number 0, 1 and 2. In all examples shown, the G116 operates properly only if axis X
has the logical number 0, Y the logical number 1 and Z the logical number 2. Please consult the machine
tool builder for further details.

33
CNC Z32 M323 C2 - Programming guide (Milling Machines)

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

30 2
3 40 30

Z
40 Y X
Y

30
Y X
Z Z

30
30

X
Y
Y X

Z Z
X

5
4 40
30

30 40

1) Vertical head:
Standard configuration
G116KA0
2) Right side face:
G116 X40 Z-30 K90
G116 I90
3) Rear face:
G116 Y30 Z-30 I-90
G116 K180
4) Left side face:
G116 X-40 Z-30 K-90
G116 I90
5) Front face:
G116 Y-30 Z-30 I90

34
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.23 OTHER FUNCTIONS

2.23.1 Dwell (G4 TT..)

The dwell value, expressed in seconds, is indicated by the parameter TT which can be programmed on the
same line 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.23.2 Axes exchange (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 the
diagram below:

G16 ... Desired axis names


...
0 1 2 3 ... Logical axis number

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:
Axis Logic Number 0 1 2 3 4
Desired axis name Z X Y A B
Axis name in machine settings X Y Z A B

The above example can be programmed:


G16ZXY

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

35
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.23.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
not interested 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
same or 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 setup
all axes programmed as alive (with G28) or abandoned (with G29) restore their alive/not alive axes
state 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 X
Only 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
or subsequent 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 programmed one.

The CNC considers the physical position coincident with the programmed position if the error is less
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 the not
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 the positioning
threshold; the threshold override may thus happen if the position is already close to the tolerance
limit. Typical examples are:
o a rotary table (or other axis) during the mechanical lock may have a little movement bringing
the axis very close to the maximum setup error allowed
o programming a little movement for a not alive axis, corresponding to a space very close to the
positioning threshold

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

36
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.23.4 Suspending and resuming Tool change (G38, G39)

By programming G39 it 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 a
machine 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 is
considered as done.
The programmed tool is thus considered in all its effects as already mounted on the spindle, with related
acquisition of 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.23.5 Reading Tool on spindle number (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
the management for replacement tools is installed, and the tool actually mounted is a replacement for T101,
the parameter HX will contain the T code related to the tool actually mounted.

2.23.6 Reading Real current axes positions (G105)

The function G105 transfers 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 axes
position 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 differ due 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 not 10.

2.23.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 not used, because automatically active at reset. After G106 the X axis and J parameter programming are
considered as radial. For an example, see G107,
37
CNC Z32 M323 C2 - Programming guide (Milling Machines)

2.23.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.23.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 a
subprogram (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
measure not significant positions, possibly disabling the movement. The operator is in charge to
have the maximum awareness in order to avoid collisions and damages.
In every case, as safety precaution, the Z32 automatically enables the TEST condition (rapid
reduction to 1/5) when G119 is active.

2.23.10 Working field limits (G123)

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

Warning:
G123 is only active on the final programmed positions of linear movements. The intersection between
movement and limit position is not estimated, but only the substitution (or the test depending on the
mode) of the final programmed position.

For each continuous axis it is possible to define a working field, defined through an upper and a lower limit,
which limits 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...]

38
CNC Z32 M323 C2 - Programming guide (Milling Machines)

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 negative limits.

The limits are programmed by the name of continuous axis where the limits have to be applied.
The programmed limits are always referred to the active origin.
The limits are applied only on continuous axes explicitly programmed with G123KA1 or G123KA-1, the
other remaining unchanged.
At reset all limits are disabled.
Only the positive or negative limit can be active, or they may be both active.
On each axis : (positive limit) > (negative limit)
If the axes are already outside the limits when G123 KA1 or G123 KA-1 is programmed, the alarm
CN5514 will be issued

Function modes
G123 KA3
Activates alarm mode: if one of the programmed positions is outside the working field, the
alarm CN5614 is issued.
G123 KA4
Restores normal mode, the positions are limited by working field. This is the default mode,
the mode normally active if not otherwise programmed. If a movement outside the limits is
programmed, the movement stops when it reaches the limit set, without generating any alarm.
G123 KA5
Enables stop mode: if one or more programmed positions are outside working field, all
movements are stopped and resumed only when all programmed positions lie inside working
field. When the programmed positions re-enter inside the working field, all axes previously
blocked are considered as programmed.

Warning: if during the stop phase more than five axes were moving, when the movement
is restored, more than five axes are considered as programmed, bringing to the alarm
CN2C14 (incompatible parameters).

Rules and restrictions for G123


G123 must be programmed in a stand-alone line, otherwise the alarm CN2C14 (incompatible
parameters) will be issued.
If a circle (G2 or G3) is programmed when G123 is active, the alarm CN5714 (circle+G123) is issued.
If G53 is programmed when G123 is active, or vice versa G123 programmed when G53 is active, the
alarm CN5A14 (G123+G53) is issued.
If G105 is programmed when G123 is active, the alarm CN5914 (G123+G105) is issued.

Deactivation
By programming G123KA0 both positive and negative limits are disabled, but all limit settings (limit positions,
KA3, KA4) remain valid.
To restore the preceding positive limit, it is sufficient to program G123KA1 without any position, and to restore
the negative limit G123KA-1 without any position.

39
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3. TOOL RADIUS CORRECTION

When a contouring profile is programmed for the numerical control, the radius of tool executing the profile is
normally not known: the tool radius may vary due to many reasons (availability, sharpening, different tools
used for roughing and finishing, etc.).
The Z32 CNC allows to program directly the finished workpiece profile, and automatically executes all
necessary profile modifications as a function of the effective tool radius.
It is thus clear that the tool center path (i.e. the machine axes motion) is different from that necessary to
describe the programmed profile with a speckled tool (R=0).
In the figure, the tool center path (AG) corresponding to the programmed profile (16) is shown.

Please note the following:


internal edges may not be machined due to tool radius (areas X)
some roundings are automatically inserted (not programmed in the original profile) around external
edges (B and D)
some programmed segments have been eliminated because they cannot be machined with the
programmed tool radius (segment 5)

Generally, if the tool radius correction is activated in a program (with G41/G42), the Z32 CNC executes a series
of operations on each element of the programmed profile, in order to transform it in the tool center path.

These operations may bring to the elimination of some profile elements because they cannot be machined with
the tool radius. The possibility to eliminate some profile elements imposes the CNC to explore in advance
the trajectory, searching elements which cannot be machined.

The G109 function allows to determine how many elements are explored in advance in this search:

G109A three elements (active at reset)


G109B four elements
G109C five elements
G109D six elements
G109E seven elements

40
CNC Z32 M323 C2 - Programming guide (Milling Machines)

OX1 OY1 OZ1


T1M6 G3 I0 J0 RA85 KA1
S3000 M3 F1000 G1 X-80 Y60 QF180
G109E Y50
R6 G1 QF0 KA1
G0X0 Y40 G3 I0 J0 RA85
G41 X10 Y40 QF90 G1 X-45 Y40 QF0
G2 I25 J40 Y30
G1 X60 Y45 QF0 X-55
Y60 Y20
X40 X-45
Y80 Y5
X5 Y90 G1 G2 I-30 J0 RA5 QF-135
Y95 G1
X10 X-20 Y-15 QF0
Y100 Y20 RR-5
X-10 G1 QF0 KA1
Y95 G3 I0 J15 RA6 KA1
X-5 G1 X25 Y20 QF0
Y90 G1 QF90
X-10 G2 I25 J40 X10 Y40
Y89 G40 X0 Y40
G1 KA1 M2

In the figure an example is show of a profile executed with a tool radius of 2 (left) and with a tool radius 6 (right).
Please note in the right execution that many profile elements are not machined, due to G109E programming.

41
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.1 INCOMPATIBLE PROFILE ERROR

If a profile cannot be executed with tool radius compensation, the INCOMPATIBLE PROFILE error may be issued.
In these cases it is possible to program the function G109R, which forces the generation of a rounding also
around internal edges (provoking a kind of knot) with the purpose to display the element generating the
problem, and eliminating the issuing of INCOMPATIBLE PROFILE error.

G109R is canceled by G109N.


Please pay attention that the activation of G109R may provoke the tool to enter in the programmed profile,
and long roundings may remain around internal edges in case of complex profiles.

Warning: usually G109R is programmed only to understand the situation provoking the INCOMPATIBLE
PROFILE error with tool radius correction. It is not a function to be used in normal programming.

3.2 APPROACH TO PROFILE


To initiate the mode RADIUS CORRECTION on the Z32 CNC, it is necessary to program G41 (workpiece on the
right) or G42 (workpiece on the left).
After the function G41/G42, all programmed positions are no more interpreted as tool center positions, but as
positions of the workpiece profile.

42
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.2.1 Circular approach with final positions and slope (G41/G42 X.. Y.. QF..)

Together with the preparatory function G41 (start of radius correction with workpiece on the right) or G42
(start of radius correction with workpiece on the left) are programmed the following:
the two final positions of the approach movement (initial profile point)
final slope of circular arc
The final slope is programmed as described in the chapter for Geometry.

The approach to the profile is done through a circular arc bringing the tool to skim the programmed point,
ready to execute an element starting from the programmed point with a QF slope.
Length and curvature of the circular arc are automatically computed by the CNC, depending on the start point
of the approaching element.
The examples below show the tool movement with different tangent profile approaches
...
...
Y G0 X-20 Y30
Y G0 X0 Y40 G41 X0 Y20 QF0
G41 X0 Y20 QF0 G1 X50
40 G1 X50 ...
... 30

20

20

0
X
0
X

-20 0

...
G0 X-45 Y-15 ...
G0 X-50 Y0
G41 X-30 Y0 QF90
G41 X-30 Y0 QF90
G2 I0 J0 X0 Y30
Y G1 X50
G2 I0 J0 X0 Y30
Y
... G1 X50
...

0
X
X

-15
R30
R30

-45 0 -50 0

In some cases it may be necessary to compute the final slope of the approaching movement:
Y
Y

20
30
30
R40

X
X

R40
-20 0

... ...
G0 X<-20*CS30> Y<20*SN30> G0 X-20 Y0
G42 X<-40*CS30> Y<40*SN30> QF60 G42 X<-40*CS30> Y<40*SN30> QF60
G2 I0 J0 X40 Y0 G2 I0 J0 X40 Y0
G1 Y-20 G1 Y-20
... ...

43
CNC Z32 M323 C2 - Programming guide (Milling Machines)

The advantage of this profile approach, if the slope is correctly programmed, is that the tool enters in contact
with the profile along the tangent, making a minimum mark on the workpiece.
A disadvantage may arise when the QF computing is difficult.

3.2.2 Linear approach without positions (G41/G42)


It is possible to program a sequence like this:
...
N20 G41 (without any position)
N21 G1 X10 Y4 (G1 may be omitted, both positions are mandatory)
N22 ...

The block N21 specifies the first point of profile to be reached with the radius correction.
The block N22 contains the first movement on the profile, with the radius correction; the movement
can be chosen among those valid for the Z32 geometry, starting from the point of N21.
The approaching movement will bring the tool tangent to the profile on the point programmed in N21
(the tool center will be on the vertical of the profile point of N21, with an offset equal to the radius).
After programming G41/G42 without positions, a profile element in G1, G2 or G3 is normally
programmed.

...
...
G0 X... Y...
G0 X... Y...
G41
G41
G1 X-40 Y10
G1 X<-40*CS30> Y<40*SN30>
X0 Y30 G2 I0 J0 X0 Y40
Y
X50 G1 X50
... ...
Y

30 40

10
R40

0
X
30
0
X

-40 0

44
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.2.3 Linear approach with final positions (G41/G42 X.. Y..)


Only the profile start point coordinates are programmed.
The approaching initial movement is a line segment, treated at all effects as a profile element, possibly
shortened if it interferes with the other profile elements.

This type of approach is different from that without positions, as shown in the example:

... ...
G0 X0 Y40 G0 X0 Y40
Y
Y G41 G41 X0 Y20
G1 X0 Y0 X50
40
40 ...
X50
...

20 20

0 0
X X

0 0

G41/G42 without positions G41/G42 with final positions

Please note that with the G41/G42 approach with final positions, the approaching element is considered at all
effects a profile element. Please note also that, differently from the approach without positions, this kind of
approach may left not machined zones on the profile.

45
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.3 END OF A PROFILE


The retract from the profile is analogous to the profile approach: also in this case the CNC changes the meaning
of the programmed positions, but in inverted direction; it interprets no more the positions as profile positions,
but as tool center positions.
The G function to be used is G40.
In the first movement block following that containing G40, it is necessary to program a movement type (G1,
G2 or G3).

3.3.1 Circular retract, tangent to profile (G40 X.. Y..)

With G40 X Y the CNC executes a circular element tangent to the last profile element executed, bringing the
tool center on the indicated final point.

G41 ...
G41 ... ...
... ...
... G1 X0 Y20
Y Y
G1 X0 Y20 G40 X20 Y30
40 G40 X0 Y40 ...
...
30

20
20

0
X
0
X

0 20

G41 ...
... G41 ...
... ...
G2 I0 J0 X30 Y0 ...
Y
G40 X60 Y0 Y
G2 I0 J0 X30 Y0
... G40 X50 Y-15
...

0
X
X
R30
R30
-15

0 50
0 60

46
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.3.2 G40 retract without positions (G40)


If the final positions of connecting element are not programmed, the radius correction ends directly on the
final point of programmed profile: the subsequent block will have a starting point coinciding with the tool
center coordinates.

G41 ...
G41 ...
...
... ...
G1 X0 Y30 ...
X40 Y10 G2 I0 J0 X30 Y0
G40
G40
Y
X... Y... X... Y...
... ...
Y

30

R30

10 X

0
X

0 40

The block programmed after G40 without positions, may have any movement type G0, G1, G2, or G3.

If the end of radius correction G40 is programmed together with G0 and a position, for instance:
N30 G40 G0 Z20
the programming alarm CN1D14 will be issued.

3.4 FEED MANAGEMENT WITH RADIUS CORRECTION (G109V, G109U)


The programmed FEED is normally the velocity desired by the programmer for the profile machining. Normally
the CNC maintains constant the tool center velocity (if compatible with the dynamic limits imposed by allowed
accelerations), equal to the programmed F.

With radius correction the programmer normally desires to maintain constant the profile machining velocity,
corresponding to that of tool periphery, and not that of the center.

On linear elements, the velocities of tool center and tool periphery are the same, while differences arise with
circular elements.
The contouring velocity of tool periphery in internal arcs is higher that that of tool center, while it is smaller
in external arcs.

Normally, with radius correction, the Z32 CNC tries to maintain constant the contouring velocity of tool
periphery, instead of that of tool center: in every case are EXCLUDED velocity increments with respect to the
tool center programmed feed.

If it is instead desired to maintain the tool center velocity equal to the programmed feed, thus deactivating
the control on tool periphery velocity, it is necessary to program G109U.

The function G109V restores the control on tool periphery velocity with radius correction. The G109V mode is
active at reset, thus being the default setting.

47
CNC Z32 M323 C2 - Programming guide (Milling Machines)

3.5 NULL OR NEGATIVE RADIUS


Null or negative tool radius are allowed: in case of null radius, exactly the programmed profile will be executed,
while a negative radius is equivalent to exchange the meaning between G41 and G42.
A negative radius may be useful when the profile has already been computed (i.e. by an automatic programming
system) for the typical tool radius, and the operator has added the tool radius compensation directly on the
machine to compensate possible wearing or difference in the actual tool used.
Please, pay attention that the radius considered by the Z32 is fictitious, losing the automatic adaptation of
tool center velocity and the constancy of tool periphery velocity: in the blocks where this adaptation is
required, the FEED must be programmed anew.

Warning: in presence if very small tool radius (less than about 3 micron) the machined profile may have a
maximum error of about 2 micron, normally well supported in most applications, because these errors are
lower than other errors influencing the final result (following errors, temperature, tool geometry, etc.).
If this error entity cannot be supported, it is recommended not to program very small tool radius; it is
better to program the physical tool radius and not its correction with respect to the theoretical radius.

3.6 CONNECTING RADIUS ON EXTERNAL EDGES (G109S, G109T)

In case of normal radius correction, a connecting radius is inserted on external edges.


The function G109S it is possible to force the Z32 not to insert the connecting radius, continuing instead the
current segment up to the bisecting line of the edge.

The G109S may be active only on edges produced by two linear segments. If one or both elements are circular
arcs, the normal connecting radius is inserted.

G109S (modal, not active at reset) forces the bisecting line correction, while G109T (modal, active at reset)
the normal behavior of Z32 is restored, with the connecting radius insertion.

G109T G109S

Warning: In order to avoid large elongations of programmed elements, the G109S mode cancels only the
external roundings below 91 degrees.

G109S

48
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4. RTCP (ROTATING TOOL CENTRE POINT)

4.1 G117 RTCP FOR ROTATING / SWIVELING HEADS

The function G117 manages spindle heads mounted on rotating axes. The head may rotate around a single axis
(mono-rotating head) or around two cascaded axes, the driving and the driven (bi-rotating head).

G117 computes XYZ offsets generated by head rotation.

4.1.1 Static G117 (G117 KA2)

The static G117 computes offsets (interpretable as XYZ origins translation) added to the displayed positions of
linear axes (XYZ)
Static G117 never induces movements on the linear axes (XYZ) when rotary head axes are moved, but only
calculates an origin translation.

The static G117 is used, for example, in three axes machining with fixed head orientation.
When the static G117 is activated (by G117KA2), the linear axes dont move, but their displayed positions
change as a function of the head orientation.

Warning: When one rotating axis is moved with static G117 active, the XYZ axes dont move, nor change
the displayed positions. After moving the rotating head axes, if an updating of the origin correction due
to head orientation is requested, it is necessary to program again the static G117 with G117KA2.

The syntax of static G117 is as follows:

G117 KA2 [RA..] [I.. J.. K..]

G117KA0 cancels G117 KA2 programming

RA: not programmed (or RA0) activates spindle parameters set 0 (in the machine setup, up to three
parameter sets may be inserted for mono/bi-rotating spindle heads; the RA parameter selects the set
used)
RA1 spindle parameters set 1 is activated
RA2 spindle parameters set 2 is activated
I, J, K set the point around which the rotation is made. These values are added to the distance between
spindle nose and tool tip, along the three linear axes (XYZ). Their computing must be done by thinking
to the machine when the rotating axes are all on their zero point. Please refer to further on explanation
about I J K parameters

Example of G117KA2 programming with mono-rotating head (rotating axis B, along Y axis).
The linear axes where G117 acts are X and Z:

G0X0Y0Z0
G0B30 (head swiveled of 30 degrees)
G117KA2 (computes X and Z offsets, added to displayed positions for X and Z)

X YZ machining with head swiveled of 30 degrees

G117KA0 deactivation of static G117

49
CNC Z32 M323 C2 - Programming guide (Milling Machines)

The G117 KA2 doesnt rotate the XYZ coordinate system.


To activate the XYZ coordinate system rotation as a function of head orientation, it is necessary to
combine the usage of G117 and G116.

4.1.2 Tilted working plane machining (G117KA2 + G116)

It is possible to combine the functions G116 and G117KA2 in order to machine on planes with any orientation
with a swiveling head. For this purpose it is very useful to program G116 KA2 which determines the rotation
to be assigned to the XYZ axes, starting from the angles of rotating head when, in order to align the Z axis of
rotated coordinate system with the spindle axis.

Warning: The function G116 KA2 is only available if the G117 is defined as generalized in machine setup.
Please consult the machine tool builder for further information.

The example below supposes to have a bi-rotating head with axis B (driven) and C (driving).

30 2
3 40 30

Z
40 Y X
Y

30
Y X
Z Z

30
30

X
Y
Y X

Z Z
X

5
4 40
30

30 40

1) Vertical head:
G0 B0 C0
G117KA0
G116KA0 Z
2) Right side face:
G0 B90 C0 C+
G117 KA2
G116 X40 Z-30 KA2
3) Rear face:
G0 B90 C90
G117 KA2
G116 Y30 Z-30 KA2 Y Z
4) Left side face:
G0 B90 C180 B+ X
G117 KA2
G116 X-40 Z-30 KA2 Y
5) Front face:
G0 B90 C270
G117 KA2
G116 Y-30 Z-30 KA2

50
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.1.3 Dynamic G117 (G117)

G117 or G117KA1 (that are equivalent) maintains the contact point between tool and workpiece when rotary
head axes rotate
Unlike the static G117KA2 a head rotation, while G117KA1 is active, induces compensating movements on the
linear axes (XYZ).

The dynamic G117 function may be used, for example, in 4 or 5 axes machining programs generated by CAM
systems.

With G117KA1 active, the linear axes (XYZ) displayed positions are corrected as a function of head orientation

When the dynamic G117 is active, by programming the movement of a rotating axis, also the linear axes will
be moved in order to maintain the contact point with the workpiece.

Movements of both rotating and linear axes together are allowed.

Programming syntax of dynamic G117:

G117 [KA1] [RA..] [I.. J.. K..]

G117KA0 cancels G117 programming

Warning: If the parameter KA is not programmed, it is assumed the default activation of dynamic
G117 KA1:
Programming G117 is the same as programming G117KA1

RA: not programmed (or RA0) activates spindle parameters set 0 (in the machine setup, up to three
parameter sets may be inserted for mono/bi-rotating spindle heads; the RA parameter selects the
set used)
RA1 spindle parameters set 1 is activated
RA2 spindle parameters set 2 is activated

I, J, K set the point around which the rotation is made. These values are added to the distance
between spindle nose and tool tip, along the three linear axes (XYZ). Their computing must be
done by thinking the machine when the rotating axes are all on their zero point.

Example of G117KA1 programming (rotating head axes B and A).

G0X0Y0Z0
G117 (activate dynamical head RTCP)

XYZAB
XYZAB
5 axes continuous machining

G117KA0 deactivation of G117

51
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.1.4 G117 usage

G117 deactivation
The function G117 (static or dynamic) is deactivated by:
G117 KA0

I,J and K parameters in G117


The RTCP-head system, activated by G117, allows the head rotation by maintaining still the virtual tool
tip.
In case of spherical tools, what is mostly wanted is to maintain still not the tool tip, but instead the
tool center, displaced by the tool radius.
It is possible to program, at the moment of G117 activation, a modification to the length of rotating
components by means of the three parameters I J K, which act correspondingly on the X Y and Z axes.

The values of parameters I J and K are referred to the condition of rotating axes in their zero position.
For example, on a mono-rotating vertical head (the tool is along Z when the rotating axis is at its zero),
the programming of G117 K10 is equivalent to shorten the tool by 10 mm.
The I J K programming is optional: if one or more of these parameters is not programmed, the length
of the rotating arm along the corresponding axis remain unchanged.

Example: activation of dynamic G117 with tool shortening:

Z
G117 K10

X K

Warning:
The reset cancels both static and dynamic G117.
The static G117 is incompatible with dynamic G117. By programming G117 while G117KA2 is active,
or G117KA2 while G117 is active, an alarm CN2C14 (incompatible parameters) will be issued
It is not allowed to change origin on the following/leading rotating axes when the dynamic G117 is
active. The origins may be modified only if G117 is not active,
G105 doesnt function if G117, both static and dynamic, is active
The G117 is non compatible with permanent formulas or copying movements (G111).
The dynamic G117 is not compatible with G43/G44/G45, otherwise the alarm CN5B14 is generated.
G53 cancels G117KA2
By programming G117KA2 or G117 when G53 is active issues alarm CN3914 (formulas + G53/G54)
The G54, which cancels G53, doesnt restore a static G117 possibly active before the G53: G117KA2
must be newly programmed to restore it.

IMPORTANT NOTE ON RTCP:


When the RTCP functions (G116 G117 G118 G122) are activated, it is necessary that all three linear
axes (normally X Y Z) interested by the RTCP transformations are all alive, otherwise the alarm
CN7D14 (RTCP + not alive axis) will be issued. The same alarm is issued if a request to abandon
(G29) one linear axis interested by the RTCP is made when a RTCP function is active.

In order to avoid this kind of alarm, all linear axes interested by the RTCP must be alive axes

52
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.1.5 Handwheel enable on rotating axes in G117 (G124)

The G124 allows to activate handwheels on the rotating axes related to G117, while G117 is active.
The purpose is to allow the manual movement of the machine head during workpiece machining in auto or
semiauto.
While G124 is active, it is not allowed to program movements for the rotating axes connected to G117 (rotating
axis for a mono-rotating head, leading/following axes for a bi-rotating head).

G124 programming
Syntax:
G124 KA1 activates the handwheels on rotating axes connected to G117; KA1 not necessary
G124 KA0 deactivates G124

Rules and restrictions for G124


After power on and at reset, G124 is disabled
The programming of G124 has effect only if G117 is active.
By programming G124 when G117 is not active has no effect, without issuing any alarm.
The two activations: G124 or G124KA1 are equivalent
If G117 is deactivated when G124 is active, also G124 is immediately deactivated.
If a rotating axis connected to G117 is programmed while G124 is active, the alarm message CN5814
G124+ROTATING AXIS OF G117 is issued
The only way to move the rotating axes connected to G117, while G124 is active, is to use the related
handwheels.

Deactivation
By programming G124KA0 the handwheels connected to the rotating axes of G117 are disabled and
these axes may be newly programmed.

53
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.2 RTCP FOR ROTARY / TILTING TABLES

The function G118 manages rotary or tilting tables. Rotary or tilting tables may rotate around a single axis
(mono-rotating table) or around two cascaded axes, the driving and the driven axes (bi-rotating table).

G118 computes the linear displacement generated by table rotations.


G118 can be used in two modes:

4.2.1 Static G118 (G118 HR2)


Manages the table rotation, setting a translation of workpiece origin without rotating the reference system.

This management mode is useful when the table has the purpose to orient the workpiece, but no machining is
done with continuous table movements.

When a table axis is moved, the linear axes are NOT moved together with the table, programming G118 HR2
simply activate an origin translation as a function of the position of rotary table axes at the moment of G118
HR2 programming.

The syntax of G118 HR2 is as follows:

G118N HR2 [KA..] [RA..] [X..Y..Z..]


or
G118{axis name} HR2 [KA..] [RA..] [X..Y..Z..]

G118E cancels G118 HR2

KA (optional) selection parameter


KA1: the management of KD parameter (additive constant) is activated on the rotating axes
connected to G118
With G118KA1 the additive value KD related to the table axes (for example KDC parameter for
C axis) is subtracted to table axis initial position when calculating translation of origin.

KA2: special function: the G118 is activated on an additional rotating axis (table) not associated
with G118 in the machine setup (only on mono-rotating tables).

RA (optional): if not programmed (or RA0) activates table parameters set 0 (in the machine setup, up
to three parameter sets may be inserted for mono/bi-rotating tables; the RA parameter selects the set
used)
RA1 table parameters set 1 is activated
RA2 table parameters set 2 is activated

By programming G118N the table RTCP is activated considering all rotating axes defined in the setup.
For bi-rotary tables, both axes are considered.

By programming G118 {axis name} the table RTCP is activated considering only the axis specified.
This programming can be useful with tables that have two rotary axes in order to activate G118 only
on one of the two rotary axes.

As an example: supposing to have a tilting table with the B axis as driving axis and C axis as
turntable (driven axis), to activate the RTCP only on the turntable it is possible to program:
G118C

The X Y Z parameters modify the table center coordinates and may be used to correct table center
coordinates.

54
CNC Z32 M323 C2 - Programming guide (Milling Machines)

G118 HR2 function activate a translation of the coordinate system (translation of the workpiece origin) as a
function of rotary table current position.

In other words, the new workpiece origin is calculated as if the origin, anchored on the workpiece piece, was
moved together with the table.

Warning: when calculating the new origin, the calculation always start from table at zero degrees position.
In other words, the new origin is calculated considering that the table has been rotated from zero position
to the current position.
It is possibile to modify the initial table position used for the calculation of origin translation in two
different ways:
By definition of a supplementary origin for the table axes, therefore redefining the table zero
position
By using the G118 HR2 KA1 and the additive parameters KD related to rotary table axes

An example of rotary table (C axis) rotating along Z axis:

G0 C0 X0 Y0 F1000
Y G1 X100 (1)
X200 (2)
Y50 (3)
X100 (4)
Y0 (5)
X0 (6)
G118C HR2 G0 C120
G118C HR2
11 G0 X0 Y0 (7)
G1 X100 (8)
12 10 X200 (9)
Y50 (10)
8 9 X100 (11)
Y0 (12)
G118E
X
7

6 5 3

1 2

Warning: When a table rotating axis is moved with G118 HR2 active, the XYZ axes dont move, nor change
the displayed positions,, nor the origin is trasnslated. After moving the rotating table axes, if an updating
of the origin correction due to head orientation is requested, it is necessary to program again the G118HR2
function.

55
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.2.2 Dynamic G118 (G118 HR1)


The function G118 HR1 allows the execution of coordinated movements between linear and rotating table axes.

The syntax of G118 HR1 is as follows:

G118N HR1 [KA..] [RA..] [X..Y..Z..]


or
G118{axis name} HR1 [KA..] [RA..] [X..Y..Z..]

G118E cancels G118 HR1 programming

KA (optional) selection parameter


KA1: the management of KD parameter (additive constant) is activated on the rotating axes
connected to G118
With G118KA1 the additive value KD related to the table axes (for example KDC parameter for
C axis) is subtracted to table axis initial position when calculating translation of origin.

KA2: special function: the G118 is activated on an additional rotating axis (table) not associated
with G118 in the machine setup (only on mono-rotating tables).

RA (optional): if not programmed (or RA0) activates table parameters set 0 (in the machine setup, up
to three parameter sets may be inserted for mono/bi-rotating tables; the RA parameter selects the set
used)
RA1 table parameters set 1 is activated
RA2 table parameters set 2 is activated

By programming G118N the table RTCP is activated considering all rotating axes defined in the setup.
For bi-rotary tables, both axes are considered.

By programming G118 {axis name} the table RTCP is activated considering only the axis specified.
This programming can be useful with tables that have two rotary axes in order to activate G118 only
on one of the two rotary axes.

As an example: supposing to have a tilting table with the B axis as driving axis and C axis as
turntable (driven axis), to activate the RTCP only on the turntable it is possible to program:
G118C

The X Y Z modify the table center coordinates and may be used to correct table center coordinates.

56
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Warning: With G118 HR1 active, a movement of rotary table axes provokes also a rotation of the
coordinate system used for the part-program. In other terms, the coordinate system rotates together with
the table.

The example below clarify the behavior: supposing the rotating axis is C and the axis aligned with the tool is
Z:

Y
Y'

G0 X100 Y0 C0
G118C HR1 G118C HR2
X' C30 (1)
G1 X200 Y0 (2)
4 3 Y50 (3)
X100 (4)
Y0 (5)
5 2 G118E

1
X

In other words:
With G118 HR1, the coordinate system rotates together with the table, therefore, its like the XYZ coordinate
system was fixed on the piece and rotated together with the table.
With G118 HR1:
Programmed X Y Z movements identify the trajectory that the tool must follow on the workpiece and
must be programmed in a coordinate system anchored to the workpiece itself even if the workpiece is
rotated and oriented by the table.
Programmed movements of table rotary axes define the orientation of the tool with respect to the
workpiece.

57
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.3 WORKPIECE MOUNTING ERRORS COMPENSATION ON ROTARY TABLES (G122)

With G122 it is possible to compensate workpiece mounting errors on a tilting table.


The procedure to be used is the following:
The workpiece mounting errors are measured and computed (normally in automatic, by means of
proper measuring sequences in G61)
The rotating axes are moved to align the workpiece (faces to be machined aligned with the linear axes)
Possible activation of origins on linear axes, to compensate all mounting errors in this aligned position.
G122 is activated programming in I J K the mounting errors along the three main linear axes X Y Z.

For example:
Proper rotations have been given to table rotary axes in order to correctly align the workpiece faces.
In this aligned position a workpiece centering error is measured with respect to the rotary table center,
for example:
+1,5mm in X (i.e. the workpiece is shifted of 1,5mm toward positive X direction),
+0.4mm in Y
-0.1mm in Z
The part-program line to activate the correction in G122 is the following:
G122 I1.5 J0.4 K0.1

G122 activation
The activation syntax of G122 is as follows:

G122 I J K
where:
I, J, K are the components of the mounting error respectively along X, Y, and Z axes.

Some important notes:


When G122 is active, no origin programming is allowed
G122 is deactivated at reset
The IJK parameters must be all programmed, otherwise the alarm CN2C14 INCOMPATIBLE PARAMETERS
is issued (see below the case where no parameters are programmed, to activate the parameters stored
in permanent memory)
G122 is not compatible with G43/G44/G45, otherwise the alarm CN5B14 is generated.
G122 is transparent to jog. It is allowed to program G122 in semiauto, then passing in jog without
pressing reset. If a rotating axis is moved in jog, the linear axes move automatically as set by G122.
Returning in semiauto from jog, with G122 active, a reset is activated, canceling the G122.
To allow usage flexibility of G122, the programmed parameters IJK are stored in permanent memory.
By programming G122 without parameters:
G122
the last programmed parameters are restored, remaining valid also after a machine shutdown and
restart. This feature may be very important during a machining restart after an interruption.

G122 deactivation
To deactivate the G122 correction, program the following:
G122 KA0

58
CNC Z32 M323 C2 - Programming guide (Milling Machines)

4.4 TOOL TIP VELOCITY CONTROL WITH DYNAMIC RTCP (G131)

The function G131 allows to maintain constant the relative velocity between tool and workpiece with dynamic
RTCP motions.

G131 is a modal function.

When dynamic RTCP (table or head) is active, this function ensures that the relative movement between the
tool and the workpiece is executed respecting the programmed F.

The general format for G131 activation is the following:


G131 I

The I parameter programmed in the same line of G131 expresses the maximum velocity allowed for
the rotating axes interested by the movement.
If this parameter is not programmed, the rapid velocity will be assumed.

When G131 is active, the CNC maintains the relative velocity between tool and workpiece equal to the
programmed F value, with the following restrictions:

No linear axis interested by the movement may exceed its maximum speed.
If one or more linear axes is requested to move at a velocity exceeding its rapid velocity, due to the
effects of dragging motions induced by rotary axes, the movement will be executed at a lower velocity,
to respect the limitations of all interested axes.
No rotating axis connected to the RTCP may exceed its rapid velocity, or the velocity expressed by I
parameter. For example, on blocks programmed with a null linear movements, the rotating axes will
be moved with the maximum allowed velocity (I parameter or rapid).

G0 is not influenced by G131.

By programming G131, the functions G93, G94 or G95 are disabled.

G131 may be deactivated by programming G93, G94 or G95, depending on the type of feed programming
required.

59
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5. PARAMETRIC PROGRAMMING

5.1 PARAMETER MANAGEMENT

A parameter defines a numeric value recalled by means of an identifier.


The Z32 CNC offers to the user three types of parameters:

Alphanumeric parameters:
They are composed by a combination of one or more alphabetic characters.
The names of literal parameters cannot contain:
- space (BLANK) characters
- NUMERICAL characters
- the characters ! $ % ( ) * + , - . / ; < = >
- the first character cannot be one of the following: G, N, O
Lower case characters cannot be used.

SYSTEM PARAMETERS:
Some parameters have a special meaning in Z32 programming, and they cannot be used for purposes
different to those already assigned. These parameters, defines as system parameters, are:

AA first axis of coordinate system set by G25


AB second axis of coordinate system set by G25
AC third axis of coordinate system set by G25
AE communication from the logic
AM first axis measure
AN negative probe correction first axis
AP positive probe correction first axis
AU communication to logic
BM second axis measure
BN negative probe correction second axis
BP positive probe correction second axis
CM third axis measure
DA first axis translation
DB second axis translation
DC third axis translation
DM measuring distance
F feed
HR temporary for radius polar coordinate and G110
HT temporary for angle polar coordinate and G110
HX temporary for X cartesian coordinate and special G
HY temporary for Y cartesian coordinate and special G
I first axis center coordinate
IR first axis rotation center coordinate
IS first axis mirroring center coordinate
J second axis center coordinate
JR second axis rotation center coordinate
JS second axis mirroring center coordinate
K threading pitch and G110
KA selection parameter
KD additive factor single axis
KG GEPI-2 code and permanent subprograms
KM multiplicative factor single axis
KP scale factor on the plane
KT third axis scale factor
L tool length (milling machines)
LX tool length (lathes)

60
CNC Z32 M323 C2 - Programming guide (Milling Machines)

LZ tool length (lathes)


M auxiliary function
MA auxiliary function
MB auxiliary function
MC auxiliary function
MS maximum speed in G96
P nurbs order
QA auxiliary slope
QF final slope
QR rotation angle
QS mirroring axis slope
R tool radius
RA circle radius
RB chamfer
RR connecting radius
S speed
T programmed tool
TA place of tool on the spindle
TB place of programmed tool
TT dwell time
# synchronizer between part-program and ML logic
#A - #Q synchronizer between part-program and ML logic

D.ELECTRON may define further parameters in the future, to enhance the Z32 software features.

AXES NAMES:
The axes names are always defined with a single letter, by choosing among the following:
A B C D H P Q U V W X Y Z
They must be defined in the machine setup.

USER PARAMETERS
The user is allowed to define up to 60 literal parameters in a program for the purpose of
parametric programming.
The following combinations are not allowed:

RQ SN CS AT square root, sine, cosine, arc-tangent


PI pi constant
PC CP polar/cartesian conversion and inverted
IF test operator
EB advanced line interruption

It is common to use as user parameters for parametric programming, the parameters composed by
the letter H followed by a second letter, for instance HA, HB, HC, etc.

PAR[] parameters
The PAR parameters are composed by a vector of 513 parameters, numbered from PAR[0] to PAR[512].
The parameter number may be an expression result, for example:

HA10 HB5
PAR[6]30
PAR[HA + PAR[HB + 1]]
is equivalent to:
PAR[10+PAR[6]]
than means:
PAR[40]

61
CNC Z32 M323 C2 - Programming guide (Milling Machines)

The usage of PAR[] parameters may be a substitute for literal user parameters in all situations.
Furthermore, these parameters are not subject to any restriction on the maximum number of
parameters allowed to be used.

PAL[] parameters
Same usage notes as for the array PAR[].
The PAL parameters are composed by a vector of 513 parameters, numbered from PAL[0] to PAL[512].
These parameters contain only INTEGER numbers, normally used for the information exchange between
PLC and part-program.
The values from PAL[256] to PAL[512] are read only.
The values from PAL[0] to PAL[255] may be written by the part-program. When a non integer number
is assigned to a PAL[] parameter, the number is rounded to the nearest integer value.

5.1.1 Parameter assignment

The assignment of a numeric value to a parameter is made through a programming very similar to that for an
axis movement.

For example, to assign the value 100 to the parameter HA, it is possible to write:
HA100

or, to assign the value 1 to the parameter PAR[10], it is possible to write:


PAR[10]1

5.1.2 Parameter assignment through a formula

It is possible to program mathematical expression whose result is a function of numeric values or other
parameters.

Mathematical operators with a single operand:


SN(sine of an angle in degrees)
CS(cosine of an angle in degrees)
TAN(tangent of an angle in degrees)
AT (arcotangent in degrees)
RQ (square root)
ABS (absolute value)
INT (truncated integer value)
NEI (rounded integer value)
- (sign change)

Mathematical operators with two operands:


+ addition
- subtraction
* multiplication
/ division

To assign an expression result to a parameter, the lower than sign < and higher than sign > (acute
parenthesis) are used to indicate the beginning and the end of the expression.
Inside the expression it is possible to use the parenthesis ( and ).

For example, to assign the value HB+1 to the parameter HA, it is possible to write:
HA< HB + 1 >

or to assign the square root value of parameter HC to the parameter PAR[10]:


PAR[10]< RQ(HC) >
62
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Through the use of parenthesis it is possible also to program complex expressions.


HA< HB + (HC+HD/2)/(SN(HE) >

5.1.3 Axis movement programming with parameters


Through the parameter programming it is possible also to program machine movements.

A very simple example:


N10 HA 10
N20 HB 1000
N30 HC 30

N40 G0 X<HA>
N50 F<HB>
N60 G1 X<HC+100>

In lines from N10 to N30, values are assigned to the parameters.


In the line N40, a rapid movement of X axis is executed up to the position contained in the parameter
HA (i.e. 10)
I the line N50 a feed is set with the value contained in parameter HB (1000)
In the line N60 a feed movement of X axis is executed up to the position HC+100 (i.e. 130) with a Feed
of 1000.

The movement programming using parametric expressions may be quite complex, following the same rules
indicated for parameters programming.

5.1.4 System parameters programming


Through parametric programming, it is possible to assign numeric values to the system parameters previously
described.

For example, it is possible to set or modify the tool length (L parameter):


L100
Assigns the value 100 to the tool length parameter.

or
L< L-2 >
shortens the tool length by 2

In a similar way it is possible to assign values, also by using expressions, to all system parameters.

Warning: the system parameters programming is absolutely equivalent to the programming of user parameters.
The usage of system parameters is however reserved to the purpose associated with the parameter and not for
generic parametric computations.

63
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.1.5 Axes programming through parameters AA, AB, AC


The system parameters AA, AB and AC are very useful for parametric programming (like macros or fixed cycles).
These parameters represents respectively the first (AA), the second(AB) and the third(AC) axis specified with
G25. For example, with G25XYZ, the parameter AA represents the axis X, parameter AB the Y axis and AC the
Z axis.

Through these parameters it is thus possible to program axes movements independently from the real axes
names.
By programming G25 the axis related to AA, the one related to AB and the one related to AC are specified, as
shown in the following diagram:

Example:
OX1 OY1 OZ1
OX1 OY1 OZ1 T1M6
T1M6 F1000
F1000 S3000 M3
S3000 M3
G25ZXY G43Y
G25XYZ G43Z G0 AA0 AB0 AC2
G0 AA0 AB0 AC2 G1 AC0
G1 AC0 AA5
AA5 AB2
AB2 AA0
AA0 AB0
AB0 AC-0.5
AC-0.5 AA5
AA5 AB2
AB2 AA0
AA0 AB0
AB0 M2
M2

64
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.2 PROGRAMMING WITH ADVANCED LINES ( ! ... ! )


The Z32 CNC allows the usage of special program lines, called advanced lines.
Through these lines it is generally possible to handle most cases of logic-parametric programming, allowing for
conditioning and jumps with or without return.
An advanced line is a program line beginning and terminating with the ! character. This line may be preceded
by the letter N followed by a line number.
Inside an advanced line more than one instruction may be contained, each separated from the others by means
of character ; or !, as below described.

Note: In advanced lines it is NOT possible to program machine movements.

5.2.1 Assigning values to parameters and computing expressions


The assignment operator is the character = .
More than one assignment is possible, by using the separator ;.
Example:

N10 !HA=16 ; HB=RQ(HA)+5 ; HC=0!

Note: The computing of expressions or the assignment of a value to a parameter is possible both in an advanced
line and in a normal line; for instance, the following expressions are equivalent:
!HA=10!
or
HA10
Also equivalent are the instructions:
!HA=PAR[3]!
and
HA<PAR[3]>

Warning: as already told, it is not possible to program an axis movement in an advanced line.
For example, by programming
!X=100!

no machine movement are produced, but it has the only meaning to set the value of parameter X to
the value 100.

A machine movement can be programmed only outside advanced lines.

5.2.2 Executing jumps without return (!GON..!)


The function allowing to jump to a label inside a program is the function:
!GON..!

Jump destination is the line corresponding to the number (also decimal) following the letter N.

Example:
The program executes N10 and jumps to the label N20:

N10 !GON20!

N20

Warning: In order to use the N numbers as destinations for a jump, it is necessary for the N character to
be the first character present in the line, without leading spaces

65
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.2.3 Executing jumps with return (!GON....!)


The function
!GON..-N..!

allows to execute the program section contained between the N labels specified, and then to return to the line
following the calling line.
Example:



N20 !GON40-N50!
N30

N40

N50

The program executes N20, jumps to N40, executes the instructions between N40 and N50 and then returns
executing line N30.
Returning jumps may be nested inside other returning jumps up to a maximum depth of 10 levels.

Warning: In order to use the N numbers as destinations for a jump, it is necessary for the N character to
be the first character present in the line, without leading spaces:

Correct programming:

N10 !GON20!

N20

Erroneous programming:
N10 !GON20!

N20

5.2.4 Executing conditioned jumps (!IF .. ; GON.. !)


The instruction allowing the execution of conditioned jumps inside a program is the following:
!IF {condition} ; GON..!
A condition may be any parametric expression containing one of the following comparison operators between
two parametric expressions:
> higher than
< lower than
= equal
<> different
>= higher or same
>= lower or same

Example:
!IF HA > 10 ; GON20!
jumps to N20 if HA is higher than 10.

The condition may also be an expression:


!IF (HA+HB)*PAR[10] >= HC ; GON20!

66
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.2.5 Controlling more than one condition on the same advanced line
On a single advanced line it is possible to control more than one condition:
!IF HA > 10 ;IF HB < 5 ; GON30!
jumps to N30 if HA is higher than 10 and HB is lower than 5.

5.2.6 Structuring conditioned jumps


Normally the various commands to be executed in a single advanced line are separated by the ; character.
When an IF condition is programmed, if the condition is verified, the subsequent commands are executed,
otherwise the analysis jumps to the next ! character present in the line.

Example:
!IF HA > 10 ; GON20 ! IF HA >5 ; GON30 ! GON40!

In the above example, if the HA > 10 is verified, the program jumps to N20.
If HA > 10 is not verified, the instruction following next ! character is executed, thus controlling if
HA is higher than 5.

With this logic, the sample line behaves as follows:


If HA is higher than 10, jump to N20.
If HA is between 5 and 10, jump to N30
Otherwise jump to N40
Warning: the character ! doesnt interrupt an advanced line execution. To interrupt an advanced line
execution, a jump command !GON..! is necessary, or the programming of an end of block instruction EB.
For example, in the following line:
!IF HA>=0 ; HA=HA+1 ; EB ! HA=HA-1!
the EB instruction is necessary to terminate the line execution.
The line has the following behavior:
If HA is higher or equal to zero, it is incremented by 1, otherwise it is decremented by 1.

If the programming were as follows:


!IF HA>=0 ; HA=HA+1 ; EB ! HA=HA-1!
This instruction is not correct because:
if HA is higher or equal to zero, HA is at first incremented and then decremented by 1, because,
as already told, the ! character doesnt interrupt the line execution.

Another example of using the EB terminator is the following:


!IF HA > 0 ; EB ! GON10!
That means: if HA is higher than zero, it terminates the advanced line and continues the
execution from next line, otherwise, jumps to N10.

67
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.2.7 Jump to a CMOS subprogram (! GOP.. !)


With the instruction
!GOP..!

It is possible to suspend the execution of current program and jump to the execution of a subprogram.
The !GOP..! instruction is valid for programs stored in the CMOS memory (internal memory) of CNC, and it is
used by specifying the program number to be activated.

Example:

N10

N50 !GOP10!

The main program is executed up to line N50, then the execution jumps to CMOS program number 10.

The subprogram must terminate with the subprogram end instruction G26. Example:
N10

N50 !GOP10!
N60

CMOS Subprogram 10:

N10


N100 G26

The main program is executed up to line N50, then the execution switches to subprogram 10, executed from
line N10 to line N100. The G26 instruction indicates the end of subprogram, then the execution switches back
to the calling program continuing from line N60.

Warning: the subprogram end instruction is the function G26. If a called subprogram contains the end of
program instruction M2, the execution stops without returning to the calling program.

5.2.8 Jump to a CMOS subprogram with label (! GOP.. N..!)


It is possible to jump in a CMOS subprogram starting the execution from a given label.
Example:
N10

N50 !GOP10-N30!
N60

CMOS Subprogarm 10:


N10

N30


N100 G26

The main program is executed up to line N50, then the execution switches to subprogram 10, executed from
line N30 to line N100. The G26 instruction indicates the end of subprogram, then the execution switches back
to the calling program continuing from line N60.

5.2.9 Jump to a CMOS subprogram with two labels (! GOP.. N.. N..!)
68
CNC Z32 M323 C2 - Programming guide (Milling Machines)

It is possible to jump in a CMOS subprogram starting the execution from a given label.
Example:

N10

N50 !GOP10-N30-N70!
N60

CMOS Subprogram 10:


N10

N30

N70

N100 G26

The main program is executed up to line N50, then the execution switches to subprogram 10, executed from
line N30 to line N70. After execution of line N70, the calling program continues the execution from line N60.

69
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.3 CONDITIONING BLOCKS OF PROGRAMS (--IF)


The structured instruction --IF is useful when it is necessary to condition the execution of whole program
blocks.
Example:
--IF condition
N10

N20
--END IF

The program executes the lines from N10 to N20 only if {condition 1} is verified.
A condition may be any parametric expression containing one of the following comparison operators:
> higher than
< lower than
= equal
<> different
>= higher or same
>= lower or same

The complete syntax is as follows:


--IF condition 1 ;comment
N10
(executed if condition 1 is true)
N20
--ELSE IF condition 2 ;comment
N30
(executed if condition 1 is false and condition 2 is true)
N40
--ELSE ;comment
N50
(executed if condition 1 and condition 2 are false)
N60
--END IF ;comment
N70

The --IF instruction indicates the first checked condition. If {condition 1} is verified, the blocks from N10 and
N20 are executed, then the execution passes to N70.
If {condition 1} is not verified, the condition --ELSE IF is checked. If {condition 2} is verified, the blocks from
N30 and N40 are executed, then the execution passes to N70.
If neither {condition 1} nor {condition 2} are verified, the execution passes to the --ELSE block, and the blocks
from N50 to N60 are executed, then the execution passes to N70.
In lines containing --IF, --ELSE IF, --ELSE and --END IF it is possible to insert a comment after the character ;.

In synthesis:
The --IF instruction is the first checked condition.
The blocks --ELSE IF specify the conditions checked if the preceding conditions are not true. It is possible to
have more than one block --ELSE IF. In this case the conditions are checked in sequence.
--IF condition 1
(executed if condition 1 is true)
--ELSE IF condition 2
(executed if condition 1 is false and condition 2 is true)
--ELSE IF condition 3
(executed if condition 1 and condition 2 are false and condition 3 is true)
--ELSE
(executed if condition 1, condition 2 and condition 3 are false)
--END IF

The instruction --ELSE identifies the block of instructions executed if all other conditions are not true.
The --END IF instruction identifies the end of a --IF block.
70
CNC Z32 M323 C2 - Programming guide (Milling Machines)

It is possible to nest --IF instructions up to 31 levels.


Example:
--IF condition 1
--IF condition 2
--IF condition 3
N30
(executed if condition 1, condition 2 and condition 3 are true)
N40
--END IF
--END IF
--END IF

71
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.4 PROGRAM BLOCK REPETITION (--DO --LOOP)


The blocks inserted between the instructions --DO and --LOOP are repeated until the exit condition is satisfied

Example:

--DO
N10

N100
--LOOP

The blocks from N10 to N100 are endless repeated.

5.4.1 Specifying the repetition number (--LOOP N)


The number of repetitions can be specified by inserting the number on the same line as the LOOP instruction:
--LOOP N

In the following example, blocks from N10 to N100 are repeated 10 times, then the execution passes to block
N110. The blocks from N10 to N100 are thus executed 11 times, because the number specified is the number
of repetitions. This specification may be passed through a parameter contained between acute parenthesis: -
-LOOP <HA>. In this case the parameter is rounded to the nearest integer.

--DO
N10

N100
--LOOP 10
N110

5.4.2 Repetition condition (--LOOP IF)


A condition to be checked in order to execute the repetition may be specified on the same line as the LOOOP
instruction:
--LOOP IF condition

In the following example, blocks from N10 to N100 are repeated if the specified condition is verified, then the
execution passes to block N110. That means, if HA is lower than 10, the repetitions are executed; if HA is
higher than 10 the repetitions are no more executed.

--DO
N10

N100
--LOOP IF HA < 10
N110

72
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.4.3 Exit condition --DO --LOOP (--EXIT DO IF)


An exit condition from a block loop execution may be expressed with:
--EXIT DO IF condition

The --EXIT DO instruction allows an anticipated exit from the --DO --LOOP structure when the specified
condition is true.
In the following example, blocks from N10 to N100 are repeated until the exit condition is verified. When the
exit condition is verified, the loop exit happens in block N50, the instructions from N50 and N100 are no more
executed, and the control passes to instruction N110.

--DO
N10

N50 --EXIT DO IF HA > 10

N100
--LOOP
N110

Warning: It is possible to use the --EXIT DO instruction also without the --IF condition written on
the same program line; it is thus possible to write:
--DO

--IF HA>100
--EXIT DO
--END IF

--LOOP

73
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.5 WRITING CMOS PROGRAMS (--DEFINE P..)


Through the instruction --DEFINE P.. it is possible to write a CMOS file of the CNC.

With this instruction it is possible to write a CNC CMOS file without the need to directly edit it.
The --DEFINE P.. instruction may be used only for CMOS user files, that means for CMOS files from number 1 to
number 109.
The instruction has the following syntax:
--DEFINE P.. ; comment

{program listing}

--END DEFINE ; comment

In lines containing --DEFINE, --END DEFINE it is possible to insert a comment after the character ;.
The program to be written may only be a CMOS program and must be specified with its number. In the following
example, the CMOS program number 10 is written:

--DEFINE P10

{program listing}

--END DEFINE

The definition of a CMOS program doesnt produce any machine movement.


The written program may be executed by recalling it by a CMOS subprogram jump instruction !GOP..!
Example:

T1M6
F5000

--DEFINE P10
G1 X100
G1Y100
G1X0
G1Y0
G26
--END DEFINE

G0 Z100
G0 X0Y0
G0 Z1
G1 Z1
!GOP10!
M2

In the above example, the instructions for the definition of program 10 dont produce any movement;
the CMOS program number 10 is executed only after its recall trough the function !GOP10!

Warning: In the definition of a CMOS subprogram by means of the --DEFINE P.. instruction, it is necessary
to insert the subprogram end instruction G26.

Warning: The --DEFINE P.. instruction must be executed before the calling of the defined subprogram (by
the instruction !GOP..!)

Warning: The definition of a CMOS program through the --DEFINE P.. instruction is not temporary. The
program can be also used after machine shutdown and successive power on.

74
CNC Z32 M323 C2 - Programming guide (Milling Machines)

5.6 WRITING A TEMPORARY SUBPROGRAM SUBTEMP (--DEFINE S..)


Through the --DEFINE S.. instruction it is possible to write a temporary subprogram.
The instruction has the following syntax:
--DEFINE S.. ; comment

{program listing}

--END DEFINE ; comment

The subprogram to be written must be specified with the desired subtemp number.
In the following example, the subtemp number 20 is written:
--DEFINE S20

{program listing}

--END DEFINE

The definition of a subtemp doesnt produce any machine movement.


The written subtemp may be executed by recalling it by a subtemp subprogram jump instruction !GOS..!
This instruction has the same syntax as the subprogram jump instruction !GOP..!, the only difference being the
character S which must be used instead of character P, to specify the subtemp number.
Example:
T1M6
F5000

--DEFINE S20
G1 X100
G1Y100
G1X0
G1Y0
G26
--END DEFINE

G0 Z100
G0 X0Y0
G0 Z1
G1 Z1
!GOS20!
M2

Up to 64 subtemps may be used for a process.


A single subtemp may contain a program no larger than 240KB.
The total content of all defined subtemps cannot exceed 1MB.
A subtemp may be recalled by using the instructions
!GOS..!, !GOS..N..! and !GOS..N..N..!
These instructions are equivalent to the corresponding !GOP.. ! instructions valid for CMOS
programs.
It is possible to use a subtemp as a fixed cycle with the instruction G27S.. To program a subtemp
as a fixed cycle, please consult the section related to fixed cycles.

Warning: In the definition of a subtemp by means of the --DEFINE S.. instruction, it is necessary to insert
the subprogram end instruction G26.

Warning: The --DEFINE S.. instruction must be executed before the calling of the defined subtemp with
the instruction !GOS..!

Warning: The definition of a subtemp through the --DEFINE S.. instruction is temporary. The subtemp is
valid only during the current execution. At execution end, the subtemp is cleared.

75
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6. Z32 CANNED CYCLES AND MACROS

This chapter describes the standard macros and ca cycles of the Z32 CNC. Cycles and machining here described
are valid for versions SIS T109-8B and following.
Cycles and machining are recalled through the functions:
G800 FIXED CYCLES
G801 POSITIONING MACROS
G802 MACHINING MACROS

6.1 Z32 CANNED CYCLES (G800)

The function G800 allows to program the system fixed cycles.


The system fixed cycles are unchangeable system subprograms, activated by programming:
G800 K..

Where the K letter must be followed by the number identifying the desired cycle.
When a fixed cycle has been activated, it is automatically executed at the end of each programmed G0 (RAPID)
positioning. Movements executed in feed dont trigger the fixed cycle execution.
The programming of G800 is as follows:

Parameters programming:
All necessary parameters are specified by programming them on the same line containing the activation
of G800. In the program line containing a G800 activation, it is possible to program only parameters
related to fixed cycles programming.
For example, with reference to the cycle G800K1, it is possible to set the parameters by programming:
G800 MHA0 MHB-20 MHC10

An example of not correct programming is the following:


G800 MHA0 MHB-20 MHC10 S1000

The parameter F is programmable on the G800 line:


G800 MHA0 MHB-20 MHC10 F1000

Fixed cycle activation


To recall and activate a fixed cycle, it is necessary to program on the G800 line also the K parameter
used to choose the cycle:
G800K1 MHA0 MHB-20 MHC10
Parameter programming and fixed cycle activation may happen on the same line or on different lines.
As an example, all following syntaxes are equivalent:
G800K1 MHA0 MHB-20 MHC10 (parameter programming and cycle activation)
and
G800 MHA0 MHB-20 MHC10 (parameter programming)
G800K1 (cycle activation)

Fixed cycle deactivation


The deactivation of a fixed cycle activated with G800 is obtained by programming:
G800K0
After a fixed cycle deactivation, the cycle parameters are cleared; if the recalling of a new fixed cycle is
desired, all necessary parameters must be programmed anew.

76
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Fixed cycle suspension


The function G27X suspends the active fixed cycle. G27X is valid only in the block where programmed.
Example:

G800 MHA0 MHB-20 MHC10 K1 (activates fixed cycle)
G0 X100 Y100 (executes fixed cycle)
G27X G0 X200 (doesnt execute fixed cycle)
G0 X200 Y200 (executes fixed cycle)
G27C0 (deactivate fixed cycle)

Optional parameters management


In the fixed cycle definition some parameters defined as optional are present.
It is possible not to program all optional not desired parameters.

77
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.1 G800K1: Drilling


Mandatory parameters:
MHA: start position
feed MHF
MHB: hole end position
MHC: high retraction position feed F
MHC

G0
Optional parameters for centering: MHA

(MHD): centering end position


(MHF): feed during centering
MHD
The segment from MHA to MHD is executed at feed MHF
If MHF = 0 all the hole is executed with programmed F

Optional parameters for dwell at hole end: MHB


(MHT): dwell time at hole end
MHT
If MHT = 0 the dwell is not executed

6.1.2 G800K2: Deep drilling with chip breakage


Mandatory parameters:
feed MHF
MHA: start position MHC
feed F
MHB: hole end position
G0
MHC: high retraction position
MHA
MHI: depth increment before stop for chip breakage
MHI MHD MHT
Type of chip breakage:
MHR: retraction for chip breakage
MHR
if MHR > 0 the retraction is executed and MHT is ignored MHI
MHT: dwell time for chip breakage
Program MHR or MHT depending on the kind of chip breakage
desired.
MHB

Optional parameters for centering:


(MHD): centering end position
(MHF): feed during centering
The segment from MHA to MHD is executed at feed MHF
If MHF = 0 the centering is not executed

78
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.3 G800K3: Deep drilling with chip extraction


Mandatory parameters:
MHA: start position
feed MHF
MHB: hole end position MHC
feed F
MHC: high retraction position MHT
G0
MHI: depth increment before retraction for chip extraction. MHA
MHZ

This increment is reduced by 10% at every movement up to a value


of 50% of starting MHI value, then the increments are constant. MHD
MHZ: chip extraction position MHI

Optional parameters for centering:


(MHD): centering end position MHS

(MHF): feed during centering


The segment from MHA to MHD is executed at feed MHF
MHB
If MHF = 0 the centering is not executed

Optional parameters for repositioning:


(MHS): safety distance for in hole repositioning.
If MHS = 0, a default distance of 0.5mm is assumed.

Optional parameters for dwell time at extraction position:


(MHT): optional dwell at chip extraction position MHZ

6.1.4 G800K4: Tapping


Mandatory parameters:
MHA: start position MHP
MHB: hole end position G0 MHC

MHC: high retraction position


MHP: tap pitch in millimeters MHA

MHM: kind of tapping: rigid or with compensating chuck


MHM = 0: rigid tapping
WARNING: Please consult the machine tool builder about the
rigid tapping availability
MHB
MHM = 1: tapping with compensating chuck

MHT MHW
Optional parameters for dwells with compensator (MHM=1)
(MHT): dwell time before spindle inversion command
(MHW): dwell time after spindle inversion command
MHT and MHW must be used only in tapping with compensating chucks.

Optional parameter for changing backward movement speed


(MHR): multiplicative factor of spindle speed during backward movement
In case of rigid tapping, allowed values are in the range: 0.5 <= MHR <= 4. Different values are ignored.

79
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.5 G800K5: Reaming feed F

Mandatory parameters: G0 MHC

MHA: start position


MHA
MHB: hole end position
MHC: high retraction position

Optional parameters for dwell at hole end:


(MHT): dwell time at hole end MHB
If MHT = 0 the dwell is not executed MHT

6.1.6 G800K6: Boring


Mandatory parameters:
MHA: start position feed F
MHB: hole end position MHC
MHC: high retraction position G0

MHA

Optional parameters for spindle orientation:


WARNING: Please consult the machine tool builder for MHB
availability of M19 instruction Stop

(MHQ): angle rough value of boring bar cutting edge position with
respect to transducer zero.
S
To measure this value, orient the spindle with M19 and observe MH
the cutting edge position. MHG
The angle value must be positive, and comprised between 0 and
360 degrees.
(MHS): retraction from hole wall along the angle MHQ.
If MHS=0, the machine is not equipped with spindle orientation, and the return movement is executed
at hole center, without retraction from the hole wall.
If MHS > 0 the machine must be equipped with spindle orientation M19

Optional parameters for dwells:


(MHT): dwell time at hole end, before spindle stop or spindle orientation
(MHW): dwell time after spindle stop

80
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.7 G800K7: Deep drilling with chip breakage and extraction


Mandatory parameters:
feed MHF
MHA: start position MHC
feed F
MHB: hole end position MHW
G0
MHC: high retraction position MHA MHZ
MHI: increment before feed stop for chip breakage
MHD
Type of chip breakage:
MHI
MHR: retraction for chip breakage
if MHR > 0 the retraction is executed and MHT is ignored MHU
MHT: dwell time for chip breakage if MHR = 0
MHL
Program MHR or MHT depending on the kind of chip breakage desired.
MHU: chip breaking zone end position chip extraction zone starting position MHS
MHL: depth increment before retraction for chip extraction. MHB
This increment is each time reduced by 10% up to a value of 50% of its
initial value, then the increments are constant.

MHZ: chip extraction position


Optional parameters for centering:
(MHD): centering end position
(MHF): feed during centering
The segment from MHA to MHD is executed at feed MHF
If MHF = 0 the centering is not executed

Optional parameters for repositioning:


(MHS): safety distance for in hole repositioning.
If MHS = 0, a default distance of 0.5mm is assumed.

Optional parameters for dwells:


(MHW): dwell time at chip extraction position HZ

6.1.8 G800K8: Two zones drilling with gap


Mandatory parameters:
MHA: start position
feed MHF
MHB: hole end position MHC
MHC: high retraction position feed F

MHU: end of first zone position G0


MHA
MHV: start of second zone position
Optional parameters for centering: MHD

(MHD): centering end position MHI


(MHF): feed during centering MHU

The segment from MHA to MHD is executed at feed MHF


If MHF = 0 the centering is not executed MHV
Optional parameters for chip breaking: MHI
(MHI): depth increment before stop for chip breakage
With MHI0 no chip breakage happens MHB
Kind of chip breakage:
(MHR): retraction for chip breakage
if MHR > 0 the retraction is executed and MHT is ignored
(MHT): dwell time for chip breakage if MHR = 0
Program MHR or MHT depending on the kind of chip breakage desired.

81
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.9 G800K9: Three zones drilling


Mandatory parameters:
MHA: start position
MHB: hole end position feed MHF feed MHJ
MHC
MHC: high retraction position feed F
feed MHK
Middle zone: G0
MHA
MHU: end high zone start middle zone position
(MHJ): feed inside middle zone. MHD
If MHJ=0, the middle zone feed is equal to the high zone feed MHI
(MHG): speed inside middle zone. MHU
If MHG=0, the middle zone speed is equal to the high zone speed MHI
MHV
Optional parameters for low zone:
(MHV): end middle zone start low zone position MHI
If MHV = 0 no low zone exists. Middle zone ends at MHB MHB
(MHK): feed inside low zone.
(MHH): Speed in low zone.
If MHH=0, the low zone speed is equal to the middle zone speed

Optional parameters for centering:


(MHD): centering end position
(MHF): feed during centering
The segment from MHA to MHD is executed at feed MHF
If MHF = 0 the centering is not executed

Optional parameters for chip breaking:


(MHI): depth increment before stop for chip breakage
If MHI = 0 no chip breakage happens
(MHR): retraction for chip breakage
If MHR > 0 the retraction is executed and MHT is ignored
(MHT): dwell time for chip breakage if MHR = 0
Program MHR or MHT depending on the kind of chip breakage desired.

Optional parameters for speed change:


(MHS): retraction for speed change
(MHW): dwell time after MHS retraction, to allow spindle setting

82
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.1.10 G800K10: Internal spiral milling-boring


Mandatory parameters:
MHB: hole end position
MHD > 0
MHC: high retraction position
MHD: hole diameter
MHD > 0: counterclockwise machining (G3)
MHD MHD < 0
MHD < 0: clockwise machining (G2)

Optional parameters for pass management: MHC


(MHA): machining start position MHA
(MHK): increment per round
MHK

MHB

6.1.11 G800K11: External spiral milling-boring


Mandatory parameters:
MHB: stud end position
MHD > 0
MHC: high retraction position
MHD: stud diameter MHS
MHD > 0: counterclockwise machining (G3)
MHD < 0: clockwise machining (G2) MHD
MHD < 0

Optional parameters for pass management: MHC


(MHA): machining start position MHA
(MHK): increment per round
MHK

Optional parameters for approach: MHB


(MHS): starting point distance from approaching point
If MHS=0 a default value of 1mm is assumed.

83
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2 Z32 POSITIONING MACROS (G801)

The function G801 allows to program positioning macros.


The positioning macros are system, unchangeable subprograms activated by programming
G801 K..
Where the K letter must be followed by the number identifying the desired cycle.
The programming of a positioning macro starts the execution of all described positioning.
Normally these macros are used in combination with fixed cycles or machining macros (G802), used as a special
kind of fixed cycle.
The programming of G801 is as follows:

Parameter passing:
All necessary parameters are specified by programming them on the same line containing the activation
of G801. In the program line containing a G801 activation, it is possible to program only parameters
related to fixed cycles programming.
For example, with reference to the cycle G801K1, it is possible to set the parameters by programming:
G801 MPX0 MPY0 MPJ10 MPK5 MPN5

An example of not correct programming is the following:


G801 MPX0 MPY0 MPJ10 MPK5 MPN5 S1000

The parameter F is directly programmable on the G801 line:


G801 MPX0 MPY0 MPJ10 MPK5 MPN5 F1000

Activating a positioning macro


To recall and activate a positioning macro, it is necessary to program on the G801 line also the K
parameter used to choose the macro:
G801K1 MPX0 MPY0 MPJ10 MPK5 MPN5

Parameter programming and macro activation may happen on the same line or on different lines.
As an example, all following syntaxes are equivalent:
G801K1 MPX0 MPY0 MPJ10 MPK5 MPN5 (parameter programming and macro activation)
and
G801 MPX0 MPY0 MPJ10 MPK5 MPN5 (parameter programming)
G801K1 (macro activation)

At the end of machining the macro parameters are cleared, if the recalling of a new machining is
desired, all necessary parameters must be programmed anew

84
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Optional parameters management


In the macros definition some parameters defined as optional are present.
It is possible not to program all optional not desired parameters.
The available positioning macros may be used in two modes:

As positioning points for a canned cycle


If on every macro point the execution of a fixed cycle is desired, the fixed cycle must be activated
before the positioning macro recall. The fixed cycle must be deactivated (G27 C0) after calling the
positioning macro, or after all positioning where the fixed cycle must be executed.

As positioning points connected to any machining


If a custom machining is desired, the machining must be stored in a CMOS file (from file 1 to file
109). The program may be stored by directly editing the file number 90, or by using the --DEFINE
P function internal to the same part-program.

When the positioning macro is used to place a machining contained in a CMOS file, it is possible to
enable the part-program rotation during the positioning execution (see the example at the end of
positioning macro description).
It is furthermore possible to suspend the positioning on a set of points chosen by the programmer:
the parameter FN determined the number of points to be skipped. The values contained in the PAR
array (from PAR[1] to PAR[FN]) indicate the positioning to be skipped.
The skipping points numbering has the same order as the positioning execution.

Note: If a positioning macro is used to repeat a machining contained in a CMOS file, the CNC will
use the parameters DA, DB and QR to translate and rotate the machining on the various positioning
points. It is responsibility of the part-program programmer to use these functionalities in such a
way they dont contrast with the positioning macro.

85
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2.1 G801K1: Line - starting point and increments


Mandatory parameters:
MPX, MPY: starting point coordinates
MPJ, MPK: increments on the first and second axis of the plane
MPK
MPN: number of points
Optional parameters for machining position:
(MPF): MPF = 0 : on all points a fixed cycle is executed MPX 0

MPF <> 0 : on all points a programmed figure, stored in CMOS MPJ


program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line MPY

Optional parameters for positioning skipping:


(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array
from PAR[1] to PAR[MPS]

6.2.2 G801K2: Line starting point, angle and point distance


Mandatory parameters:
MPX, MPY: starting point coordinates
MPG: line slope angle
MPP: distance between points
MPN: number of points MP
P

Optional parameters for machining position: MPG


MPX 0
(MPF): MPF = 0 : on all points a fixed cycle is executed
MPF <> 0 : on all points a programmed figure, stored in CMOS
program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated MPY
MPR = 1 : the figure is rotated by the slope of positioning line
Optional parameters for positioning skipping:
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array
from PAR[1] to PAR[MPS]

6.2.3 G801K3: Line - starting and end point


Mandatory parameters:
MPX, MPY: starting point coordinates
MPA, MPB: end point coordinates
MPN: number of points MPB

Optional parameters for machining position: MPX 0

(MPF): MPF = 0 : on all points a fixed cycle is executed MPA

MPF <> 0 : on all points a programmed figure, stored in CMOS


program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated MPY

MPR = 1 : the figure is rotated by the slope of positioning line


Optional parameters for positioning skipping:
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array
from PAR[1] to PAR[MPS]

86
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2.4 G801K4: Grid row and column increments


Mandatory parameters:
MPX, MPY: starting point coordinates
MPJ, MPK: row increments MPV

MPV, MPW: column increments MPJ


MPK
MPN: number of points in a row MPW
MPM: number of points in a column
Optional parameters for machining position:

MP M
(MPF): MPF = 0 : on all points a fixed cycle is executed
MPF <> 0 : on all points a programmed figure, stored in CMOS
program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated MPY

MPR = 1 : the figure is rotated by the slope of positioning line MPN

Optional parameters for positioning skipping: MPX


0
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]

6.2.5 G801K5: Grid starting point, distances and angles


Mandatory parameters:
MPX, MPY: starting point coordinates
MPP: distance between row points MPT

MPG: row angle relative to the first axis of plane MPP

MPQ: distance between columns points


MPQ
MPT: column angle relative to the first axis of plane
MPN: number of points in a row
MPM: number of points in a column

MP M
Optional parameters for machining position:
(MPF): MPF = 0 : on all points a fixed cycle is executed MPG

MPF <> 0 : on all points a programmed figure, stored in CMOS MPY


program MPF, is positioned MPN
(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line 0 MPX

Optional parameters for positioning skipping:


(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]

6.2.6 G801K6: Grid row and column starting and end points
Mandatory parameters:
MPX, MPY: first row starting point coordinates
MPA, MPB: first row end point, last column starting point coordinates
MPC, MPD: last column end point coordinates MPD
MPN: number of points in a row
MPM: number of points in a column
Optional parameters for machining position:
MP M

(MPF): MPF = 0 : on all points a fixed cycle is executed


MPF <> 0 : on all points a programmed figure, stored in CMOS
MPB
MPY
program MPF, is positioned MPN
(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line
0 MPX MPA MPC
Optional parameters for positioning skipping:
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]

87
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2.7 G801K7: Circle initial angle and total increment


Mandatory parameters:
MPX, MPY: circle center coordinates
MPC: circle radius (positive or negative value)
If MPC is positive, positioning happens counterclockwise
If MPC is negative, positioning happens clockwise MPL

MPA: initial angle


MPN: number of points MPA

Optional parameters for arc length MPY


(MPL): total increment (positive value)
If MPL = 0 or MPL = 360 the points are spaced along the whole MPC

circumference
Optional parameters for machining position:
(MPF): MPF = 0 : on all points a fixed cycle is executed
MPF <> 0 : on all points a programmed figure, stored in CMOS 0 MPX
program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line
Optional parameters for positioning skipping:
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]
Optional parameters for positioning type:
(MPW): movement type between points
MPW = 0 : linear movement
MPW = 1 : circular movement

6.2.8 G801K8: Circle initial angle and angular distance


Mandatory parameters:
MPX, MPY: circle center coordinates MPP

MPC: circle radius (positive or negative value)


If MPC is positive, positioning happens counterclockwise
If MPC is negative, positioning happens clockwise MPA
MPA: initial angle
MPN: number of points MPY

Optional parameters for arc length MPC


(MPP): angular distance between points (positive value)
If MPP = 0 the points are spaced along the whole
circumference, starting from the initial angle.
Optional parameters for machining position:
(MPF): MPF = 0 : on all points a fixed cycle is executed 0 MPX

MPF <> 0 : on all points a programmed figure, stored in CMOS


program MPF, is positioned
(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line
Optional parameters for positioning skipping:
(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]
Optional parameters for positioning type:
(MPW): movement type between points
MPW = 0 : linear movement
MPW = 1 : circular movement

88
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2.9 G801K9: Circle initial and final angle


Mandatory parameters:
MPX, MPY: circle center coordinates
MPC: circle radius (positive or negative value) M
PB
If MPC is positive, positioning happens counterclockwise
If MPC is negative, positioning happens clockwise
MPA: initial angle

MPA
MPB: final angle
If MPA = MPB the points are spaced along the whole MPY

circumference, starting from the initial angle. MPC


MPN: number of points

Optional parameters for machining position:


(MPF): MPF = 0 : on all points a fixed cycle is executed
MPF <> 0 : on all points a programmed figure, stored in CMOS 0 MPX

program MPF, is positioned


(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line

Optional parameters for positioning skipping:


(MPS): number of points to be skipped.
The numbers of points to be skipped are stored in PAR array from PAR[1] to PAR[MPS]

Optional parameters for positioning type:


(MPW): movement type between points
MPW = 0 : linear movement
MPW = 1 : circular movement

6.2.10 G801K10: Rectangle center and pitch


Mandatory parameters: MPP
MPX, MPY: rectangle center coordinates MPQ

MPG: rectangle rotation angle


MPN: number of points on rectangle base MPG
MPP: distance between points on the base MPY
MPM: number of points on rectangle height
MPQ: distance between points on the height
MP
M

Optional parameters for machining position: MP N

(MPF): MPF = 0 : on all points a fixed cycle is executed MPX


MPF <> 0 : on all points a programmed figure, stored in CMOS 0

program MPF, is positioned


(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line

89
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.2.11 G801K11: Rectangle center and sides

Mandatory parameters:
MPX, MPY: rectangle center coordinates L
MP
MPG: rectangle rotation angle
MPN: number of points on rectangle base

MP
H
MPL: rectangle base
G
MP

MPM: number of points on rectangle height MPY

MPH: rectangle height

MP
M
Optional parameters for machining position: MP N
(MPF): MPF = 0 : on all points a fixed cycle is executed
MPX
MPF <> 0 : on all points a programmed figure, stored in CMOS 0

program MPF, is positioned


(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line

6.2.12 G801K12: Rectangle corner and pitch


Mandatory parameters:
MPX, MPY: lower left corner coordinates MP
P

MP
MPG: rectangle rotation angle

Q
MPN: number of points on rectangle base
MPP: distance between points on the base

MPG
MPM: number of points on rectangle height
MPQ: distance between points on the height MP
M

Optional parameters for machining position: N


MP
(MPF): MPF = 0 : on all points a fixed cycle is executed MPY

MPF <> 0 : on all points a programmed figure, stored in CMOS 0 MPX

program MPF, is positioned


(MPR): MPR = 0 : the figure is not rotated
MPR = 1 : the figure is rotated by the slope of positioning line

6.2.13 G801K13: Rectangle corner and sides


Mandatory parameters:
MPX, MPY: lower left corner coordinates
MPG: rectangle rotation angle
MPN: number of points on rectangle base MP
L

MPL: rectangle base


MP

MPM: number of points on rectangle height


H

G
MP
MPH: rectangle height

Optional parameters for machining position:


MP

(MPF): MPF = 0 : on all points a fixed cycle is executed


M

MPF <> 0 : on all points a programmed figure, stored in CMOS MPY MP N

program MPF, is positioned 0


MPX

(MPR): MPR = 0 : the figure is not rotated


MPR = 1 : the figure is rotated by the slope of positioning line

90
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3 Z32 MACHINING MACROS (G802)

The function G802 allows to program machining macros.


The machining macros are system, unchangeable subprograms activated by programming
G802 K..
Where the K letter must be followed by the number identifying the desired cycle.
The programmming of G802 is as follows:

Parameters programming:
All necessary parameters are specified by programming them on the same line containing the activation
of G802. In the program line containing a G802 activation, it is possible to program only parameters
related to fixed cycles programming.
Unlike G800 and G801, with G802 it is possible to program the positions of continuous axes, in order to
define the macro reference point (i.e. a pocket center).
For example, with reference to the cycle G802K1, it is possible to set the parameters by programming:
G802 X10 Y10 MMA0 MMB-20 MMC10

An example of not correct programming is the following:


G802 X10 Y10 MMA0 MMB-20 MMC10 S1000

The parameter F is directly programmable on the G802 line:


G802 X10 Y10 MMA0 MMB-20 MMC10 F1000

Activating a machining macro


To recall and activate a fixed cycle, it is necessary to program on the G802 line also the K parameter
used to choose the cycle:
G802K1 X10 Y10 MMA0 MMB-20 MMC10

Parameter programming and fixed cycle activation may happen on the same line or on different lines.
As an example, all following syntaxes are equivalent:
G802K1 X10 Y10 MMA0 MMB-20 MMC10 (parameter programming and macro activation)
and
G802 X10 Y10 MMA0 MMB-20 MMC10 (parameter programming)
G802K1 (cycle activation)
At the end of machining the macro parameters are cleared, if the recalling of a new machining is
desired, all necessary parameters must be programmed anew

Optional parameters management


In the fixed cycle definition some parameters defined as optional are present.
It is possible not to program all optional not desired parameters.

91
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Using a machining macro as a fixed cycle


By programming the parameter HX1 on the same line as G802 K.. it is possible to use a machining macro
like a fixed cycle, thus allowing the macro replication on more than one point.
For example, it is possible to combine a machining macro, used as a fixed cycle, with a positioning
macro.
When a machining macro is used as a fixed cycle, the macro reference point programmed through the
axes positions (i.e. a pocket center) will be no more set on the same line as G802, because the macro
positioning point is determined by succeeding positioning.

Example:
G802 MMA0 MMB-30 MMC10 MMD60
G802K1 HX1 MMK1 MME2 MMW1 MMQ4
Please note that the pocket center positions are not programmed.

The fixed cycle deactivation is programmed by the function


G802K0
After a fixed cycle deactivation, the cycle parameters are cleared; if the recalling of a new fixed cycle
is desired, all necessary parameters must be programmed anew.

A fixed cycle may be suspended by the function G27X (see introduction to G800 fixed cycles).

By using a machining macro connected with a positioning macro, it is possible to use the machining rotation
(parameter MHR).

92
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.1 G802K1: Circular pocket roughing


MMP MMJ=0
Mandatory parameters:
pocket center coordinates (programmed through axes
AA, AB
positions) MMJ=1
MMD: pocket diameter
MMA: pocket start position MMD
R MMC
MMB: pocket end position MMS MME
MMC: high retraction position MMA
MMK: pass depth
MME: safety distance MMK

MMB
Optional parameters for taper: MMU MMN
(MMN): taper (delivery angle).
Must be comprised between 0 and 80 degrees.

Optional parameters for depth increment movements:


(MMF): feed for depth increment movements.
If not programmed, or if equal to 0, the depth increment feed assumes the F value.

Optional parameters for ramp sinking:


(MMW): depth increment ramp:
MMW=0: depth increment executed on pocket center, inside a pre-hole.
MMW=1: depth increment executed with a spiral movement, with maximum slope MMQ
(MMQ): maximum slope of depth increment ramp.
If MMQ=0, the depth increment is executed as a single movement.

Optional parameters for pass overlapping:


(MMP): minimum overlapping between passes.
Values between 0.2 and 1.9 times the tool radius. If MMP=0 the value MMP=0.2 times tool radius
is assumed

Optional parameters for movement direction:


(MMJ): movement direction:
MMJ=0 counterclockwise (concordance)
MMJ=1 clockwise (discordance)

Optional parameters for machining allowance:


(MMS): allowance at roughing end.
(MMV): allowance at end of pass:
MMV=0 leaves allowance unmachined
MMV=1 eliminates allowance with a final pass to MMD position

Optional parameters for non cylindrical tools:


(MMU): insert radius of toroidal tools
The R parameter contains the tool radius, while the MMU parameter the insert radius:
MMU=0, cylindrical tool
MMU<R, toroidal tool
MMU=R, spherical tool

93
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.2 G802K2: Rectangular pocket roughing pocket center


Mandatory parameters:
pocket center coordinates (programmed through axes
positions) MMP
MML: pocket base
MMG
MMH: pocket height MMR
MMR: rounding radius AA, AB
MMA: pocket start position MMH
MMB: pocket end position MML
MMC: high retraction position MMC
MMS MME
MME: safety distance R MMA
MMK: pass depth
MMK
Optional parameters for pocket rotation:
MMB
(MMG): pocket rotation angle. MMU MMN

Optional parameters for taper:


(MMN): taper (delivery angle). Must be comprised between 0 and 80 degrees.
(MMX): rounding (MMR) management with taper pockets:
MMX=0 variable rounding
MMX=1 constant rounding

Optional parameters for depth increment feed:


(MMF): feed for depth increment movements.
If not programmed, or if equal to 0, the depth increment feed assumes the F value.

Optional parameters for depth increment sinking:


(MMW): depth increment sinking:
MMW=0: depth increment executed on pocket center, inside a pre-hole.
MMW=1: depth increment executed with a spiral movement, with maximum slope MMQ
(MMQ): maximum slope of depth increment ramp.
If MMQ=0, the depth increment is executed as a single movement.

Optional parameters for pass overlapping:


(MMP): minimum overlapping between passes.
Values between 0.2 and 1.9 times the tool radius. If MMP=0 the value MMP=0.2 times tool radius is
assumed

Optional parameters for movement direction:


(MMJ): movement direction:
MMJ=0 counterclockwise (concordance)
MMJ=1 clockwise (discordance)

Optional parameters for machining allowance:


(MMS): allowance at roughing end.
(MMV): allowance at end of pass:
MMV=0 leaves allowance unmachined
MMV=1 eliminates allowance with a final pass to MMD position

Optional parameters for non cylindrical tools:


(MMU): insert radius of toroidal tools
The R parameter contains the tool radius, while the MMU parameter the insert radius:
MMU=0, cylindrical tool
MMU<R, toroidal tool
MMU=R, spherical tool

94
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.3 G802K3: Rectangular pocket roughing - corner

The machining cycle of this macro is very similar to the roughing macro where the pocket center is known. The
only difference is in the programmed coordinates: those of a pocket corner, instead of pocket center.

In this case the AA and AB parameters represent one pocket corner, while MML and MMH are the two pocket
sides. The sign of MML and MMH must be assigned according to the following figure:

MML>0

MMH>0 MMH<0

MML>0
MML<0

MMH>0 MMH<0

MML<0

MMP
MMG
MMR

MMH
MML
MMC
MMS MME
R MMA

MMK

MMB
MMU MMN

95
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.4 G802K4: Circular pockets finishing

Mandatory parameters:
pocket center coordinates (programmed through axes
positions)
MMJ=0
MMD: pocket diameter AA, AB
MMA: pocket start position
MMB: pocket end position
MMD MMJ=1
MMC: high retraction position MMQ
MME: safety distance
MMK: pass depth R MMC
MMS MME
MMA
Optional parameters for pocket wall orientation:
(MMV): defines the wall where the approaching and retraction MMK
movements from pocket profile are made: MMB
MMU
MMV=0: right wall MMN
MMV=1: left wall

Optional parameters for approaching distance:


(MMQ): profile approaching and retraction distance.
If not programmed, or if equal to 0, a value of 2mm is assumed.

Optional parameters for taper:


(MMN): taper (delivery angle). Must be comprised between 0 and 80 degrees.

Optional parameters for sinking feed:


(MMF): feed for sinking movements.
If not programmed, or if equal to 0, the sinking feed assumes the F value.

Optional parameters for spiral milling:


(MMW): spiral milling
MMW=0 finishing with constant depth passes
MMW=1 spiral finishing

Optional parameters for movement direction:


(MMJ): movement direction:
MMJ=0 counterclockwise (concordance)
MMJ=1 clockwise (discordance)

Optional parameters for machining allowance:


(MMS): allowance at machining end.

Optional parameters for non cylindrical tools:


(MMU): insert radius of toroidal tools
The R parameter contains the tool radius, while the MMU parameter the insert radius:
MMU=0, cylindrical tool
MMU<R, toroidal tool
MMU=R, spherical tool

96
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.5 G802K5: Rectangular pocket finishing pocket center


Mandatory parameters:
pocket center coordinates (programmed through axes
positions)
MML: pocket base MMQ
MMH: pocket height MMG
MMR
MMR: rounding radius
AA, AB
MMA: pocket start position
MMB: pocket end position MMH
MMC: high retraction position MML
MMC
MME: safety distance R MMS MME
MMK: pass depth MMA

MMK
Optional parameters for pocket wall orientation:
(MMV): defines the wall where the approaching and retraction MMB
MMU MMN
movements from pocket profile are made:
MMV=0: right wall
MMV=1: left wall

Optional parameters for approaching distance:


(MMQ): profile approaching and retraction distance.
If not programmed, or if equal to 0, a value of 2mm is assumed.

Optional parameters for pocket rotation:


(MMG): pocket rotation angle.

Optional parameters for tapered walls:


(MMN): taper (wall angle). Must be comprised between 0 and 80 degrees.
(MMX): rounding (MMR) management with tapered pockets:
MMX=0 variable rounding
MMX=1 constant rounding

Optional parameters for depth increment feed:


(MMF): feed for depth increment movements. If not programmed, or if equal to 0, the depth increment
feed assumes the F value.

Optional parameters for spiral milling:


(MMW): spiral milling
MMW=0 finishing with constant depth passes
MMW=1 spiral finishing (only for cylindrical pockets, MMN=0)

Optional parameters for movement direction:


(MMJ): movement direction:
MMJ=0 counterclockwise (concordance)
MMJ=1 clockwise (discordance)

Optional parameters for machining allowance:


(MMS): allowance at machining end.

Optional parameters for non cylindrical tools:


(MMU): insert radius of toroidal tools
The R parameter contains the tool radius, while the MMU parameter the insert radius:
MMU=0, cylindrical tool
MMU<R, toroidal tool
MMU=R, spherical tool

97
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.6 G802K6: Rectangular pocket finishing - corner

The machining cycle of this macro is very similar to the finishing macro where the pocket center is known. The
only difference is in the programmed coordinates: those of a pocket corner, instead of pocket center.

In this case the AA and AB parameters represent one pocket corner, while MML and MMH are the two pocket
sides. The sign of MML and MMH must be assigned according to the following figure:

MML>0

MMH>0 MMH<0

MML>0
MML<0

MMH>0 MMH<0

MML<0

MMQ
MMG
MMR

MMH
MML
MMC
R MMS MME
MMA

MMK

MMB
MMU MMN

98
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.7 G802K7: Linear slot


Mandatory parameters:
slot center coordinates (programmed through axes positions)
MML: slot length MMG
MMD: slot width B A
MMD
MMA: slot start position AA, AB
MMB: slot end position
MMC: high retraction position MML
MME: safety distance
MMC
MMS MME
Type of machining management: MMA
MMV: machining type MMK, MMH
MMV = 0: roughing and finishing with the same tool
MMV = 1: roughing only MMB
MMV = 2: finishing only
MMK: roughing pass depth
MMH: finishing pass depth

Optional parameters for rotation:


MPG: rotation angle relative to the first axis of plane
The rotation is executed around the slot center.

Optional parameters for machining allowance:


(MMS): allowance at roughing end.

Optional parameters for depth increment:


(MMW): depth increment mode
MMW = 0: depth increment in a pre-hole centered in A or B, depending on the MML sign:
MML>0 depth increment on point A
MML<0 depth increment on point B
MMW > 0: sloped depth increment with MMW oscillations between point A and point B
(MMF): depth increment feed

Optional parameters for movement direction:


(MMJ): machining direction:
MMJ = 0: counterclockwise
MMJ = 1: clockwise

99
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.8 G802K8: Circular slot slot center

Mandatory parameters:
slot center coordinates (programmed through axes positions)
MML: slot length
MMD: slot slot width
MMR A
MMR: slot curvature radius
MMA: slot start position
MMB: slot end position MMC
MMC: high retraction position MMS MME
MMA
MME: safety distance AA, AB MMG
MMK
MMH MMD
Type of machining management: MMB
MML
MMV: machining type
MMV = 0: roughing and finishing with the same tool B
MMV = 1: roughing only
MMV = 2: finishing only
MMK: roughing pass depth
MMH: finishing pass depth

Optional parameters for rotation:


MPG: rotation angle relative to the first axis of plane
The rotation is executed around the slot center.

Optional parameters for machining allowance:


(MMS): allowance at roughing end.

Optional parameters for depth increment:


(MMW): depth increment mode
MMW = 0: depth increment in a pre-hole centered in A or B, depending on the MML sign:
MML>0 depth increment on point A
MML<0 depth increment on point B
MMW > 0: sloped depth increment with MMW oscillations between point A and point B
(MMF): depth increment feed

Optional parameters for movement direction:


(MMJ): machining direction:
MMJ = 0: counterclockwise
MMJ = 1: clockwise

100
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.9 G802K9: Circular slot curvature center

Mandatory parameters:
curvature center coordinates (programmed through axes
positions)
MML: slot length
A
MMD: slot width
MMR: slot curvature radius MMR
MMA: slot start position
MMB: slot end position

MML
MMC: high retraction position AA, AB MMG
MME: safety distance
MMC MMD
MMS MME
MMA
Type of machining management:
MMV: machining type MMK
B
MMH
MMV = 0: roughing and finishing with the same tool MMB
MMV = 1: roughing only
MMV = 2: finishing only
MMK: roughing pass depth
MMH: finishing pass depth

Optional parameters for rotation:


MPG: rotation angle relative to the first axis of plane
The rotation is executed around the slot center.

Optional parameters for machining allowance:


(MMS): allowance at roughing end
.
Optional parameters for depth increment:
(MMW): depth increment mode
MMW = 0: depth increment in a pre-hole centered in A or B, depending on the MML sign:
MML>0 depth increment on point A
MML<0 depth increment on point B
MMW > 0: sloped depth increment with MMW oscillations between point A and point B
(MMF): depth increment feed

Optional parameters for movement direction:


(MMJ): machining direction:
MMJ = 0: counterclockwise
MMJ = 1: clockwise

101
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.10 G802K10: Hole thread milling with a single tooth mill

Mandatory parameters:
hole center coordinates (programmed through axes positions) MMD
MMA
MMD: bottom of thread diameter
MMQ: hole diameter
MMA: machining start position MMP
MMB: machining end position
MMC: high retraction position MMQ
MMP: thread pitch
MMK: pass depth for thread roughing.
The roughing machining ends on thread bottom (MMD).
On this diameter are executed the MMN polishing passes. MMB

Optional parameters for safety distance:


(MME): safety distance on thread top and bottom.
The approach (and retraction) to the thread is executed
in a fourth of thread; the MME diameter indicates the starting diameter initiating the fourth of
thread approach to the machining. For example, if the internal diameter is 50, tool radius is
10 and MME is 2, the approach point is at coordinates X0 Y13. If MME=0 a default safety distance
of 2mm is assumed.

Optional parameters for polishing passes:


(MMN): number of polishing passes.

Optional parameters for last roughing pass:


(MMW): last roughing pass depth.
If MMW=0, all roughing passes have the same pass increment, less than or equal to MMK. If
MMW>0, the last roughing pass has a MMW depth.

Optional parameters for thread direction:


(MMJ): thread direction:
MMJ = 0 : right thread
MMJ = 1 : left thread

102
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.11 G802K11: Hole thread milling with a multiple teeth mill

Mandatory parameters:
hole center coordinates (programmed through axes positions) MMD
MMD: bottom of thread diameter MMA
MMQ: hole diameter
MMA: machining start position
MMP
MMB: machining end position
MMC: high retraction position
MMP: thread pitch MMQ
MMK: pass depth for thread roughing.
The roughing machining ends on thread bottom (MMD).
On this diameter are executed the MMN polishing passes. MMH
MMH: tool height (mm or inches, depending on machine setup) MMB
MMS: threads overlap (number of threads).
If the area to be threaded is smaller than tool height,
the threading may be executed in a single turn (adding
a fourth of turn approach and a fourth of turn retract); if the area to be threaded is higher
than tool height, the threading is executed in more than one turn. After each turn, the tool is
translated by a quantity equal to tool height minus the programmed overlap.

Optional parameters for safety distance:


(MME): safety distance on thread top and bottom.
The approach (and retraction) to the thread is executed in a fourth of thread; the MME diameter
indicates the starting diameter initiating the fourth of thread approach to the machining. For
example, if the internal diameter is 50, tool radius is 10 and MME is 2, the approach point is at
coordinates X0 Y13. If MME=0 a default safety distance of 2mm is assumed.

Optional parameters for polishing passes:


(MMN): number of polishing passes.

Optional parameters for last roughing pass:


(MMW): last roughing pass depth.
If MMW=0, all roughing passes have the same pass increment, less than or equal to MMK. If
MMW>0, the last roughing pass has a MMW depth.

Optional parameters for thread direction:


(MMJ): thread direction:
MMJ = 0 : right thread
MMJ = 1 : left thread

103
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.12 G802K12: Stud thread milling with a single tooth mill

Mandatory parameters:
stud center coordinates (programmed through axes positions) MMD
MMD: external diameter MMA
MMQ: bottom of thread diameter
MMA: machining start position
MMP
MMB: machining end position
MMC: high retraction position
MMP: thread pitch MMQ
MMK: pass depth for thread roughing.
The roughing machining ends on thread bottom (MMD).
On this diameter are executed the MMN polishing
MMB
passes.

Optional parameters for safety distance:


(MME): safety distance on thread top and bottom.
The approach (and retraction) to the thread is executed in a fourth of thread; the MME diameter
indicates the starting diameter initiating the fourth of thread approach to the machining. For
example, if the internal diameter is 50, tool radius is 10 and MME is 2, the approach point is at
coordinates X0 Y37. If MME=0 a default safety distance of 2mm is assumed.

Optional parameters for polishing passes:


(MMN): number of polishing passes.

Optional parameters for last roughing pass:


(MMW): last roughing pass depth.
If MMW=0, all roughing passes have the same pass increment, less than or equal to MMK. If
MMW>0, the last roughing pass has a MMW depth.

Optional parameters for thread direction:


(MMJ): thread direction:
MMJ = 0 : right thread
MMJ = 1 : left thread

104
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.13 G802K13: Stud thread milling with a multiple teeth mill

Mandatory parameters:
stud center coordinates (programmed through axes positions) MMD
MMA
MMD: external diameter
MMQ: bottom of thread diameter
MMA: machining start position MMP

MMH
MMB: machining end position
MMC: high retraction position MMQ
MMP: thread pitch
MMK: pass depth for thread roughing.
The roughing machining ends on thread bottom (MMD).
On this diameter are executed the MMN polishing MMB
passes.
MMH: mill height (mm or inches, depending on machine setup)
MMS: threads overlap (number of threads).
If the area to be threaded is smaller than tool height,
the threading may be executed in a single turn (adding a fourth of turn approach and a fourth
of turn retract); if the area to be threaded is higher than tool height, the threading is executed
in more than one turn. After each turn, the tool is translated by a quantity equal to tool height
minus the programmed overlap.

Optional parameters for safety distance:


(MME): safety distance on thread top and bottom.
The approach (and retraction) to the thread is executed in a fourth of thread; the MME diameter
indicates the starting diameter initiating the fourth of thread approach to the machining. For
example, if the internal diameter is 50, tool radius is 10 and MME is 2, the approach point is at
coordinates X0 Y37. If MME=0 a default safety distance of 2mm is assumed.

Optional parameters for polishing passes:


(MMN): number of polishing passes.

Optional parameters for last roughing pass:


(MMW): last roughing pass depth.
If MMW=0, all roughing passes have the same pass increment, less than or equal to MMK. If
MMW>0, the last roughing pass has a MMW depth.

Optional parameters for thread direction:


(MMJ): thread direction:
MMJ = 0 : right thread
MMJ = 1 : left thread

105
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.3.14 G802K14: Face milling

Mandatory parameters:
first vertex coordinates of rectangular area (programmed AA, AB
MMV=1
through axes positions)
MMX: working plane first axis coordinate of rectangular area
MMV=0 MMP
second vertex.
MMY: working plane second axis coordinate of rectangular area
second vertex.
MMA: rapid approaching position
MMB: facing position
MMC: high retraction position MMX, MMY
MMC
Optional parameters for pass overlapping:
(MMP): minimum overlapping between passes.
MMA MMB
Values between 0.2 and 1.9 times the tool radius. If
MMP=0 the value MMP=0.2 times tool radius is assumed

Optional parameters for depth increment feed:


(MMF): depth increment feed If not programmed, or if equal to 0, the depth increment feed assumes
the F value.

Optional parameters for pass increment:


(MMV): type of pass increment
MMV = 0 : the pass increment is executed in G1 on the internal side of working rectangle
MMV = 1 : the pass increment is executed in G0 on the external side of working rectangle of
2mm.

106
CNC Z32 M323 C2 - Programming guide (Milling Machines)

6.4 MACHINE TOOL BUILDERS FIXED CYCLES (G27C..)

Through the instruction G27C.. it is possible to activate a set of fixed cycles generally supplied by the machine
tool builder.
The syntax and usage of G27C.. instruction is the same as the G800K.. instruction.

G27C.. must be followed by the number of cycle to activate (ex. G27C1)


When the fixed cycle is activated, it will be executed after all successive rapid positioning.
The fixed cycle may be suspended through the instruction G27X (see description of G800 function).
The fixed cycle deactivations happens by means of the G27C0 instruction.

107
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7. PROFILE PROGRAMMING

The Z32 CNC offers an instruction set designed to solve computing problems of complex geometrical profiles.
It is possible to use the geometric instructions for complex profiles programming, only on the working plane
defined by G25.
All succeeding discussion assumes the plane X-Y as the working plane. To program profiles on different planes,
it is necessary to correctly program the G25 function, specifying the desired axes instead of X-Y.

A geometric profile is composed by the following elements:


points
linear segments
circular arcs
chamfers
roundings

Warning: When the G12 function (helical interpolation) is active, it is possible to coordinate a movement
along the third axis direction specified by G25, with any profile element.

Some preliminary notes:

A defined point is any point programmed on the plane or computed by Z32. A defined point may be
the starting or end point of an element.
An element is a line segment or a circular arc, and may be open or closed.
A line or a circle are defined as closed elements when their final point is known.
A line or a circle are defined as open elements when their end point is not defined, but will be
computed as intersection with the succeeding element.
Each element may terminate with a chamfer (only linear elements) or with a rounding.

As discussed with more detail in the following, the parameters used to define geometric elements are the
following:

Element end point. Programmed with the axis name and corresponding position, i.e. X and Y.
Arc center coordinates. Programmed with the parameters I and J, where I is the coordinate
related to the first axis of working plane and J the coordinate related to the second axis.
Arc radius. Programmed with the RA parameter, always positive.
Element final slope. Programmed with the QF parameter, expressed in degrees and considering the
following figure:

QF > 0 QF < 0

0 < QF < 90 -270 > QF > -360

90 < QF < 180 -180 > QF > -270


QF

270 < QF < 360 0 > QF > -90


180 < QF < 270 -90 > QF > -180

Rounding radius. Programmed with the parameter RR, with sign.


RR>0 counterclockwise rounding (G3)
RR<0 clockwise rounding (G2)
Rounding choice parameter. Programmed with KA parameter:
KA0 short rounding
KA1 long rounding
Chamfer. Programmed with the parameters RB and QA.

108
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Arc length in degrees or auxiliary slope. Programmed with QA parameter, expressed in degrees as
for parameter QF. It is used in two cases:
To define the length in degrees of a circular arc.
To define the slope of a line in the combinations line-circle G1 G2/G3.
Intersection choice. Programmed with KA parameter:
The end point of an open element may be computed through its intersection with the succeeding
element.
If at least one of the elements is a circle, two different solutions are possible.
Observing the movement with reference to the first programmed element, one of the solutions turns
to the right while the other turns to the left.

The correct solution is chosen with the KA parameter:

KA0 KA1
KA0 (turns to the left)
KA1 (turns to the right)

KA0 KA1

By programming KA in a block where it is not required, it is ignored with no alarm issued; KA0 may be omitted.

The radius sign of a rounding decides the intersection to be chosen; thus in most cases by programming a
rounding radius eliminates the need to choose an intersection with KA.

RR>0 RR<0

RR>0 counterclockwise rounding (G3)


RR<0 clockwise rounding (G2)

RR>0 RR<0

109
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.1 CLOSED LINES


A line is defined as closed when its end point is defined.

7.1.1 Line end point (G1 X.. ; G1 Y.. ; G1 X.. Y..)


The end point may be defined with one or two coordinates:

G1 X..
G1 Y..
G1 X.. Y..

If the end point is defined with only one coordinate, a line parallel to one axis is specified.
If the end point is defined with two coordinates, a sloped line is specified.

The line may originate from another defined point.


The line may originate from an open circle; in this case, a tangent condition with the circle is forced. In this
case the end point must be defined with both coordinates and must be external to the circle, otherwise the
error CN3314 is issued.
The line cannot originate from an open line.

R10

G0 X40 Y0
30
G1 X20 Y20
X10
20
Y30
G3 I0 J30
G1 X-20 Y20
X-40
0
Y0
X

-40 -20 0 10 20 40

110
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.1.2 Line end coordinate and slope (G1 X..QF.. ; G1 Y..QF..)

G1 X.. QF..
G1 Y.. QF..

The line must originate from a defined point. Starting from the known starting point, the programmed
coordinate is reached with an element having QF slope.

G0 X40 Y0
40
G1 Y10
45
30
30
Y30 QF120
30
X15
30
X0 QF210
Y40 QF135
10
X-40
X-50 QF-120
0 Y0
X

-50 -40 0 15 40

7.1.3 Line two coordinates end point and slope (G1 X.. Y.. QF..)

G1 X.. Y.. QF..

The programmed end point is reached with an element having programmed slope QF.
The preceding element must be an open circle or an open line.
If the preceding element is closet, an error is issued.
The line starting point is computed by intersecting the line with the preceding element.
If the preceding element is a circle, there are two possible intersections. In order to choose between the two
solutions it is possible to use the KA parameter, or to define a very small signed rounding.

Y G0 X50 Y0
G3 I35 J0 KA1 (or RR-0.0001)
G1 X0 Y30 QF150
40 X-10
G2 I-25 J30 KA1 (or RR-0.0001)
30 G1 X-40 Y40 QF100
30
R15

10
R15

0
X

-40 -25 -10 0 35 50

111
CNC Z32 M323 C2 - Programming guide (Milling Machines)

All closed lines may be terminated or be preceded by a rounding RR or by a chamfer RB, if the preceding or
the following elements are lines.
Y

40 G0 X50 Y0
R10
R5 R10 G3 I35 J0 RR-5
30 G1 X0 Y30 QF150 RR10
X-10 RR5
30
R15 G2 I-25 J30 RR-10
G1 X-40 Y40 QF100
10
R15 R5
0
X

-40 -25 -10 0 35 50

112
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.2 OPEN LINES (G1 ; G1 QF..)


Open lines are defined only as direction and must then originate from a defined point, represented by a rapid
movement, the end point of a closed line or of a closed circle.

The line end point is computed by intersecting the line with the succeeding element. The succeeding element
must be an open element, line or circle. It cannot be a closed element.

If the succeeding element is a circle, there are two possible intersections.


To choose the intersection desired, the KA parameter must be used.
KA0 : turns to the left (default setting if KA is not programmed)
KA1 : turns to the right.

The desired intersection may be chosen also by inserting a rounding with a very small signed radius (i.e.
RR0,0001 or RR-0,0001)

The syntax for an open line is as follows:


G1 QF.. (known slope line)
G1 (continuing line)

The continuing line has the same slope as the preceding element.
If programmed after a closed line definition with end coordinates and angle, it defines a line of known slope,
with start and end points unknown, but with an intermediate known point.
Example:

Y
10 10
15

5
G0 X-80 Y15
0
G1 QF-10
X KA1
G3 I-30 J0 RA15 KA1
G1 X0 Y5 QF0
R15 R15 G1 KA1
-80 -30 0 30 80
G3 I30 J0 RA15 KA1
G1 X80 Y15 QF10

Y
10 10
15

10
5

0 X

R15 R15
G0 X-80 Y15
G1 QF-10 RR-0.0001
-80 -30 0 30 80 G3 I-30 J0 RA15 RR-0.0001
G1 X0 Y5 QF10
G1 RR-0.0001
G3 I30 J0 RA15 RR-0.0001
G1 X80 Y15 QF10

113
CNC Z32 M323 C2 - Programming guide (Milling Machines)

If programmed after a closed circle with center coordinates, radius and final slope, it defines a line tangent to
the preceding circle, and sloped by QF degrees.

G0 X-55 Y30
Y G1 X-45 Y20
30 G1 RR-2
45
G3 I-25 J0 RA15 RR-2
20 G1 X0 Y5 QF0
G1 RR-2
R12
R2
R2 R2
G3 I25 J0 RA15 QF45
5 G1 RR12
0 X
G1 X55 Y30 QF90
45

R15 R15

-55 -45 -25 0 25 55

114
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.3 CLOSED CIRCLES


Z32 considers closed circles all circular arcs terminating on a point with known coordinates.

7.3.1 Circle center and end point (G2/G3 I..J..X..Y..)

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


G3 I.. J.. X.. Y..

The circle is defined by the end point coordinates (XY) and center point coordinates (IJ).

The circle may originate from a defined point programmed before the circle, from an open line or from an
open circle.
If the starting point doesnt belong to the circle, an error CN3214 is issued.
If the circle originates from an open line or circle, the KA parameter must be used to choose the desired
intersection.

KA0 : turns to the left (default setting if KA is not programmed)


KA1 : turns to the right.

It is otherwise possible to choose the intersection by programming a rounding with very small signed radius.

15
R15 G0 X30 Y0
G3 X15 Y15 I15 J0
0 R15 R15 G2 X-15 Y15 I0 J20
X
G3 X-30 Y0 I-15 J0

-30 -15 0 15 30

Y
30

10 10

0
X

-50 0 30 50

G0 X-50 Y10
G1 QF10
G3 X50 Y30 I30 J30 KA1 (or RR-0.0001)

115
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.3.2 Circle end point and radius (G2/G3 X..Y..RA..)


Circle defined by end point coordinates and radius.

G2 I.. J.. RA..


G3 I.. J.. RA..

If the circle originates in a defined point, it solves the problem of a circle passing between two points with a
given radius.
If the circle originates in an open line, a tangent condition is forced and the rotation direction is chosen in
such a way the exit is tangent to the line, independently from the programmed G2/G3.
If the preceding element is an open circle, an error is issued.

Y
30
R50

R5
R4 R4 G0 X40 Y0
G42 X30 Y0 QF90
Y30 RR4
0
X G2 X-30 Y30 RA50 RR4
G2 X-30 Y-30 RA50 RR4
R50 G2 X30 Y-30 RA50 RR4
R4 G1 Y0
R4
G40 X40 Y0

-30 R50

-30 0 30

If the circle originates in an open line, a tangent condition is forced and the rotation direction is chosen in
such a way the exit is tangent to the line, independently from the programmed G2/G3.

30
R15

G0 X50 Y0
G1 Y5
30 G1 QF150
5 G2 X20 Y30 RA15 (or G3)
G1 X0
0
X

0 20 50

116
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.3.3 Circle center, radius and end slope (G2/G3 I..J..RA..QF..)


Circle defined by center point coordinates, radius and final slope.

G2 I.. J.. RA.. QF..


G3 I.. J.. RA.. QF..

The preceding element must be an open line or circle; if it is a closed element, an error is issued.

This geometric definition is useful to define in the subsequent block a line tangent to the circle, with the same
slope.

Y
R15

30
45 G0 X-10 Y0
G1 QF90 RR5
G2 I0 J30 RA15 QF-45
R5 G1 RR-5
R5 X40 Y0 QF-90
0
X

-10 0 40

7.3.4 Circle center and end slope (G2/G3 I..J..QF..)


Circle defined by center point coordinates and final slope.

G2 I.. J.. QF..


G3 I.. J.. QF..

The circle must originate from a defined point or from an open line.
If the preceding element is an open circle, an error is issued.
If the preceding element is an open line, this geometry solves the problem of a circle with known center,
tangent to a line. In this case a tangent condition is forced and the rotation direction is chosen in such a way
to exit tangent to the line, independently from the programmed G2/G3.
Y

45
G0 X0 Y0
20 G1 QF45
G3 I40 J20 QF-45
45
R5 G1 RR-5
X65 Y0 QF-90
0
X

0 40 65

117
CNC Z32 M323 C2 - Programming guide (Milling Machines)

If the preceding element is closed, a circle with center in a known point, passing through another known point
is obtained.
Y

10

R3 G0 X30 Y10
0 G1 X10 RR3
X
G2 I0 J0 QF90
G1 Y10

0 10 30

7.3.5 Circle radius and end slope (G2/G3 RA..QF..)


The circle has known radius and final slope.

G2 RA.. QF..
G3 RA.. QF..

The circle must originate from a defined point and slope; it is therefore a circle tangent to the preceding
element.
Circle with known radius, tangent to a line in a known point:

Y
R10

30

G0 X0 Y0
G1 X30 Y30
G2 RA10 QF-90
G1 Y0
0
X

0 30

Circle with known radius, tangent to a circle in a known point:

R10
R5 G0 X-30 Y0
R15 45
G1 X-15 RR3
20 G2 I0 J0 QF-45
G3 RA10 QF45
G1 RR-5
R3
X50 Y20 QF0
0
X

45

-30 -15 0 50

118
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.3.6 Circle end point (G2/G3 X..Y..)


Circle with known end point, tangent to previous and next elements The correct rotation direction is forced,
independently from G2/G3 programming.

G2 X.. Y..
G3 X.. Y..

If a G1 movement is programmed after this circle, a movement tangent to the circle is obtained.
Y

30

20
G0 X-50 Y30
G1 X-30
G2 X-10 Y20
G3 X10 Y20
0
X
G1 RR-1
X50 Y30 QF0

-50 -30 -10 0 10 50

30

G0 X-50 Y30
G1 X-30
10 G2 X-10 Y10
G3 X10 Y10
0
X G2 X30 Y30
G1 X50
-50 -30 -10 0 10 30 50

7.3.7 Circle center and end arc length (G2/G3 I..J..QA..)


Circle originating from a defined point or from an open line, with known center, tangent to preceding element,
with arc length equal to QA degrees.

G2 I.. J.. QA..


G3 I.. J.. QA..

If the circle originates in an open line, a tangent condition is forced and the rotation direction is chosen in
such a way to exit tangent to the line, independently from the programmed G2/G3.
Y
90
30

G0 X-50 Y30
20 G1 QF0
G2 I-20 J20 QA90
G3 I0 J20 QA135
135 G1
0
X X50 Y30 QF0

-50 -20 0 50

119
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.4 OPEN CIRCLES

Z32 considers as open circles all circular arcs whose end point is computed by the intersection with next
element.

7.4.1 Circle center and radius (G2/G3 I..J..RA..)


The preceding element, line or circle, must be open.

G2 I.. J.. RA..


G3 I.. J.. RA..

The intersections between a line and a circle or between two circles are generally two. The programming of
KA parameter allows to choose the desired intersection.

KA0 : turns to the left (default setting if KA is not programmed)


KA1 : turns to the right.

The desired intersection may be chosen also by inserting a rounding with a very small signed radius (i.e.
RR0,0001 or RR-0,0001)

Next element may be a point external to the circle (in this case a tangent condition is forced) or another open
or closed circle, or a closed line.

The intersection choice criteria with next element may be the programming of KA parameter, or a small signed
rounding radius.

40

20
30

R20 G0 X-50 Y0
20
G1 Y20
G1 QF0 RR-0.0001
G3 I-10 J30 RA20 RR-0.0001
0
G1 X50 Y40 QF20
X

-50 -10 0 50

40
G0 X-50 Y0
R20 30 G1 Y20
G1 QF0 RR-0.0001
R20
20 G3 I-10 J30 RA20 RR-0.0001
G3 I15 J40 RA20
G1 X50 Y40
0
X

-50 -10 0 15 50

120
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.4.2 Circle center (G2/G3 I..J..)

G2 I.. J..
G3 I.. J..

The preceding element may be a defined point or an open line.

G0 X50 Y0
Y
G1 Y10
G1 QF150
40
G2 I15 J15 KA1 (oppure RR-0.0001)
G1 X-20 Y20 QF180
28 G2 I-33 J28
G1 X-60 Y40
20
30 15
10

0 0 X
0

-60 -33 -20 15 50

G0 X60 Y-10
G1 X40 Y10
G2 I30 J20 RR0.0001 (oppure KA0)
G3 I0 J0 RA30 QF225
G2 I-55 J20 RR-0.0001 (oppure KA1)
Y
G1 X-60 Y-10 QF180

20 45 20

10
R30

0 0
X

-10 -10

-55 -20 0 30 40 60
-60

121
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.4.3 Circle radius (G2/G3 RA..)

G2 RA..
G3 RA..

The circle must originate from a defined point, possibly the end point of preceding line or circle. The circle
starts with the same slope as the preceding element.

30 R1
25 R15
20
R1
R10
R10
30 5
0 0 X

-50 -20 0 20 60 G0 X-50 Y0


G1 X-20 Y30
G2 RA10 RR1
G1 X0 Y20 QF0
G1 RR1
G2 I20 J20 RA15 QF-120
G3 RA10
G1 X60 Y5

122
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.5 LINE-CIRCLE COMBINATIONS


This is an instruction generating a linear movement followed by a tangent circular movement.

G1 G2/G3 I..J..X..Y..
Line tangent to a circle defined by center and end point

G1 G2/G3 I..J..RA..
Line tangent to a circle defined by center and radius

G1 G2/G3 I..J..RA..QF..
Line tangent to a circle defined by center, radius and final slope

The three cases must originate from a defined point or from an open circle. In this latter case a tangent
condition is forced.
The line is tangent to the preceding open circle.

Y
G0 X-50 Y0
G1 G2 I-1 J20 RA10
G1 G3 I30 J0 RA10 QF45
G1 RR-4
G1 X80 Y10 QF0
20
R4
45
R10 R10 10

0 0 X

-50 -20 0 30 80

R30

50 G0 X0 Y-10
G41 X0 Y-20 QF0
G3 I0 J0
G1 G3 I0 J50 RA30
G1 G3 I0 J0 RA20 QF0
G40 X0 Y-10

0
X
R20 -10

123
CNC Z32 M323 C2 - Programming guide (Milling Machines)

G1 G2/G3 I..J..X..Y..QA..
Line with QA slope, tangent to a circle defined by center and end point

G1 G2/G3 I..J..RA..QA..
Line with QA slope, tangent to a circle defined by center and radius

G1 G2/G3 I..J..RA..QF..QA..
Line with QA slope, tangent to a circle defined by center, radius and final slope

The three cases must originate from an open line or from an open circle.

R5
30 45
R30 R30

R5 30

G0 X-60 Y0
40
-60 -40 0 G41 X-70 Y0 QF-90
G3 I-40 J0 RR-5
G1 G3 I40 J0 RA30 QF225 QA-30
G1 RR-5
G1 G3 I-40 J0 RA30 QF-90 QA150
G40 X-60 Y0

124
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.6 AUTOMATIC ROUNDINGS (RR..)


Roundings (connecting arcs) are inserted by programming the RR parameter representing the arc radius.
To insert a rounding it is necessary to consider that between a line and a circle, or between two not oriented
circles, up to 8 connecting arcs may exist.

The definition order of the two elements to be connected and the sign of the rounding radius allow to choose
the desired solution among those geometrically possible. The Z32 CNC chooses the solution warranting the
rotation direction concordance of the elements to be connected, and of the rounding itself.

The selection between the various solutions is made by using:

RR sign:
RR>0 : counterclockwise rounding (G3)
RR<0 : clockwise rounding (G2)

KA selection parameter:
KA0 : short rounding (default setting)
KA1 : long rounding

It is possible to insert a rounding between any two geometric elements, excluding the cases where the
definition inhibit the connection programming; it is not allowed, for example, to insert a connecting arc
between already tangent elements.

It is therefore possible to insert a rounding between:


- two linear open or closed elements
- a linear element and a circular element
- two intersecting circular elements
- two internal circular elements
- two external circular elements

125
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Roundings between lines:

20

G0 X0 Y0
G1 X20 Y20 RR-10
R10 G1 X40 Y0
0
X

20 40
0

Roundings between lines and circles

20

G0 X40 Y0
G1 X20 Y0 RR10
G1 X0 Y0
R10

0
X

20 40
0

20
R10
G0 X0 Y20
G1 X20 RR-6
R6 R6 G3 I30 J20 X40 Y20 RR-6
G1 X60
0
X

30 60
0

126
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Roundings between circles

G0 X-15 Y15
R5
G1 X0 RR-5
15
G3 I15 J15 RR-5
R15 R15 G3 I45 J15 RA15 RR-5
R5 R5
G1 X75 Y15 QF0
0
X

-15 0 15 45 75

Y
R10
R15
G0 X-35 Y0
R15 G2 I-20 J0 RR10
G2 I20 J0 RA15 RR-70
X
G2 I-20 J0 X-35 Y0

R70

-20 0 20

127
CNC Z32 M323 C2 - Programming guide (Milling Machines)

KA selection parameter
The KA selection parameter define if the desired connecting arc is a long or short rounding.
KA0 (short rounding)
KA1 (long rounding)
Usually the correct choice is the short rounding; this is also the Z32 default choice.
In some cases it may be necessary to choose the long connecting arc, for example in connecting two external
circular elements.

R40
Y

(short rounding)
G0 X0 Y-15
G1 QF180
X G2 I-20 J0 RA15 RR-40 (KA0)
G2 I20 J0 RA15 QF180
R15 R15 G1 X0 Y-15

-20 0 20

R40

(long rounding)
G0 X0 Y-15
G1 QF180
G2 I-20 J0 RA15 RR-40 KA1
X
G2 I20 J0 RA15 QF180
G1 X0 Y-15
R15 R15

-20 0 20

128
CNC Z32 M323 C2 - Programming guide (Milling Machines)

7.7 CHAMFERS
Chamfers are inserted at the end of the element, by programming the RB parameter, representing chamfer
length along the line element where RB is programmed.

If only RB is programmed, a symmetrical chamfer is assumed; if RB is programmed with QA, an asymmetrical


chamfer is assumed, following the rule:

Second element length / RB = tangent of QA

Chamfers may be programmed only between linear elements.

10 Y 5.77
Y
10
30
30

10

0
0 X
X

0 30 60
0 30

G0 X30 Y0 G0 X0 Y0
G1 Y30 RB10 G1 X30 Y30 RB10 QA30
G1 X0 G1 X60 Y30

Y 5.77

30 Y
10 10
10 30

30
0
X 0
X

30 0 30 60
0

G0 X0 Y0
G0 X30 Y0
G1 X30 Y30 RB10
G1 Y30 RB10 QA30
G1 X60 Y0
G1 X0

129
CNC Z32 M323 C2 - Programming guide (Milling Machines)

8. DISK FILES RECALL

8.1 MACHINING OF FILES GENERATED BY CAD-CAM SYSTEMS

When it is necessary to machine a file generated by CAD-CAM systems it is preferable to create a file recalling
the desired part-program to be executed, where all technological parameters relative to the machining are
specified.

That means that the CAM file contains only machine movements, while the recalling file contains all settings
related to machining technological parameters: origin recall, tool recall, feed and speed setting, etc.

For example, suppose the CAM generated file has the name TEST.ISO, saved in the folder C:\Z32\PPG\CAM.

The launcher file may be also saved on the hard disk, in the same folder as TEST.ISO.

8.1.1 DNC disk program recall ( !:L254 ! )

Through the instruction !:L254! contained in an advanced line, it is possible to execute a program of any
dimension, stored on the hard disk.

The syntax is as follows:

!:L254 program name!

The program name may contain a full path specification.


For example, to recall the file TEST.ISO stored in folder C:\Z32\PPG\CAM, it is possible to write the instruction:
!:L254-C:\Z32\PPG\CAM\TEST.ISO!

If the launcher file is residing in the same folder of the called file, it is possible to omit the path specification.
For example, if the folder C:\Z32\PPG\CAM contains both TEST.ISO and its calling file TESTLAUNCH, the calling
instruction may the following:
!:L254-TEST.ISO!

Warning: the program files called in DNC mode must terminate with the subprogram end instruction G26.
If the program ends with the M2 instruction, the execution terminates without return to the calling
program.

130
CNC Z32 M323 C2 - Programming guide (Milling Machines)

It is possible to organize the machining by calling more than one DNC file.
For example, suppose the folder C:\Z32\PPG\CAM contains the two files part1.iso and part2.iso. It is
possible to create a recall file for both machining with a content like the following:

OX1 OY1 OZ1 (origin 1 valid for part1.iso)


T5 M6 (tool for part1.iso)
F1500 S5000 M3 (feed and speed for part1)
G0 Z100 (initial approach)
!:L254-part1.iso!

OX2 OY2 OZ2 (origin 2 valid for part2.iso)


T8 M6 (tool for part2.iso)
F3000 S4000 M3 (feed and speed for part2)
G0 Z100 (initial approach)
!:L254-part2.iso!

G0 Z100 (final retract)


M2

Warning:
A program called by the instruction !:L254! cannot in turn call a program with the same
instruction !:L254!
A program called by the instruction !:L254! may call CMOS subprograms, or subtemp by means of
instructions !GOP...! or !GOS...!
A program called by the instruction !:L254! may contain the jump instruction !GON..!, repetition
--DO --LOOP and conditioning !IF..! and --IF.

8.1.2 Programming rules for DNC part-program

initial % character not allowed


the program must not have the first character % (therefore the initial comment, if existing, must be
enclosed in parenthesis).

termination with G26


the program must terminate with the G26 instruction (subprogram return).

GON and GON-N jumps allowed


The jumps, executed with GON or GON-N instructions, are allowed also for DNC programs.
The jump destination is always the first available N from the beginning of the file.
For example:
!GON1!
The destination jump is the first label N1 found searching from the beginning of the file
Warning: In case big portions of a DNC file are jumped, a not negligible searching time must be
expected.

Warning: In order to use the N numbers as destinations for a jump, it is necessary for the N
character to be the first character present in the line, without leading spaces

131
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9. HIGH SPEED SETTING

Warning: in the following chapters it will be assumed that the motion control function G113X KA2 (or its
previous version G113X KA1) is available.

The functions to be used are:


G114
G113X KA2 (or its previous version G113X KA1)
G113B
G135

9.1 MOVEMENT CONTROL FUNCTION: G113X KA2

The Z32 CNC manages several movements control modes, many of which are obsolete, maintained only
for backward compatibility.
The movement control mode can be set in the machine settings or with G functions:
G98: a very old mode, to be avoided
G113P: proportional error mode, with high following errors
G113F: feed-forward mode, lower errors, but rough movements
G113X: first implementation of high-speed machining
G113X KA1: first evolution of G113X, more efficient than any previous mode

The last and most advanced movement control mode is G113X KA2

The machine must be setup up properly in order to use the G113 KA2 control mode.
Please refer to the machine manufacturer to obtain information about the machine setup

If the setup is correctly done, the activation can be done programming:


G114 {G114 parameters} (refer to G114 description further on)
G113X KA2

Suggestion:
Always program G113X KA2 alone on a single part-program line

Warning:
depending on the machine setup parameters, G114 and G113X KA1 functions can be setup as
automatically activated after a reset: this means that G114 and G113X KA1 are always active
without needing G-codes programming.
In this case, its not necessary to program any G-code in order to activate high-speed management,
but G114 programming is still available in order to modify high-speed parameters.

Warning:
In order to use G113X KA2 (or G113X KA1) function, its mandatory to execute autotuning G125
KA1 function on any machine axis at least one time.

Warning:
The following chapters assumes that G113X KA2 (or the previous G113X KA1) function is activated and
available on the machine

132
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.1.1 Axes auto-tuning for G113X KA2 (G125 KA1)


In order to use G113X KA2 movement control (or the previous G113X KA1) an axes auto-tuning procedure is
mandatory: G125 KA1 function performs the auto-tuning.

G125 KA1 function:


Performs the auto-tuning for both G113X KA2 and G113X KA1
Performs an easy and automatic axes tuning and can be executed any time an axes behavior fine tuning
is required in a specific machine configuration

Please refer to machine manufacturer or to high-speed configuration manual for further information about
programming syntax and operative instructions of G125 KA1.

133
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.2 HIGH SPEED PARAMETERS: G114 RA..K..J..I..HY..HR..


General Syntax for G114:
G114 RA.. K.. J.. I.. HY.. HR..

The machine setup defines default values for the G114 function.
To apply the machine setup default values for G114, program:
G114 KA0

To deactivate the high speed settings activated by G114 program:


G115

Note: normally high-speed management should never be deactivated; therefore, G115


programming is reserved to special situations.

RA: corner smoothing tolerance


Represents the tolerance, expressed in mm or inches, used to round edges and corners.
The programming range varies from 0.0000625 mm (1/16 micron or 0,0000025 inches) to 2 mm (0.08
inches).

To explain the principle of RA, imagine that Z32 with G113XKA2 (or KA1) acts as a racing car driver,
using the tolerance specified with RA as useful track width.
When the track is straight, the driver maintains the car at the track center, but in case of curves or
sharp corners, he deviates from the track center and uses the track width to smooth it and by
consequence speed up the movement.

Suggestion:
RA0.015 (RA0.0006 inches) in normal cases
RA0.005 (RA0.0002 inches) or less, if high precision is required
RA0.05 (RA0.002 inches) or more in case of roughing operations with no need of high accuracy

K: maximum trajectory acceleration


Represents the maximum allowed trajectory acceleration, expressed in mm/s2.
This value may be equal or lower than the accelerations defined in the machine setup.

Suggestion:
Program K only for special needs, specifically, program K lower than machine settings to obtain
better surface quality (but machining time will increase)

Warning:
- The K parameter of G114 doesnt have any effect on rapid movements; on these movements
only the setup values remain active.
- K is expressed in mm/sec2 also in case of inches programming.
- No effect is produced if the K parameter requires acceleration values higher that those
expressed in the machine setup; lower acceleration values are instead allowed with the aim to
obtain smoother movements, with better finishing.
- If K is not programmed, the acceleration defined in setup parameters is applied.

J: dynamic smoothness index


Defines the dynamic smoothness of the movements: its effect is obtained by means of jerk limitation.
This value is an integer parameter in the range from J0 to J6
It may be programmed up to one unit lower than the value defined in machine setup.
For example:
if the machine is setup as J3 machine, the minimum applicable J value with G114 is J2.
Programming lower numbers (J1 or J0) is allowed, but it results in no effect: the value will be
automatically limited to J2.
134
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Suggestion:
Program J only for special needs
- Program J lower than machine settings to obtain lower machining time (but
surface quality will be worse)
- Program J higher than machine settings to obtain better surface (but machining
time will increase)

Warning:
The J parameter of G114 doesnt have any effect on rapid movements; on these
movements setup J value is always applied.
If J is not programmed, the J defined in setup parameters is applied.

I: minimum velocity
Expresses the minimum velocity imposed on the axes by the CNC.

Suggestion:
I30 (I1.2 in inches) is normally a good value

HY e HR: polishing of short-segments CAM trajectories (to be used together with G113B)
HR and HY parameters are used by the algorithm (activated with G113B) that the CNC uses to smooth
and polish short-segments trajectories.
Without G113B, these parameters have no effect.
In G113B algorithm, the CNC manages short-segment CAM trajectories in order to recreate a polished,
continuous and smooth trajectory.

HY represents the maximum length of the segment managed by G113B algorithm.


Longer segments are never smoothed and are interpreted as isolated segments.

HR pass to the G113B the chord error used by the CAM to generate segments.
In order to grant a good efficiency of the G113B algorithm, in HR should be programmed a value
greater than the chord error used in the CAM.

What happens if HR is lower than the CAM chord error?


Some of the part-program segments will not be smoothed, the resulting trajectory
could be non uniform could contain corners, so that higher machining times and lower
surface quality can be expected.

What happens if HR is much higher than CAM chord error?


As HR is a maximum limit there is the possibility that the polishing algorithm (G113B)
deviates from the correct trajectory resulting in excessive errors.
However, but it is to be noted that the G113B has efficient internal controls, so that
the possibility of errors of this kind is rather low.

Suggestion:
HY20 (HY0.8 in inches) is normally the right value
HR = (CAM chord error) *1.2
For example, if the CAM chord error is 0.01mm, HR should be programmed as HR0.012

Warning: Some CAM's can refer the requested parameters (maximum chord error and/or maximum
chord length) to the workpiece surface and not to the trajectory transmitted to the CNC (tool tip
trajectory)

If possible, the preferable option is to configure the CAM system to apply chord error
calculations on generated trajectory (tool-tip trajectory) and not on workpiece surface.

135
CNC Z32 M323 C2 - Programming guide (Milling Machines)

If this is not possible, and the CAM system applies chord error calculations on workpiece
surface, its good practice to lower the CAM chord error and set HR value in G114 line
as 3 times the CAM chord error.

136
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.3 SHORT-SEGMENTS CAM PART-PROGRAMS (G113B)


In this chapter, short-segment part-programs generated by CAM system are analyzed.

9.3.1 Suggested CAM settings

A good CAM system and its correct setup is a fundamental pre-requisite for a good finishing.

In case of part-programs generated with the aim of a CAM system in the form of short G1 segments, the
following settings should be controlled:

CAM chord error


Set a low CAM chord error implies:
- Shorter G1 segments (longer file)
- Better precision on trajectory
Keep chord error low is a good practice, unless the point number generated by CAM system results
excessive.

Suggestion:
set CAM chord error not greater then 0.01mm or 0.0005 inches
if available in CAM system, set maximum length of a segment at a value lower than 15mm
or 0.5 inches (10mm or 0.4 inches as an example)

Number of digits:
Suggestion:
Linear axes in mm:
4 digits: suggested setting
3 digits: minimum acceptable

Linear axes in inches:


5 digits: suggested setting
4 digits: minimum acceptable

Assi rotativi in gradi:


5 digits: suggested setting
3 digits: minimum acceptable

9.3.2 Short-segment part-program polishing (G113B)


With G113B function, the CNC manages short-segment CAM trajectories in order to recreate a polished,
continuous and smooth trajectory.

G113B is an evolution of G113A function, that should be considered obsolete.

G113B can be programmed without problems also in part-programs not generated by CAM systems and
consisting of a sequence of short-segments in G1: simply it remains ineffective.

Suggestion:
Always program G113B alone on a single part-program line

Warning:
G113X KA2 and G113B functions are different. If both functions are needed, it is possible to program
them in two different consecutive part-program lines:
G113X KA2
G113B

137
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.4 G135 I1: ADVANCED HIGH-SPEED SETTINGS


G135 I1 function allows to set advanced parameters for high-speed algorithm.

Syntax:
G135 I1 HX.. HR..

G135 I0 (deactivation of G135 I1 settings)

HX: curvature jerk management


If HX is not programmed, a default HX0 is considered (no change to standard jerk management)

HX parameter allows a finer control over dynamic jerk control:

J parameter of G114 function allows a limitation of the global acceptable jerk

With HX parameter of G135, a further refinement is possible, distinguishing between curvature


jerk and trajectory jerk.
HX parameter acts on the curvature jerk, leaving trajectory jerk unchanged.

HX parameter must be between -4 and 4


HX = 0:
G135 I1 HX0 doesnt introduce any change on standard behavior: its the same as not
programming G135 I1 or canceling it.

HX > 0 (HX1 HX4):


Pro:
Lower machining time
Relative velocity tool-workpiece is kept more constant (reduction of slow-down
movements)
Cons:
Higher mechanical stress on machine structure due to higher motion dynamics

HX < 0 (HX-1 HX-4):


Pro:
Lower mechanical stress on machine structure due to smoother motion
dynamics
Cons:
Longer machining time
Relative velocity tool-workpiece may have bigger variations

When G135 I1 HX.. is useful?


The answer is not unique, because it depends on the machine, on the specific job and on the needed
result.

Suggestion:
A procedure to understand if a G135 I1 HX.. is useful can be:
1) Start adjusting G114 parameters until the best result is obtained
2) If the result is satisfactory, no G124 I1 HX.. is required
3) Otherwise two scenario can occur:
During machining excessive slow-downs take place in conjunction with curvature
changes.

138
CNC Z32 M323 C2 - Programming guide (Milling Machines)

In this case HX > 0 can be tried (machining will be done with more uniform speed, but
greater mechanical solicitations on machine structure will occur):
G135 I1 HX2 (for example)

Warning: its not possible to forecast the result: with HX>0 dynamic jerk will be higher,
therefore resulting mechanical solicitations can worsen the surface quality.

Divots or defect can be noticed in conjunction with curvature changes.


Two possible options:
o Defects are detected on the machined surface before the curvature changes:
increase J parameter of G114 of 1 unit and re-try

o Defects are detected on the machined surface after the curvature changes:
In this case, it is possible to program HX < 0 with G135 I1 (machining time will
be higher, but lower dynamic solicitations on machine structure will occur):
G135 I1 HX-2 (ad esempio)

HR: circle diameter accuracy


If HR is not programmed, the default behavior is left unchanged.

Default behavior is HR1, automatically set by the CNC if no other instruction is given

HR1: Fully apply RA tolerance defined with G114 to circles


Circles radius will be reduced of RA value
The result is a faster and smoother movement, but lower profile accuracy

HR0: Apply RA/4 tolerance to circles


Circles radius will be reduced of RA/4 value
The result is a lower velocity, but higher profile accuracy

Suggestion:
Normally HR value should not be programmed
Program HR0 only if there are specific strict profile requirements

139
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.5 G135 J1: ROTARY AXES SMOOTHING TOLERANCE IN RTCP


G135 J1 HY parameter replaces RA of G114 for rotary axes in RTCP

G135 J1 HY is suggested in case of dynamic RTCP activation (5-axes continuous machining)

In other words:
when G117 or G118 are active, G135 J1 HY is the smoothing tolerance applied instead of G114 RA
to rotary axes involved in G117 or G118.

HY is always expressed in degrees

If HY is not programmed, it is assumed by default:


Programming in mm: HY = RA of G114
G114 RA0.01 -> rotary axes are smoothed with a tolerance of 0.01 o

Programming in inches: HY = RA*25.4


G114 RA0.0005 -> rotary axes are smoothed with a tolerance of 0.013o

Note:
G114 RA.. parameter always directly affects surface accuracy, because its a tolerance on X Y Z
coordinates

G113 J1 HY.. parameter depends:


In case of spherical tool, it doesnt affect surface accuracy, as the smoothing of rotary
axes only implies a different orientation of the tool.
In case of different tool shapes (cylindrical or others) HY tolerance may affect surface
accuracy because an error on tool orientation produce a different cutting condition

G135 J1 HY can be very useful because often the coordinates of rotary axes generated by CAM are rough,
therefore, without a smoothing, can lead to rough and not countiuous movments.

Warning:
The larger HY, the larger the deviation of rotary axes with respect to the programmed orientation.
Also when resultant surface accuracy error is tolerable, collision problems should be carefully
checked.
It must be noticed that in case of sharp corners involving rotary axes, the tolerance on rotary axes
smoothing can be raised automatically up to 4 times the programmed HY:
G135 J1 HY0.5 can lead in the worst case up to 2 o deviation for rotary axes

Values for HY up to 0.5 degrees have normally shown to be safely tolerated, but it is duty of the operator to
check the CAM margins for collision and, in case, to set the CAM parameters to avoid them.

Suggestion:
set the CAM to allow rotary axes deviations at least 4 times higher than planned HY
A good starting value for HY can be
G135 J1 HY0.1

140
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.6 HIGH SPEED PARAMETERS SETTINGS (SUMMARY TABLE)

K: Maximum acceleration (mm/s2)


HR: program the CAM Program only if a reduction of machine
Z32 high-speed chord error x 1.2 setup acceleration is required for better
activation Used only with G113B finishing

N10 G114 RA0.01 HR0.02 HY20 K4000 J2 I30


I: Minimum velocity
RA: Smoothing tolerance HY: Maximum length of Suggested: I30
RA0.015 default smoothable segment
RA0.05 roughing Used only with G113B
RA0.005 - finishing Suggested: HY20
J: Dynamic smoothenss factor
Integer value: MIN=0 MAX=6
Program only if a reduction of machine
setup jerk is required for better finishing
Activate algorithm for polishing
short-segment part-programs
N20 G113B

Activate advanced
N30 G113X KA2 motion control
algorithm

Curvature Jerk management


N40 G135 I1 HX2 HX: integer value between -4 and 4
HX1 HX4: higer jerk, lower machining time
HX-1 HX-4: lower jerk, smoother dynamics
I0 = disabled
I1 = enabled

Smoothing tolerance for rotary axes in RTCP


N50 G135 J1 HY0.1 HY: tolerance in degrees

J0 = disabled
J1 = enabled

141
CNC Z32 M323 C2 - Programming guide (Milling Machines)

9.7 HIGH SPEED PARAMETERS - EXAMPLES

Example 1: standard 3 axes part program

T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200

(high speed settings)


G114 RA0.01 I30 HY20 HR0.02
G113X KA2
G113B

(DNC launch)
!:L254-prog1.iso!
M2

Example 2: 3 axes part program with programming of G114 K and J

T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200

(high speed settings)


G114 RA0.01 I30 HY20 HR0.02 K1000 J3
G113X KA2
G113B

(DNC launch)
!:L254-prog1.iso!
M2

Example 3: 3 axes part program with G135 programming to increase dynamic smoothnes

T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200

(high speed settings)


G114 RA0.01 I30 HY20 HR0.02
G113X KA2
G113B
G135 I1 HX-2

(DNC launch)
!:L254-prog1.iso!
M2

142
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Example 4: 5 axes part program with G135 J programming

T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200

(high speed settings)


G114 RA0.01 I30 HY20 HR0.02 (0.01 tol for linear axes)
G113X KA2
G113B
G135 J1 HY0.1 (0.1 tol for rotary axes)

G0 A0 B90
G117 (RTCP activation)
(DNC launch)
!:L254-prog1.iso!
M2

143
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10. PROGRAMMING EXAMPLES

10.1 PROFILE 1

70 R20

65
R10
R20

30
R20
20

R15

0
X

0 25 100

OX1 OY1 OZ1 (uses origin 1)


T1 M6 (uses tool 1)
F1000 (machining to 1000 mm/min)
S2000 M3 (starts spindle rotation at 2000 rpm)
R5 (sets tool radius)
G0 Z10 (initial approach)
G0 X0 Y100
G0 Z2 (approach)
G1 Z-5 (sinking inside workpiece)
G41 X0 Y90 QF0 (profile approach)
G2 RA20
G1 X25 Y30 RR10
G1 QF-5 RR20
G2 I100 J20 RA20 QF180
G1 QF180 RR-15
G1 G2 I0 J70 RA20 QA65 QF0
G40 X0 Y100 (profile retract)
G0 Z10 (retract in Z)
M5 (spindle stop)
M2 (program end)

144
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.2 PROFILE 2

R15

65 45
R18
40
R8

75
R7
10

R20 X
60
-20
R18

-40

-35 -20 0 40 50

OX1 OY1 OZ1 (uses origin 1)


T1 M6 (uses tool 1)
F1000 (machining to 1000 mm/min)
S2000 M3 (starts spindle rotation at 2000 rpm)
R3 (sets tool radius)
G0 Z10 (initial approach)
G0 X0 Y-20
G0 Z2 (approach)
G1 Z-5 (sinking inside workpiece)
G42 X0 Y-40 QF180 (profile approach)
G1 QF180 RR-18
G1 X-35 Y10 QF75
G1 RR7
G2 I-20 J40 RA18 RR15
G1 X50 Y45 QF0 RR-8
G1 QF-90 RR-8
G3 I50 J0 RA20 QF-60
G1
G1 X40 Y-40 QF-90
G1 X0
G40 X0 Y-20
G0 Z10 (retract in Z)
M5 (spindle stop)
M2 (program end)

145
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.3 ROTATION

Y
50

B C
45

45
0
X

Profile A:
OX1 OY1 OZ1 (origin 1) 0 20
T1 M6 S2000 M3
G0 Z10 (initial approach)
G0 X0 Y0 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 Y50
X20
Y0
X0
G0 Z10 (retract)
M2
Profile B:
OX1 OY1 OZ1 (origin 1)
T1 M6 S2000 M3
G0 Z10 (initial approach)
QR45 (rotation)
G0 X0 Y0 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 Y50
X20
Y0
X0
G0 Z10 (retract)
M2
Profile C:
OX1 OY1 OZ1 (origin 1)
T1 M6 S2000 M3G0
Z10 (initial approach)
IR20 JR50 QR45 (rotation)
G0 X0 Y0 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 Y50
X20
Y0
X0
G0 Z10 (retract)
M2

146
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.4 TRANSLATION

Y
50

0
DB-25 X

0 20

DA50

Profile A:
OX1 OY1 OZ1 (origin 1)
T3 M6 S5000 M3
G0 Z10 (initial approach)
G0 X0 Y0 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 Y50
X20
Y0
X0
G0 Z10 (retract)
M2

Profile B:
OX1 OY1 OZ1 (origin 1)
T3 M6 S5000 M3
G0 Z10 (initial approach)
DA50 DB-25
G0 X0 Y0 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 Y50
X20
Y0
X0
G0 Z10 (retract)
M2

147
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.5 ROTO-TRANSLATION 1

40
Y' 20
Y
X'
0 0
R10
R20
30
50

R10 R20

20

0 X

-20
Y''

R10 R20

-50
30
R20
R10
0
0 X''
-20
40

0 30 50 100

OX2 OY2 OZ2 (origin 2)


T6 M6 S1500 M3
G0 Z10 (initial approach)
G0 X0 Y20 (initial positioning)
G1 Z-1 F100(approach)
F1000 (machining to 1000 mm/min)
G1 X30 RR20
G1 QF90 RR-20
DA50 DB50 QR30 (X Y system)
G1 X40 Y20 QF0 RR-10
G1 QF-90 RR-20
DA0 DB0 QR0 (X Y system)
G1 X100 Y0 QF-90
G1 RR-20
DA50 DB-50 QR-30 (X Y system)
G1 X40 Y-20 QF-90 RR-10
G1 QF180 RR-20
DA0 DB0 QR0 (X Y system)
G1 X30 Y-20 QF90 RR10
G1 X0 Y-20
G0 Z10 (retract)
M2

148
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.6 ROTO-TRANSLATION 2

B
X X
Y
C
Y

A
X

Y
E
X D X

OX1 OY1 OZ1 (origin 1)


T21 M6 S5000 M3
G0 Z10 (initial approach)

(Profile A:)
N1
G0 X40 Y0 (initial positioning)
G1 Z-2 F50(approach)
F2000 (machining to 2000 mm/min)
G0 X40 Y0
G1 G3 I0 J0 X-10 Y0
G3 I0 J0
G1 X40 Y0
G0 Z5 (retract)
N2

(Profile B:)
DA80 DB80 QR45
!GON1-N2!

(Profile C:)
DA-80 DB80 QR135
!GON1-N2!

(Profile D:)
DA-80 DB-80 QR-135
!GON1-N2!

(Profile E:)
DA80 DB-80 QR-45
!GON1-N2!

M2

149
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.7 MIRRORING 1

0 30 60

20
B A 10
R10
0
X

D C

OX3 OY3 OZ3 (origin 3)


T12 M6 S3000 M3
G0 Z10 (initial approach)

(Profile A)
N1
G0 X60 Y10 (initial positioning)
G1 Z-3 F100 (approach)
F2000 (machining to 2000 mm/min)
G1 G2 I30 J20 X40 Y20
G0 Z5 (retract)
N2

(Profile B)
QS90 (sets mirroring line Y)
G56 (activates mirroring of X coordinates)
(recalls profile A)
!GON1-N2!
G55 (disables mirroring)

(Profile C)
QS0 (sets mirroring line X)
G56 (activates mirroring of Y coordinates)
(recalls profile A)
!GON1-N2!
G55 (disables mirroring)

(Profile D)
QR180 (activates rotation of 180 degrees)
(recalls profile A)
!GON1-N2!
QR0 (deactivates the 180 degrees rotation)

M2

150
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.8 MIRRORING 2

60

20
10
0
A
30
0

B 45
R10

OX2 OY2 OZ2 (origin 2)


T4 M6 S3000 M3
G0 Z10 (initial approach)

(Profile A)
N1
QR45 (45 degrees rotation)
G0 X60 Y10 (initial positioning)
G1 Z-3 F200(approach)
F2000 (machining to 2000 mm/min)
G1 G2 I30 J20 X40 Y20
G0 Z10 (retract)
N2

(Profile B)
QS45 (sets mirroring line to 45 degrees)
G56 (activates mirroring)
(recalls profile A)
!GON1-N2!
G55 (disables mirroring)

(Profile C)
QS135 (sets mirroring line to 135 degrees)
G56 (activates mirroring)
(recalls profile A)
!GON1-N2!
G55 (disables mirroring)

M2

151
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.9 THIRD AXIS TURNOVER

OX1 OY1 OZ1 (uses origin 1) OX1 OY1 OZ1 (uses origin 1)
T1 M6 (uses tool 1) T1 M6 (uses tool 1)
F1000 (machining to 1,000 mm/min) F1000 (machining to 1,000 mm/min)
S2000 M3 (speed 2000 rpm) S2000 M3 (speed 2000 rpm)
R5 (sets tool radius) R5 (sets tool radius)
G0 Z10 (initial approach) KT-1
G0 X0 Y0 G0 Z10 (initial approach)
G1Z0 G0 X0 Y0
--DO G1Z0
Y<Y+1> --DO
G1 X10 Z10 Y<Y+1>
X30 Z0 G1 X10 Z10
X40 X30 Z0
Y<Y+1> X40
X30 Y<Y+1>
X10 Z10 X30
X0 Z0 X10 Z10
--LOOP 9 X0 Z0
G0 Z10 (retract in Z) --LOOP 9
M5 (spindle stop) G0 Z10 (retract in Z)
M2 (program end) M5 (spindle stop)
M2 (program end)

152
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.10 ANGULAR REPETITION OF A PROFILE

45

OX1 OY1 OZ1 (origin 1)


T2 M6 S3000 M3
G0 Z10 (initial approach)
R3

--DO ; repetitions start


G0 X35 Y0
G1 Z-1 F100(approach)
F2000 (machining to 2000 mm/min)
G41 X40 Y0 QF90
G1 Y10 RR5
G1 QF-165 RR5
G1 X20 Y0 QF-90
G1 RR5
G1 X40 Y-10 QF-15 RR5
G1 X40 Y0
G40 X35 Y0
G0 Z10 (retract)
QR<QR+45> (increases rotation by 45 degrees)
--LOOP 7 ; repeat 7 times

M2

153
CNC Z32 M323 C2 - Programming guide (Milling Machines)

Linear repetition of a profile

10.11

OX1 OY1 OZ1 (origin 1)


T8 M6 S3000 M3
G0 Z10 (initial approach)

--DO ; repetitions start


G0 X35 Y0
G1 Z-2 F300(approach)
F3000 (machining to 3,000 mm/min)
G41 X40 Y0 QF90
G1 Y10 RR5
G1 QF-165 RR5
G1 X20 Y0 QF-90
G1 RR5
G1 X40 Y-10 QF-15 RR5
G1 X40 Y0
G40 X35 Y0
G0 Z5 (retract)
DA<DA+30> (increases translation by 30)
--LOOP 2 ; repeat 2 times

M2

154
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.12 PROFILE 1 REPETITION WITH VARIOUS DEPTHS

OX1 OY1 OZ1 (uses origin 1)


T1 M6 (uses tool 1)
F1000 (machining to 1,000 mm/min)
S2000 M3 (starts spindle rotation at 2000 rpm)
R5 (sets tool radius)
G0 Z10 (initial approach)
G0 X0 Y100
G0 Z2 (approach)
G1 Z-2 (sinking inside workpiece)

--DO ; repetitions start


G41 X0 Y90 QF0 (profile approach)
G2 RA20
G1 X25 Y30 RR10
G1 QF-5 RR20
G2 I100 J20 RA20 QF180
G1 QF180 RR-15
G1 G2 I0 J70 RA20 QA65 QF0
G40 X0 Y100 (profile retract)
G1 Z<Z-5> (decreases Z by 5 on each repetition)
--LOOP 10; execute 10 repetitions

G0 Z10 (retract in Z)
M5 (spindle stop)
M2 (program end)

155
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.13 FINISHING OF A SPHERICAL SURFACE

OX1 OY1 OZ1 (origin 1)


T3 M6 S3000 M3
G0 Z10 (initial approach)
F10000
G0X-1000 Y-1000
G0 Z-1

(HA: sphere radius)


(HB: initial angle)
(HC: final angle)
(HD: angular increment)
HA100 HB0 HC60 HD4
G0 X0Y0Z0
N1
HE<HA*CSHB>
HF<HA*SNHB>
G1 X<HE> Y0 Z<-HF>
G3 I0 J0 X<X> Y0
HB<HB+HD>
!IF HC>HB;GON1!
G0 Z100

M2

156
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.14 ELLIPSE

OX1 OY1 OZ1 (origin 1)


T3 M6 S3000 M3
G0 Z10 (initial approach)
F4000

(HA: major ellipse semiaxis)


(HB: minor ellipse semiaxis)
(HC: initial angle)
(HD: final angle)
(HE: angular increment on each point)
HA200 HB150 HC45 HD360 HE1
G0 X0 Y0
G1 Z-1
G41
N10
HF<HA*CSHC>
HG<HB*SNHC>
G1 X<HF> Y<HG>
HC<HC+HE>
!IF HD>=HC;GON10!
G40
M2

157
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.15 ROTO-TRANSLATION IN THE SPACE (SPHERICAL SURFACE)

OX2 OY2 OZ2


T1 M6
F1000 S3000 M3
G0 Z10
G0 X30Y0
G1 Z0
-- DO
G1 X30 Y0Z0
G2 X0 Z-30 I0 J0
G116K5
G3X30 Z0 I0J0
G116K5
--LOOP 36
M2

158
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.16 REVOLUTION SOLID

T1M6
S2000 M3 F1000
G0 Z50

-- DO
X0 Y0 Z0
G1 Y10 RR-6
X20 RR10
X40 Y20 RR-20
X120 RR-10
Y0

G116 I-5

Y20 RR10
X40 RR20
X20 Y10 RR-10
X0RR6
Y0

G116 I-5

-- LOOP 18

G116 KA0
G0 Z50
M2

159
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.17 MACHINING OF A X-Z PROGRAMMED PROFILE

G25 XZY
OX1 OY1 OZ1
T1 M6
F5000 M3 S3000
R3
X-75 Y-20 Z10 G0
!PAR[1]=0!
-- DO
DC<PAR[1]>
Y-15

G25XZY (sets working plane XZ)


G41 X-75Z0QF0
G1 X-45RR8
G1 Z25
G1 X-12 Z40
G2 I0 J20 X12 Z40
G1 X45 Z25
Z0 RR8
X75
G40 X75 Z10

Y-13.5
G41 X75Z0QF180
G1 X45RR-8
G1 Z25
G1 X12 Z40
G3 I0 J20 X-12 Z40
G1 X-45 Z25
Z0 RR-8
X-75
G40 X-75 Z10

!PAR[1]=PAR[1]+3!
-- LOOP 10
Z100 G0
G25 XYZ
M2

160
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.18 SLANTED HEAD DRILLING

Z'
Z
B-20
20 X'
X

OX1 OZ1

5 60

OX1 OY1
T2 M6
S1000 M3
F500
Z10

G117 B-20 (head rotation)


G116 X-60 KA2 (X Z reference system)
G0 X-20 Y0 Z5
G1 Z-10
Z5

M2

161
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.19 CIRCUMFERENCE POSITIONING AND DRILLING FIXED CYCLE

S2000 F1200 M3
G0 Z50
(parameters and fixed cycle recall)
G800K1 MHA2 MHB-10 MHC2
(positioning macro recall)
(definition of positioning to be skipped)
PAR[1]3
(MPX=10, MPY=20: the positioning circle is centered in 10,20)
(MPC=100: the positioning circle has diameter 100)
(MPA=0, MPL=0, MPN=8: execute 8 positioning on all the circumference)
(MPS=1: skips positioning defined in PAR[1])
(MPW=1: circular motion between positioning)
G801K7 MPX10 MPY20 MPC100 MPA0 MPL0 MPN8 MPS1 MPW1
G27C0 (fixed cycle deactivation)
G0 Z50
M2

162
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.20 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITH ROTATION

S2000 M3 F800
(Program P40 defines the figure to be moved on circle points)

--DEFINE P40
G0X0Y0
Z2
G1Z0
Z-1
G1X10
Y5
X-10
Y-5
X10
Y0
G0X0Y0
Z2G0
G26
--END DEFINE

PAR[1]3
(G801K7 recall to position the figure stored in CMOS program number 40)
(MPF=40: positions program 40)
(MPR=1: rotate the figure)
(positioning macro recall)
G801K7 MPX10 MPY20 MPC100 MPA0 MPL0 MPN8 MPS1 MPW1 MPF40 MPR1
G0 Z50
G0 Z50
M2

163
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.21 POSITIONING OF A MACHINING AROUND A CIRCUMFERENCE, WITHOUT ROTATION

S2000 M3 F800

(Program P40 defines the figure to be moved on circle points)


--DEFINE P40
G0X0Y0
Z2
G1Z0
Z-1
G1X10
Y5
X-10
Y-5
X10
Y0
G0X0Y0
Z2G0
G26
--END DEFINE

(definition of positioning to be skipped)


PAR[1]3
(MPX=10, MPY=20: the positioning circle is centered in 10,20)
(MPC=100: the positioning circle has diameter 100)
(MPA=0, MPL=0, MPN=8: execute 8 positioning on all the circumference)
(MPS=1: skips positioning defined in PAR[1])
(MPF=40: positions program 40)
(positioning macro recall)
G801K7 MPX10 MPY20 MPC100 MPA0 MPL0 MPN8 MPS1 MPF40
G0 Z50
G0 Z50
M2

This second part-program is different from the preceding only for positioning type (linear movements) and the
machining stored in file 40 is not rotated (MPR=0).

164
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.22 CIRCULAR POCKET ROUGHING

S2000 F1200 M3
G0 Z50
R5
(parameters and fixed cycle recall)
(MMA=0: upper pocket position)
(MMB=-20: lower pocket position)
(MMC=10: exit position at machining end)
(MMD=60: pocket diameter)
(X,Y: pocket center)
(MMK=3: pass depth)
(MME=2: safety distance)
G802 MMA0 MMB-20 MMC10 MMD80
G802K1 X10 Y10 MMK3 MME2
M2

165
CNC Z32 M323 C2 - Programming guide (Milling Machines)

10.23 CIRCULAR POCKET ROUGHING POSITIONED ON A CIRCUMFERENCE

S2000 F1200 M3
G0 Z50
R5
(parameters and fixed cycle recall)
(MMA=0: upper pocket position)
(MMB=-10: lower pocket position)
(MMC=10: exit position at machining end)
(MMD=30: pocket diameter)
(X,Y: pocket center)
(HX=1: use as fixed cycle)
(MMK=3: pass depth)
(MME=2: safety distance)
(MMW=1: ramp sinking)
(MMQ=4: maximum slope of sinking ramp)

G802 MMA0 MMB-10 MMC10 MMD30


G802K1 HX1 MMK3 MME2 MMW1 MMQ4
(positioning macro recall)
(MPX=10, MPY=20:)
(the positioning circle is centered in 10,20)
(MPC=60: the positioning circle has diameter 60)
(MPA=0, MPL=0, MPN=8:)
(executes 8 positioning around all circumference)
(MPS=1: skips positioning defined in PAR[1])
(MPW=1:)
(circular motion between positioning)

(definition of positioning to be skipped)


PAR[1]3

G801K7 MPX10 MPY20 MPC60 MPA0 MPL0 MPN8 MPS1 MPW1


G27C0 (fixed cycle deactivation)
G0 Z50
M2

166

Das könnte Ihnen auch gefallen