Escolar Documentos
Profissional Documentos
Cultura Documentos
( G codes type A )
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.
MEANING OF SYMBOLS
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.
<Other Symbols>
COMMAND
The format identified by this symbol provides information on programming.
Indicates the manual or page number to which you should be referred to find
further information on the topic in question.
Indicates the manual or page number to which you should be referred to find further information on the
topic in question........................................................................................................................................ 3
1. BASIC CONCEPTS............................................................................................................................. 24
Refer to operation manual for further information on this subject, chapter B, point 3: SELECTING THE
COORDINATE SYSTEM......................................................................................................................... 24
If the machine is provided with a subhead, C1 would be for the main head and C2 for the subhead.....25
n= Rpm limit........................................................................................................................................... 25
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
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
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
Comment:............................................................................................................................................... 29
These notes are totally optional, and it is up to the programmer to enter them or not............................ 29
These notes will be always placed in brackets () in order to prevent the program reading them. ...........29
T101 29
Here is shown that the tool to be used is in position 1 and a correction value of 01 is applied...............29
T0101 could be also entered, as the four mandatory characters are present, however, the first zero is
optional.................................................................................................................................................... 29
M4 M200 M8.......................................................................................................................................... 29
It is always advisable to switch chip conveyor and coolant on at the start of the program, excepting for
special cases........................................................................................................................................... 29
G0 X150 Z150........................................................................................................................................ 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
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
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................................................................................................... 29
Entering codes such as G96 and G50 in the same line is not permitted................................................. 29
In this example you can see that the first pass (N10 to N50) is carried out letting part of the machining
PROGRAMMING MANUAL -6-
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...................................................................... 30
As seen in this example, G2 is used to machine radii in clockwise direction and G3 in counterclockwise
direction................................................................................................................................................... 32
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
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
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
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
4. THREADING....................................................................................................................................... 45
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................................................................................................ 46
When retapping threads, do not release the workpiece, do not change the speed and do not change the
start point................................................................................................................................................ 46
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
At the end of each cycle sequence the machine is always positioned in the position at which this cycle
sequence was started.............................................................................................................................. 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
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
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
subtracted............................................................................................................................................... 53
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.................................................................................................................. 55
PROGRAMMING MANUAL -8-
Command and tool displacement tables are included in paragraph 13.6 of Fanuc Manual, part 1/2......58
The easier procedure is drawing a quadrant on the drawing and locate the degrees as shown on the
above diagram......................................................................................................................................... 58
Finishing on (P3):................................................................................................................................... 60
You can program two angles with 2 radii or bevels as a maximum. ....................................................... 60
For further information on this subject, refer to section 14 on Fanuc manual, part 1/2........................... 60
All cycles ends where they are started and, because of this, finishing positioning is done above the
workpiece................................................................................................................................................ 66
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”. ........................... 68
Roughing cycles are without tool radius compensation. Because of this, higher allowances will be
specified for X and Z depending on tool radius........................................................................................ 68
G38 B (J)_K_F_Q_;................................................................................................................................ 76
- 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
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
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
sub-head chuck....................................................................................................................................... 76
5- If any cycle argument is erroneous, the following alarm message will be displayed: ......................... 76
Machining program................................................................................................................................. 77
G0 B-_; Sub-head moved to B position (approach point) (machine co-ordinate system) (First approach)
77
G98 G01 B-_F1000; Sub-head approached to workpiece at 1000 mm/min-1 (Second approach).........77
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............................................................................................. 79
If S value is omitted, the default advance value on clamping will be: ..................................................... 80
200 mm/min........................................................................................................................................... 80
1500 mm/min......................................................................................................................................... 80
If the B-axis final position is less or equal to “B” (in the example, -425.8mm), the alarm 3011 PART NOT
PROGRAMMING MANUAL -10-
Commands G384 and G380 can be only used on machines equipped with powered tool..................... 83
G384 X_C_Z_........................................................................................................................................ 83
H_R_F_S_D_M_E_Q_A_T2(T3);........................................................................................................... 83
G384 X_C_Z_........................................................................................................................................ 83
H_R_F_S_D_M_E_Q_A_T1;................................................................................................................. 83
G380;83
- X,Z,C Absolute command for positioning the tool in front of hole centre.< Rigid threading on front end
> 83
- H Specifies the position of hole bottom on X- or Z-axis from point R (incremental value) .................... 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
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
permitted................................................................................................................................................. 84
If another fixed cycle is specified without previously cancelling the rigid threading cycle, a collision
between tool and workpiece may occur................................................................................................... 84
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................................................................................................ 84
12- If no D value is specified, tool lead-in and lead-out speed will be that specified for S....................... 84
13- If neither M50 nor M250 is specified, there will be no head braking................................................. 84
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............................ 84
16- If any cycle argument is erroneous, the following alarm message will be displayed:........................ 84
When moving from initial point to R point, powered tool rotation is stopped........................................... 85
Commands G384 and G380 can be only used on machines equipped with powered tool..................... 88
G384 X_C_Z_........................................................................................................................................ 88
H_R_F_S_D_M_E_Q_A_T2(T3);........................................................................................................... 88
G384 X_C_Z_........................................................................................................................................ 88
H_R_F_S_D_M_E_Q_A_T1;................................................................................................................. 88
G380;88
- X,Z,C Absolute command for positioning the tool in front of hole centre.< Rigid threading on front end
> 88
- H Specifies the position of hole bottom on X- or Z-axis from point R (incremental value) .................... 88
1- For a threading cycle, axis and head override will be set to 100%..................................................... 89
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
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
permitted................................................................................................................................................. 89
If another fixed cycle is specified without previously cancelling the rigid threading cycle, a collision
between tool and workpiece may occur................................................................................................... 89
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................................................................................................ 89
12- If no D value is specified, tool lead-in and lead-out speed will be that specified for S....................... 89
13- If neither M50 nor M250 is specified, there will be no head braking................................................. 89
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............................ 89
16- If any cycle argument is erroneous, the following alarm message will be displayed:........................ 89
When moving from initial point to R point, powered tool rotation is stopped........................................... 90
The G100 command can be used only with the programmable tailstock specification machine. ............91
PROGRAMMING MANUAL -14-
Z ……… Specifies the distance between the chuck face and the tailstock. ............................................ 91
2/ Specify the coordinate value of the tailstock positioning point (Z) in mm. ........................................... 91
4/ In order to get the tailstock out from the parking position the G100Z_ command should be
commanded............................................................................................................................................ 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
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
U/2 distance must be greater than angular runout length ( r ). Refer to bottom left figure. ..................... 95
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
displayed................................................................................................................................................. 96
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
round parts.............................................................................................................................................. 96
Machining program................................................................................................................................. 97
After synchronising the phases, head and sub-head speed is synchronised to 1000 min-1................... 97
G53 B-_; Sub-head is moved to limit point on B-axis (machine co-ordinates) ........................................ 97
PROGRAMMING MANUAL -16-
G98 G01 B-_F1000; Sub-head is approached to workpiece at a speed of 1000 mm/min ...................... 97
Machining program)............................................................................................................................... 97
Machining program................................................................................................................................. 98
Machining program................................................................................................................................. 98
1.- M40 function can be only used on machines equipped with a sub-head (S)..................................... 99
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............................................................... 99
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.........99
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. ....................... 99
G01 X-06 F0.08; Cutting cycle. Workpiece cut to X-0.6 at a feed speed of 0.08 mm/sec. ................... 100
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................................................................................................. 101
2.- On machines equipped with a sub-head (S), B-axis displacement is not permitted when workpiece
collector is in collection position............................................................................................................. 101
G53 B_; Sub-head is moved to the position at which the workpiece is collected by workpiece collector.
PROGRAMMING MANUAL -18-
102
B-axis co-ordinate value will be the position at which the workpiece is released from the sub-head
without causing any interference with workpiece collector, turret, etc.................................................... 102
1.- Commands M210 and M211 (open and close sub-head jaws respectively) cannot be executed when
a workpiece collection cycle is being executed...................................................................................... 105
2.- The following operations, if programmed when a workpiece collection cycle is activated, will be
executed at the end of workpiece collection cycle:................................................................................ 105
3.- Programming a M432 will not be permitted in there is any interference of B-axis with workpiece
collector................................................................................................................................................. 105
4.- If a M432 is programmed in a block together with a displacement of B-axis, workpiece collection
cycle will be executed after the required B-axis displacement is completed.......................................... 105
G53 B_; Sub-head is moved to the position at which workpiece collector collects the workpiece. .......106
B-axis co-ordinate value will be the position on B-axis at which the workpiece is released from the sub-
head, without causing any interference with workpiece collector, turret, etc.......................................... 106
G04 U_; Time delay to allow properly opening main head jaws............................................................ 106
G04 U_; Time delay to allow properly clamping a new workpiece on main head.................................. 106
If a rear chip conveyor is installed, M200 and M201 codes switch on and off cleaning fluid, respectively,
further to starting and stopping the chip conveyor................................................................................. 107
In this case, chip conveyor operation time entered on parameter screen does not affect cleaning fluid
pump operation..................................................................................................................................... 107
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
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
Through-coolant supply will be only activated with machine door closed.............................................. 108
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
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
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
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 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
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
programmer........................................................................................................................................... 124
Approach operation is omitted. The programmer is responsible for entering correct values. ...............125
Those functions which require to be executed that a function in the same block will be previously
executed must not be entered in the same block.................................................................................. 127
For instance, neither “M80 M83” nor “M81 M85” must be entered in the same block, as M83 and M85
require that M80 and M81 respectively will be previously executed....................................................... 127
Do not enter “M70 M30”, but “M30 M70” (cycle end and door opening)............................................... 127
The approach operation is only an example. The programmer is responsible for entering correct values.
129
130
The approach operation is only an example. The programmer is responsible for entering correct values.
130
In this example the machining operations include facing, axial drilling and.......................................... 131
131
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
PROGRAMMING MANUAL -23-
1. BASIC CONCEPTS
X+
Z- Z+ B- B+
X-
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).
You may also operate X+ Z+ quadrant when the workpiece is clamped on the subhead.
PROGRAMMING MANUAL -24-
1.1.2 C-axis
C-axis would be used to swivel the head in order to C- C+
position the workpiece for drilling operations using a
powered tool.
B: displacement axis used to approach the subhead to main head or move it away.
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.
As you can see, two variants are available “,C” and “,A” with a leading comma
to differentiate them from C- and A-axis
PROGRAMMING MANUAL -25-
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
For machines with presetter, place the presetter in position and preset the tool.
Refer to operation manual for further information on this subject, chapter B,
point 4: OPERATION PROCEDURE FOR MANUAL TOOL PRESETTER
INTEGRATED IN THE MACHINE
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.
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.
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.
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 2nd
machining stage.
PROGRAMMING MANUAL -27-
1.4 Facing
BBD 210 O0001;
N10 G10 P0 Z-103;
N20 T101 (FACING);
N30 G50 S2000 (LIMIT R.P.M.);
N40 G96 G99 S200 F.25 M4 M200 M8
(CUTTING CONDITIONS, CHIP
CONVEYOR AND COOLANT
ACTIVATION);
N50 G0 X45 Z0 (APROXIMATION)
N60 G1 X-2;
N70 G0 X150 Z150;
N80 M30;
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.
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.
BBD 210
Pass
Pass
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.
PROGRAMMING MANUAL -30-
BBD 210
O0003;
N10 G10 P0 Z-85; Part zero at -85
N20 T606; Tool 06 offset 06
N30 G50 S2000; Turning speed limit: 2000 r.p.m.
N40 G96 G99 S180 F.2 M4 M8 M200; Cutting speed =180 mm/rev, feedrate 0.2 mm/rev,
clockwise sense
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
1.7 Radii
BBD 210
G2 G3
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;
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
Z-100 clockwise
N90 G1 Z-105; Machining to Z-105
N100 G0 X150;
N110 Z10
N120 M30;
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).
PROGRAMMING MANUAL -33-
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.
PROGRAMMING MANUAL -34-
Tools:
T1= Outside and facing.
T2= ø15 twist drill.
T3= Inside.
O0007;
N10 G10 P0 Z-74;
N20 T101 (EXTERNAL); Tool 1
External machining
N30 G50 S2500;
N40 G96 S220 G99 F.25 M4 M8 M200; Clockwise turning
N50 G0 X35 Z0;
N60 G1 X-2;
N70 G0 X26 Z2;
N80 G1 Z0;
N90 X28 Z-1 F.2;
N100 Z-18 F.25;
N110 X32;
N120 G0 X150 Z200 M5; Remove axes and stop spindle
N130 T202 (BROCA DE 15); Tool 2
N140 G97 S600 G99 F.15 M3; Fixed turn. speeds, Count.clockwise
Boring
N150 G0 X0 Z3;
N160 G1 Z-47;
N170 G0 Z100 M5; Remove axes and spindle stop
N180 T303 (INTERIOR); Tool 3
N190 G96 S150 G99 F.25 M4; Clockwise turning
Inside machining
2. G FUNCTIONS
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.
Type Description
Non-modal G code The G code is valid within the block in which it was
(Group 00, excepting G10 and G11) programmed
Modal G code The G code will remain valid until another G code of
(Groups other than 00) the same group is programmed.
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.
4.- G codes marked with % are activated by default when CNC is started or
RESET key pressed.
PROGRAMMING MANUAL -36-
G Code
Group Function Remarks
A B C
% G00 G00 G00 Positioning (fast feedrate) )
G Code
Group Function Remarks
A B C
G32 G33 G33 Threading )
01
G34 G34 G34 Variable pitch threading )
% G50.2
(G250)
G50.2
(G250)
G50.2
(250)
Polygonal turning. Disable x5
20
G51.2 G51.2 G51.2
Polygonal turning x5
(G251) (G251) (G251)
G52 G52 G52 Defining local co-ordinate system +
00
G53 G53 G53 Defining machine co-ordinate system +
G Code
Group Function Remarks
A B C
G83 G83 G83 Drilling cycle on front face +2
3. M FUNCTIONS
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.
4. THREADING
BBD 210
PROGRAMMING MANUAL -45-
O0008;
N10 G10 P0 Z-95;
N20 T101 (Surfacing);
N30 G50 S2500;
N40 G96 S200 G99 F.25 M3 M8 M200;
N50 G0 X70 Z0;
N60 G1 X-2;
N70 G0 X57 Z1;
N80 G1 Z0;
N90 X59.9 Z-1.5;
N100 Z-45;
N110 X66;
N120 G0 X150 Z100;
N130 T202; (Threading);
N140 G97 S700 M3; Fixed revolutions, counterclockwise
N150 G0 X60 Z2 (Start 2 times the step);
N160 X59.4 (First pass); First pass to X59.4
N170 G32 Z-40 F1 (F=step); Threading to Z-40 step 1
N180 G0 X62;
N190 Z2;
N200 X58.8 (Second pass); Second pass X58.8
N210 G32 Z-40 F1; Thread until Z-40 pass 1
N220 G0 X62;
N230 Z2;
N240 X58.7 (Last pass); Last pass to X58.7
N250 G32 Z-40 F1; Threading until Z-40, pass 1
N260 G0 X62;
N270 X200 Z2
00 M30;
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.
You can find here a brief explanation of machining cycles. For a detailed
description, refer to section 13 of FANUC manual, part 1/2
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.
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.
PROGRAMMING MANUAL -47-
5.6 G83 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).
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;
PROGRAMMING MANUAL -51-
6.2 G74 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.
PROGRAMMING MANUAL -52-
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.
PROGRAMMING MANUAL -53-
Threading in 8 passes.
Thread height
P= 0.65 x 2 (thread pitch) = 1.3 mm
1300 microns
Bottom diameter
Ø = ønominal – ( 2 x height of threads)
Ø = 60 – (2 x 1.3) = 57.4
1300 microns
Q= =457 microns
8
PROGRAMMING MANUAL -54-
O0011;
N10 G10 P0 Z-88;
N20 T101 (ROUNDING);
N30 G50 S2000;
N40 G96 G99 S200 F0.25 M4 M200 M8;
N50 G0 X68 Z0;
N60 G1 X-2;
N70 G0 X56 Z2;
N80 G1 Z0;
N90 X60 Z-2 F0.15;
N100 Z-35 F0.25;
N110 X66;
N120 G0 X200 Z100;
N130 T303 (ROSCADO);
N140 G97 S800 M4; Fixed revolutions at a 800 rpm
N150 G0 X62 Z4 (2 TIMES THE STEP); Positioning of TOOL.
N160 G76 P010060 Q50 R0.03; Threading fixed chicle P01/00/60: 01 passes,
00 thread exit, 60 thread angle (60º)
ATTENTION: in machines with specification of
“tenth of micron”, Q500 must be set instead of
Q50
N170 G76 X57.4 Z-30 R0 P1300 Q500 F2; Depth of thread ø57.4, end of thread Z-30,
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
N180 G0 X200 Z100 M30;
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.
PROGRAMMING MANUAL -55-
APPLY
DRILLING CYCLE
THREADING CYCLE
PROGRAMMING MANUAL -56-
PROGRAM:
O0012;
N10 G10 P0 Z-100;
N20 T101;
N30 G50 S2000;
N40 G96 G99 S200 F0.2 M4 M8 M200;
N50 G0 X73 Z0;
N60 G1 X-2;
N70 G0 X61 Z2;
N80 G1 Z0;
N90 X64.9 Z-2 F0.15 (THREAD DIAMETER);
N100 Z-35 F0.2;
N110 X70 Z-50 F0.15;
N120 X71;
N130 G0 X150 Z200;
N140 T808 (BORE OF 28);
N150 G97 S300 M4 F0.15;
N160 G0 X0 Z3;
N170 G74 R1;
N180 G74 Z-84 Q30000 F0.15; ATTENTION: in machines
with specification of “tenth of micron”, Q300000 must be set
instead of Q30000
N190 G0 Z100;
N200 T1010 (INTERNAL MACHINING);
N210 G96 G99 S150 M4 F0.2;
N220 G0 X34 Z2;
N230 G1 Z0;
N240 X29.6 Z-2 F0.15;
N250 Z-30 F0.2;
N260 X27;
N270 G0 Z100;
N280 T1212 (INTERNAL THREAD);
N290 G97 S1300 M4;
N300 G0 X28 Z4 (2 TIMES THE LENGTH OF PASS);
N310 G76 P010060 Q40 R0.03; ATTENTION: in machines
with specification of ·”tenth of micron”, Q400 must be
set instead of Q400
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;
PROGRAMMING MANUAL -57-
The easier procedure is drawing a quadrant on the drawing and locate the
degrees as shown on the above diagram.
PROGRAMMING MANUAL -58-
O0012;
N10 G10 P0 Z-200;
N20 T303 (PROFILING);
N30 G50 S2200;
N40 G96 G99 S230 F0.12 M4 M8 M200;
N50 G0 X0 Z3;
N60 G1 Z0 (P1);
N70 ,A90 R6 (FIRST ANGLE);
N80 X50 Z-25 ,A165 (SECOND ANGLE); A165 comes from 180°-15°=165°
N90 ,A180
N100 X75 Z-49 ,A90 ,C1;
N110 Z-60;
N120 ,A150 R50; A150 comes from 180°-30°=150°
N130 X185 Z-100 ,A110; A110 comes from 180°-70°=110°
N140 ,A90 ,C2;
N150 X200 Z-150 ,A180 (P2);
N160 G0 X250 Z200 M30;
Finishing on (P3):
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.
<EXTERNAL>
<INTERNAL>
PROGRAMMING MANUAL -61-
Milling cutters are assigned with type “0” or “9” for interpolations.
PROGRAMMING MANUAL -62-
Tools
T1 = EXTERNAL
T8= TWIST DRILL ø38
T10 = INTERNAL
PROGRAMMING MANUAL -63-
All cycles ends where they are started and, because of this, finishing positioning
is done above the workpiece.
PROGRAMMING MANUAL -66-
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.
PROGRAMMING MANUAL -68-
TOOLS:
T1 = EXTERNAL ROUGHING
T2 = EXTERNAL FINISHING
T6 = INTERNAL ROUGHING
T10 = INTERNAL FINISHING
PROGRAMMING MANUAL -69-
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.
PROGRAMMING MANUAL -72-
PROGRAM:
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
PROGRAMMING MANUAL -75-
In this chapter, the description of some G codes that have been programmed by CMZ is
described
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.
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
M33;........................................Speed synchronisation
M211;......................................Open sub-head chuck jaws
G0 B-_;...................................Sub-head moved to B position (approach point) (machine co-
ordinate system) (First approach)
G98 G01 B-_F1000;................Sub-head approached to workpiece at 1000 mm/min-1 (Second
approach)
G38 B_F_Q_;..........................Workpiece push detection
Machining program
(Cutting the workpiece)
M36;........................................Speed synchronisation disabled
G28 B0;...................................B-axis retracted to reference point.
M30;
PROGRAMMING MANUAL -77-
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
(T specification)
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.
O0001;
N1;
G138 B-425.8 Q1 S700 T300 J10 E1;...... Workpiece clamping cycle
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
M30;
PROGRAMMING MANUAL -79-
G238 is only available for machines equipped with automatic tailstock on B-axis
(T specification)
3- “Workpiece clamped” signal is activated after reaching the torque limit and
current tailstock position is within tolerance "B,B-Q".
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.
11- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
O0001;
N1;
G238 X100 Z50 B-425.8 K5 Q1 S700 T250 A501 E1; .... Workpiece clamping cycle
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
G238 X250 Z250 B100 D1200 J10 E2; Workpiece releasing cycle
M30;
PROGRAMMING MANUAL -82-
Commands G384 and G380 can be only used on machines equipped with
powered tool.
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.
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.
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.
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.
16- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
PROGRAMMING MANUAL -84-
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
G384 X150.0 Z30.0 C30.0 H20.0 R15.0 F2.0 S300. D600. M50. T2. A101;
A rigid threading cycle is executed on point 1
- X150.0 Z30.0 C30.0
The axes are positioned on point 1 (X150, Z30, C30) at quick speed (G0).
G384 C90.0;
G384 C150.0;
A rigid threading cycle (G384) is executed on
G384 C210.0; ...............
points 2 to 6
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;
PROGRAMMING MANUAL -86-
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.
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.
PROGRAMMING MANUAL -87-
Commands G384 and G380 can be only used on machines equipped with
powered tool.
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.
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.
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.
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.
16- If any cycle argument is erroneous, the following alarm message will be
displayed:
3012 ILLEGAL COMMAND
PROGRAMMING MANUAL -89-
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
G384 X150.0 Z30.0 C30.0 H20.0 R15.0 F2.0 S300. D600. M50. T2. A101;
A rigid threading cycle is executed on point 1
- X150.0 Z30.0 C30.0
The axes are positioned on point 1 (X150, Z30, C30) at quick speed (G0).
G384 C90.0;
G384 C150.0;
A rigid threading cycle (G384) is executed on
G384 C210.0; ...............
points 2 to 6
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;
The G100 command can be used only with the programmable tailstock
specification machine.
<Macro program>
Positioning of the saddle to the tailstock joint position.
... Execution of M27 (tailstock body unclamp; joint pin extends from the
G100 Z_; tailstock body to connect with the saddle).
...
Z_ (positioning of the tailstock at the position specified by Z_)
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).
…
PROGRAMMING MANUAL -92-
The G101 command can be used only with the programmable tailstock
specification machine.
COMMAND
G101;
G101 …. Calls the tailstock connect joint mode
<Macro program>
... Positioning of the saddle to the tailstock joint position.
G101;
...
Execution of M27 (tailstock body unclamp; joint pin extends from the
tailstock body to connect with the saddle).
PROGRAMMING MANUAL -93-
EXAMPLE
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.
…
PROGRAMMING MANUAL -94-
In this chapter, the description of some M functions that have been programmed by CMZ can
be found
COMMAND
M23; ............ Used for angular runout.
M24; ............ Used for straight runout (disables angular runout).
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.
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.
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.
PROGRAMMING MANUAL -96-
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.
Machining program).
(Cutting operation)
M36;........................................Synchronisation mode is disabled
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.
M33;........................................Speed synchronisation.
Machining program.
(Cutting operation)
M36;........................................Synchronisation mode is disabled
COMMAND
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.- 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.
PROGRAMMING MANUAL -99-
O0001;
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
G28 W0;
M36;........................................Head synchronisation mode is disabled
G28 B0;...................................Sub-head is returned to reference point on B-axis.
M01;
PROGRAMMING MANUAL -100-
1.- Before executing a M73 function, ensure that the turret is out the
interference area with workpiece collector.
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.
Machining program.
(Machining operation on sub-head)
M05:........................................Sub-head is stopped
G53 B_;...................................Sub-head is moved to the position at which the workpiece is
collected by workpiece collector.
M30;
PROGRAMMING MANUAL -102-
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 head are synchronised, using a floating tap will not be required.
7- T3 value must be only specified for machines equipped with a sub-head (S)
(S specification). This value must not be used to perform a front threading
operation on a workpiece located on the sub-head.
8- If argument 1 is set to a value other than 1, the cycle will assume that a
right-hand thread is to be machined.
O0001;
N1;
Machining program
(Workpiece machined on main head)
N5;
G97 M81 M5;.........................................C-axis is deactivated and head stopped.
M30;
PROGRAMMING MANUAL -104-
1.- Commands M210 and M211 (open and close sub-head jaws respectively)
cannot be executed when a workpiece collection cycle is being executed.
The following example assumes that the machine is equipped with a bar feed.
O0001;
Machining program
(Machining operation on sub-head)
M05:........................................Sub-head is stopped
G53 B_;...................................Sub-head is moved to the position at which workpiece collector
collects the workpiece.
N10;
M11;........................................Open jaws on main head.
G04 U_;..................................Time delay to allow properly opening main head jaws.
M62;........................................Bar feed (push)
M10;........................................Clamp workpiece on main head.
G04 U_;..................................Time delay to allow properly clamping a new workpiece on main
head.
N11;
G50 S2000;
G00 T0101;
G96 S120 M03;
Machining program
(Machining operation on main head)
M30;
If a rear chip conveyor is installed, M200 and M201 codes switch on and off
cleaning fluid, respectively, further to starting and stopping the chip conveyor.
In this case, chip conveyor operation time entered on parameter screen does
not affect cleaning fluid pump operation.
9.10.1 Coolant
If the machine is equipped with a single coolant pump, M8 code, while on automatic mode, will
start the pump and M38 code will stop it. You can also enter M9 code to stop the pump, as this
code will switch off all pumps, both coolant pumps and cleaning fluid pumps.
A push-button is available for starting this pump on manual mode. The LED on this push-
button will be lighted when the pump is started.
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.
Same as for the first pump, a push-button is available on control panel for starting and
stopping the second coolant pump on manual mode. (The LED will be lighted when this pump
is started)
These two coolant pumps will only operated if machine door is closed.
If the chip conveyor is located on the machine side instead of on the rear, M382 and M383
code will start and stop the pump, respectively, while on automatic mode. In this case, a push-
button on control panel is used to start (LED lighted) and stop the pump on manual mode.
PROGRAMMING MANUAL -107-
Operation of cleaning pump will be only possible with machine door closed.
Enter M478 code to activate this function on automatic mode. By this way, both the coolant
pump and the electrovalve enabling coolant to be fed through the sub-head will be activated.
M479 or M9 code will deactivate both the coolant pump and the electrovalve, making coolant
to circulate through the turret.
Moreover, two push-buttons are provided on control panel to activate and deactivate this
function on manual mode.
This section describes the procedure used to program machining cycles requiring position
control by the head. This is the meaning of C-axis. The head will rotate and the control unit will
control head position at all moment. By this way, C-axis can be positioned according to preset
angles, be displaced on incremental mode, etc irrespective the workpiece is being machined or
not.
When a command M81 is entered, C-axis operation is deactivated for main head, or for head1.
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.
On mode M80 or M280, head rotation can be controlled synchronically with tool
movement in order to cut grooves or slots.
PROGRAMMING MANUAL -109-
For machines of SM series, chuck locking function is only enabled for the head
for which the last M command has been programmed, provided that more than
one M80 (C-axis activation for head1), M280 (C-axis activation for head2), M50
(brake activation for head1), and M250 (brake activation for head2) is
programmed in a single block. Chuck locking function is nor enabled for other
heads. Therefore, the machining operation must be performed with the head for
which the last M command is programmed. If the machining operation is
performed with other head, the powered tool will not be stopped even with jaws
open, letting the workpiece to fall or be thrown out the chuck, causing personal
injures or damages to the machine.
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.
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.
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.
COMMAND
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.
PROGRAMMING MANUAL -110-
Function M480 is used for coupling C-axis movement for head and subhead. For instance, this
function is used to perform C-axis operations with a workpiece simultaneously clamped on bot
heads.
Commands M480 and M481 can be only used on machines of SMC series.
M480; ........... C-axis mode is activated on both heads, head1 and head2.
M481; ........... C-axis mode is deactivated on both heads, head1 and head2.
When C-axes on both heads are coupled, activating the hydraulic brake to lock
head1 (M50) will only be permitted. Considering that this function is used to
machine workpieces clamped on both heads, locking both heads will not be
required.
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.
When the control unit is provided with SuperCap tool, C-axis is activated by means of
command M380, and then enter M303 or M304 to activate C-axis mode on head1 or head2
respectively.
Commands M380 and M381 are only used on machines of SMC series provided
with SUPERCAP tool.
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.
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.
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.
PROGRAMMING MANUAL -112-
PROGRAM
O0004
N10 G10 P0 Z-100;
N20 T101 M8;
N30 M80 (ACTIVATES C AXIS);
N40 G98 G97 F80 M83 S800;
N50 G0 C0;
N60 X90 Z2;
N70 G83 Z-10 Q5000 H90 K4 M50 F80 (ORDER OF BORING: 90º, 180º, 270º, 0º);
ATENCIÓN: en machines with specification of “tenth of micron”, Q50000 must be set
instead of Q5000
N80 G0 G80 X150 Z150 M5;
N90 M81 (DEACTIVATES THE C AXIS);
N100 M30;
First go to C0= position then rotate the head by the angle given by M command and finally
perform the drilling operation. As the head is first rotated and then the drilling operation is
carried out, C-axis position at the beginning must be advanced by a value equal to the angle
given by H command. The number of K command indicates the number of holes and the angle
given by H command indicates the rotation angle between a hole and the next one.
By pressing F6 on the screen of CMZ main menu, you can gain access to a screen allowing
you to select both tool holder and its own rotation direction. By this way, when M83 is entered,
it is assumed that the tool holder will rotate in the proper direction.
ALTERNATIVE PROGRAM
This fixed drilling cycle can be programmed in the apparently more logic and simple sequence,
ie, 0º - 90º - 180º - 270º. This cycle would be as follows:
PROGRAM
O0004
N10 G10 P0 Z-100;
N20 T101 M8;
N30 M80 (ACTIVATES C AXIS);
N40 G98 G97 F80 M83 S800;
N50 G0 C0;
N60 X90 Z2;
N70 G83 Z-10 Q5000 M50 F80; ATTENTION: in machines with specification of “tenth of
micron”, Q50000 must be set instead of Q5000
N80 C90;
N90 C180;
N100 C270 (BORING ORDER: 0º, 90º, 180º, 270º);
N110 G0 G80 X150 Z150 M5;
N120 M81 (DEACTIVATES C AXIS);
N130 M30;
10.3 G87 Programming of fixed axial drilling cycle with powered tool
3 HOLES SPACED 120º
PROGRAM
O0005
N10 G10 P0 Z-120;
N20 T303 M8;
N30 M80 (ACTIVATES C AXIS);
N40 G98 F100 M83 S900 G97;
N50 G0C0;
N60 X125 Z-15;
N70 G87 X96 Q4500 H120 K3 M50 F100; ATTENTION: in machines with specification
of “tenth of micron”, Q45000 must be set instead of Q4500
N80 G0 G80 X180 Z150 M5;
N90 M81 (DEACTIVATES C AXIS);
N100 M30;
In this case, the first position must be also advanced by the angle with respect to the first hole
given by H command.
PROGRAMMING MANUAL -115-
PROGRAM
O0009
N10 G10 P0 Z-105;
N20 T505 M8;
N30 M80 (ACTIVATES C AXIS);
N40 G98 F100 M84 S700 G97;
N50 G0C0;
N60 X110 Z2;
N70 M98 P40020 (Calls subprogram “0020”, that Hill be executed 4 times);
N80 G0 X200 Z100 M85;
M90 M81 (DEACTIVATES C AXIS);
M100 M30;
PROGRAMMING MANUAL -116-
The weak brake is only useful with a significant force in applied by the milling cutter on the
chuck. This force will depend on workpiece material and the machining operation itself. If no
significant force is applied on the chuck, using the brake is not advisable, as otherwise this
would result in a discontinuous (step to step) feed of milling cutter.
PROGRAMMING MANUAL -117-
SEN30º= A / 30 A=30xSEN30º=15mm
COS30ª= B / 30 B=30xCOS30º=25,98mm
Geometry data:
R4
T9
PROGRAM
O0001
N10 G10 P0 Z-95;
N20 T101 (MILLING TOOL DIAMETER 8);
N30 M80;
N40 G98 F100 M83 S1000;
N50 G0C0:
N60 X80 Z-2;
N70 G112 (ACTIVATES COORDENATES TRANSFORMATION);
N80 G1 G42 X60 (P1) (G42 ACTIVATES TOOL COMPENSATION);
N90 X30 C25,98 (P2)
N100 X-30 (P3);
N110 X-60 C0 (P4);
N120 X-30 C-25,98 (P5);
N130 X30 (P6);
N140 X60 C0 (P1);
N150 G40 X80 (G40 DEACTIVATES TOOL COMPENSATION);
N160 G113 (DISABLESCOORDENATES TRANSFORMATION);
N170 M53 (ONLY IN TBI)
N180 M5;
N190 M81;
N200 G0 X150 Z150 M30;
PROGRAMMING MANUAL -118-
PROGRAM
O0033
This example describes a rigid tapping operation for three holes spaced 120º.
PROGRAM
O0001;
PROGRAM
N10 M5;
N20 T303 (BORING TOOL 8,5MM DIÁMETER);
N30 M80 (ACTIVATION OF C AXIS);
N40 G98 F80 M83 DS500 G97;
N50 G0C0;
N60 X90 Z5;
N70 G83 Z-10 Q5000 H90 K4 M50 F80 (FOUR HOLES BORING IN ORDER 2-3-4-1);
ATTENTION: in machines with specification “tenth of micron”
Q50000 must be set instead of Q5000
N80 G80 (DISABLES BORING FIXED CYCLE);
N90 G0 X200 Z200 M85 (STOPS DRIVEN TOOL);
N100 M81 (DEACTIVATES CAXIS);
N110 T606 (THREADING TOOL);
N120 M80 (ACTIVATES C AXIS);
N130 G98 G97 F80 M83;
N140 G0 C0;
N150 X90 Z5;
N160 G384 H10 S300 D300 M50 T2 F1,5 (RIGID TAPPING CYCLE AT (1));
N170 G384 C90 (RIGID TAPPING CYCLE AT (2));
N180 G384 C180 (RIGID TAPPING CYCLE AT (3));
N190 G384 C270 (RIGID TAPPING CYCLE AT (4));
N200 G380 (DISABLES FIXED CYCLE);
N230 G0 X200 Z200 M85 (REMOVE AND STOP OF DRIVEN TOOL);
N240 M81 (DEACTIVATION OF C AXIS);
N250 G99;
PROGRAMMING MANUAL -121-
This example describes a rigid tapping operation for two holes spaced 180º.
PROGRAM
O0001;
PROGRAM
Tool selection and approach to start point operations are omitted and they must
be determined by the programmer.
PROGRAM
N10...;
N20...;
N30 G112 C45;
N40 G0 Z-39,4;
N50 G1 G42 X16 C4.42 F1000;
N60 X-18 F80;
N70 C-4,42 F1000;
N80 X17 F80;
N90 G40 X80 F1000;
N100 G113;
N110 M30
PROGRAMMING MANUAL -124-
10.12 Example of bevelling two squares, one with the main head and
the other with the subhead
PROGRAM
;SPINDLE SIDE
N1O T1010 M8;
N20 M80 (ACTIVATION OF C AXIS IN SPINDLE);
N30 M83 G97 G98 S600 F100;
N40 G0 X50 Z-22 C0 (in spindle, the movement in Z axis is in NEGATIVE sense);
N50 G112;
N60 G1 G42 X27 C9,75 F800;
N70 X-27 F100
N80 C-9,75 F2000;
N90 27 F100;
N100 G40 X40 F2000;
N110 G113;
N120 M5;
N130 M81;
N140 M30
;SUBSPINDLE SIDE
The functions described below are used to shorten the time of operations that, while required
for machining a part, would extend the whole process.
Because of this, the turret must be unlocked before rotating toolholder disc. Also, the turret
must be locked after rotating toolholder disc to the required position.
Neither the locking operation nor the unlocking operation are instantaneous, but require some
time.
By means of function M316, the servo-turret is unlocked while moved out the workpiece to tool
change position and locked while moved toward the workpiece after the tool is changed.
Application example:
The sum of locking and unlocking times is saved as a result of function M316, as these
operations are performed while the turret is being moved.
PROGRAMMING MANUAL -126-
Machine models TB, TL and TBI520 equipped with Fanuc i-TB series control units enable
simultaneously executing three M functions.
This means that the three M functions are executed at the same time, irrespective the order in
which they are programmed. The total time required to execute the three M functions will be
equal to the time required to execute the slower one.
Those functions which require to be executed that a function in the same block
will be previously executed must not be entered in the same block.
For instance, neither “M80 M83” nor “M81 M85” must be entered in the same
block, as M83 and M85 require that M80 and M81 respectively will be previously
executed.
M30, M0, M1, M2, M301, M302, M303, M304 y M29 functions must be required as the first M
function of all three functions.
Do not enter “M70 M30”, but “M30 M70” (cycle end and door opening).
11.3 Using G97 to ensure the head reaching the required rotation
speed
If G96 is entered, cutting speed will be constant. This means that, for small turning diameters,
the head will reach high rotation speeds.
If when turning a small diameter a tool change is required, the turret should be moved out from
the workpiece to the position in which the tool is changed. The head will be decelerated
because this turret movement is carried out without specifying the speed. Consequently, when
the turret returns to the position in which a small diameter is turned, the head will be
accelerated until the speed required for turning this small diameter is reached.
By entering function G97 together with the required head speed, the required head rotation
speed is maintained while both moving the turret out the workpiece and returning it to the
workpiece, thus reducing the time required to accelerate the head.
PROGRAMMING MANUAL -127-
For example:
11.4 Using M318 to change tower position while axes are being
moved.
By default, tower position is changed after all axes are moved to programmed position.
However, by using M318 code, you can change tower position before all axis movements are
completed.
As M318 enables tower movement while the axes are being moved,
you should keep in mind that a collision between the workpiece
and tool holding disc could occur if machine movements are
incorrectly programmed. Before starting a new cycle, make sure
that any interference between movements is prevented.
The examples below correspond to programs commonly used and can facilitate the
programming of machining operations on similar workpieces.
PROGRAM
N10 T606;
N20 G50 S1800;
N30 G96 S250 G99 F0,2 M3;
N40 G0 X28 Z1;
N50 G72 W2,5 R0,5;
N60 G72 P1000 Q1100 U-1 W0,1 F0,2;
N70 G1 Z-28 F0,35;
N80 X181 F0,15;
N90 Z1;
N100 G0 X200 Z100;
N110 M30
PROGRAMMING MANUAL -129-
PROGRAM
N10 T505;
N20 G96 S140 M3 F0,15;
N30 G0 X302 Z-29,4;
N40 G75 R0,2;
N50 G75 S244,1 Z-19,6 P8000 Q3600 F0,15; ATTENTION: in
machines with specifiication of “tenth of micron”·, P80000 and Q36000
must be set instead of P8000 y Q3600
N60 G0 W-3,5 (starting point for the left inclined wall);
N70 G1 X300;
N80 X250 W3,5;
N90 G0 X302;
N100 W-7
N110 G1 X300;
N120 X250 W7;
N130 G0 X302;
N140 W9,1;
N150 G1 X300;
N160 X244,1 Z-29,4;
N170 G0 X302;
N180 Z-19,4;
N190 W3,5;
N200 G1 X300;
N210 X250 W-3,5;
N220 G0 X302;
N230 W7;
N240 G1 X300;
N250 X250 W-7;
N260 G0 X302;
N270 W9,1;
N280 G1 300;
N290 X244 Z-19,6;
N300 Z-29,4;
N310 G0 X302;
N320 X350 Z200 M30
12.3 Example of machining a circular groove without using the
grooving cycle
In this example the machining operations include facing, axial drilling and
cutting plus cylindrical grooving.
PROGRAM
PROGRAM
To help us to improve this manual, we invite you to send us your comments about any insufficient
description or error found in this manual. Please, limit your comments to the aspects related to this
manual.
Manual designation:
Issue No.:
Name Company
Department Telephone
Address