Beruflich Dokumente
Kultur Dokumente
Z32
Document M323
C2 01.03.15
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.
INDEX
1. INTRODUCTION...................................................................................6
4
CNC Z32 M323 C2 - Programming guide (Milling Machines)
5
CNC Z32 M323 C2 - Programming guide (Milling Machines)
1. INTRODUCTION
For a complete and detailed description of all functionalities available in the Z32 numerical control, please
consult Programming Manual M96.
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.
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.
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)
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
The character ; (semicolon) at the beginning of a line makes the whole line a comment
9
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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.
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)
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
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)
13
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
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.
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)
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
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
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)
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.
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).
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.
16
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
17
CNC Z32 M323 C2 - Programming guide (Milling Machines)
2.15 CANCELLATION AND SUSPENSION OF ORIGINS AND LENGTHS (G53 G54 G45)
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
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
G25 ZXY
G43Y
X
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)
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:
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.
G1 X0 (G1 movement)
Y0 (G1 movement)
X10 (G1 movement)
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
21
CNC Z32 M323 C2 - Programming guide (Milling Machines)
Y
Z
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
...
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.
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)
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
23
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
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)
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.
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)
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).
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)
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]
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)
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)
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)
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.
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)
For example, to execute a translation of 10 along the first axis and of 14 along the second axis:
DA10 DB14
14
10
DA100 DB50
QR IR0 JR0 QR45
DB
DA
30
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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...
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.
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)
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.
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)
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)
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:
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
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)
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.
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)
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.
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.
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)
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.
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.).
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.
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).
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)
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.
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:
40
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
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.
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.
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.
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)
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
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)
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)
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.
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)
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.
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)
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).
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.
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)
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)
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.
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.
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)
G117 deactivation
The function G117 (static or dynamic) is deactivated by:
G117 KA0
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.
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.
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)
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
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)
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).
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.
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
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)
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)
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.
G122 deactivation
To deactivate the G122 correction, program the following:
G122 KA0
58
CNC Z32 M323 C2 - Programming guide (Milling Machines)
The function G131 allows to maintain constant the relative velocity between tool and workpiece with dynamic
RTCP motions.
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 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).
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
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:
60
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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:
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.
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
It is possible to program mathematical expression whose result is a function of numeric values or other
parameters.
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 >
N40 G0 X<HA>
N50 F<HB>
N60 G1 X<HC+100>
The movement programming using parametric expressions may be quite complex, following the same rules
indicated for parameters programming.
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)
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)
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.
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)
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
Example:
!IF HA > 10 ; GON20!
jumps to N20 if HA is higher than 10.
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.
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.
67
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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
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)
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 --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)
71
CNC Z32 M323 C2 - Programming guide (Milling Machines)
Example:
--DO
N10
N100
--LOOP
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
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)
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)
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
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)
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
--DEFINE S20
G1 X100
G1Y100
G1X0
G1Y0
G26
--END DEFINE
G0 Z100
G0 X0Y0
G0 Z1
G1 Z1
!GOS20!
M2
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)
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
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
76
CNC Z32 M323 C2 - Programming guide (Milling Machines)
77
CNC Z32 M323 C2 - Programming guide (Milling Machines)
G0
Optional parameters for centering: MHA
78
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
79
CNC Z32 M323 C2 - Programming guide (Milling Machines)
MHA
(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
80
CNC Z32 M323 C2 - Programming guide (Milling Machines)
81
CNC Z32 M323 C2 - Programming guide (Milling Machines)
82
CNC Z32 M323 C2 - Programming guide (Milling Machines)
MHB
83
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
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)
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)
86
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
MP M
Optional parameters for machining position:
(MPF): MPF = 0 : on all points a fixed cycle is executed MPG
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
87
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
88
CNC Z32 M323 C2 - Programming guide (Milling Machines)
MPA
MPB: final angle
If MPA = MPB the points are spaced along the whole MPY
89
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
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
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
G
MP
MPH: rectangle height
90
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
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
91
CNC Z32 M323 C2 - Programming guide (Milling Machines)
Example:
G802 MMA0 MMB-30 MMC10 MMD60
G802K1 HX1 MMK1 MME2 MMW1 MMQ4
Please note that the pocket center positions are not programmed.
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)
MMB
Optional parameters for taper: MMU MMN
(MMN): taper (delivery angle).
Must be comprised between 0 and 80 degrees.
93
CNC Z32 M323 C2 - Programming guide (Milling Machines)
94
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
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
96
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
97
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
99
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
100
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
101
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
102
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
103
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
104
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
105
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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
106
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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.
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.
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
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.
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 RR<0
109
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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)
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..)
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
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
112
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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 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
114
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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.
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)
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)
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
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
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
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)
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
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
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)
Z32 considers as open circles all circular arcs whose end point is computed by the intersection with next
element.
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.
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)
G2 I.. J..
G3 I.. J..
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
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)
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
122
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
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.
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.
125
CNC Z32 M323 C2 - Programming guide (Milling Machines)
20
G0 X0 Y0
G1 X20 Y20 RR-10
R10 G1 X40 Y0
0
X
20 40
0
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)
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.
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)
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.
Through the instruction !:L254! contained in an advanced line, it is possible to execute a program of any
dimension, stored on the hard disk.
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:
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.
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)
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 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
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)
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)
The machine setup defines default values for the G114 function.
To apply the machine setup default values for G114, program:
G114 KA0
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
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.
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.
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.
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)
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:
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
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)
Syntax:
G135 I1 HX.. HR..
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.
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)
Default behavior is HR1, automatically set by the CNC if no other instruction is given
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)
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.
Note:
G114 RA.. parameter always directly affects surface accuracy, because its a tolerance on X Y Z
coordinates
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)
Activate advanced
N30 G113X KA2 motion control
algorithm
J0 = disabled
J1 = enabled
141
CNC Z32 M323 C2 - Programming guide (Milling Machines)
T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200
(DNC launch)
!:L254-prog1.iso!
M2
T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200
(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
(DNC launch)
!:L254-prog1.iso!
M2
142
CNC Z32 M323 C2 - Programming guide (Milling Machines)
T1M6
OX1 OY1 OZ1
F1000 S4000 M3
G0 Z200
G0 A0 B90
G117 (RTCP activation)
(DNC launch)
!:L254-prog1.iso!
M2
143
CNC Z32 M323 C2 - Programming guide (Milling Machines)
10.1 PROFILE 1
70 R20
65
R10
R20
30
R20
20
R15
0
X
0 25 100
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
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
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
(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
(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
(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)
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)
45
M2
153
CNC Z32 M323 C2 - Programming guide (Milling Machines)
10.11
M2
154
CNC Z32 M323 C2 - Programming guide (Milling Machines)
G0 Z10 (retract in Z)
M5 (spindle stop)
M2 (program end)
155
CNC Z32 M323 C2 - Programming guide (Milling Machines)
M2
156
CNC Z32 M323 C2 - Programming guide (Milling Machines)
10.14 ELLIPSE
157
CNC Z32 M323 C2 - Programming guide (Milling Machines)
158
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
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
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)
Z'
Z
B-20
20 X'
X
OX1 OZ1
5 60
OX1 OY1
T2 M6
S1000 M3
F500
Z10
M2
161
CNC Z32 M323 C2 - Programming guide (Milling Machines)
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)
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)
S2000 M3 F800
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)
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)
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)
166