Showing posts with label Custom Macro for FANUC. Show all posts
Showing posts with label Custom Macro for FANUC. Show all posts

Friday, February 8, 2008

Custom Macro Programming for CNC Lathe - an Example

Interesting use of variable Programming for CNC Lathe :


Custom Macro Programming for CNC Lathe – Using variables for the Programming - An Interesting Example :

Discussion :

Ideal application for the use of Variable programming (i.e. Custom Macro Programming) on a CNC Lathe :

As such the usage is covering very vast application area. You name it and it can be codified using macros. But, by and large following are the core application areas :

1) Threading applications like variable lead threading, Multi start threading,
Square and Trapezoidal threading, circular form non-standard type
threading ;

2) Multi-start worm cutting ;
3) Face and radial grooving of non-standard type;
4) Design one’ s own cycle of any type.



Now; we'll see a real life example (from my own experience) ; and shall compare custom macro "A" for FANUC OT-D system with the latest Custom Macro "B" for the ultra Modern FANUC OiMATE-TC system :


Example : Carrying out 4 start threading of the size – M16 x 2.0 mm pitch. Write a custom Macro “A” Program for the same. Use Multi-start threading cycle – G76. Use following data :

Data :

i) O. D. = 15.8 mm
ii) δ1 = 30.0 mm
iii) δ2 = 5.0 mm
iv) 1st cut depth = 0.3 mm
v) Lead = Pitch x no. of starts = 2 x 4 = 8 mm
vi) Chamfer amount = 1.0 times the lead.
vi) Root diameter = 13.3 mm
vii) Thd. Height = 1.25 mm
viii) Length of threads = 50 mm
ix) No. of finishing passes = 3 nos.
x) Limiting depth of cut per pass = 0.075 mm
xi) Depth of cut for finishing pass = 0.050 mm.
xii) Angle of Approach = 60 degrees.

Custom Macro "A" Program for FANUC OT-D system :

O0001 (4 START THREADING);
N1;
T0000;
G28 U0 W0;
T0101;
G50 S800;
G97 S800 M03;
G65 H01 P#100 Q30000;
M08;
N10;
G0 X17.0 Z#100;
G65 H83 P20 Q#100 R36000;
G76 P031060 Q75 R50;
G76 X13.3 Z-55.0 P1250 Q300 F8.0;
G65 H02 P#100 Q#100 R2000;
G65 H80 P10;
N20;
M09;
G97 M05;
G28 U0 W0;
M30;
%


Now : Custom Macro “B” for FANUC Oi Mate – TC system : One of the most ultra-modern system in the market :

Same Example :


O0001 (4 START THREADING);
N1;
T0000;
G28 U0 W0;
T0101;
G50 S800;
G97 S800 M03;
#100 = 30.0;
M08;
N10;
G0 X17.0 Z#100;
IF [#100 GT 36.0] GOTO 20;
G76 P031060 Q75 R50;
G76 X13.3 Z-55.0 P1250 Q300 F8.0;
#100 = #100 + 2.0;
GOTO 10;
N20;
M09;
G97 M05;
G28 U0 W0;
M30;
%

_____ Jasmin C. Shah
CNC Programming Consultant