Instrumentation, measurement and control of bio process parameters ( Temperat...
4 basic cnc programming milling
1. FANUC INDIA FA & ROBOT
1
BASIC PROGRAMMING OF
CNC MILLING MACHINE
2. FANUC INDIA FA & ROBOT
2
Course contents Page No.
General coordinate System 04
Designation of machine axes 05
Machine coordinate system 06
Work coordinate system 07
Work datum setting procedure 09
Work coordinate system – Selection 11
Structure of
program 13
Course contents
3. FANUC INDIA FA & ROBOT
Course contents Page No.
Basic G codes 17
Basic M codes 26
Tool length compensation 27
Cutter radius compensation 29
Programming Examples 35
Canned cycles – Drilling 47
Pattern of holes 74
Custom macro programming 87
4. FANUC INDIA FA & ROBOT
4
General Co-ordinate system
General coordinate system
5. FANUC INDIA FA & ROBOT
5
Designation of machine axis
Designation of machine axis
6. FANUC INDIA FA & ROBOT
6
Machine coordinate system
• The point that is specific to
machine and serves as the
reference of the machine
is referred to as the
machine zero point
• Machine tool builder sets a
machine zero point for
each machine
Machine coordinate system
7. FANUC INDIA FA & ROBOT
7
Work co- ordinate system
A coordinate system used for
machining a workpiece is
referred to as a workpiece
coordinate system
A workpiece co-ordinate system
is also called as work reference
zero or work datum
The work datum will be set by
the user before the machining
process begins
Work coordinate system
8. FANUC INDIA FA & ROBOT
8
Work co- ordinate system
A coordinate system used
for machining a workpiece is
referred to as a workpiece
coordinate system
A workpiece co-ordinate
system is also called as
work reference zero or work
datum
The work datum will be set
by the user before the
machining process begins
Work coordinate system
9. FANUC INDIA FA & ROBOT
9
Work datum setting procedure
Move the work table and spindle head
to the reference position
Attach a dial gauge or fix the reference
tool in the spindle
Bring the tool towards the work piece
in rapid mode or manually and make
the tool to touch on the surface of the
workpiece and note the Z axis reading.
Then add the tool length with the same
sign to get the Z co ordinate value and
note down this value
WCS
MCS
Work datum setting procedure
10. FANUC INDIA FA & ROBOT
10
Work datum setting procedure cont.,
Then move the tool to any one edge
and make the tool to touch the edge
and note down the readings of X and
Y axes.ADD /subtract the radius of
the tool from the readings
The readings will be the distance
between the machine zero and work
zero point
Record noted X, Y, Z values in any
one of the work coordinate G codes
(G54 to G59)
Work datum setting procedure
11. FANUC INDIA FA & ROBOT
11
Work piece coordinate system - selection
G54 Workpiece coordinate system 1
G55 Workpiece coordinate system 2
G56 Workpiece coordinate system 3
G57 Workpiece coordinate system 4
G58 Workpiece coordinate system 5
G59 Workpiece coordinate system 6
Work piece coordinate system selection
12. FANUC INDIA FA & ROBOT
12
Work piece coordinate system Selection
Work piece coordinate system selection
13. FANUC INDIA FA & ROBOT
13
Structure of Program
Structure of Program
26. FANUC INDIA FA & ROBOT
26
Basic M codes
- Miscellaneous function
- Machine operations related
functions
• M01 – Optional stop
• M02 – Program stop
• M03 – Spindle on, CW
• M04 – Spindle on, CCW
• M05 – Spindle stop
• M06 – Turret indexing
• M07 – Coolant on
• M08 – Coolant on
• M09 – Coolant off
• M30 – Program stop and rewind
Basic M codes
27. FANUC INDIA FA & ROBOT
27
Tool length compensation
The procedure of mentioning the difference of length of tool assumed during
programming and actual tool used for machining is called tool length compensation
1) If the actual tool length is more than the assumed tool, the difference should be
mentioned as follows
G43 H01
H01 – here 01 specifies the address where the difference
of tool will be mentioned
2) If the actual tool length is less than the assumed tool, the difference should be
mentioned as follows
G44 H01
H01 – here 01 specifies the address where the difference
of tool will be mentioned
Tool length compensation
28. FANUC INDIA FA & ROBOT
28
Tool length compensation
• G43 - Tool length offset plus
• G44 - Tool length offset minus
• G49 - Tool length compensation cancel
Tool length compensation
29. FANUC INDIA FA & ROBOT
29
Cutter radius compensation
-When the Endmill cutter of some specified
diameter is commanded to position at a location,
actually the centre point of the cutter only
coincide with the addressed point of the work
piece.
- So, t is necessary to shift the cutter for a radius
amount towards left or right from the position.
The procedure of shifting the tool of radius
amount is called as Cutter Radius
Compensation
G41 - Cutter radius compensation left
G42 - Cutter radius compensation right
G40 - Cutter radius compensation
cancel
Cutter radius compensation
30. FANUC INDIA FA & ROBOT
30
Cutter radius compensation
The type of compensation is selected from
the starting point as follows
Type of
operation
Direction of
movement
Type of
compensation
External Clockwise G41
External Counter
clockwise
G42
Internal Clockwise G42
Internal Counter
clockwise
G41
Cutter radius compensation
31. FANUC INDIA FA & ROBOT
31
Cutter radius compensation
Cutter radius compensation
32. FANUC INDIA FA & ROBOT
32
G41 - Cutter radius compensation left
G41 D07;
Here, D specifies the address of
offset at which the radius of tool
will be mentioned
Cutter radius compensation
33. FANUC INDIA FA & ROBOT
33
G42 - Cutter radius compensation right
G41 D07;
Here, D specifies the
address of offset at which
the radius of tool will be
mentioned
Cutter radius compensation
34. FANUC INDIA FA & ROBOT
34
Operations performed in machining centre
Side cutting
Hole machining
Face cutting
Operations in machining centre
36. FANUC INDIA FA & ROBOT
36
Programming example
Making 150 mm* 150 mm square
for a depth of 5mm in a given Billet
Assumptions
Work offset = G54
Tool length compensation = H01
Point X co ordinate
value
Y co ordinate
value
1 25 25
2 25 175
3 175 175
4 175 25
Programming Examples
37. FANUC INDIA FA & ROBOT
37
O1001 ; Program Number
N1 G21 G94 ; Metric input, Feed in mm/min.
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position
N3 T01 M06 ; (Dia. 15 mm End drill)
N4 G90 G54 G00 X25.0 Y25.0 ; Work offset call
N5 G43 H01 Z100.0 ; Tool length compensation call
N6 M03 S1000 Z20 ; Positioning above the starting point and
spindle starts rotating at 1000 rpm
N7 G01 Z-5.0 F400 ; The tool is moved inside work of -5.0 mm
N8 Y175.0 ; The tool is moved to second corner
N9 X175.0 ; The tool is moved to third corner
N10 Y25.0 ; The tool is moved to fourth corner
N11 X25.0 ; The tool is moved back to first corner
N12 G00 Z100.0 M05 ; The tool is taken out of the work and
spindle stop
N13 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
N14 M30 ; Program stop snd rewind
Programming Examples
38. FANUC INDIA FA & ROBOT
38
PROGRAMMING EXAMPLE WITHOUT SUB PROGRAM
2
1
3 4
5
6
8 7
Blank size: 150mm*150mm*20mm
Point X Y
1 0 25
2 0 50
3 45 150
4 105 150
5 150 50
6 150 25
7 125 0
8 25 0
G55
Programming Examples
39. FANUC INDIA FA & ROBOT
39
O1002 ; Program Number
N1 G21 G94 ; Metric input, Feed in mm/min.
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position
N3 T01 M06 ; (Dia. 15 mm End drill)
N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call
N5 G43 H01 Z100.0 ; Tool length compensation call
N6 M03 S1000 Z20 ; Positioning above the starting point and
spindle starts rotating at 1000 rpm
N7 G01 Z-20.0 F400 ; The tool is moved inside work of -20.0 mm
N8 G41 G01 X0.0 Y0.0 D01 ; Cutter radius compensation call
N9 G01 X0.0 Y50.0 ; The tool is moved to point 2
N10 G01 X45.0 Y150.0 ; The tool is moved to point 3
N11 G01 X105.0 Y150.0 ; The tool is moved to point 4
N12 G01 X150.0 Y50.0 ; The tool is moved to point 5
N13 G01 X150.0 Y25.0 ; The tool is moved to point 6
Programming Examples
40. FANUC INDIA FA & ROBOT
40
N14 G01 X125.0 Y0.0 ; The tool is moved point 7
N15 G01 X25.0 Y0.0 ; The tool is moved to point 8
N16 G01 X0.0 Y25.0 ; The tool is moved to point 1
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position
N18 G00 Z100.0 M05 ; The tool is taken out of the work and
spindle stop
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
N20 M30 ; Program stop and rewind
Programming Examples
41. FANUC INDIA FA & ROBOT
41
PROGRAMMING EXAMPLE WITH SUB PROGRAM
2
1
3 4
5
6
8 7
Blank size: 150mm*150mm*20mm
Point X Y
1 0 25
2 0 50
3 45 150
4 105 150
5 150 50
6 150 25
7 125 0
8 25 0
G55
Programming Examples
42. FANUC INDIA FA & ROBOT
42
O1003 ; Program Number
N1 G21 G94 ; Metric input, Feed in mm/min.
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position
N3 T01 M06 ; (Dia. 15 mm End drill)
N4 G90 G55 G00 X-25.0 Y-25.0 ; Work offset call
N5 G43 H01 Z100.0 ; Tool length compensation call
N6 M03 S1000 Z20 ; Positioning above the starting point and
spindle starts rotating at 1000 rpm
N7 G01 Z0.0 F400 ; The tool is moved To Z0.0
N8 M98 P1500 L10 ; Sub program No.1500 call, L indicates
No. of times
N18 G00 Z100.0 M05 ; The tool is taken out of the work and
spindle stop
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
N20 M30 ; Program stop snd rewind
Programming Examples
43. FANUC INDIA FA & ROBOT
43
O 1500 ; Sub program No
N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm
N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left),
F400 D01 ; The tool is moved towards work piece
N220 G01 X0.0 Y50.0 ; The tool is moved to point 2
N230 G01 X45.0 Y150.0 ; The tool is moved to point 3
N240 G01 X105.0 Y150.0 ; The tool is moved to point 4
N250 G01 X150.0 Y50.0 ; The tool is moved to point 5
N260 G01 X150.0 Y25.0 ; The tool is moved point 6
N270 G01 X125.0 Y0.0 ; The tool is moved to point 7
N280 G01 X25.0 Y0.0 ; The tool is moved to point 8
N290 G01 X0.0 Y25.0 ; The tool is moved to point 1
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position
N310 M99 ; Sub program end
Programming Examples
44. FANUC INDIA FA & ROBOT
44
PROGRAMMING EXAMPLE WITH SUB PROGRAM
2 3 4 5
1
R25
8 7 6
Blank size: 200mm*200mm*20mm
Point X Y
1 0 0
2 0 200
3 75 200
4 125 200
5 200 200
6 200 0
7 125 0
8 75 0
G57
R25
Programming Examples
45. FANUC INDIA FA & ROBOT
45
O1004 ; Program Number
N1 G21 G94 ; Metric input, Feed in mm/min.
N2 G91 G28 X0 Y0 Z0 ; The tool is moved to home position
N3 T01 M06 ; (Dia. 15 mm End drill)
N4 G90 G57 G00 X-25.0 Y-25.0 ; Work offset call
N5 G43 H01 Z100.0 ; Tool length compensation call
N6 M03 S1000 Z20 ; Positioning above the starting point and
spindle starts rotating at 1000 rpm
N7 G01 Z0.0 F400 ; The tool is moved To Z0.0
N8 M98 P1501 L10 ; Sub program No.1500 call, L indicates
No. of times
N18 G00 Z100.0 M05 ; The tool is taken out of the work and
spindle stop
N19 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
N20 M30 ; Program stop snd rewind
Programming Examples
46. FANUC INDIA FA & ROBOT
46
O 1501 ; Sub program No
N200 G91 Z-2.0 F400 ; The tool is moved incrementally -2 mm
N210 G90 G41 G01 X0.0 Y0.0 Cutter Radius comp. (left),
F400 D01 ; The tool is moved towards work piece
N220 G01 X0 Y200.0 ; The tool is moved to point 2
N230 G01 X75.0 Y200.0 ; The tool is moved to point 3
N240 G03 X125.0 Y200.0 R25.0 ; The tool is moved to point 4 with CIP-CCW
N250 G01 X200.0 Y200.0 ; The tool is moved to point 5
N260 G01 X200.0 Y0 ; The tool is moved point 6
N270 G01 X125.0 Y0 ; The tool is moved to point 7
N280 G03 X75.0 Y0 R25.0 ; The tool is moved to point 8 with CIP CCW
N290 G01 X0 Y0 ; The tool is moved to point 1
N17 G40 G00 X-25.0 Y-25.0 ; The tool is moved back to starting position
N310 M99 ; Sub program end
Programming Examples
47. FANUC INDIA FA & ROBOT
47
Canned cycles - Drilling
Canned cycles - Drilling
48. FANUC INDIA FA & ROBOT
48
G81 SPOT DRILLING CYCLE
STEP Description of the cycle
1 Rapid motion to hole position
2 Rapid motion to safety
level/reference level
3 Feed rate motion to Z depth
4 Rapid retract to
initial/reference level
FORMAT AND EXPLANATION
G81 X…. Y…. R…. Z…. F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
F = Federate specification
Canned cycles - Drilling
49. FANUC INDIA FA & ROBOT
49
Programming Example
BLANK SIZE
100*100*20
DIA. 8, FIVE HOLES
HOLE1 (20,20)
HOLE2 (20,80)
HOLE3 (80,80)
HOLE4 (80,20)
HOLE5 (50,50)
Canned cycles - Drilling
51. FANUC INDIA FA & ROBOT
51
G82 COUNTER BORING CYCLE
STEP Description of the cycle
1 Rapid motion to hole position
2 Rapid motion to safety level/reference level
3 Feed rate motion to Z depth
4 Dwell at the depth in millisecond
5 Rapid retract to initial/reference level
Format and explanation
G82 X…. Y…. R…. Z…. P….F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
P = Dwell time in milliseconds
F = Federate specification
Canned cycles - Drilling
52. FANUC INDIA FA & ROBOT
52
PROGRAMMING EXAMPLE
BLANK SIZE
100*100*20
DIA. 8, FIVE HOLES
HOLE1 (20,20)
HOLE2 (20,80)
HOLE3 (80,80)
HOLE4 (80,20)
HOLE5 (50,50)
Canned cycles - Drilling
54. FANUC INDIA FA & ROBOT
54
DEEP HOLE DRILLING HIGH SPEED DEEP HOLE CYCLE
STEP Description of the cycle STEP Description of the cycle
1 Rapid motion to hole position 1 Rapid motion to hole position
2 Rapid motion to safety
level/reference level
2 Rapid motion to safety
level/reference level
3 Feed rate motion to Z depth by
the amount of specified depth
3 Feed rate motion to Z depth by the
amount of specified depth
4 Rapid retract to safety level/R
level
4 Rapid retract by a clearance value
(clearance value is set by a system
parameter)
5 Rapid motion to the previous
depth less a clearance
(clearance is set by a system
parameter)
5 Feed rate motion in Z axis by the
distance specified plus clearance
6 Steps 3,4, and 5 repeat until the
programmed Z depth is reached
6 Steps 4 and 5 repeat until the
programmed Z depth is reached
7 Rapid retract to safety/R level 7 Rapid retract to safety/R level
Canned cycles - Drilling
55. FANUC INDIA FA & ROBOT
55
FORMAT AND EXPLANATION
G73 X…. Y…. R…. Z…. Q….F…. G83 X…. Y…. R…. Z…. Q….F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
Q = Pecking depth (Micron)
F = Federate specification
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
Q = Pecking depth (Micron)
F = Federate specification
Canned cycles - Drilling
56. FANUC INDIA FA & ROBOT
56
WHEN TO USE DEEP HOLE DRILLING CYCLE (G83)
For deep hole drilling, also known as peck drilling, where the drill has to be
retracted above the part (to a clearance position) after drilling to a certain depth.
WHEN TO USE HIGH SPEED DEEP HOLE DRILLING CYCLE(G73)
For deep hole drilling, also known as peck drilling, where the chip breaking is ore
important than the full retract of the drill from the holes. This type often used for a
long series drills, when a full retract is not very important.
Programming Example
BLANK SIZE
100*100*20
DIA. 8, FIVE HOLES
HOLE1 (20,20)
HOLE2 (20,80)
HOLE3 (80,80)
HOLE4 (80,20)
HOLE5 (50,50)
Canned cycles - Drilling
58. FANUC INDIA FA & ROBOT
58
TAPPING CYCLE - STANDARD TAPPING CYCLE - REVERSE
STEP Description of the Cycle STEP Description of the cycle
1 Rapid motion to hole position 1 Rapid motion to hole position
2 Rapid motion to safety
level/reference level
2 Rapid motion to safety
level/reference level
3 Feed rate motion to Z depth 3 Feed rate motion to Z depth
4 Spindle rotation stop 4 Spindle rotation stop
5 Spindle reverse rotation (M04)
and feed rate back to safety/R
level
5 Spindle reverse rotation (M04)
and feed rate back to safety/R
level
6 Spindle rotation stop 6 Spindle rotation stop
7 Spindle rotation normal 7 Spindle rotation normal
Canned cycles - Drilling
59. FANUC INDIA FA & ROBOT
59
FORMAT AND EXPLANATION
G84 X…. Y…. R…. Z….R… F…. G74 X…. Y…. R…. Z…R….. F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
F = Federate specification
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
F = Federate specification
Canned cycles - Drilling
60. FANUC INDIA FA & ROBOT
60
The important notes for the tapping operation
• Safety/reference level should be higher in the tapping cycle than in the other cycles to
follow for the stabilization of the feed rate, due to acceleration
• Feed rate section for the tap is very important. In tapping, there is a direct relationship
between the spindle speed and the lead of the tap. This relationship must be maintained at
all the times.
• The override switches on the control panel used for spindle speed and feed rate, are
ineffective during these cycles.
• Tapping motion (in or out of the part) will be completed even if the feed hold key is
pressed during tapping cycle processing for safety reasons.
PROGRAMMING EXAMPLE
BLANK SIZE
100*100*20
DIA. 8, FIVE HOLES
HOLE1 (20,20)
HOLE2 (20,80)
HOLE3 (80,80)
HOLE4 (80,20)
HOLE5 (50,50)
Canned cycles - Drilling
62. FANUC INDIA FA & ROBOT
G85 X…. Y…. R…. Z…. F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
F = Feed rate specification
62
G85 BORING CYCLE
STEP Description of the cycle
1 Rapid motion to hole position
2 Rapid motion to
safety level/reference level
3 Feed rate motion to Z depth
4 Feed rate motion back to safety/R level
Canned cycles - Drilling
63. FANUC INDIA FA & ROBOT
63
This cycle is typically used for boring and reaming operations.
This cycle is used in cases where the tool motion into and out of
holes should improve the hole surface finish, its dimensional
tolerances and/or its concentricity, roundness, etc.
DIMNSION OF
BLANK
100*100*20
HOLE DIA. 10 mm
HOLE (50,50)
WHEN TO USE THIS CYCLE
PROGRAMMING EXAMPLE
Canned cycles - Drilling
65. FANUC INDIA FA & ROBOT
65
PRECISION BORING CYCLE (G76)
STEP Description of the cycle
1 Rapid motion to hole position
2 Rapid motion to
safety level/reference level
3 Feed rate motion to Z depth
4 Spindle rotation stop
5 Shifting in programmed direction
6 Rapid retract to reference level
ROUGH BORING CYCLE (G86)
STEP Description of the cycle
1 Rapid motion to hole position
2 Rapid motion to
safety level/reference level
3 Feed rate motion to Z depth
4 Spindle rotation stop
5 Rapid retract to reference level
Canned cycles - Drilling
66. FANUC INDIA FA & ROBOT
66
Format and Explanation
G86 X…. Y…. R…. Z…Q... F (rough)
G76 X…. Y…. R…. Z…I…J... F ….(fine)
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
F = Federate specification
Q = amount of shift for boring
I, J = amount of shift
68. FANUC INDIA FA & ROBOT
68
BORING CYCLE (G88)
STEP Description of the cycle
1 Rapid motion to XY position
2 Rapid motion to safety level/reference level
3 Feed rate motion to Z depth
4 Dwell at the depth in milliseconds
5 Spindle rotation stops (feed hold condition is generated and the CNC operator
switches to manual operation mode and perform a manual task, then switches back to
memory mode)
6 Rapid retract to safety/reference level
7 Spindle rotation on
G88 X…. Y…. R…. Z….P… F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st. point)
Z = Final depth (abs.)
P = Dwell time in milliseconds
F = Federate specification
Canned cycles - Drilling
69. FANUC INDIA FA & ROBOT
69
WHEN TO USE THIS CYCLE
This cycle is rare. Its use is limited to boring operations with special tools that require
manual interference at the bottom of a hole. This cycle may be used by some tool
manufacturers for certain operations.
PROGRAMMING EXAMPLE
Canned cycles - Drilling
DIMNSION OF
BLANK
100*100*20
HOLE (50,50)
71. FANUC INDIA FA & ROBOT
71
BORING (REAMING) CYCLE (G89)
STEP Description of the cycle
1 Rapid motion to XY position
2 Rapid motion to safety level/reference
level
3 Feed rate motion to Z depth
4 Dwell at the depth
5 Feed rate motion back to safety/R level
G89 X…. Y…. R…. Z…. P…F….
X = Hole position in X axis
Y = Hole position in Y axis
R = Reference position (Z axis st.
point)
Z = Final depth (abs.)
P = dwell time in milliseconds
F = Federate specification
Canned cycles - Drilling
72. FANUC INDIA FA & ROBOT
72
WHEN TO USE THIS CYCLE
For boring operations, when the feed rate is required for the in and out directions
of the machined hole, with a specified dwell at the bottom. The dwell is the only
value that distinguishes this cycle from the cycle85/G85.
PROGRAMMING EXAMPLE
Canned cycles - Drilling
DIMNSIONS OF BLANK
100*100*20
HOLE DIA. 10 mm
HOLE (50,50)
78. FANUC INDIA FA & ROBOT
78
PATTERN OF HOLES IN AN INCLINED LINE
ANGLE OF THE INCLINED LINE WITH X AXIS = 15
DISTANCE BETWEEN HOLES = 40
FIRST HOLE DIMENSION IS (20,20)
DIAMETER OF HOLES = 10 mm
The following calculation is required in FANUC to find distance between
holes in X axis and in Y axis.
X = 40 * cos15 = 38.63703305
Y = 40 * sin15 = 10.3527618
Pattern of holes
82. FANUC INDIA FA & ROBOT
82
CIRCLE OF HOLES PATTERN
Distance of reference point in X axis from the WCS = 75
Distance of reference point in Y axis from the WCS = 60
Starting angle of the first hole from X axis = 30 deg.
Indexing angle between holes = 60, Number of holes = 6
Radius of the circle = 50mm, Diameter of holes = 8mm
1
2
3
4
5
6
Pattern of holes
83. FANUC INDIA FA & ROBOT
83
Hole # 1
X = 75 + 50 * cos30 = 118.30127
Y = 60 + 50 * sin30 = 85.0
Hole # 2
X = 75 + 50 * cos90 = 75.0
Y = 60 + 50 * sin90 = 110.0
Hole # 3
X = 75 + 50 * cos150 = 31.6987298
Y = 60 + 50 * sin150 = 85.0
Hole # 4
X = 75 + 50 * cos210 = 31.6987298
Y = 60 + 50* sin210 = 35.0
Hole # 5
X = 75 + 50 * cos270 = 75.0
Y = 60 + 50 * sin270 = 100.0
Hole # 6
X = 75 + 50 * cos330 = 118.30127
Y = 60 + 50* sin330 = 35.0
Pattern of holes
85. FANUC INDIA FA & ROBOT
85
CIRCLES OF HOLES USING POLAR SYSTEM
Distance of reference point in X axis from the WCS = 75
Distance of reference point in Y axis from the WCS = 60
Starting angle of the first hole from X axis = 30 deg.
Indexing angle between holes = 60, Number of holes = 6
Radius of the circle = 50mm, Diameter of holes = 8mm
1
2
3
4
5
6
Pattern of holes
87. FANUC INDIA FA & ROBOT
87
CUSTOM MACRO PROGRAMMING
Custom Macro programming
88. FANUC INDIA FA & ROBOT
Custom Macro
• Part Program prepared using variables
• Arithmetic operations possible
• Conditional statements like GOTO , DO WHILE are used
• For developing user defined cycles
• Can be easily called from user program
Custom Macro programming
89. FANUC INDIA FA & ROBOT
89
Macro call
Custom Macro programming
90. FANUC INDIA FA & ROBOT
Simple Macro Call
Custom Macro programming
94. FANUC INDIA FA & ROBOT
Model Macro Call- G66
• Once G66 is issued to specify a modal call a macro is
called after a block specifying movement along axes is
executed. This continues until G67 is issued to cancel a
modal call.
Custom Macro programming