The basic preventive information contained in the manual should be observed in order to
ensure a safe operation of the machine. The operator should thoroughly read this manual
before operating the machine.
Keep this manual at hand reach in a safe location.
Page 2
Issue 07.2004
Valid for
TL-15 from machine 368
TL-20 from machine 368
TL-25 from machine 368
TB-46 from machine 123
TB-67 from machine 123
TBI520 from machine 556
The machine includes more functions that those described in this
manual. However, the purchaser will have not the right of
demanding any of these additional functions at the time the
machine is supplied or when serviced by our After-sales Service.
CMZ reserves the right of making technical changes without
previous notice.
No part of this manual may be transmitted or copied, in any form or
by any means, without the previous written permission of CMZ.
Infringers will be prosecuted and claims for damages will be
lodged. Al rights reserved, particularly in case of Patent or Utility
Model.
Several symbols are used to indicate the various types of warning or advise.
The operator must know the meaning of these symbols and carefully read the instructions
enclosed in order to ensure a safe operation of the machine.
<Symbols related to warning messages>
The instructions provided are classified into three categories: DANGER, WARNING and
CAUTION
The following symbols are used to indicate the hazard level:
Indicates an imminent hazard that, if not prevented, will be cause
of death or serious injures.
The instructions contained in DANGER boxes must be strictly
observed.
Indicates a potentially hazardous situation that, if not prevented,
could be cause of death or serious injures.
The instructions contained in WARNING boxes must be strictly
observed.
Indicates a potentially hazardous situation that, if not prevented, could
be cause of little or moderate damages to the machine.
The instructions next to CAUTION symbol must be strictly observed.
<Other Symbols>
The format identified by this symbol provides information on programming.
Indicates those aspects that should be considered.
Indicates the manual or page number to which you should be referred to find
further information on the topic in question.
Provides guidelines on the topic being described.
Provides an example for a given procedure.
Page 4
PROGRAMMING MANUAL -4-
The format identified by this symbol provides information on programming. ............................................ 3
Indicates those aspects that should be considered. ................................................................................ 3
Indicates the manual or page number to which you should be referred to find further information on the
topic in question. ....................................................................................................................................... 3
Provides guidelines on the topic being described. .................................................................................... 3
Provides an example for a given procedure. ............................................................................................ 3
As you can see, two variants are available “,C” and “,A” with a leading comma to differentiate them from
C- and A-axis ........................................................................................................................................... 25
New correction values must be entered when the tool is moved because of a hit .................................. 26
Refer to operation manual for further information on this subject, chapter B, point 4: OPERATION
PROCEDURE FOR MANUAL TOOL PRESETTER INTEGRATED IN THE MACHINE .......................... 26
When a tool is placed on the subhead (the case may be in which double toolholders are used for the
head and the subhead) keep in mind that correction values are ? 21, that is, for position 1 the correction
value will be 21, for position 2, 22, and so on. ......................................................................................... 26
It can be also placed in other location, even though it is advised not to do it, as following up and verifying
the program would much more difficult and you should continuously calculate the difference between this
position and workpiece end. .................................................................................................................... 26
We advise you to enter workpiece zero at the beginning of the program. .............................................. 26
How preparing the machine for machining operations with transfer: ...................................................... 27
1st Determine workpiece zero and carry out the 1st machining stage. ................................................... 27
2nd Stop the machine and verify the dimension before doing the transfer. ............................................ 27
3nd Do the transfer and place the subhead in working position. ............................................................. 27
Page 5
PROGRAMMING MANUAL -5-
4nd Stop the machine and determine workpiece zero before performing the 2nd machining stage. ...... 27
In this manual we will always refer to codes G type A. Refer to Fanuc programming manual for further
information on G codes. .......................................................................................................................... 29
As seen in this example, up to 3 M codes can be programmed on each line. ........................................ 29
It is always advisable to switch chip conveyor and coolant on at the start of the program, excepting for
special cases. .......................................................................................................................................... 29
Note that tool retraction in this example is to 150 mm on X+ and 150 mm on Z+ from workpiece zero,
and not from chuck face, as no order for changing the position is given to workpiece zero, which in this
example is maintained in the previous position. ...................................................................................... 29
Line number (N10, N20...) ...................................................................................................................... 29
Line numbers are optional, and can be either entered or not. ................................................................. 29
It is advisable to enter line numbers with a margin, such as 10, 20 …, as you can then enter
intermediate operations without requiring changing all line numbers (10, 12, 13, 20...). .......................... 29
You can also see that G2 or G3 is first entered, then the end point, and finally the radius, .................... 32
As you can see, for the interpolation, you must know the point from which this interpolation will take
place in order to change radius direction (in this example on point X69.282 Z-60). ................................. 33
In this example, slots of de ø65, ø71 and ø69 are to be machined. For this, tool T5 will be used. ......... 34
The references are: U for X-axis (U-command also on ø to) .................................................................. 34
W for the Y-axis ..................................................................................................................................... 34
H for the C-axis ..................................................................................................................................... 34
Time delays are entered each time a slot is machined in order to stop the tool for a given time and then
properly complete the machining operation. ............................................................................................ 34
To go from M3 to M4, first enter M5 to stop the head. ............................................................................ 35
2. G FUNCTIONS ................................................................................................................................... 36
This section describes G codes more commonly used. Refer to CNC unit manual supplied by the
manufacturer for G codes not included in this section. ............................................................................ 36
1- More than one G code may be programmed in a block, provided they are from different groups. ..... 36
2.- If more than one G code in a group is programmed in a block, only the last programmed G code will
be executed. ............................................................................................................................................ 36
3.- If a G code not specified in the list of G codes or a G code related to a function not available in the
machine is programmed, alarm message no. 010 will be displayed. ....................................................... 36
4.- G codes marked with % are activated by default when CNC is started or RESET key pressed. 36
*1: Standard machines with automatic tailstock (T). ............................................................................... 37
*2: Standard for machines with powered tool ......................................................................................... 37
*3: Optional for machines with sub-head (S). ......................................................................................... 37
*4: Standard for machines with sub-head (S). ........................................................................................ 37
*5: Optional for machines with powered tool. .......................................................................................... 37
Page 7
PROGRAMMING MANUAL -7-
3. M FUNCTIONS ................................................................................................................................... 40
For M codes not included in this manual, refer to CMZ. In some machine models, other M codes for
functions different to those described herein may be availbale. ............................................................... 40
5. CONTROL FIXED CYCLES ................................................................................................................ 47
You can find here a brief explanation of machining cycles. For a detailed description, refer to section 13
of FANUC manual, part 1/2 ..................................................................................................................... 47
At the end of each cycle sequence the machine is always positioned in the position at which this cycle
sequence was started. The tool will be commonly located in the position used for rough machining. ..... 47
The profile allows changing X and Z direction. ....................................................................................... 47
At the end of each cycle sequence the machine is always positioned in the position at which this cycle
sequence was started. ............................................................................................................................. 47
The positioning allows changing X- and Z-axis direction. ....................................................................... 47
If the block G71 U3 R1 is entered for the first time, it will be stored in the parameter U=P5132 and
R=P5133 and will be kept until changed in either the program or the parameter. .................................... 47
Same as the above one, excepting for the profile. .................................................................................. 48
IMPORTANT: Roughing cycles are without tool radius compensation. Because of this, higher
allowances will be specified for X and Z depending on tool radius. ......................................................... 49
6. EXAMPLES OF FIXED CYCLES ........................................................................................................ 51
For retraction at the start, the end of program will be replaced by this end of program; with cycle G83
the control retracts the drill to the start point (X0 Z3) every time, thus the retraction (R05) is not entered.
52
Groove width or groove end point can be defined with a W code in this example (W27, that is, 30 – 3 of
tool), if tool is positioned on the right-hand would be (W-27). For either Z or W, tool width must be
Finishing on (P3): ................................................................................................................................... 60
- B Absolute command ........................................................................................................................... 76
This is a B-axis coordinate value for the working position at which the workpiece will be transferred from
the head to the sub-head. ........................................................................................................................ 76
- F Advance (mm/min) ............................................................................................................................ 76
This is the advance speed for workpiece transfer operation. .................................................................. 76
- Q Transfer position tolerance. .............................................................................................................. 76
After the workpiece is positioned on B+Q as a result of transfer operation, the program will be advanced
to the following block. .............................................................................................................................. 76
1- If B-axis position after retracted from detected transfer position is out of the specified tolerance
“B+Q”, an alarm message will be displayed ............................................................................................ 76
3011 CYCLE NOT COMPLETED ........................................................................................................... 76
Page 9
PROGRAMMING MANUAL -9-
and the machine will be stopped. ........................................................................................................... 76
2- If Q value is omitted, the tolerance for workpiece position will be 1 mm. ............................................ 76
3- The approach point specified before G38 must be a point located at a distance of 1 mm from the
The tailstock is advanced to the B-position (-425.8+5=-420.8mm) on G0, as K is 5 and B is –425.8.
From this position, the tailstock is advanced on G1 until reaching the torque, with F700mm/min, as S is
700. 82
After executing the part-clamping-movement, the new T code will be executed. ................................... 82
If the B-axis final position is less or equal to “B” (in the example, -425.8mm), the alarm 3011 PART NOT
Page 10
PROGRAMMING MANUAL -10-
CLAMPED will appear. ............................................................................................................................ 82
Commands G384 and G380 can be only used on machines equipped with powered tool. .................... 83
< Rigid threading cycle on front end > .................................................................................................... 83
1- For a threading cycle, axis and head override will be set to 100%. .................................................... 84
2- Dry Run function is not available when a threading cycle is being executed. ..................................... 84
3- Ensure that powered tool and head are stopped prior to executing a threading cycle. ....................... 84
4- As axes and tool are synchonised, using a floating tap will not be required. ...................................... 84
5- Powered tool speed will be limited when using a rigid threading cycle. .............................................. 84
For subsequent calls, only a single coordinate value is possible. X or Z or C. ........................................ 84
7- G384 function is programmed in all blocks requiring a rigid threading cycle. H, R, F, S, D, M, Q, E, A
and T values must not be entered in the second block in which a rigid threading cycle is programmed, as
well as in all subsequent blocks. Only the position at which a threading operation is to be carried out
must be entered. .................................................................................................................................... 84
8- H argument is the distance from R point to hole bottom. .................................................................... 84
9- Entering the number of repeats for a rigid threading cycle is not permitted. ....................................... 84
10- A rigid threading cycle enabled with G384 must be disabled with G380. .......................................... 84
If another fixed cycle is entered without previously disabling a rigid threading cycle, an alarm message
(No. 3011) will be displayed. Indexing the turret with a T command during a rigid threading cycle is not
1- For a threading cycle, axis and head override will be set to 100%. .................................................... 89
Page 13
PROGRAMMING MANUAL -13-
2- Dry Run function is not available when a threading cycle is being executed. ..................................... 89
3- Ensure that powered tool and head are stopped prior to executing a threading cycle. ....................... 89
4- As axes and tool are synchonised, using a floating tap will not be required. ...................................... 89
5- Powered tool speed will be limited when using a rigid threading cycle. .............................................. 89
For subsequent calls, only a single coordinate value is possible. X or Z or C. ........................................ 89
7- G384 function is programmed in all blocks requiring a rigid threading cycle. H, R, F, S, D, M, Q, E, A
and T values must not be entered in the second block in which a rigid threading cycle is programmed, as
well as in all subsequent blocks. Only the position at which a threading operation is to be carried out
must be entered. .................................................................................................................................... 89
8- H argument is the distance from R point to hole bottom. .................................................................... 89
9- Entering the number of repeats for a rigid threading cycle is not permitted. ....................................... 89
10- A rigid threading cycle enabled with G384 must be disabled with G380. .......................................... 89
If another fixed cycle is entered without previously disabling a rigid threading cycle, an alarm message
(No. 3011) will be displayed. Indexing the turret with a T command during a rigid threading cycle is not
To execute the G100 command, the following conditions must be satisfied: .......................................... 91
The main spindle or the rotary tool spindle is stopped. ........................................................................... 91
The turret head index has completed. .................................................................................................... 91
The tailstock spindle is in the IN position. ............................................................................................... 91
During setup operation, it is recommended to record the position(s) where the tailstock should be
positioned and the position where the tailstock should be returned after the completion of machining.
The coordinate values must be specified in the machine coordinate system. ......................................... 91
The G101 command can be used only with the programmable tailstock specification machine. ............ 93
G101; 93
G101 …. Calls the tailstock connect joint mode ..................................................................................... 93
1/ Specify the G101 command independently in a block without other commands. ............................... 93
To execute the G101 command, the following conditions must be satisfied: .......................................... 93
The main spindle or the rotary tool spindle is stopped. ........................................................................... 93
The turret head index has completed. .................................................................................................... 93
The tailstock spindle is in the IN position. ............................................................................................... 93
When programing G101 to get out the tailstock from park position, the joint hole doesn’t change and the
tailstock is coupled to the 2nd hole. ......................................................................................................... 93
During setup operation, it is recommended to record the position(s) where the tailstock should be
positioned and the position where the tailstock should be returned after the completion of machining.
The coordinate values must be specified in the machine coordinate system. ......................................... 93
9. M functions made by CMZ. .................................................................................................................. 95
Page 15
PROGRAMMING MANUAL -15-
U/2 distance must be greater than angular runout length ( r ). Refer to bottom left figure. ..................... 95
95
M23; ............ Used for angular runout. ................................................................................................... 95
M24; ............ Used for straight runout (disables angular runout). ........................................................... 95
As shown in the figure, r distance is programmed by means of parameter 5130. Runout angle will be
45º. 95
M33, M34 and M36 commands are only used on machines equipped with a sub-head (S). .................. 96
1- For transferring a workpiece from main head to sub-head, head and sub-head speed must be
synchronised by means of M33 command. If the workpiece is transferred without activating the
synchronisation mode, scratching of workpiece could result. .................................................................. 96
2- For transferring an hexagonal bar, head and sub-head phase and speed must be synchronised by
means of M34 command, as otherwise the transfer operation will not be possible. ................................ 96
3- M36 function should be only programmed after completing a cutting cycle or when chucks on main
head and sub-head are open. ................................................................................................................. 96
4- If a M34 function is programmed with sub-head jaws closed, alarm message FM 102 will be
5- M5 function must not be programmed when phase and/or speed synchronisation mode is activated.
M5 function will disable the synchronisation mode. ................................................................................. 96
M34 function can de also used for round parts, but considering that phase (and speed) synchronisation
time is longer and speed synchronisation time, using M33 function is recommended when machining
TBI 520 machines can be provided with a second coolant pump. This pump is started and stopped,
while on automatic mode, by means of codes M18 and M17, respectively. If a M9 code is programmed,
both coolant pumps are stopped. .......................................................................................................... 107
This pump is optional for TBI520 machines. ......................................................................................... 107
A cleaning pump is always provided on TL machines equipped with rear chip conveyor or B-axis. ..... 108
Operation of cleaning pump will be only possible with machine door closed. ...................................... 108
This option is only available for TL machines. ...................................................................................... 108
Page 20
PROGRAMMING MANUAL -20-
Through-coolant supply will be only activated with machine door closed. ............................................. 108
The coolant gun is an option available for all machines. ....................................................................... 108
10. PROGRAMMING C-AXIS AND POWERED TOOL. ....................................................................... 109
Commands M80, M280, M81 and M281 can be only used on machines of M type Commands M280 and
M281 can be only used on machines of SM type. ................................................................................ 109
By programming command M80, M280 on automatic mode or MDI mode, head1 or head2 can be
indexed to the required angular position in order to drill holes on the circular contour of the workpiece or
on the end face. ..................................................................................................................................... 109
On mode M80 or M280, head rotation can be controlled synchronically with tool movement in order to
cut grooves or slots. .............................................................................................................................. 109
M80; ............. C-axis mode is activated on head1. .............................................................................. 110
M280; ........... C-axis mode is activated on head2. ............................................................................... 110
M81; ............. C-axis mode is deactivated on main head or on head1. ................................................ 110
M281; ........... C-axis mode is deactivated on head2. ........................................................................... 110
1- Stop the head (head1 and/or head2) by entering the command M05 (head1) or M205 (head2) before
entering commands M80, M280. If any of the last parameters is entered with head1 or head2 rotating,
the machine will be stopped and an alarm message (FM024) will be shown on the display. ................. 110
2- Before entering command M81 or M281, the powered tool must be stopped by entering command
M05 or M85. If any of these commands is entered when the powered tool is rotating, the machine will be
stopped and the alarm message (FM025) will de shown on the display. ............................................... 110
3- For machines of SMC series, deactivating C-axis function will not be necessary when changing this
function from a head to the other head by means of M80 or M280. ....................................................... 110
4- For machines of SMC series, head1 or head2 will operate on C-axis mode when entering M80 or
M280 respectively. To deactivate C-axis function on either head, only enter command M81 or M281
respectively, in case of each head. ........................................................................................................ 110
5- For machines of SMC series, if machining operations are to be carried out with head2, C-axis must be
returned to its “zero reference point” after completing the machining operations with head1. ............... 110
Commands M480 and M481 can be only used on machines of SMC series. ....................................... 111
M480; ........... C-axis mode is activated on both heads, head1 and head2. .......................................... 111
M481; ........... C-axis mode is deactivated on both heads, head1 and head2. ...................................... 111
111
When C-axes on both heads are coupled, activating the hydraulic brake to lock head1 (M50) will only be
Page 21
PROGRAMMING MANUAL -21-
permitted. Considering that this function is used to machine workpieces clamped on both heads, locking
both heads will not be required. ............................................................................................................ 111
1- Stop head, head1 or head2 by entering M05 (head1) and/or head2 by entering M205 before entering
command M480. If the last command in entered when the head1 or head2 is rotating, the machine will
be stopped and the alarm message (FM024) will be shown on the display. .......................................... 111
2- Before entering command M481 you will need to stop the powered tool by entering M05 or M85
command. If command M481 is programmed when the powered tool is running, the machine will be
stopped and the alarm message (FM025) will be shown on the display. ............................................... 111
3- For machines of SMC series, when a command M480 is entered both heads, head1 and head2 will
operate in C-axis mode. To rotate the heads, C-axis must be deactivated by means of M81 or M281
respectively, or by means of M481. ....................................................................................................... 111
Commands M380 and M381 are only used on machines of SMC series provided with SUPERCAP tool.
112
M380; ........... C-axis mode is activated by means SuperCap. ............................................................. 112
M381; ........... C-axis mode is activated by means SuperCap. ............................................................. 112
M303; ........... When SuperCap is used, activates C-axis for head1 after enabling C-axis mode by
means of M380. ..................................................................................................................................... 112
M304; ........... When SuperCap is used, activates C-axis for head2 after enabling C-axis mode by
means of M380. ..................................................................................................................................... 112
For machines of SMC series, chuck locking function is only valid for the head for which the last M
function is entered, and provided that more than one M303 (activation of C-axis for head1), M304
(activation of C-axis for head2), M50 (head brake for head1), or M250 (head brake for head2), is entered
in a single block. Therefore, the machining process must be carried out with the head corresponding to
the M code entered in the program. If the machining operation is carried out with the other head, the
powered tool will not be stopped, irrespective the jaws are open or not, so the workpiece could fall down
or be thrown away the chuck, causing personal injures or damages to the machine. ........................... 112
1- For machines of SMC series, head1 or head2 will operate in C-axis mode if command M303 or M304,
respectively, is entered in the program. To rotate head1 or head2, C-axis mode is disabled on head1
and head2 by entering the command M381. ......................................................................................... 112
2- For machines of SMC series, after using main head, C-axis must be returned to zero position before
changing to the subhead, after using the main head. ............................................................................ 112
Numbers in brackets indicate the order in which holes are drilled. ....................................................... 113
Numbers in brackets indicate the order in which holes are drilled. ....................................................... 114
This operation will be performed in two passes. ................................................................................... 116
Page 22
PROGRAMMING MANUAL -22-
This tapping operation is only performed on machines equipped with powered tool. ........................... 120
This example describes a rigid tapping operation for three holes spaced 120º. ................................... 120
The approach operation is only an example. The programmer is responsible for entering correct values.
121
This tapping operation is only performed on machines equipped with powered tool. ........................... 122
This example describes a rigid tapping operation for two holes spaced 180º. ...................................... 122
Milling radius compensation must be always used in this type of programs. ........................................ 123
In this case we are using a milling cutter of diameter 10. ..................................................................... 123
Therefore, on the correction table, enter Radius = 5 and Tool type = 9. ............................................... 123
Tool selection and approach to start point operations are omitted and they must be determined by the
In this case, all roughing cycles will not permit tool compensation. The approach operation is omitted, as
the programmer depending of tool used should determine it. ................................................................ 132
132
Page 23
Z+
X+
X-
Z-B-B+
1.BASIC CONCEPTS
1.1Machine axes
Refer to operation manual for further information on this subject, chapter B,
point 3: SELECTING THE COORDINATE SYSTEM
1.1.1 X axis, Z axis
PROGRAMMING MANUAL -23-
X-, Z- and B-axis and their respective positive and negative displacement directions are shown
on the above schematic diagram.
As you can see, when workpiece zero reference point is located on workpiece end (most
common case), the positive direction is outside the workpiece, while the negative direction is
on the workpiece area to be machined (inside the workpiece).
Commonly, you will operate in the quadrant defined by X+ and Z-.
The machine will enter only in X- area for facing operations.
You may also operate X+ Z+ quadrant when the workpiece is clamped on the subhead.
Page 24
C+
C-
PROGRAMMING MANUAL -24-
1.1.2 C-axis
C-axis would be used to swivel the head in order to
position the workpiece for drilling operations using a
powered tool.
C+ is in clockwise direction and C- is counterclockwise
direction.
If the machine is provided with a
subhead, C1 would be for the main head
and C2 for the subhead.
1.1.3 Other axes that could be encountered when programming the
machine are
A: powered tool rotating axis.
B: displacement axis used to approach the subhead to main head or move it away.
F: feed axis (related to slides) to be programmed when in operation.
In millimetres x per revolution when the head is rotating (turning)
For example:
G99 F0.3 this means “03 millimetres per revolution”.
In millimetres per minute when the head is stopped (MC).
For example:
G98 F80 this means “80 millimetres per minute”
T: is turret rotation.
R: is radius programming.
S: are head revolutions (cutting speed) This letter is always related to heads.
G50 S1000 Rpm limit.
G97 S1000 fixed rpm (for tapping and drilling).
G96 S200 cutting speed (m/min) for all turning operations.
Cutting speed formula:
Dn
Vc=
1000
Vc1000
n=
D
Vc= Cutting speed
D= Part standard diameter
n= Rpm limit.
,C: bevel programming.
,A: angle programming.
As you can see, two variants are available “,C” and “,A” with a leading comma
to differentiate them from C- and A-axis
Page 25
1.2Tool offset
The correction value is the protruding length of tool end from the zero reference of turret disc.
The required correction values must be entered each time tool position is changed with respect
to the aforementioned position; if tool position is not changed, entering a correction value will
not be necessary as these values are stored in the memory.
New correction values must be entered when the tool is moved because of a hit
1.2.1 Entering correction values
There are two ways for entering tool correction values.
1st.) supplied with presetter.
For machines with presetter, place the presetter in position and preset the tool.
PROGRAMMING MANUAL -25-
Refer to operation manual for further information on this subject, chapter B,
2nd.) supplied without presetter.
For machines without presetter, turn the workpiece and retract the tool without moving it out
the axis. Then measure the workpiece and enter the readings in the geometry table.
To enter a value, go to the geometry table (correction value), enter the required value and
press the intermediate key; by this way the control unit will calculate the correction value.
point 4: OPERATION PROCEDURE FOR MANUAL TOOL PRESETTER
INTEGRATED IN THE MACHINE
When a tool is placed on the subhead (the case may be in which double
toolholders are used for the head and the subhead) keep in mind that correction
values are ? 21, that is, for position 1 the correction value will be 21, for position
2, 22, and so on.
1.3Workpiece zero reference point
Workpiece zero is the workpiece protruding length from main chuck face.
It can be also placed in other location, even though it is advised not to do it, as
following up and verifying the program would much more difficult and you should
continuously calculate the difference between this position and workpiece end.
We advise you to enter workpiece zero at the beginning of the program.
Page 26
PROGRAMMING MANUAL -26-
<Standard for machines with sub-head>
In the following example we explain how a value of 80 is entered for the first stage (machining
the workpiece on the head), while a value of 460 is entered for the second stage (machining
the workpiece on the subhead).
Zero 1st phase
G10 P0 Z-80
Zero 2nd phase
G10 P0 Z-460
How preparing the machine for machining operations with transfer:
1st Determine workpiece zero and carry out the 1st machining stage.
2nd Stop the machine and verify the dimension before doing the transfer.
3nd Do the transfer and place the subhead in working position.
4nd Stop the machine and determine workpiece zero before performing the 2
machining stage.
Positioning the tool on
X45 Z0, that is, 5 mm
above the workpiece
N50 G0 X45 Z0 (APPROACH);
N60 G1 X-2;
Line number
N70 G0 X150 Z150;
End and rewinding
of program
N80 M30;
Workpiece zero -103
Comment
Cutting speed
(Vc=200 m/min)
Feed (mm/revolution)
Chip conveyor
running
Coolant supply on
Head rotation in
clockwise direction
Facing up to X-2, that is,
crossing 2 mm below
the axis
Retraction at quick speed to X150
Z150, that is, at 150 mm on both
axes.
Page 28
PROGRAMMING MANUAL -28-
In this manual we will always refer to codes G type A. Refer to Fanuc
programming manual for further information on G codes.
Comment:
These are notes included in the program.
These notes are totally optional, and it is up to the programmer to enter them or
not.
These notes will be always placed in brackets () in order to prevent the program
reading them.
T101
Here is shown that the tool to be used is in position 1 and a correction value of
01 is applied.
T0101 could be also entered, as the four mandatory characters are present,
however, the first zero is optional.
Head rotation direction:
M3 head rotation direction
M4 head rotation direction reverse or clockwise.
M4 M200 M8
As seen in this example, up to 3 M codes can be programmed on each line.
It is always advisable to switch chip conveyor and coolant on at the start of the
program, excepting for special cases.
G0 X150 Z150
Note that tool retraction in this example is to 150 mm on X+ and 150 mm on Z+
from workpiece zero, and not from chuck face, as no order for changing the
position is given to workpiece zero, which in this example is maintained in the
previous position.
Line number (N10, N20...)
Line numbers are optional, and can be either entered or not.
It is advisable to enter line numbers with a margin, such as 10, 20 …, as you
can then enter intermediate operations without requiring changing all line
numbers (10, 12, 13, 20...).
G96 G99 S200 F.25
As you can see, G codes are first placed and then S and F codes. Codes can be
also entered in the following manner: G96 S200 G99 F.25
Entering codes such as G96 and G50 in the same line is not permitted.
Page 29
1.5Taper turning
PROGRAMMING MANUAL -29-
BBD 210
Pass
Pass
O0002;Name of the program
N10 G10 P0 Z-78;Part-zero at –78
N20 T101;Tool chosing (pos. 01 and offset 01)
N30 G50 S1500;Spindle turning limit: 1500 rpm
N40 G96 G99 S200 F.25 M4 M8 M200; Cutting speed (m/min), Feedrate (mm/rev),
clockwise sense, Coolant, Chip conveyor
N50 G0 X52.5 Z2;Fast feedrate to point X52.5 Z2
N60 G1 Z-19.9;Machine and go to Z-19.9 (First pass)
N70 G0 X55 Z2;Fast feedrate to X55 Z2
N80 X45;Fast feedrate until the beginning of cone in X45 Z2
N90 G1 Z0;Machining feedrate to X45 Z0
N100 X52 Z-20 F.2;Machine the cone to X52 Z-20 (Second pass)
N110 X61;Machine to X61 Z-20
N120 G0 X200 Z200;Fast backwards to 200mm in both axes
N130 M30;End of programm and back to he beginning
In this example you can see that the first pass (N10 to N50) is carried out letting
part of the machining operation for de second pass (N60 to N120).
You can also see that for taper turning entering the start point and the end point
will not be necessary, and the angle between these two points will be machined.
N50 G0 X44 Z2;Move Z2 axis to the height of the beve 2x45º
N60 G1 Z0;Move forwards machining to Z0
N70 X40 Z-2 F.15;Machine the bevel with feedrate 0.15 mm/rev
N80 Z-40 F.2;Machine the inside at ø40 with federate 0.2 mm/rev
N90 X35;Face the inside until ø35
N100 G0 Z5;Fast feedrate to Z5
N110 X200 Z100;Move backwards to X200 Z100
N120 M30;End and back to de beginning
In this example the part would have a ø35 hole.
Page 31
1.7Radii
PROGRAMMING MANUAL -31-
BBD 210
G2G3
O0004;
N10 G10 P0 Z-110;
N20 T303;
N30 G50 S2500;
N40 G96 S220 G99 F.2 M4 M8 M200;
N50 G0 X30 Z2;
N60 G1 Z-22;Machine to ø30 and Z-22
N70 G2 X40 Z-27 R5 (CLOCKWISE SENSE);Radio 5 clockwise to X40 Z-27
N80 G1 X55;Face to X55
N90 G3 X80 Z-57 R80 (COUNTERCLOCKWISE);Radio 80 counterclockwise to X80 Z-57
N100 G1 Z-62;Machine to Z-60
N110 X86;Face to X86
N120 G0 X150 Z150 M30;
In this example we consider that the part is rough machined.
As seen in this example, G2 is used to machine radii in clockwise direction and
G3 in counterclockwise direction.
You can also see that G2 or G3 is first entered, then the end point, and finally
the radius,
Page 32
PROGRAMMING MANUAL -32-
1.8Cylindrical interpolation
BBD 210
O0005;
N10 G10 P0 Z-165;
N20 T404;
N30 G50 S2000;
N40 G96 S200 G99 F.2 M4 M8 M200;
N50 G0 X69.282 Z2;Fast feedrate to X69.292 Z2
N60 G1 Z-20;Machining to Z-20
N70 G3 X69.282 Z-60 R40;Machine at radio 40 until point X69.282
Z-60 counterclockwise sense
N80 G2 X69.282 Z-100 R40;Machine at radio 40 until point X69.282
As you can see, for the interpolation, you must know the point from which this
interpolation will take place in order to change radius direction (in this example
on point X69.282 Z-60).
Page 33
PROGRAMMING MANUAL -33-
1.9Incremental commands (U, W, H) only for FANUC
BBD 210
O0006;
N10 G10 P0 Z-96:
N20 T505;
N30 G96 G99 S120 F.1 M4 M8 M200;
N40 G0 X78 Z-20;Fast feedrate to X78 Z-20
N50 G1 X65;Grooving to ø65
N60 G4 X1 (TEMPORIZACION 1 SEGUNDO);Timming (stop tool 1 sec X1=P1000)
N70 G0 X78;Fast feedrate to X78
N80 W-10 (INCREMENTAL);Increment –10 en el eje Z (W=Z)
N90 G1 U-7;Increment –7 en el eje X (U=X)
N100 G4 X1;Timming
N110 G0 U7;Fast feedrate 7 in axis X (U=X)
N120 W-15;Increment –15 en eje Z (W=Z)
N130 G1 U-9;Groove until –9 in axis X (ø69)
N140 G4 X1;Timming
N150 G0 U9;Fast feedrate 9 in axis X (ø78)
N160 X200 Z200;
N170 M30;
In this example, slots of de ø65, ø71 and ø69 are to be machined. For this, tool
T5 will be used.
The references are:U for X-axis (U-command also on ø to)
W for the Y-axis
H for the C-axis
Time delays are entered each time a slot is machined in order to stop the tool
for a given time and then properly complete the machining operation.
To go from M3 to M4, first enter M5 to stop the head.
Page 35
2. G FUNCTIONS
G functions used in machining programs are described in this section.
This section describes G codes more commonly used. Refer to CNC unit
manual supplied by the manufacturer for G codes not included in this section.
2.1List of G codes
Also called preparatory functions, G codes consist of a G address followed by a numerical
value which defines a machining mode or an axis displacement within a program block. The
CNC unit will control the specified G code.
G codes are classified into two types:
TypeDescription
PROGRAMMING MANUAL -35-
Non-modal G code
(Group 00, excepting G10 and G11)
Modal G code
(Groups other than 00)
For instance, G00 and G01 are modal G codes, as they pertain to a group other than 00.
G01 X_Z_;
X_;G01 is valid within this range
Z_;
G00 X_Z_;
1- More than one G code may be programmed in a block, provided they are
from different groups.
2.- If more than one G code in a group is programmed in a block, only the last
programmed G code will be executed.
3.- If a G code not specified in the list of G codes or a G code related to a
function not available in the machine is programmed, alarm message no. 010
will be displayed.
The G code is valid within the block in which it was
programmed
The G code will remain valid until another G code of
the same group is programmed.
4.- G codes marked with % are activated by default when CNC is started or
RESET key pressed.
Page 36
PROGRAMMING MANUAL -36-
2.1.1 TL, TB, TBI models
*1: Standard machines with automatic tailstock (T).
*2: Standard for machines with powered tool
*3: Optional for machines with sub-head (S).
*4: Standard for machines with sub-head (S).
*5: Optional for machines with powered tool.
) = Standard, + = Optional, x = Not available
%
%
%
%
G Code
GroupFunction
ABC
G00G00G00
G01G01G01Linear interpolation (machining feed)
G02G02G02
G03G03G03
G04G04G0400Time delay
G07.1
(G107)
G10G10G10Programmable data input
G11G11G11Programmable data input disabled
G12.1
(G112)
G13.1
(G113)
G17G17G17
G18G18G18Zp-Xp plane selection
G07.1
(G107)
G12.1
(G112)
G13.1
(G113)
G07.1
(G107)
G12.1
(G112)
G13.1
(G113)
Positioning (fast feedrate)
01
Circular clockqwise or helical
interpolation (clockwise)
Circular counterclockwise or helical
interpolation (counterclockwise)
Cylindrical interpolationx
00
Interpolation mode in polar coordinatesx
21
Interpolation mode in polar coordinates
disabled
Xp-Yp plane selection
16
Remarks
)
)
)
)
)
2
)
)
2
2
x
)
)
%
G19G19G19Yp-Zp plane selection
G20G20G70
G21G21G71Input in mm
G22G22G22
G23G23G23
G27G27G27
G28G28G28Go to reference point
G30G30G30
G31G31G31Skip function
Input in inches
06
Verify traverse limit stored in the
memory. Function enabled
09
Verify traverse limit stored in the
memory. Function disabled
compensation
Tool insert radius rightward
compensation
Selection of co-ordinate system or
selection of maximum spindle speed
00
Polygonal turning. Disablex
20
Polygonal turningx
Defining local co-ordinate system
00
Selection of workpiece co-ordinate
system (1 co-ordinate)
Selection of workpiece co-ordinate
system (2 co-ordinates)
Selection of workpiece co-ordinate
system (3 co-ordinates)
14
Selection of workpiece co-ordinate
system (4 co-ordinates)
Selection of workpiece co-ordinate
system (5 co-ordinates)
Selection of workpiece coordinate
system (6 co-ordinates)
Remarks
)
)
)
)
)
)
4
5
5
+
+
+
+
+
+
+
+
+
%
%
G66G66G66
G67G67G67Call macro on modal mode. Disable
G70G70G72
G71G71G73Stock removal on turning
G72G72G74Stock removal on facing
G73G73G75Lead repetition
G74G74G76Deep drilling on end face
G75G75G77Drilling external/internal diameter
G76G76G78Multiple threading cycle
G80G80G8010Drilling cycle. Disable
Call macro on modal mode
12
Finishing cycle
00
+
+
)
)
)
)
)
)
)
2
+
Page 38
PROGRAMMING MANUAL -38-
G Code
GroupFunction
ABC
G83G83G83Drilling cycle on front face
G84G84G84Drilling and tapping cycle on front face
G86G86G86Boring cycle on front face
G87G87G87Drilling cycle on a side
G88G88G88Drilling and tapping cycle on a side
G89G89G89Boring cycle on a side
G90G77G20
G92G78G21Threading cycle
G94G79G24Turning cycle on end face
G96G96G96
%
G97G97G97Constant cutting rate control. Disable
G98G94G94
%
G99G95G95Advance per revolution
-G90G90
-G91G91Incremental programming
- G98G98
- G99G99
G138G138G138
G238G238G238
G380G380G380Rigid threading cycle. Disablex
G384G384G384Rigid threading cycleX
Machining cycle on inside/outside
diameter
01
Constant cutting rate control
02
Advance per minute
05
Absolute programming
03
Return to initial level (refer to
Explanation 6)
11
Return to R point level (refer to
Explanation 6)
Workpiece clamping cycle with
automatic tailstock (I)
Workpiece clamping cycle with
automatic tailstock (II)
00
Remarks
2
+
2
+
2
+
2
+
2
+
2
+
+
+
+
)
)
)
)
)
)
)
)
1
x
1
x
2
2
Page 39
3.M FUNCTIONS
M functions used in machining programs are described in this section.
For M codes not included in this manual, refer to CMZ. In some machine
models, other M codes for functions different to those described herein may be
availbale.
3.1List of M codes
These codes control functions complementary to those controlled by G codes. For instance,
coolant supply, head rotation direction, etc.
CMZFunctionDescription
M000 Program stop
M001 Optional stop
M002 Program endEnd of program and CNC reset
M003 Spindle 1 start (normal)Spindle 1 running in CW direction
M004 Spindle 1 start (reverse)Spindle 1 running in CCW direction
M005
M006 Turret head rotation (normal)Turret rotates in CW direction
M007 Turret head rotation (reverse)Turret rotates in CW direction
M008 Coolant ONCoolant 1 supply ON (Coolant 1 start key)
M009 Coolant OFFAll coolnat supplies stopped (1 and 2)
M010 Chuck clamp (spindle 1)
M011 Chuck unclamp (spindle 1)
M012 Chucking pressure 1 (spindle 1)Reduced pressure on spindle 1 activated
M013 Chucking pressure 2 (spindle 1)Reduced pressure on spindle 1 activated
M015 In-position check valid
M016 In-position check invalid
M018 Auxiliary coolant ONAuxiliary coolant supply ON
M019 Spindle orientation (spindle 1)Spindle 1 is oriented (without C-axis)
M020 Steady rest 1 closeSteadyrest is closed
M021 Steady rest 1 openSteadyrest is opened
M023 Chamfering ON
M024 Chamfering OFFM23 disabled
M025 Tailstock spindle outTailstock quill is moved out
M026 Tailstock spindle inTailstock quill is moved in
M027 Tailstock body unclampAutomatic tailstock base is unlocked
M028 Tailstock body clampAutomatic tailstock base is locked
M029 Rigid tapping in spindle ON (spindle 1)
M030 Program end and rewindEnd of program, rewinding and CNC reset
CMZFunctionDescription
M033 Phase synchronous operation OFFSpeed synchronised on both heads
Spindle 1/spindle 2/rotary tool spindle
stop
PROGRAMMING MANUAL -39-
All machine functions are unconditonally
stopped
Machine functions are conditinally stopepd
(OPS function activated)
Spindle 1, spindle 2 and powered tool are
stopped
Workpiece clamped by chuck/collet on spindle
1
Workpiece released from chuck/collet on
spindle 1
Tool lead-out at 45º (Thread end without
bleeding) refer to p5130
Page 40
PROGRAMMING MANUAL -40-
M034 Phase synchronous operation ON
M035 Work counter/total counterPart counter
M036 Syncrhonization OFFSynchronisation deactivated
M047 Workpiece ejector OUTWorkpiece ejector on spindle 2
M048 Override cancel OFFFeed override is set to 100%
M049 Override cancel ONFeed override selector switch is released
M050 Spindle brake clamp (spindle 1)Spindle 1 and spindle 2 braking is activated
M051
M052 Spindle low pressure brake clamp
M053
M054 Chuck air blow ON (spindle 1)Jaws on spindle 1 are blown with air
M055
M059 Chuck air blow OFF (spindle 1)Blowing of jaws on spindle 1 is deactivated
M060
M061
M062 Operation of bar feeder
M063 Movement detection
M065 Order for bar change
M066 Activate monitoring
M067 Deactivate monitoring
M070 Automatic door openAutomatic door is opened
M071 Automatic door closeAutomatic door is closed
M072
Disable steadyrest opening when the
spindle is turning
Spindle brake unclamp (spindle 1,
spindle 2)
Contact sensor airo blow ON (spindle
1)
Air blow sensor OFF for automatic
toolsetter on machine (spindle 1)
Activate spindle and tool sincronization
mode
Deactivate spindle and tool
sincronization mode
Automatic toolsetter arm in machine
UP
Jaws and speed synchronised on the two
heads
Cutting off detection (workpiece on spindle 1)
for transfer to spindle 2
Spindle 1 and spindle 2 braking is deactivated
M073 Parts catcher OUTPart collector is moved out (to collect a part)
M074 Parts catcher INPart collector is moved in (to remove a part)
M075 X-axis mirror image OFFX-mirror function is activated
M076 X-axis mirror image ONX-mirror function is deactivated
M080 C-axis joint (spindle 1)C-axis mode is activated in spindle 1
M081 C-axis release (spindle 1, spindle 2)C-axis mode is deactivated in both spindles
M083 Rotary tool spindle start (normal)Powered tool runs in CW direction
M084 Rotary tool spindle start (reverse)Powered tool runs in CCW direction
M085 Stop rotary toolPowered tool is stopped
M087 Piece meassurement ON (spindle 1)
M088 Piece meassurement OFF (spindle 1)
CMZFunctionDescription
M090 Spindle indexation at 45º
M091 Spindle indexation at 90º
M092 Spindle indexation at 180º
Page 41
PROGRAMMING MANUAL -41-
M096
M098 Sub-program callA sub-program is called
M099
M125 The part is clamped with T tailstockThe tailstock is moved in G1 against the part
M126 The part is unclamped with T tailstock
M200 Chip conveyor forwards
M201 Stop chip conveyor
M203 Spindle 2 start (normal)Spindle 2 runs in CW direction
M204 Spindle 2 start (reverse)Spindle 2 runs in CCW direction
M205 Stop of spindle 2
M210 Chuck clamp (spindle 2)Workpiece clamped on chuch/collet 2
M211 Chuck unclamp (spindle 2)Workpiece released from chuck/collet 2
M212 Chucking pressure 1 (spindle 2)Pressure reduction on spindle 2 is activated
M213 Chucking pressure 2 (spindle 2)Pressure reduction os spindle 2 is deactivated
M219 Spindle orientation (spindle 2)Spindle 2 is oriented (without C-axis)
M222 Check spindle 2 emty chucks
M250 Clamp spindle 2 brakeSpindle 1 and spindle braking is activated
M251 Clamp spindle 2 brake pressure
M252 Clamp spindle 2 low pressure
M253
M254 Chuck air blow ON (spindle)Jaws on head 2 are blown with air
M255
M257 Air blow OFF (spindle 2)
M258 Air blow sensor OFF (subspindle)
M259 Chuck air blow OFF (spindle)Blowing of jaws on head 2 is deactivated
M260
M261
M280 C-axis joint (spindle 2)C-axis mode is activated in spindle 2
M281 Deactivate C axis (spindle 2)
Open chucks enabled when spindle is
turning
Sub-program end Repetition of
program
Contact air blow sensor ON
(subspindle)
Air blow sensor OFF for automatic
toolsetter in machine (subspindle)
Activate subspindle and driven tool
syncronization
Deactivate subspindle and driven tool
syncronization
Open jaws enabled with head running
Return to either main program or program start
The tailstock is moved away in G1 from the
part
M287 Meassurement of piece ON (spindle 2)
M288
M301
M302
M303 Signal to select spindle 1
M304 Signal to select spindle 2
M306 Tool control from part program (A axis)
CMZFunctionDescription
M307
M310
Meassurement of piece OFF (spindle
2)
Direct turning sense of spindle in rigid
tapping (spindle 1 or 2)
Reverse turning sense of spindle in
rigid tapping (spindle 1 or 2)
Tool control from PMC (axis control
PMC)
Automatic selection of spindle coil in
main spindle
Page 42
PROGRAMMING MANUAL -42-
M311
M312
M316 Unlock turret
M318
M319 Turn back to tool zero
M320
M321
M322
M337 Piston keeper up
M338 Piston beeper down
M382 Washing coolant ON
M383 Washing coolant OFF
M384 Spindle 1 orientation and roof opening
M387 Spindle 2 orientation and roof opening
M408 Special M code output
M409
M410
M411
M412
M413
M414
M415
M416
M417
M418
M419
M420
M421
M422
M423
M424 Special M code output
M425
M426
M427
M428
M429
M430
M431
M432 Part catcher cycle
CMZFunctionDescription
M434 Pressure 1 in tailstock – high
M435 Pressure 2 in tailstock – low
M438 Graphic mode axis C
M440 Special M code outputClient M function
M441
M442
Selection of LOW coil (star) in main
spindle
Selection of HIGH coil (delta) in main
spindle
Unable turret turning during axis
movement
Automatic selection of spindle coil in
subspindle
Selection of LOW coil (star) in
subspindle
Selection of HIGH coil (delta) in
subspindle
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Part catcher cycle (removes part from spindle 2
during another part is machined in spindle 1)
Client M function
Client M function
Page 43
PROGRAMMING MANUAL -43-
M443
M444
M445
M446
M447
M448
M449
M454
M455
M456
M457
M458
M459
M470
M471
M472
M473
M474
M478
M479
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Special M code output
Bar unloader forwards movement
signal
Bar unloader backwards movement
signal
Tailstock air blow ON
Tailstock air blow OFF
Driven tool air blow ON
Driven tool air blow OFF
Roof opening
Roof closing
Unload cycle. Stop subspindle, move
unloader forwards, open check, blow
check, move unloader backwards
Stop of operations programmed by
M472
Call to robot cycle (robot command)
Coolant through spindle 2 ON
(Taladrina 3)
Coolant through spindle 2 OFF
(Coolant 3)
Client M function
Client M function
Client M function
Client M function
Client M function
Client M function
Client M function
The outside thread area will be turned to a diameter (- 0.1 mm the metric
diameter) in order to prevent that thread tips can result in sharp edges.
G32 for threading operations, always operate at fixed rpm (G97).
When retapping threads, do not release the workpiece, do not change the
speed and do not change the start point.
Page 46
PROGRAMMING MANUAL -46-
5.CONTROL FIXED CYCLES
You can find here a brief explanation of machining cycles. For a detailed
description, refer to section 13 of FANUC manual, part 1/2
5.1G70 Finishing cycle
G70 P1000 Q1100
P Block number from which the profile operation begins.
Q Block number from which the profile operation ends.
At the end of each cycle sequence the machine is always positioned in the
position at which this cycle sequence was started. The tool will be commonly
located in the position used for rough machining.
The profile allows changing X and Z direction.
5.2G71 Longitudinal roughing cycle parallel to Z-axis
G71 U3 R1
G71 P100 Q200 U0.3 W0.1 F0.25
U Cut depth on radius (mm).
R Retraction in radial direction from diameter to prevent touching the machined diameter
(mm).
P Block number from which the profile operation begins.
QNumber of end block of profile.
U Finishing allowance for radius on X-axis (mm).
W Finishing allowance on Z-axis (mm).
F Instantaneous feed (mm/revolution).
At the end of each cycle sequence the machine is always positioned in the
position at which this cycle sequence was started.
The positioning allows changing X- and Z-axis direction.
If the block G71 U3 R1 is entered for the first time, it will be stored in the
parameter U=P5132 and R=P5133 and will be kept until changed in either the
program or the parameter.
Page 47
PROGRAMMING MANUAL -47-
5.3G72 Cross roughing cycle transversal parallel to X-axis
G72 W3 R1
G72 P100 Q200 U0.25 W0.1 F0.3
Same as the above one, excepting for the profile.
5.4G73 Roughing cycle with passes parallel to profile
G73 U9 W9 R3
G73 P100 Q150 U0.4 W0.1 F0.3
U Stock allowance (for radius) unmachined on X-axis (mm).
W Stock allowance on Z-axis (mm).
R Number of roughing passes.
P Block number from which the profile operation begins.
QNumber of end block of profile.
U Finishing allowance for radius on X-axis (mm).
W Finishing allowance on Z-axis (mm).
F Instantaneous feed (mm/revolution).
5.5G74 Drilling cycle (chip breakage)
G74 R0.5
G74 Z-100 Q25000 F0.25
R Return distance on drilling to break chips (in mm), changes to P722.
Z Final drilling depth (absolute dimensions in mm).
Q Cut depth per pass (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
F Instantaneous feed (mm/revolution).
Page 48
PROGRAMMING MANUAL -48-
5.6G83 Drilling cycle (chip breakage with retraction at the start)
G0 X0 Z3
G83 Z-60 Q20000 F0.2
Z Final drilling depth (absolute dimensions in mm).
Q Cut depth per pass (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
F Instantaneous feed (mm/revolution).
5.7G74 Front counterboring cycle
G74 R0.4
G74 X50 Z-4 P3000 Q4000 F0.15
R Retraction (mm) to break chips.
X(U) End position on X-axis (mm).
Z(W) End position in slot direction (mm).
P Displacement on X-axis for next passes (micron).
WARNING: On machines with specification in tenths of micron, “P” data must be specified in
tenths of micron.
Q Cutting depth (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
F Instantaneous feed (mm/revolution).
5.8G75 Longitudinal grooving cycle
G75 R0.2
G75 X43 W-7.5 P4000 Q25000 F0.15
R Retraction (mm) to break chips
X Groove bottom diameter (mm).
W Groove end point on Z-axis (mm) if Z is specified in absolute dimensions and W is the
displacement in incremental mode; from left-hand to right-hand (W+) and from right-hand to
left-hand (W-), always subtracting tool width.
P Cutting depth on X-axis (micron).
WARNING: On machines with specification in tenths of micron, “P” data must be specified in
tenths of micron.
Q Displacement on Z-axis for next pass (micron).
WARNING: On machines with specification in tenths of micron, “P” data must be specified in
tenths of micron.
F Instantaneous feed (mm/revolution).
IMPORTANT: Roughing cycles are without tool radius compensation. Because
of this, higher allowances will be specified for X and Z depending on tool radius.
Page 49
5.9G76 Threading cycle
G76 P010060 Q30 R0.03
G76 X100 Z-40 R0 P1300 Q650 F2
P01 Number of finishing passes.
P00 Thread runout; distance at which thread outlet is started, in tenths of turn Example: If
thread pitch is 2 and 20 is entered: 2mm x 2 turns = 4 mm (thread runs out 4mm before the
end point).
P60 Thread angle in degrees
Q Minimum pass (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
R Finishing allowance (mm).
XThread bottom diameter (mm).
Z Thread end point on Z-axis (absolute dimensions in mm).
R Height difference on radius (mm) for taper threads, if start point is ø20 and end point ø20,
then R-5.
P Thread height (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
QCut depth for first pass (micron).
WARNING: On machines with specification in tenths of micron, “Q” data must be specified in
tenths of micron.
FThread pich (mm).
PROGRAMMING MANUAL -49-
Page 50
PROGRAMMING MANUAL -50-
6.EXAMPLES OF FIXED CYCLES
6.1G71 Fixed roughing cycle
O0071;
N10 G10 P0 Z-130;
N20 T101 (ROUGHING);
N30 G50 S2500;
N40 G96 S200 G99 F.25 M3 M8 M200;
N50 G0 X105 Z0;
N60 G1 X-2 (SURFACING);
N70 G0 X105 Z1 (STARTING POINT AND END OF FIXED CYCLE);
N80 G71 U3 R1 (DEPTH OF PASS= U3mm REMOVING R1mm);
N90 G71 P100 Q140 U2 W2 F0.3 (ROUGHING LETTING OFFSETS OF 2 mm IN X AND Z);
N100 G0 X40 (FROM BLOCK 100 TO140 THE PROFILE IS DEFINED);
N110 G1 Z-30;
N120 X60 Z-60;
N130 Z-80;
N140 X100 Z-90;
N150 G70 P100 Q140 (FINISHING CYCLE)
N160 G0 X200 Z200 M5;
N170 M30;
Page 51
PROGRAMMING MANUAL -51-
6.2G74 and G83 fixed drilling cycles (with chip breakage)
BBD 210
6.2.1 G74 Drilling cycle with a short retraction for chip breakage
O0009;
N10 G10 P0 Z-75;
N20 T808 (BORING TOOL OF 30);
N30 G97 S265 M4 F0.2 M8 M200;Fixed Revolutions of 265rpm Av=0.2mm per
revolution
N40 G0 X0 Z3;We place at X0 Z3
N50 G74 R0.5;Boring with breaking (removing 0.5mm)
N60 G74 Z-60 Q20000 F0.2;Bore until Z-60 depth: 20000 microns per
pass, Av=0.2mm per revolution
ATTENTION: in machines with specification of
“tenth of micron”, Q200000 must be set
instead of Q20000
N70 G0 X200 Z100 M30;
6.2.2 G83 Fixed drilling cycle with retraction at the start for chip
breakage and removal
N40 G0 X0 Z3 M8;We place at X0 Z3
N50 G83 Z-60 Q20000 F0.2;Bore until Z-60, depth 20000 microns per
pass, Av=0.2mm per revolution
ATTENTION: in machines with specification of
“tenth of micron”, Q200000 must be set
instead of Q2000000
N60 G0 G80 X200 Z100 M30;Removing and ending
For retraction at the start, the end of program will be replaced by this end of
program; with cycle G83 the control retracts the drill to the start point (X0 Z3)
every time, thus the retraction (R05) is not entered.
Page 52
PROGRAMMING MANUAL -52-
6.3Fixed longitudinal grooving cycle
BBD 210
O0010;
N10 G10 P0 Z-110;
N20 T707 (RANURADO);
N30 G50 S1000;
N40 G96 G99 S110 M4 M200 M8;
N50 G0 X80 Z-55;Positioning the TOOL at X80 Z-55
N60 G75 R.5;Grooving with chip breaking (0.5 of removing)
N70 G75 X69 Z-28 P3000 Q2500 F.1;Grooving, penetrate until ø69 and until Z(W)-28,
penetration in X 3000 microns, movement in Z
2500 microns Av=0.1mm/revolution
ATTENTION: in machines with specification of
“tenth of micron”, P30000 and Q5000 must be set
instead of P3000 y Q500
N80 G0 X200 Z200 M30;
Groove width or groove end point can be defined with a W code in this example
(W27, that is, 30 – 3 of tool), if tool is positioned on the right-hand would be (W-
27). For either Z or W, tool width must be subtracted.
N170 G76 X57.4 Z-30 R0 P1300 Q500 F2;Depth of thread ø57.4, end of thread Z-30,
N180 G0 X200 Z100 M30;
00 thread exit, 60 thread angle (60º)
ATTENTION: in machines with specification of
“tenth of micron”, Q500 must be set instead of
Q50
finishing offsets 0, thread height 1300
microns, depth of first pass 500 microns, pass
2
ATTENTION: in machines with specification of
“tenth of micron”, P13000 and Q5000 must be
set instead of P1300 y Q500
It must be kept in mind that in all cases when pitch is multiplied by the
revolutions the result must be ? 4000. Pitch x R.P.M. . 4000.
N320 G76 X32 Z-25 R0 P1300 Q450 F2; ATTENTION: in machines with
specification of “tenth of micron”, P13000 and Q4500 must be set instead of
P1300 y Q450
N330 G0 X250 Z100;
N340 T505 (EXTERNAL THREADING);
N350 G97 S650 M4;
N360 G0 X67 Z3 (2 TIMES THE STEP);
N370 G76 P010060 Q50 R0.04; ATTENTION: in machines with specification of “tenth of
micron”, Q500 must be set instead of Q50
N380 G76 X63.05 Z-30 R0 P975 Q400 F1.5; ATTENTION: in machines with specification of
“tenth of micron”, P9750 and Q4000 must be set instead of P975 y Q400
N390 G0 X200 Z200 M30;
N180 G74 Z-84 Q30000 F0.15; ATTENTION: in machines
with specification of “tenth of micron”, Q300000 must be set
instead of Q30000
N310 G76 P010060 Q40 R0.03; ATTENTION: in machines
with specification of ·”tenth of micron”, Q400 must be
set instead of Q400
Page 57
7.PROGRAMMING SIMPLIFICATION FUNCTIONS
Command and tool displacement tables are included in paragraph 13.6 of
Fanuc Manual, part 1/2.
PROGRAMMING MANUAL -57-
In theses cases, considering tool direction is most important.
The easier procedure is drawing a quadrant on the drawing and locate the
degrees as shown on the above diagram.
Page 58
PROGRAMMING MANUAL -58-
7.1Direct programming of profile (angles and round edges)
N140 X200 C2;
N150 Z-102 (it is not known if right or left);
You can program two angles with 2 radii or bevels as a maximum.
7.2Compensation function
For further information on this subject, refer to section 14 on Fanuc manual, part
1/2.
Page 60
PROGRAMMING MANUAL -60-
7.2.1 Tool radius compensation
1st) Type of tool (Control) T (Offsets table).
2st) Radius inserts of tool (Control) R (Offsets table).
3st) Workpiece position with respect to tool (Part program) G41 or G42.
<EXTERNAL>
<INTERNAL>
Page 61
7.2.2 Tool types
PROGRAMMING MANUAL -61-
Milling cutters are assigned with type “0” or “9” for interpolations.
N220 G76 P010055 Q50 R0.025; ATTENTION: in machines with
specification of “tenth of micron”, Q500 must be set instead of Q50
N230 G76 X57.641 Z-19 R0 P1179 Q450 F1.814; ATTENTION: in machines with
specification of “tenth of micron”, P11790 and Q4500 must be set instead of P1179 and
Q450
N240 G0 X200 Z200 M30;
All cycles ends where they are started and, because of this, finishing positioning
is done above the workpiece.
Page 66
PROGRAMMING MANUAL -66-
7.5G71 Type II - Roughing cycle with displacement direction
reversal on X-axis
For control units with capability for machining profiles with X-axis direction
reversal, the first block for defining the profile must state the movement of the
two axes or include “U0” or “W0”.
Roughing cycles are without tool radius compensation. Because of this, higher
allowances will be specified for X and Z depending on tool radius.
Page 68
PROGRAMMING MANUAL -68-
7.6G72 Example of cross roughing cycle parallel to X-axis
The subprogram is called by means of command P followed by a number. This
number consists of four or more characters.
If the number consists of four characters, it indicates the identification number of
subprogram to be called.
If the number consists of more than four characters, the first four characters,
from right to left, indicate the identification number of subprogram to be called.
Next characters indicate the number of repetitions of subprogram to be called.
Page 72
PROGRAMMING MANUAL -72-
7.8M98 Repetition of parts of a program
Page 73
PARTS OF A PROGRAM REPETITION APPLICATION:
00018 (REPEATING OF PARTS OF A PROGRAM);
N10 T404 (GROOVING);
N20 G96 G99 S90 M4 F0.1;
N30 G0 X36 Z0 M8;
N40 M98 P41001 (REPEATS FOUR TIMES 1001);
N50 G0 X200 Z200
N60 M30
As described above, a subprogram or part of a subprogram is repeatedly called by means of a
command P followed by several numerical characters. In this example, the subprogram is
repeatedly called by means of “P41001”.
This command consists of three parts:
“P” calling a subprogram.
“4” number of subprogram repetitions.
“1001” number consisting of four characters and directly referring to the subprogram.
The maximum number of repetitions for a subprogram in a single call is
9999.
Page 74
PROGRAMMING MANUAL -74-
OTHER EXAMPLE OF SUBPROGRAM EXECUTION REPETITION
PROGRAM:
O0001 (EXAMPLE OF M98);
N10 G10 PO Z-130;
N20 M98 P30002 (REPEATS 3 TIMES THE SUBPROGRAM 0002);
N30 G0 X150 Z150 M30
SUBPROGRAM
00002 (SUBPROGRAM);
N10 T101;
N25 G50 S1500;
N30 G96 S150 G99 F0.08 M4;
N40 G0 X30 Z-10;
50 G1 X-2;
N60 G0 X30;
N70 G10 P0 W10;
N80 M99
Page 75
PROGRAMMING MANUAL -75-
COMMAND
8.FIXED CYCLES BY CMZ
In this chapter, the description of some G codes that have been programmed by CMZ is
described
8.1G38, Checking workpiece pushing
G38 is programmed when a workpiece clamped on the head is to be moved to the sub-head.
When transferring the workpiece from the head to the sub-head, it is assumed that the workpiece will
be in contact with sub-head chuck face when the limit value preset for B-axis is reached. Then the
workpiece is clamped on the sub-head and the program advances to the following block.
G38 can be only programmed on machines equipped with sub-head (S)
This is a B-axis coordinate value for the working position at
which the workpiece will be transferred from the head to the
sub-head.
- F....................Advance (mm/min)
This is the advance speed for workpiece transfer operation.
- Q....................Transfer position tolerance.
After the workpiece is positioned on B+Q as a result of transfer
operation, the program will be advanced to the following block.
This detection operation may cause an elongation of aluminium parts,
leading to permanent deformation or damage.
Transfer advance rate must be selected depending on workpiece
material and size.
1- If B-axis position after retracted from detected transfer position is out of the
specified tolerance “B+Q”, an alarm message will be displayed
3011 CYCLE NOT COMPLETED
and the machine will be stopped.
2- If Q value is omitted, the tolerance for workpiece position will be 1 mm.
3- The approach point specified before G38 must be a point located at a
distance of 1 mm from the sub-head chuck.
4- It is assumed that all coordinate values for B-axis are negative.
5- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
Page 76
PROGRAMMING MANUAL -76-
EXAMPLE
Program with G38
This function is used to transfer a workpiece from the main head to the sub-head.
Workpiece push (torque) against sub-head chuck is checked during workpiece transfer
operation.
O0001;
N1;
Machining program
(Workpiece machined on main head)
N5;
G97 S1000 M03;.....................Main head rotates at 1000 min-1
G28 B0;...................................B-axis retracted to reference point.
M30;
Page 77
8.2G138, workpiece clamping
COMMAND
This cycle can be replaced by G238 (refer to page 60)
G138 is programmed when a workpiece, which was previously clamped with main head, is to
be clamped with the tailstock (B-axis)
In the clamping operation, the workpiece is meant to be properly clamped when B-axis motor
torque reaches the limit value (cycle argument)
G138 is only available for machines equipped with automatic tailstock on B-axis
This is a B-axis coordinate value for the working final position
at which the workpiece will be clamped. This value should be
never reached by the tailstock
- Q.........Tolerance of final position for workpiece clamping (mm)
After the workpiece is positioned on B - Q as a result of
transfer operation, the program will be advanced to the
following block.
- T.........Limit torque for B-axis thrust (K/cm2).
- S.........Feedrate for final workpiece clamping (mm/min)
- D.........Feedrate for workpiece release (retraction) (mm/min)
- J..........Displacement on G1 when clamping and releasing a
This clamping operation may cause damage of aluminium parts, leading
to permanent deformation or damage.
Displacement and torque limit for clamping operation should be selected
according to workpiece material and dimensions.
1- If S value is omitted, the default advance value on clamping will be
200mm/min.
2- If D value is omitted, the default retraction value on clamping will be
1500mm/min.
3- If Q value is omitted, the tolerance for workpiece position will be 1mm.
4- If B-axis position after clamping a workpiece is out of the specified tolerance
"B-Q" an alarm message will be displayed:
3011 PART NOT CLAMPED
and the machine will be stopped.
Page 78
PROGRAMMING MANUAL -78-
5- “Workpiece clamped” signal is activated after reaching the torque limit and
current tailstock position is within tolerance "B-Q".
6- J value is optional; its default value, when J is not programmed, is: 5 mm.
7- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
EXAMPLE
Clamping a workpiece on main head.
Workpiece push (torque) against centre piece is checked during workpiece clamping
operation.
G97 S1000 M03...................Main head rotates at 1000 rpm
G99; ....................................Advance per revolution.
Program with G138
Advance the tailstock to 10 mm on G0. From this position, the tailstock
must be advanced on G1 until reaching the torque limit with
F700mm/min.
The part will be clamping, if the B-axis position is between (B, B-Q].
If the B-axis final position is greater than “B-Q” (in the example,
-424.8mm), the alarm 3011 PART NOT CLAMPED will appear.
If the B-axis final position is less or equal to “B” (in the example,
-425.8mm), the alarm 3011 PART NOT CLAMPED will appear.
Machining program
G138 D1500 J10 E2; Workpiece releasing cycle
The tailstock is retracted 10 mm, as J is 10; with F1500mm/min.
M30;
Page 79
8.3G238, workpiece clamping
COMMAND
G238 is programmed for clamping a workpiece, which was previously clamped on main head,
on the tailstock (B-axis).
In the clamping operation, the workpiece is meant to be properly clamped when B-axis motor
torque reaches the limit value (cycle argument)
G238 is only available for machines equipped with automatic tailstock on B-axis
(T specification)
These are the X and Z coordinate values for positioning the
axes on G0. This positioning is performed simultaneously with
B-axis.
- B.........Absolute command
This is a B-axis coordinate value for the working final position
at which the workpiece will be clamped. This value should be
never reached by the tailstock.
- Q.........Tolerance of final position for workpiece clamping (mm)
After the workpiece is positioned on B - Q as a result of
clamping operation, the program will be advanced to the
following block.
- T.........Limit torque for B-axis thrust (K/cm2).
- A.........T command for tool change it will be performed at the cycle
start.
- S.........Feedrate for final workpiece clamping (mm/min)
- D.........Feedrate for workpiece release (retraction) (mm/min)
- K.........Traverse on G1 when clamping the workpiece (mm).
- J..........Traverse on G1 when releasing the workpiece (mm).
This clamping operation may cause damage of aluminium parts, leading to
permanent deformation or damage.
Displacement and torque limit for clamping operation should be selected
according to workpiece material and dimensions.
If S value is omitted, the default advance value on clamping will be:
200 mm/min.
If D value is omitted, the default retraction value will be:
1500 mm/min.
1- If Q value is omitted, the tolerance for workpiece position will be 1 mm.
2- If B-axis position after clamping the workpiece is out of the specified
tolerance “B,B-Q”, the following alarm message will be displayed:
3011 PART NOT CLAMPED
and the machine will be stopped.
Page 80
PROGRAMMING MANUAL -80-
3- “Workpiece clamped” signal is activated after reaching the torque limit and
current tailstock position is within tolerance "B,B-Q".
4- Programming X and Z arguments, for both clamping and releasing, is
optional.
5- If programmed, the positioning of X-, Z- and B-axis, when clamping or
releasing the workpiece, is simultaneous movement of 3 axes on G0.
6- Programming A argument is only possible during the clamping cycle and is
optional.
7- If K value is omitted, the default vale will be 10 mm. This value is only
effective on clamping cycle.
8- J value is optional, and is only effective during the releasing cycle its default
value, when B is not programmed, is: 0 mm.
9- When programming B on a releasing cycle, the J argument is optional. If J
is not programmed, the tailstock will go to B position programmed on G0
from the clamping position.
10- If B and J are programmed on a releasing cycle, the tailstock is retracted J
mm on G1 and then will go to B coordinate value programmed on G0.
11- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
EXAMPLE
Clamping a workpiece on main head.
Workpiece push (torque) against centre piece is checked during workpiece clamping
operation.
The X, Z and B axes moving at the same time.
The tailstock is advanced to the B-position (-425.8+5=-420.8mm) on
G0, as K is 5 and B is –425.8. From this position, the tailstock is
advanced on G1 until reaching the torque, with F700mm/min, as S is
700.
After executing the part-clamping-movement, the new T code will be
executed.
The part will be clamping, if the B-axis position is between (B, B-Q].
If the B-axis final position is greater than “B-Q” (in the example,
-424.8mm), the alarm 3011 PART NOT CLAMPED will appear.
If the B-axis final position is less or equal to “B” (in the example,
-425.8mm), the alarm 3011 PART NOT CLAMPED will appear.
G97 S1000 M03..........................................Main head rotates at 1000 rpm
G99;............................................................Advance per revolution.
It will be moved 10 mm out from the workpiece, as J is 10; with F1200
mm/min.
Then it will be retracted on G0 to the X, Z and B coordinate values.
M30;
Page 82
PROGRAMMING MANUAL -82-
COMMAND
8.4G384,G380 Rigid threading cycle
For threading operations, X- or Z-axis displacement per revolution of powered tool must be
equal to thread pitch.
To ensure that an accurate thread pitch is achieved, axis feed (X- or Z-axis) and powered tool
speed must be continuously synchronised.
A rigid threading cycle is disabled by entering G380 in the program.
Commands G384 and G380 can be only used on machines equipped with
powered tool.
< Rigid threading cycle on front end >
G384 X_C_Z_
H_R_F_S_D_M_E_Q_A_T2(T3);
< Rigid threading cycle on a side >
G384 X_C_Z_
H_R_F_S_D_M_E_Q_A_T1;
G380;
- G384..............Enables a rigid threading cycle
- G380..............Disables a rigid threading cycle
- X,Z,C..............Absolute command for positioning the tool in front of hole
centre.< Rigid threading on front end >
- R....................Used to set R point position (incremental value).
- H....................Specifies the position of hole bottom on X- or Z-axis from
point R (incremental value)
- F....................Used to set thread pitch (mm).
- S....................Used to set tool lead-in speed (min-1).
- D....................Used to set tool lead-out speed (min-1).
- A....................Specifies the command for t code, for selecting a new tool.
- M....................Used to activate head brake.
M50.............Brake of head or head 1.
M250...........Brake of head 2.
- T....................Used to set threading direction.
T1................Direction according to X-axis (threaded radial).
T2................Direction according to Z-axis (threaded axial <head 1>).
T3................Direction according to Z-axis (threaded axial <head 2>).
- Transmission ratio powered tool holder
E.................Tool holder input speed
Q.................Tool holder output speed.
If you press emergency stop or RESET pushbutton when a threading cycle is being executed, special attention
should be paid to axis movements, as otherwise damage could be
caused to the machine or workpiece. Executing G380 in MDI
Page 83
PROGRAMMING MANUAL -83-
1- For a threading cycle, axis and head override will be set to 100%.
2- Dry Run function is not available when a threading cycle is being executed.
3- Ensure that powered tool and head are stopped prior to executing a threading
cycle.
4- As axes and tool are synchonised, using a floating tap will not be required.
5- Powered tool speed will be limited when using a rigid threading cycle.
6 Positioning of X-, Z- and C-axis is performed on G0 simultaneously on the 3
axes. This movement is carried out when calling the cycle for the first time.
For subsequent calls, only a single coordinate value is possible. X or Z or C.
7- G384 function is programmed in all blocks requiring a rigid threading cycle. H,
R, F, S, D, M, Q, E, A and T values must not be entered in the second block in
which a rigid threading cycle is programmed, as well as in all subsequent
blocks. Only the position at which a threading operation is to be carried out must
be entered.
8- H argument is the distance from R point to hole bottom.
9- Entering the number of repeats for a rigid threading cycle is not permitted.
10- A rigid threading cycle enabled with G384 must be disabled with G380.
If another fixed cycle is entered without previously disabling a rigid threading
cycle, an alarm message (No. 3011) will be displayed. Indexing the turret with a
T command during a rigid threading cycle is not permitted.
If another fixed cycle is specified without previously cancelling the rigid threading
cycle, a collision between tool and workpiece may occur.
11- During a rigid threading cycle, turret indexing by means of command T is
carried out when starting the cycle and before positioning the axes.
12- If no D value is specified, tool lead-in and lead-out speed will be that
specified for S.
13- If neither M50 nor M250 is specified, there will be no head braking.
14- T3 value must be only specified for machins equipped with a sub-head (S).
This value must not be used to perform a front threading operation on a
workpiece located on the sub-head.
15- Commnad M250 will be only valid if a T3 value is specified.
16- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
Page 84
PROGRAMMING MANUAL -84-
EXAMPLE
Programming using G384 and G380
A rigid threading cycle (G384) (pitch: 2 mm; depth: 20 mm) is to be carried out for holes 1 to 6.
Infeed
Rapid displacement
Z30.0
(Initial point)
Normal rotation
Reverse rotation
Z15.0
(R point)
0.1 s dwell time on hole bottom
Movements for G384 on 1 - 6
O0001;
N1;
G98;........................................Advance per minute
M80;........................................C-axis on main head is activated
G28 H0;..................................Go to C-axis reference point
G97;........................................Constant head speed control is activated
The axes are positioned on point 1 (X150, Z30, C30) at quick speed (G0).
- H20.0...........Position of hole bottom (from R)
- R15.0...........Position of R point (from initial point)
- F2.0.............Pitch: 2mm
- S300............Lead-in speed of powered tool: 300 min
- D600............Lead-out speed of powered tool: 600 min
- M50.............Main head brake
- T2................Threading direction (Z-axis direction <main head>)
- A101............Calling tool 01 with corrector 01.
-1
-1
When moving from initial point to R point, powered tool
rotation is stopped.
Page 85
PROGRAMMING MANUAL -85-
G384 C90.0;
G384 C150.0;
G384 C210.0; ...............
G384 C270.0;
G384 C330.0;
G380;......................................Rigid threading cycle is disabled (G384)
G00 X200.0 Z100.0 M05;........Powered tool is stopped.
M81;........................................C-axis is disabled.
G99;........................................Advance per revolution.
M30;
A rigid threading cycle (G384) is executed on
points 2 to 6
Page 86
PROGRAMMING MANUAL -86-
8.4.1 Calibrating of tailstock pushing force.
G138 and G238 allow the calibrating of the tailstock pushing force through the variable #130.
When an argument T [Kgf] is programmed for this G function (limit of B axis pushing force),
the tailstock makes this force against the workpiece.
If a force meassurement device is installed between the spindle and the automatic tailstock, as
can be seen on next figure, the force made by the tailstock could be read. This force should be
the same as the one programmed on by the T argument.
Fig. 1.3.1
To calibrate this force, the variable #130 of the program O9016 (for the cycle G138), or the
program O9015 (for the cycle G238) can be introduced from the keyboard, until both
measurements are the same.
The initial #130 is introduced by the manufacturer during the machine
verification process.
If the bit 4 in the parameter 3202 takes the value of “1”, the edition of registered
programs O9000 to O9999 will not be possible.
Page 87
8.5G384,G380 Rigid threading cycle
COMMAND
For threading operations, X- or Z-axis displacement per revolution of powered tool must be
equal to thread pitch.
To ensure that an accurate thread pitch is achieved, axis feed (X- or Z-axis) and powered tool
speed must be continuously synchronised.
A rigid threading cycle is disabled by entering G380 in the program.
Commands G384 and G380 can be only used on machines equipped with
powered tool.
< Rigid threading cycle on front end >
G384 X_C_Z_
H_R_F_S_D_M_E_Q_A_T2(T3);
< Rigid threading cycle on a side >
PROGRAMMING MANUAL -87-
G384 X_C_Z_
H_R_F_S_D_M_E_Q_A_T1;
G380;
- G384..............Enables a rigid threading cycle
- G380..............Disables a rigid threading cycle
- X,Z,C..............Absolute command for positioning the tool in front of hole
centre.< Rigid threading on front end >
- R....................Used to set R point position (incremental value).
- H....................Specifies the position of hole bottom on X- or Z-axis from
point R (incremental value)
- F....................Used to set thread pitch (mm).
- S....................Used to set tool lead-in speed (min-1).
- D....................Used to set tool lead-out speed (min-1).
- A....................Specifies the command for t code, for selecting a new tool.
- M....................Used to activate head brake.
M50.............Brake of head or head 1.
M250...........Brake of head 2.
- T....................Used to set threading direction.
T1................Direction according to X-axis (threaded radial).
T2................Direction according to Z-axis (threaded axial <head 1>).
T3................Direction according to Z-axis (threaded axial <head 2>).
- Transmission ratio powered tool holder
E.................Tool holder input speed
Q.................Tool holder output speed.
If you press emergency stop or RESET pushbutton when a threading cycle is being executed, special attention
should be paid to axis movements, as otherwise damage could be
caused to the machine or workpiece. Executing G380 in MDI
Page 88
PROGRAMMING MANUAL -88-
1- For a threading cycle, axis and head override will be set to 100%.
2- Dry Run function is not available when a threading cycle is being executed.
3- Ensure that powered tool and head are stopped prior to executing a threading
cycle.
4- As axes and tool are synchonised, using a floating tap will not be required.
5- Powered tool speed will be limited when using a rigid threading cycle.
6 Positioning of X-, Z- and C-axis is performed on G0 simultaneously on the 3
axes. This movement is carried out when calling the cycle for the first time.
For subsequent calls, only a single coordinate value is possible. X or Z or C.
7- G384 function is programmed in all blocks requiring a rigid threading cycle. H,
R, F, S, D, M, Q, E, A and T values must not be entered in the second block in
which a rigid threading cycle is programmed, as well as in all subsequent
blocks. Only the position at which a threading operation is to be carried out must
be entered.
8- H argument is the distance from R point to hole bottom.
9- Entering the number of repeats for a rigid threading cycle is not permitted.
10- A rigid threading cycle enabled with G384 must be disabled with G380.
If another fixed cycle is entered without previously disabling a rigid threading
cycle, an alarm message (No. 3011) will be displayed. Indexing the turret with a
T command during a rigid threading cycle is not permitted.
If another fixed cycle is specified without previously cancelling the rigid threading
cycle, a collision between tool and workpiece may occur.
11- During a rigid threading cycle, turret indexing by means of command T is
carried out when starting the cycle and before positioning the axes.
12- If no D value is specified, tool lead-in and lead-out speed will be that
specified for S.
13- If neither M50 nor M250 is specified, there will be no head braking.
14- T3 value must be only specified for machins equipped with a sub-head (S).
This value must not be used to perform a front threading operation on a
workpiece located on the sub-head.
15- Commnad M250 will be only valid if a T3 value is specified.
16- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
Page 89
PROGRAMMING MANUAL -89-
EXAMPLE
Programming using G384 and G380
A rigid threading cycle (G384) (pitch: 2 mm; depth: 20 mm) is to be carried out for holes 1 to 6.
Infeed
Rapid displacement
Z30.0
(Initial point)
Normal rotation
Reverse rotation
Z15.0
(R point)
0.1 s dwell time on hole bottom
Movements for G384 on 1 - 6
O0001;
N1;
G98 (G94);..............................Advance per minute
M80;........................................C-axis on main head is activated
G28 H0;..................................Go to C-axis reference point
G97;........................................Constant head speed control is activated
The axes are positioned on point 1 (X150, Z30, C30) at quick speed (G0).
- H20.0...........Position of hole bottom (from R)
- R15.0...........Position of R point (from initial point)
- F2.0.............Pitch: 2mm
- S300............Lead-in speed of powered tool: 300 min
- D600............Lead-out speed of powered tool: 600 min
- M50.............Main head brake
- T2................Threading direction (Z-axis direction <main head>)
- A101............Calling tool 01 with corrector 01.
-1
-1
When moving from initial point to R point, powered tool
rotation is stopped.
Page 90
PROGRAMMING MANUAL -90-
COMMAND
G384 C90.0;
G384 C150.0;
G384 C210.0; ...............
G384 C270.0;
G384 C330.0;
G380;......................................Rigid threading cycle is disabled (G384)
G00 X200.0 Z100.0 M05;........Powered tool is stopped.
M81;........................................C-axis is disabled.
G99 (G95);..............................Advance per revolution.
M30;
A rigid threading cycle (G384) is executed on
points 2 to 6
8.5.1 G100 Tailstock connect joint
When performing center-work, G100 Z_ moves the saddle to the position where the tailstock
can be connected to the saddle and then to the specified positioning point (Z_).
The G100 command can be used only with the programmable tailstock
specification machine.
G100 Z_ or G100 I1;
G100 …. Calls the tailstock connect joint mode
Z ……… Specifies the distance between the chuck face and the tailstock.
I1 ……… Specifies moving the tailstock to the parking position.
1/ Specify the G100 command independently in a block without other
commands.
2/ Specify the coordinate value of the tailstock positioning point (Z) in mm.
3/ For address Z, specify a numeric value with a decimal point.
4/ In order to get the tailstock out from the parking position the G100Z_
command should be commanded.
To execute the G100 command, the following conditions must be satisfied:
The main spindle or the rotary tool spindle is stopped.
The turret head index has completed.
The tailstock spindle is in the IN position.
During setup operation, it is recommended to record the position(s) where the
tailstock should be positioned and the position where the tailstock should be
returned after the completion of machining. The coordinate values must be
specified in the machine coordinate system.
Page 91
<Operation flow chart for G100>
EXAMPLE
<Macro program>
Positioning of the saddle to the tailstock joint position.
PROGRAMMING MANUAL -91-
...
G100 Z_;
...
Execution of M27 (tailstock body unclamp; joint pin extends from the
tailstock body to connect with the saddle).
Z_ (positioning of the tailstock at the position specified by Z_)
Execution of M28 (joint pin extracts from saddle to release the
tailstock body from the saddle ; tailstock body clamp).
Programming using G100
O0005;
N1;
G100 Z_; …………………………. Moving the tailstock to the position specified by Z_ (value in
mm).
M25; ……………………………… The tailstock spindle moves OUT to hold the workpiece by
the tailstock spindle center.
G04 U_; …………………………... Calling for dwell to allow positive support of the workpiece by
the tailstock spindle center.
G50 S1000:
T0101:
G96S100M03;
...
Machining program
…
G28 U0; …………………………. Machine zero return of X-axis to avoid interference with the
tailstock.
M05;
M26; …………………………….. The tailstock spindle moves IN.
G04 U_; …………………………. Calling for dwell to allow tailstock spindle to correctly extract
into the tailstock body.
G100 Z_; ………………………… Moving the tailstock to the previously located position,
specified by Z_ (value in mm).
…
Page 92
PROGRAMMING MANUAL -92-
COMMAND
8.5.2 G101 Tailstock connect joint
When performing center-work, G101 moves the saddle to the position where the tailstock can
be connected to the saddle and then the tailstock can be commanded to a working point.
The G101 command can be used only with the programmable tailstock
specification machine.
G101;
G101 …. Calls the tailstock connect joint mode
1/ Specify the G101 command independently in a block without other
commands.
To execute the G101 command, the following conditions must be satisfied:
The main spindle or the rotary tool spindle is stopped.
The turret head index has completed.
The tailstock spindle is in the IN position.
When programing G101 to get out the tailstock from park position, the joint hole
doesn’t change and the tailstock is coupled to the 2nd hole.
During setup operation, it is recommended to record the position(s) where the
tailstock should be positioned and the position where the tailstock should be
returned after the completion of machining. The coordinate values must be
specified in the machine coordinate system.
<Operation flow chart for G101>
<Macro program>
...
G101;
...
Positioning of the saddle to the tailstock joint position.
Execution of M27 (tailstock body unclamp; joint pin extends from the
tailstock body to connect with the saddle).
Page 93
PROGRAMMING MANUAL -93-
EXAMPLE
Programming using G101
O0005;
N1;
G101; …………………………. Moving the Z axis to the position where the tailstock was left.
G1Z_F100; ……………………….. Approuch the tailstock to the part with the Z-axis.
M28; ………………………..… Uncouple and clamp the tailstock.
M25; ……………………………… The tailstock spindle moves OUT to hold the workpiece by
the tailstock spindle center.
G04 U_; …………………………... Calling for dwell to allow positive support of the workpiece by
the tailstock spindle center.
G50 S1000:
T0101:
G96S100M03;
...
Machining program
…
G28 U0; …………………………. Machine zero return of X-axis to avoid interference with the
tailstock.
M05;
M26; …………………………….. The tailstock spindle moves IN.
G04 U_; …………………………. Calling for dwell to allow tailstock spindle to correctly extract
into the tailstock body.
G101; …………………………. Moving the Z axis to the position where the tailstock was left.
G1Z_F100; ……………………… Moving the tailstock to the previously located position
specified by Z_ (absolute coordinate value).
M28; ………………………… Uncouple and clamp the tailstock.
…
Page 94
PROGRAMMING MANUAL -94-
COMMAND
9.M functions made by CMZ.
In this chapter, the description of some M functions that have been programmed by CMZ can
be found
9.1M23,M24 Angular or straight thread runout
(1) Angular runout (M23)
(2) Straight runout (M24)
M23; ............ Used for angular runout.
M24; ............ Used for straight runout (disables angular runout).
M23 and M24 codes are used to specify an
angular or straight runout respectively for fixed
threading cycles.
If the thread is not relieved at the thread end, as
shown on the top left figure, a M23 function must
be programmed (aungular runout.
M24 function is used for threads relieved at the
thread end, as shown on the bottom left figure
(straight runout)
U/2 distance must be greater than
angular runout length ( r ). Refer to
bottom left figure.
Special care should be taken to prevent any interference between
workpiece and tool when using an angular runout.
As shown in the figure, r distance is programmed by means of parameter 5130.
Runout angle will be 45º.
Page 95
9.2M33, M34, M36 Synchronising operation
COMMAND
M33 function is used to synchronise only head
and sub-head speed.
M34 function is used to synchronise head and
sub-head phase and speed.
M36 function disables the synchronisation mode.
M33; ............ Speed synchronisation.
M34; ............ Phase and speed synchronisation.
M36; ............ Synchronisation mode disabled.
PROGRAMMING MANUAL -95-
M33, M34 and M36 commands are
only used on machines equipped
with a sub-head (S).
1- For transferring a workpiece from main head to sub-head, head and subhead speed must be synchronised by means of M33 command. If the workpiece
is transferred without activating the synchronisation mode, scratching of
workpiece could result.
2- For transferring an hexagonal bar, head and sub-head phase and speed
must be synchronised by means of M34 command, as otherwise the transfer
operation will not be possible.
3- M36 function should be only programmed after completing a cutting cycle or
when chucks on main head and sub-head are open.
4- If a M34 function is programmed with sub-head jaws closed, alarm message
FM 102 will be displayed.
5- M5 function must not be programmed when phase and/or speed
synchronisation mode is activated. M5 function will disable the synchronisation
mode.
M34 function can de also used for round parts, but considering that phase (and
speed) synchronisation time is longer and speed synchronisation time, using
M33 function is recommended when machining round parts.
Page 96
PROGRAMMING MANUAL -96-
EXAMPLE
Program with M34 and M36 (1)
These functions are used when the workpiece on main head is to be transferred to sub-head
with the synchronisation mode activated.
O0001;
Machining program.
(machining operation on main head)
N5;
G97 S1000 M03;.....................Main head rotates at 1000 min-1.
M34;........................................Phase and speed synchronisation.
M211;......................................Sub-head jaws are opened.
After synchronising the phases, head and subhead speed is synchronised to 1000 min-1.
Sub-head rotates at 1000 min-1 in reverse direction with jaws
open.
During the synchronisation, heads can be rotated
with jaws open.
G53 B-_;.................................Sub-head is moved to limit point on B-axis (machine co-
ordinates)
(First approach)
G98 G01 B-_F1000;................Sub-head is approached to workpiece at a speed of 1000
mm/min
(Second approach)
G38 J_K_F_Q_;......................Workpiece push is detected.
Includes clamping of workpiece on sub-head.
G99;........................................Advance per revolution.
Machining program).
(Cutting operation)
M36;........................................Synchronisation mode is disabled
Sub-head is stopped while main head continues
rotating at programmed speed.
G28 B0;...................................Sub-head is returned to reference point on B-axis.
M01;
Page 97
PROGRAMMING MANUAL -97-
EXAMPLE
Program with M33 and M36 (2)
These functions are used when the workpiece on main head is to be transferred to sub-head
with the synchronisation mode activated.
O0001;
Machining program.
(machining operation on main head)
N5;
G97 S1000 M03;.....................Main head rotates at 1000 min-1.
Head and sub-head speed is synchronised to
1000 min-1.
M211;......................................Sub-head jaws are opened.
Sub-head rotates at 1000 min-1 in reverse direction with jaws
open.
During the synchronisation, heads can rotate with
jaws open.
G53 B-_;.................................Sub-head is moved to limit point in B-axis (machine co-
ordinates)
(First approach)
G98 G01 B-_F1000;................Sub-head is approached to workpiece at 1000 mm/min
(Second approach)
G38 J_K_F_Q_;......................Workpiece push is detected.
Includes clamping of workpiece on sub-head.
G99;........................................Advance per revolution.
Machining program.
(Cutting operation)
M36;........................................Synchronisation mode is disabled
Sub-head is stopped while main head continues
rotating at programmed speed.
G28 B0;...................................Sub-head is returned to reference point on B-axis
M01;
Page 98
PROGRAMMING MANUAL -98-
COMMAND
COMMAND
9.3Spindles windings selection
The inetegrated spindles of machines TS and TS-Compact have two windings. By default the
selection of the spindles windings is automatic in the machine. But they can be selected using
the appropiate M codes in the part programm.
M310;............Automatic selection of main spindle windings.
M311; ..........Star-winding selection in main spindle.
M312; ..........Delta-winding selection in main spindle.
M320;...........Automatic selection of windongs in subspindle.
M321; ..........Star-winding selection in subspindle.
M322; ..........Delta-winding selection in subspindle.
In order to avoid any damage on machine, the work piece and the tools
and to make a correct machining of the work piece, is very important to
know the the torque and power characteristics of the wondings of the
spindles before executing any of the M codes described before.
Please look up the specifications manual sent with the machine.
1.- In machines without subspindle no execution of M320, M321 or M322 is
executed.
9.4M40 Detection of cut workpiece
M40 function is used to check whether the cutting cycle on the workpiece transferred from
main head to sub-head is completed.
A cutting cycle is considered completed when sub-head speed is different to main head speed.
M40; ............ Detection of cut workpiece.
1.- M40 function can be only used on machines equipped with a sub-head (S).
2.- If the cutting cycle is not completed after executing a M40 function, the two
heads are stopped and alarm message FM41 (Cutting cycle not completed)
displayed.
3.- If a M40 function is executed with head synchronisation mode activated, the
head with the rotation is initiated (M3, M4, M203, M204) will rotate at
programmed speed. The other head will be stopped.
4.- Even though a M40 function disables head synchronisation, the operation
synchronisation mode is not disabled. Always enter a M36 function after
entering a M40 function in the program.
Page 99
O0001;
EXAMPLE
PROGRAMMING MANUAL -99-
Program with M40
Machining program
(Machining operation on main head)
N5;
G97 S1000 M03;.....................Main head rotates at 1000 min
-1
M33;........................................Speed synchronised in both heads.
M211;
Workpiece transfer
G99 G00 X42.0 M08;..............Advance per revolution
G01 X-06 F0.08;.....................Cutting cycle. Workpiece cut to X-0.6 at a feed speed of 0.08
mm/sec.
G28 U0 M09;
M40;........................................Detection of cut workpiece
Main head rotates at 1000 min-1 and sub-head is
stopped.
G28 W0;
M36;........................................Head synchronisation mode is disabled
G28 B0;...................................Sub-head is returned to reference point on B-axis.
M01;
Page 100
PROGRAMMING MANUAL -100-
COMMAND
9.5M73, M74 Workpiece collector IN/OUT
When a M73 function is executed, workpiece collector is moved to a position under the chuck
in order to collect the finished workpiece.
When a M74 function is executed, workpiece collector returns to a position near machine door
for ejection of finished part.
If you try opening machine door, workpiece collector will be retracted to a position allowing the
door to be easily opened.
M73; ............ Workpiece COLLECTION.
(Workpiece collector IN)
M74; ............ Workpiece EJECTION.
(Workpiece collector OUT)
1.- Before executing a M73 function, ensure that the turret is out the
interference area with workpiece collector.
2.- Singly programming a M73 or M74 function in a block without any
other command and entering a G04 function in the next block, will allow
workpiece collector movements to be completed without any
interference.
If a G04 function is not entered in the next block, next block can be
started with workpiece collector not having completed its movements
and thus with a risk of collision.
G04 time period must be longer than the time required for collecting and
ejecting the workpiece. It should be taken also into account that this
time period will depend on air pressure.
3.- If workpiece weight or volume exceeds the capacity of workpiece
collector, do not use it, as otherwise damages could be caused to the
machine.
1.- On machines equipped with a sub-head (S), don not enter a M73 function in
the program if there is any risk of collision with sub-head body.
2.- On machines equipped with a sub-head (S), B-axis displacement is not
permitted when workpiece collector is in collection position.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.