MachineSMM
06-20-2003, 09:52 AM
I am trying to make a macro to cut a round groove into some steel. I want it to ramp in and out of the cut. I am going to paste what I have so for below this post. The problem I am having is it always leaves a mark at the start and end point (the same spot). I think what is happening is there is a little rounding error.
If anyone has some ideas please let me know. If you have more questions either post here, email me christellers@eschelon.com or give me a call 612-823-6477.
Thanks
Macro
%
O9050(O-RING MILLING MACRO)
(#7 D = CIRCLE DIAMETER)
(#9 F = FEEDRATE)
(R CANNOT EXCEED 24 PERCENT)
(#18 R = PERCENTAGE OF CIRCUMFERENCE TO RAMP IN AT)
(#26 Z = FINAL DEPTH)
(INTERNAL VARIABLES)
(#4 CIRCLE RADIUS)
(#5 LENGTH OF RAMP MOVE BASED ON THE PERCENTAGE USER DEFINES)
(#6 ANGLE OF RAMP MOVE)
(#10 X POSITION OF IN RAMP MOVE)
(#11 Y POSITION OF IN RAMP MOVE)
(#12 #1 INC MOVE)
#3=#18*.01
#4=#7/2
#5=[3.1416*#7]*#3
#6=[57.296*#5]/#4
#10=#4*COS[#6]
#11=#4*SIN[#6]
#12=#4-#10
G91G17
G00X#10Y-#11
G90G17
G00Z.1
G01Z.005F5.0
G91G17
G03X#12Y#11I-#10J#11Z[#26+[-.005]]F#9
G03I-#4
G03X-#12Y#11I-#4Z-[#26+[-.005]]F[#9*4]
G01Z.095F50.
(DONE)
G90G00Z1.
N9M99
%
Macro Details
G65 makes the command Simple
G66 makes the command Modal, must be canceled (G67)
P9050 is the Sub-program Number of the C’Bore Macro
F = Feedrate
D = Ring Centerline Diameter
--- R CANNOT EXCEED 24. ---
R = Percentage of Circumference to Ramp In At
Z = Final Depth of Cut
Z0 is ALWAYS Top of Surface to be Cut
Example G66 Code:
G66 P9050 D.5 Z-.05 R15. F5.
X0.0 Y0.0
X3.0 Y0.0
X6.0 Y0.0
G67
Example G65 Code:
G66 P9050 D.5 Z-.05 R15. F5.
X0.0 Y0.0
G66 P9050 D.5 Z-.05 P15. F5.
X3.0 Y0.0
G66 P9050 D.5 Z-.05 P15. F5.
X6.0 Y0.0
If anyone has some ideas please let me know. If you have more questions either post here, email me christellers@eschelon.com or give me a call 612-823-6477.
Thanks
Macro
%
O9050(O-RING MILLING MACRO)
(#7 D = CIRCLE DIAMETER)
(#9 F = FEEDRATE)
(R CANNOT EXCEED 24 PERCENT)
(#18 R = PERCENTAGE OF CIRCUMFERENCE TO RAMP IN AT)
(#26 Z = FINAL DEPTH)
(INTERNAL VARIABLES)
(#4 CIRCLE RADIUS)
(#5 LENGTH OF RAMP MOVE BASED ON THE PERCENTAGE USER DEFINES)
(#6 ANGLE OF RAMP MOVE)
(#10 X POSITION OF IN RAMP MOVE)
(#11 Y POSITION OF IN RAMP MOVE)
(#12 #1 INC MOVE)
#3=#18*.01
#4=#7/2
#5=[3.1416*#7]*#3
#6=[57.296*#5]/#4
#10=#4*COS[#6]
#11=#4*SIN[#6]
#12=#4-#10
G91G17
G00X#10Y-#11
G90G17
G00Z.1
G01Z.005F5.0
G91G17
G03X#12Y#11I-#10J#11Z[#26+[-.005]]F#9
G03I-#4
G03X-#12Y#11I-#4Z-[#26+[-.005]]F[#9*4]
G01Z.095F50.
(DONE)
G90G00Z1.
N9M99
%
Macro Details
G65 makes the command Simple
G66 makes the command Modal, must be canceled (G67)
P9050 is the Sub-program Number of the C’Bore Macro
F = Feedrate
D = Ring Centerline Diameter
--- R CANNOT EXCEED 24. ---
R = Percentage of Circumference to Ramp In At
Z = Final Depth of Cut
Z0 is ALWAYS Top of Surface to be Cut
Example G66 Code:
G66 P9050 D.5 Z-.05 R15. F5.
X0.0 Y0.0
X3.0 Y0.0
X6.0 Y0.0
G67
Example G65 Code:
G66 P9050 D.5 Z-.05 R15. F5.
X0.0 Y0.0
G66 P9050 D.5 Z-.05 P15. F5.
X3.0 Y0.0
G66 P9050 D.5 Z-.05 P15. F5.
X6.0 Y0.0