FANUC Series 0i-MC. OPERATOR’S MANUAL - page 6

 

  Index      Manuals     FANUC Series 0i-MC. OPERATOR’S MANUAL (B-64124EN/01)

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     4      5      6      7     ..

 

 

 

FANUC Series 0i-MC. OPERATOR’S MANUAL - page 6

 

 

B-64124EN/01
PROGRAMMING
12. PROGRAM CONFIGURATION
D Major addresses and
Major addresses and the ranges of values specified for the addresses are
ranges of command
shown below. Note that these figures represent limits on the CNC side,
values
which are totally different from limits on the machine tool side. For
example, the CNC allows a tool to traverse up to about 100 m (in
millimeter input) along the X axis.
However, an actual stroke along the X axis may be limited to 2 m for a
specific machine tool.
Similarly, the CNC may be able to control a cutting federate of up to 240
m/min, but the machine tool may not allow more than 3 m/min. When
developing a program, the user should carefully read the manuals of the
machine tool as well as this manual to be familiar with the restrictions on
programming.
Table 12.2 (c) Major addresses and ranges of command values
Function
Address
Input in mm
Input in inch
Program number
O (1)
1-9999
1-9999
Sequence number
N
1-99999
1-99999
Preparatory function
G
0-99
0-99
Dimen-
Increment
X, Y, Z,
± 99999.999mm
± 9999.9999inch
sion
system IS-B
U, V, W,
word
A, B, C,
Increment
± 9999.9999mm
± 999.99999inch
I, J, K, R,
system IS-C
Feed
Increment
F
1-240000mm/min
0.01-9600.00
per
system IS-B
inch/min
minute
Increment
1-100000mm/min
0.01-4000.00
system IS-C
inch/min
Feed per revolution
F
0.001-500.00
0.0001-9.9999
mm/rev
inch/rev
Spindle speed function
S
0-20000
0-20000
Tool function
T
0-99999999
0-99999999
Auxiliary function
M
0-99999999
0-99999999
B
0-99999999
0-99999999
Offset number
H, D
0-400
0-400
Dwell
Increment
X, P
0-99999.999s
0-99999.999s
system IS-B
Increment
0-9999.9999s
0-9999.9999s
system IS-C
Designation of a pro-
P
1-9999
1-9999
gram number
Number of subprogram
P
1-999
1-999
repetitions
NOTE
In ISO code, the colon ( : ) can also be used as the address
of a program number.
133
12. PROGRAM CONFIGURATION
PROGRAMMING
B-64124EN/01
D Optional block skip
When a slash followed by a number (/n (n=1 to 9)) is specified at the head
of a block, and optional block skip switch n on the machine operator panel
is set to on, the information contained in the block for which
/n
corresponding to switch number n is specified is ignored in DNC
operation or memory operation.
When optional block skip switch n is set to off, the information contained
in the block for which /n is specified is valid. This means that the operator
can determine whether to skip the block containing /n.
Number 1 for /1 can be omitted. However, when two or more optional
block skip switches are used for one block, number 1 for /1 cannot be
omitted.
Example)
(Incorrect)
(Correct)
//3 G00X10.0;
/1/3 G00X10.0;
This function is ignored when programs are loaded into memory. Blocks
containing /n are also stored in memory, regardless of how the optional
block skip switch is set.
Programs held in memory can be output, regardless of how the optional
block skip switches are set.
Optional block skip is effective even during sequence number search
operation.
Depending on the machine tool, all optional block skip switches (1 to 9)
may not be usable. Refer to manuals of the machine tool builder to find
which switches are usable.
WARNING
1
Position of a slash
A slash (/) must be specified at the head of a block. If a slash
is placed elsewhere, the information from the slash to
immediately before the EOB code is ignored.
2 Disabling an optional block skip switch
Optional block skip operation is processed when blocks are
read from memory or tape into a buffer. Even if a switch is
set to on after blocks are read into a buffer, the blocks
already read are not ignored.
NOTE
TV and TH check
When an optional block skip switch is on. TH and TV checks
are made for the skipped portions in the same way as when
the optional block skip switch is off.
134
B-64124EN/01
PROGRAMMING
12. PROGRAM CONFIGURATION
D Program end
The end of a program is indicated by programming one of the following
codes at the end of the program:
Table 12.2 (d) Code of a program end
Code
Meaning usage
M02
For main program
M30
M99
For subprogram
If one of the program end codes is executed in program execution, the
CNC terminates the execution of the program, and the reset state is set.
When the subprogram end code is executed, control returns to the
program that called the subprogram.
WARNING
A block containing an optional block skip code such as /M02
; , /M30 ; , or /M99 ; is not regarded as the end of a program,
if the optional block skip switch on the machine operator’s
panel is set to on.
(See “Optional block skip”.)
135
12. PROGRAM CONFIGURATION
PROGRAMMING
B-64124EN/01
12.3
If a program contains a fixed sequence or frequently repeated pattern, such
a sequence or pattern can be stored as a subprogram in memory to simplify
SUBPROGRAM
the program.
(M98, M99)
A subprogram can be called from the main program.
A called subprogram can also call another subprogram.
Format
D Subprogram
configuration
One subprogram
O jjjj ;
Subprogram number
(or the colon (:) optionally in the case of ISO)
M99 ;
Program end
M99 need not constitute a separate block as indicated below.
Example) X100.0 Y100.0 M99 ;
D Subprogram call
M98 P fff ffff ;
Number of times
Subprogram number
the subprogram is
called repeatedly
When no repetition data is specified, the subprogram is called just once.
Explanations
When the main program calls a subprogram, it is regarded as a one-level
subprogram call. Thus, subprogram calls can be nested up to four levels
as shown below.
Main program
Subprogram
Subprogram
Subprogram
Subprogram
O0001 ;
O1000 ;
O2000 ;
O3000 ;
O4000 ;
M98P1000 ;
M98P2000 ;
M98P3000 ;
M98P4000 ;
M30 ;
M99 ;
M99 ;
M99 ;
M99 ;
(One-level nesting)
(Two-level nesting)
(Three-level nesting)
(Four-level nesting)
A single call command can repeatedly call a subprogram up to 999 times.
For compatibility with automatic programming systems, in the first
block, Nxxxx can be used instead of a subprogram number that follows
O (or :). A sequence number after N is registered as a subprogram number.
D Reference
See III-10 for the method of registering a subprogram.
136
B-64124EN/01
PROGRAMMING
12. PROGRAM CONFIGURATION
NOTE
1
The M98 and M99 code signal and strobe signal are not
output to the machine tool.
2
If the subprogram number specified by address P cannot be
found, an alarm (No. 078) is output.
Examples
l M98 P51002 ;
This command specifies “Call the subprogram (number 1002) five times in
succession.” A subprogram call command (M98P_) can be specified in the
same block as a move command.
l X1000.0 M98 P1200 ;
This example calls the subprogram (number 1200) after an X movement.
l Execution sequence of subprograms called from a main program
Main program
Subprogram
1
2
3
N0010 0 ;
O1010 0 ;
N0020 0 ;
N1020 0 ;
N0030 M98 P21010 ;
N1030 0 ;
N0040 0 ;
N1040 0 ;
N0050 M98 P1010 ;
N1050 0 ;
N0060 0 ;
N1060 0 M99 ;
A subprogram can call another subprogram in the same way as a main pro-
gram calls a subprogram.
137
12. PROGRAM CONFIGURATION
PROGRAMMING
B-64124EN/01
Special Usage
D Specifying the sequence
If P is used to specify a sequence number when a subprogram is
number for the return
terminated, control does not return to the block after the calling block, but
destination in the main
returns to the block with the sequence number specified by P. Note,
program
however, that P is ignored if the main program is operating in a mode other
than memory operation mode.
This method consumes a much longer time than the normal return method
to return to the main program.
Main program
Subprogram
N0010 ;
O0010 ;
N0020 ;
N1020 ;
N0030 M98 P1010 ;
N1030 ;
N0040 ;
N1040 ;
N0050 ;
N1050 ;
N0060 ;
N1060 M99 P0060 ;
D Using M99 in the main
If M99 is executed in a main program, control returns to the start of the
program
main program. For example, M99 can be executed by placing /M99 ; at
an appropriate location of the main program and setting the optional block
skip function to off when executing the main program. When M99 is
executed, control returns to the start of the main program, then execution
is repeated starting at the head of the main program.
Execution is repeated while the optional block skip function is set to off.
If the optional block skip function is set to on, the /M99 ; block is skipped
; control is passed to the next block for continued execution.
If/M99Pn ; is specified, control returns not to the start of the main
program, but to sequence number n. In this case, a longer time is required
to return to sequence number n.
N0010 ;
N0020 ;
N0030 ;
Optional block skip
N0040 ;
OFF
N0050 ;
/
Optional block skip
N0060 M99 P0030 ;
ON
N0070 ;
N0080 M02 ;
138
B-64124EN/01
PROGRAMMING
12. PROGRAM CONFIGURATION
D Using a subprogram only A subprogram can be executed just like a main program by searching for
the start of the subprogram with the MDI.
(See III-9.3 for information about search operation.)
In this case, if a block containing M99 is executed, control returns to the
start of the subprogram for repeated execution. If a block containing
M99Pn is executed, control returns to the block with sequence number n
in the subprogram for repeated execution. To terminate this program, a
block containing /M02 ; or /M30 ; must be placed at an appropriate
location, and the optional block switch must be set to off ; this switch is
to be set to on first.
N1010 ;
N1020 ;
N1030 ;
Optional block skip
/
N1040 M02 ;
ON
N1050 M99 P1020 ;
139
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
FUNCTIONS TO SIMPLIFY PROGRAMMING
13
General
This chapter explains the following items:
13.1
CANNED CYCLE
13.2
RIGID TAPPING
13.3
CANNED GRINDING CYCLE (FOR GRINDING MACHINE)
13.4
GRINDING-WHEEL WEAR COMPENSATION BY CONTINUOUS
DRESSING (FOR GRINDING MACHINE)
13.5
IN-FEED GRINDING ALONG THE Y AND Z AXES AT THE END
OF TABLE SWING (FOR GRINDING MACHINE)
13.6
OPTIONAL ANGLE CHAMFERING AND CORNER ROUNDING
13.7
EXTERNAL MOTION FUNCTION (G81)
13.8
INDEX TABLE INDEXING FUNCTION
140
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
Canned cycles make it easier for the programmer to create programs.
13.1
With a canned cycle, a frequently-used machining operation can be
CANNED CYCLE
specified in a single block with a G function; without canned cycles,
normally more than one block is required. In addition, the use of canned
cycles can shorten the program to save memory.
Table 13.1 (a) lists canned cycles.
Table 13.1 (a) Canned cycles
Operation at the
G code
Drilling(-Z direction)
Retraction(+Z direction)
Application
bottom of a hole
G73
Intermittent feed
-
Rapid traverse
High-speed peck drilling
cycle
G74
Feed
Dwell→Spindle CW
Feed
Left-hand tapping cycle
G76
Feed
Oriented spindle
Rapid traverse
Fine boring cycle
stop
G80
-
-
-
Cancel
G81
Feed
-
Rapid traverse
Drilling cycle, spot drilling
cycle
G82
Feed
Dwell
Rapid traverse
Drilling cycle, counter boring
cycle
G83
Intermittent feed
-
Rapid traverse
Peck drilling cycle
G84
Feed
Dwell→Spindle
Feed
Tapping cycle
CCW
G85
Feed
-
Feed
Boring cycle
G86
Feed
Spindle stop
Rapid traverse
Boring cycle
G87
Feed
Spindle CW
Rapid traverse
Back boring cycle
G88
Feed
Dwell→spindle stop
Manual
Boring cycle
G89
Feed
Dwell
Feed
Boring cycle
141
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Explanations
A canned cycle consists of a sequence of six operations (Fig. 13.1 (a))
Operation 1 Positioning of axes X and Y
(including also another axis)
Operation 2 Rapid traverse up to point R level
Operation 3 Hole machining
Operation 4 Operation at the bottom of a hole
Operation 5
Retraction to point R level
Operation 6
Rapid traverse up to the initial point
Operation 1
Initial level
Operation 2
Operation 6
Point R level
Operation 5
Operation 3
Rapid traverse
Operation 4
Feed
Fig. 13.1 Canned cycle operation sequence
D Positioning plane
The positioning plane is determined by plane selection code G17, G18,
or G19.
The positioning axis is an axis other than the drilling axis.
D Drilling axis
Although canned cycles include tapping and boring cycles as well as
drilling cycles, in this chapter, only the term drilling will be used to refer
to operations implemented with canned cycles.
The drilling axis is a basic axis (X, Y, or Z) not used to define the
positioning plane, or any axis parallel to that basic axis.
The axis (basic axis or parallel axis) used as the drilling axis is determined
according to the axis address for the drilling axis specified in the same
block as G codes G73 to G89.
If no axis address is specified for the drilling axis, the basic axis is
assumed to be the drilling axis.
Table 13.1 (b) Positioning plane and drilling axis
G code
Positioning plane
Drilling axis
G17
Xp-Yp plane
Zp
G18
Zp-Xp plane
Yp
G19
Yp-Zp plane
Xp
Xp : X axis or an axis parallel to the X axis
Yp : Y axis or an axis parallel to the Y axis
Zp : Z axis or an axis parallel to the Z axis
142
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
Examples
Assume that the U, V and W axes be parallel to the X, Y, and Z axes
respectively. This condition is specified by parameter No. 1022.
G17 G81 ………Z _ _ : The Z axis is used for drilling.
G17 G81 ………W _ _ : The W axis is used for drilling.
G18 G81 ………Y _ _ : The Y axis is used for drilling.
G18 G81 ………V _ _ : The V axis is used for drilling.
G19 G81 ………X _ _ : The X axis is used for drilling.
G19 G81 ………U _ _ : The U axis is used for drilling.
G17 to G19 may be specified in a block in which any of G73 to G89 is
not specified.
WARNING
Switch the drilling axis after canceling a canned cycle.
NOTE
A parameter FXY (No. 5101 #0) can be set to the Z axis
always used as the drilling axis. When FXY=0, the Z axis
is always the drilling axis.
D Travel distance along the
The travel distance along the drilling axis varies for G90 and G91 as
drilling axis G90/G91
follows:
G90 (Absolute Command)
G91 (Incremental Command)
R
R
Point R
Point R
Z=0
Z
Point Z
Z
Point Z
D Drilling mode
G73, G74, G76, and G81 to G89 are modal G codes and remain in effect
until canceled. When in effect, the current state is the drilling mode.
Once drilling data is specified in the drilling mode, the data is retained
until modified or canceled.
Specify all necessary drilling data at the beginning of canned cycles; when
canned cycles are being performed, specify data modifications only.
143
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
D Return point level
When the tool reaches the bottom of a hole, the tool may be returned to
G98/G99
point R or to the initial level. These operations are specified with G98 and
G99. The following illustrates how the tool moves when G98 or G99 is
specified. Generally, G99 is used for the first drilling operation and G98
is used for the last drilling operation.
The initial level does not change even when drilling is performed in the
G99 mode.
G98(Return to initial level )
G99(Return to point R level)
Initial level
Point R level
D Repeat
To repeat drilling for equally-spaced holes, specify the number of repeats
in K_.
K is effective only within the block where it is specified.
Specify the first hole position in incremental mode (G91).
If it is specified in absolute mode (G90), drilling is repeated at the same
position.
Number of repeats K The maximum command value = 9999
If K0 is specified, drilling data is stored, but drilling is not performed.
D Cancel
To cancel a canned cycle, use G80 or a group 01 G code.
Group 01 G codes
G00 : Positioning (rapid traverse)
G01 : Linear interpolation
G02 : Circular interpolation or helical interpolation (CW)
G03 : Circular interpolation or helical interpolation (CCW)
G60 : Single direction positioning (when the MDL bit (bit 0 of
parameter 5431) is set to 1)
D Symbols in figures
Subsequent sections explain the individual canned cycles. Figures in
these explanations use the following symbols:
Positioning (rapid traverse G00)
Cutting feed (linear interpolation G01)
Manual feed
OSS Oriented spindle stop
(The spindle stops at a fixed rotation position)
Shift (rapid traverse G00)
P
Dwell
144
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.1
This cycle performs high-speed peck drilling. It performs intermittent
cutting feed to the bottom of a hole while removing chips from the hole.
High-speed Peck
Drilling Cycle
(G73)
Format
G73 X_ Y_ Z_ R_ Q_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
Q_ : Depth of cut for each cutting feed
F_ : Cutting feedrate
K_ : Number of repeats (if required)
G73 (G98)
G73 (G99)
Initial level
Point R level
Point R
Point R
q
q
d
d
q
q
d
d
q
q
Point Z
Point Z
145
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Explanations
The high-speed peck drilling cycle performs intermittent feeding along
the Z-axis. When this cycle is used, chips can be removed from the hole
easily, and a smaller value can be set for retraction. This allows, drilling
to be performed efficiently. Set the clearance, d, in parameter 5114.
The tool is retracted in rapid traverse.
Before specifying G73, rotate the spindle using a miscellaneous function
(M code).
When the G73 code and an M code are specified in the same block, the
M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When K is used to specify the number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
Limitations
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D Q/P
Specify Q and P in blocks that perform drilling. If they are specified in
a block that does not perform drilling, they cannot be stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G73 in a single block.
Otherwise, G73 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S2000 ;
Cause the spindle to start rotating.
G90 G99 G73 X300. Y-250. Z-150. R-100. Q15. F120. ;
Position, drill hole 1, then return to point R.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
146
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.2
This cycle performs left-handed tapping. In the left-handed tapping
cycle, when the bottom of the hole has been reached, the spindle rotates
Left-handed
clockwise.
Tapping Cycle (G74)
Format
G74 X_ Y_ Z_ R_P_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
P_ : Dwell time
F_ : Cutting feedrate
K_ : Number of repeats (if required)
G74 (G98)
G74 (G99)
Initial level
Spindle
CCW
Spindle
P
CCW
Point R
Point R level
Point R
P
P
Point Z
Point Z
P
Spindle CW
Spindle CW
Explanations
Tapping is performed by turning the spindle counterclockwise. When the
bottom of the hole has been reached, the spindle is rotated clockwise for
retraction. This creates a reverse thread.
Feedrate overrides are ignored during left-handed tapping. A feed hold
does not stop the machine until the return operation is completed.
Before specifying G74, use a miscellaneous function (M code) to rotate
the spindle counterclockwise.
When the G74 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When K is used to specify the number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
147
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Limitations
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D P
Specify P in blocks that perform drilling. If it is specified in a block that
does not perform drilling, it cannot be stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G74 in a single block.
Otherwise, G74 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M4 S100 ;
Cause the spindle to start rotating.
G90 G99 G74 X300. Y-250. Z-150. R-120. F120. ;
Position, tapping hole 1, then return to point R.
Y-550. ;
Position, tapping hole 2, then return to point R.
Y-750. ;
Position, tapping hole 3, then return to point R.
X1000. ;
Position, tapping hole 4, then return to point R.
Y-550. ;
Position, tapping hole 5, then return to point R.
G98 Y-750. ;
Position, tapping hole 6, then return to the
initial level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
148
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.3
The fine boring cycle bores a hole precisely. When the bottom of the hole
has been reached, the spindle stops, and the tool is moved away from the
Fine Boring Cycle
machined surface of the workpiece and retracted.
(G76)
Format
G76 X_ Y_ Z_ R_ Q_ P_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
Q_ : Shift amount at the bottom of a hole
P_ : Dwell time at the bottom of a hole
F_ : Cutting feedrate
K_ : Number of repeats (if required)
G76 (G98)
G76 (G99)
Spindle CW
Oriented spindle stop
Initial level
Spindle CW
Tool
Point R
level
Point R
Point R
P
P
Point Z
OSS
OSS
q
Point Z
q
Shift amount q
WARNING
Q (shift at the bottom of a hole) is a modal value retained
within canned cycles. It must be specified carefully because
it is also used as the depth of cut for G73 and G83.
149
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Explanations
When the bottom of the hole has been reached, the spindle is stopped at
the fixed rotation position, and the tool is moved in the direction opposite
to the tool tip and retracted. This ensures that the machined surface is not
damaged and enables precise and efficient boring to be performed.
Before specifying G76, use a miscellaneous function (M code) to rotate
the spindle.
When the G76 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next operation.
When K is used to specify the number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
Limitations
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Boring
In a block that does not contain X, Y, Z, R, or any additional axes, boring
is not performed.
D P/Q
Be sure to specify a positive value in Q. If Q is specified with a negative
value, the sign is ignored. Set the direction of shift in bits 4 (RD1) and
5 (RD2) of parameter 5101. Specify P and Q in a block that performs
boring. If they are specified in a block that does not perform boring, they
are not stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G76 in a single block.
Otherwise, G76 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S500 ;
Cause the spindle to start rotating.
G90 G99 G76 X300. Y-250. Position, bore hole 1, then return to point R.
Z-150. R-120. Q5.
Orient at the bottom of the hole, then shift
by 5 mm.
P1000 F120. ;
Stop at the bottom of the hole for 1 s.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
150
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.4
This cycle is used for normal drilling. Cutting feed is performed to the
bottom of the hole. The tool is then retracted from the bottom of the hole
Drilling Cycle, Spot
in rapid traverse.
Drilling (G81)
Format
G81 X_ Y_ Z_ R_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
F_ : Cutting feedrate
K_ : Number of repeats (if required)
G81 (G98)
G81 (G99)
Initial level
Point R level
Point R
Point R
Point Z
Point Z
Explanations
After positioning along the X- and Y-axes, rapid traverse is performed
to point R.
Drilling is performed from point R to point Z.
The tool is then retracted in rapid traverse.
Before specifying G81, use a miscellaneous function (M code) to rotate
the spindle.
When the G81 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When K is used to specify the number of repeats, the M code is performed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
151
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Restrictions
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G81 in a single block.
Otherwise, G81 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S2000 ;
Cause the spindle to start rotating.
G90 G99 G81 X300. Y-250. Z-150. R-100. F120. ;
Position, drill hole 1, then return to point R.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
152
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.5
This cycle is used for normal drilling.
Cutting feed is performed to the bottom of the hole. At the bottom, a dwell
Drilling Cycle Counter
is performed, then the tool is retracted in rapid traverse.
Boring Cycle
This cycle is used to drill holes more accurately with respect to depth.
(G82)
Format
G82 X_ Y_ Z_ R_ P_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
P_ : Dwell time at the bottom of a hole
F_ : Cutting feed rate
K_ : Number of repeats (if required)
G82 (G98)
G82 (G99)
Initial level
Point R level
Point R
Point R
Point Z
Point Z
P
P
Explanations
After positioning along the X- and Y-axes, rapid traverse is performed
to point R.
Drilling is then performed from point R to point Z.
When the bottom of the hole has been reached, a dwell is performed. The
tool is then retracted in rapid traverse.
Before specifying G82, use a miscellaneous function (M code) to rotate
the spindle.
When the G82 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When K is used to specify the number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
153
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Restrictions
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D P
Specify P in blocks that perform drilling. If it is specified in a block that
does not perform drilling, it cannot be stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G83 in a single block.
Otherwise, G83 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S2000 ;
Cause the spindle to start rotating.
G90 G99 G82 X300. Y-250. Z-150. R-100. P1000 F120. ;
Position, drill hole 2, and dwell for 1 s at the
bottom of the hole, then return to point R.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
154
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.6
This cycle performs peck drilling.
It performs intermittent cutting feed to the bottom of a hole while
Peck Drilling Cycle
removing shavings from the hole.
(G83)
Format
G83 X_ Y_ Z_ R_ Q_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
Q_ : Depth of cut for each cutting feed
F_ : Cutting feedrate
K_ : Number of repeats (if required)
G83 (G98)
G83 (G99)
Initial level
Point R
Point R level
Point R
q
d
q
d
q
d
q
d
q
q
Point Z
Point Z
Explanations
Q represents the depth of cut for each cutting feed. It must always be
specified as an incremental value.
In the second and subsequent cutting feeds, rapid traverse is performed
up to a d point just before where the last drilling ended, and cutting feed
is performed again. d is set in parameter (No.5115).
Be sure to specify a positive value in Q. Negative values are ignored.
Before specifying G83, use a miscellaneous function (M code) to rotate
the spindle.
When the G83 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When K is used to specify the number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
155
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Limitations
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D Q
Specify Q in blocks that perform drilling. If they are specified in a block
that does not perform drilling, they cannot be stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G83 in a single block.
Otherwise, G83 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S2000 ;
Cause the spindle to start rotating.
G90 G99 G83 X300. Y-250. Z-150. R-100. Q15. F120. ;
Position, drill hole 1, then return to point R.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
156
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
13.1.7
An arbor with the overload torque detection function is used to retract the
tool when the overload torque detection signal (skip signal) is detected
Small-hole peck
during drilling. Drilling is resumed after the spindle speed and cutting
drilling cycle (G83)
feedrate are changed. These steps are repeated in this peck drilling cycle.
The mode for the small-hole peck drilling cycle is selected when the M
code in parameter 5163 is specified. The cycle can be started by
specifying G83 in this mode. This mode is canceled when G80 is
specified or when a reset occurs.
Format
G83 X_ Y_ Z_ R_ Q_ F_ I_ K_ P_ ;
X_ Y_ : Hole position data
Z_ : Distance from point R to the bottom of the hole
R_ : Distance from the initial level to point R
Q_ : Depth of each cut
F_ : Cutting feedrate
I_ : Forward or backward traveling speed (same format as F above)
(If this is omitted, the values in parameters No.5172 and No.5173 are
assumed as defaults.)
K_ : Number of times the operation is repeated (if required)
P_ : Dwell time at the bottom of the hole
(If this is omitted, P0 is assumed as the default.)
G83(G98)
G83(G99)
Initial level
Point R
Point R
Q
Q
Overload torque
Overload torque
Point Z
Point Z
Dwell
Dwell
: Initial clearance when the tool is retracted to point R and the clearance
from the bottom of the hole in the second or subsequent drilling
(parameter 5174)
Q : Depth of each cut
Path along which the tool travels at the rapid traverse rate
Path along which the tool travels (forward or backward) at the rapid
(
) traverse rate during the cycle specified with parameters
Path along which the tool travels at the programmed cutting feedrate
157
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Explanations
D Component operations
of the cycle
*Positioning along the X-axis and Y-axis
*Positioning at point R along the Z-axis
*Drilling along the Z-axis (first drilling, depth of cut Q, incremental)
Retraction (bottom of the hole → small clearance ∆, incremental)
Retraction (bottom of the hole → point R)
Advance (point R → point at a height of clearance ∆ from the bottom of
the hole)
Drilling (second or subsequent drilling, depth of cut Q + ∆ , incremental)
*Dwell
*Return to point R (or initial level) along the Z-axis, cycle end
Acceleration/deceleration during advancing and retraction is controlled
according to the cutting feed acceleration/deceleration time constant.
When retraction is performed, the position is checked at point R.
D Specifying an M code
When the M code in parameter 5163 is specified, the system enters the
mode for the small-hole peck drilling cycle.
This M code does not wait for FIN. Care must be taken when this M code
is specified with another M code in the same block.
(Example) Mjj M03 ; → Waits for FIN.
M03 Mjj ; → Does not wait for FIN.
D Specifying a G code
When G83 is specified in the mode for the small-hole peck drilling cycle,
the cycle is started.
This continuous-state G code remains unchanged until another canned
cycle is specified or until the G code for cancelling the canned cycle is
specified. This eliminates the need for specifying drilling data in each
block when identical drilling is repeated.
D Signal indicating that the
In this cycle, the signal indicating that the small-hole peck drilling cycle
cycle is in progress
is in progress is output after the tool is positioned at the hole position
along the axes not used for drilling. Signal output continues during
positioning to point R along the drilling axis and terminates upon a return
to point R or the initial level. For details, refer to the manual of the
machine tool builder.
D Overload torque
A skip signal is used as the overload torque detection signal. The skip
detection signal
signal is effective while the tool is advancing or drilling and the tool tip
is between points R and Z. (The signal causes a retraction). For details,
refer to the manual of the machine tool builder.
158
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
D Changing the drilling
In a single G83 cycle, drilling conditions are changed for each drilling
conditions
operation (advance drilling retraction). Bits 1 and 2 of parameter
OLS, NOL No. 5160 can be specified to suppress the change in drilling
conditions.
1.
Changing the cutting feedrate
The cutting feedrate programmed with the F code is changed for each
of the second and subsequent drilling operations. In parameters
No.5166 and No.5167, specify the respective rates of change applied
when the skip signal is detected and when it is not detected in the
previous drilling operation.
Cutting feedrate =F×α
<First drilling> α=1.0
<Second or subsequent drilling> α=α×βB100, where β is the rate of
change for each drilling operation
When the skip signal is detected during the previous drilling operation
:β=b1%(parameter No. 5166)
When the skip signal is not detected during the previous drilling
operation:β=b2%(parameter No. 5167)
If the rate of change in cutting feedrate becomes smaller than the rate
specified in parameter 5168, the cutting feedrate is not changed.
The cutting feedrate can be increased up to the maximum cutting
feedrate.
2.
Changing the spindle speed
The spindle speed programmed with the S code is changed for each of
the second and subsequent advances. In parameters 5164 and 5165,
specify the rates of change applied when the skip signal is detected and
when it is not detected in the previous drilling operation.
Spindle speed =S×γ
<First drilling> γ=1.0
<Second or subsequent drilling> γ=γ×δB100, where δ is the rate of
change for each drilling operation
When the skip signal is detected during the previous drilling operation
:β=b1%(parameter No. 5164)
When the skip signal is not detected during the previous drilling
operation:β=b2%(parameter No. 5165)
When the cutting feedrate reaches the minimum rate, the spindle speed
is not changed. The spindle speed can be increased up to a value
corresponding to the maximum value of S analog data.
Advancing and retraction of the tool are not executed in the same manner
D Advance and retraction
as rapid-traverse positioning. Like cutting feed, the two operations are
carried out as interpolated operations. The speed is subjected to exponen-
tial acceleration/deceleration. Note that the tool life management func-
tion excludes advancing and retraction from the calculation of the tool
life.
159
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
D Specifying address I
The forward or backward traveling speed can be specified with address
I in the same format as address F, as shown below:
G83 I1000 ;
(without decimal point)
G83 I1000. ;
(with decimal point)
Both commands indicate a speed of 1000 mm/min.
Address I specified with G83 in the continuous-state mode continues to
be valid until G80 is specified or until a reset occurs.
D Functions that can be
In this canned cycle mode, the following functions can be specified:
specified
⋅ Hole position on the X-axis, Y-axis, and additional axis
⋅ Operation and branch by custom macro
⋅ Subprogram (hole position group, etc.) calling
⋅ Switching between absolute and incremental modes
⋅ Coordinate system rotation
⋅ Scaling (This command will not affect depth of cut Q or small clearance
d1.)
⋅ Dry run
⋅ Feed hold
D Single block
When single-block operation is enabled, drilling is stopped after each
retraction.
D Feedrate override
The feedrate override function works during cutting, retraction, and
advancing in the cycle.
The number of retractions made during cutting and the number of
D Custom macro interface
retractions made in response to the overload signal received during
cutting can be output to custom macro common variables (#100 to #149)
specified in parameters No.5170 and No.5171. Parameters No.5170 and
No.5171 can specify variable numbers within the range of #100 to #149.
Parameter No.5170 : Specifies the number of the common variable to
which the number of retractions made during
cutting is output.
Parameter No.5171: Specifies the number of the common variable to
which the number of retractions made in response
to the overload signal received during cutting is
output.
160
13. FUNCTIONS TO SIMPLIFY
B-64124EN/01
PROGRAMMING
PROGRAMMING
Examples
N01M03 S___ ;
N02Mjj ;
N03G83 X_ Y_ Z_ R_ Q_ F_ I_ K_ P_ ;
N04X_ Y_ ;
:
:
N10G80 ;
<Description of each block>
N01: Specifies forward spindle rotation and spindle speed.
N02: Specifies the M code to execute G83 as the small-hole peck drilling cycle.
The M code is specified in parameter No.5163.
N03: Specifies the small-hole peck drilling cycle. Drilling data (except K and P)
is stored and drilling is started.
N04: Drills a small, deep hole at another position with the same drilling data as
for N03.
N10: Cancels the small-hole peck drilling cycle. The M code specified in N02
is also canceled.
13.1.8
This cycle performs tapping.
In this tapping cycle, when the bottom of the hole has been reached, the
Tapping Cycle
spindle is rotated in the reverse direction.
(G84)
Format
G84 X_ Y_ Z_ R_P_ F_ K_ ;
X_ Y_ : Hole position data
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
P_ : Dwell time
F_ : Cutting feedrate
K_ : Number of repents (if required)
G84 (G98)
G84 (G99)
Initial level
Spindle CW
Spindle CW
P
Point R
Point R
Point R level
P
Point Z
Point Z
P
P
Spindle CCW
Spindle CCW
161
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
PROGRAMMING
B-64124EN/01
Explanations
Tapping is performed by rotating the spindle clockwise. When the bottom
of the hole has been reached, the spindle is rotated in the reverse direction
for retraction. This operation creates threads.
Feedrate overrides are ignored during tapping. A feed hold does not stop
the machine until the return operation is completed.
Before specifying G84, use a miscellaneous function (M code) to rotate
the spindle.
When the G84 command and an M code are specified in the same block,
the M code is executed at the time of the first positioning operation. The
system then proceeds to the next drilling operation.
When the K is used to specify number of repeats, the M code is executed
for the first hole only; for the second and subsequent holes, the M code
is not executed.
When a tool length offset (G43, G44, or G49) is specified in the canned
cycle, the offset is applied at the time of positioning to point R.
Limitations
D Axis switching
Before the drilling axis can be changed, the canned cycle must be
canceled.
D Drilling
In a block that does not contain X, Y, Z, R, or any other axes, drilling is
not performed.
D P
Specify P in blocks that perform drilling. If it is specified in a block that
does not perform drilling, it cannot be stored as modal data.
D Cancel
Do not specify a G code of the 01 group (G00 to G03 or G60 (when the
MDL bit (bit 0 of parameter 5431) is set to 1)) and G84 in a single block.
Otherwise, G84 will be canceled.
D Tool offset
In the canned cycle mode, tool offsets are ignored.
Examples
M3 S100 ;
Cause the spindle to start rotating.
G90 G99 G84 X300. Y-250. Z-150. R-120. P300 F120. ;
Position, drill hole 1, then return to point R.
Y-550. ;
Position, drill hole 2, then return to point R.
Y-750. ;
Position, drill hole 3, then return to point R.
X1000. ;
Position, drill hole 4, then return to point R.
Y-550. ;
Position, drill hole 5, then return to point R.
G98 Y-750. ;
Position, drill hole 6, then return to the initial
level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position return
M5 ;
Cause the spindle to stop rotating.
162

 

 

 

 

 

 

 

Content      ..     4      5      6      7     ..