-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hallo Fern,
may be you are able to integrate my gcode to make a spiral pocket. It may begin from a radius a little bigger than the tool radius and is able also to enlage a pocket with a pilot bore.
This way to make a spiral is not so havy load for the mill. I made several tests with my sup, but I would prefer to use it out of NCam.
I have also a subroutine spiral from out to in, I use that quiete often, wenn I want a remainig shaft on a plate, I have not found any way to do that with NCam, as there is no way to leave an iland on the part, I can send you the gcode sub if you like.
Regards Norbert (gmoccapy)
`
; Spiral from in to out
; from Norbert Schechner
G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
T8 M6
G43
S 3600 M3
#<Start_X> = [125/2]
#<Start_Y> = [130/2]
#<Start_Radius> = 6.02
#<End_Radius> = 88.0
; #5410 = Tool Diameter
#<Step_Over> = 6.0 ; Step Over of Tool
#<Cut_Depth> = 5.0 ; Max Cut Depth
#<Safe_Z> = 20.0
#<Start_Z> = 0.0
#<Final_Z> = -15.0
#<Feed_XY> = 7500
#<Feed_Z> = 250
; Check parameter first, i.e. negative StepOver will lead to infinite loop
o101 if [ #<End_Radius> LE #<Start_Radius> ]
(DEBUG, end radius <= start radius)
M2
o101 endif
o102 if [ #<Start_Radius> LT [ #5410 / 2 ] ]
(DEBUG, Start Radius to small or no tool in spindle ?)
M2
o102 endif
o103 if [ #<Step_Over> LE 0 ]
(DEBUG, StepOver <= 0, Must be a positive number ?)
M2
o103 endif
o104 if [ #<Cut_Depth> LE 0 ]
(DEBUG, CutDepth <= 0, Must be a positive number ?)
M2
o104 endif
o105 if [ #<Feed_XY> LE 0 or #<Feed_Z> LE 0 ]
(DEBUG, Feed values <= 0, Must be a positive numbers ?)
M2
o105 endif
o106 if [ #<Safe_Z> LT #<Start_Z> ]
(DEBUG, Save Z can not be smaller than Final Z value!)
M2
o106 endif
o107 if [ #<Final_Z> GE #<Start_Z> ]
(DEBUG, Final Z can not be smaller than Start Z value!)
M2
o107 endif
G0 X[ #<Start_X> ] Y[ #<Start_Y> ] Z [ #<Safe_Z> ]
#<Current_Z> = #<Start_Z>
o100 while [ #<Current_Z> GT #<Final_Z> ]
#<Current_Z> = [ #<Current_Z> - #<Cut_Depth> ]
o111 if [ [ #<Current_Z> ] LE #<Final_Z> ]
#<Current_Z> = #<Final_Z>
o111 endif
#<Current_Radius> = #<Start_Radius>
G40
G0 X[ #<Start_X> + [#<Start_Radius> * -1 ] ] Y[ #<Start_Y> ]
G0 Z [ #<Current_Z> + #<Cut_Depth> ]
F [ #<Feed_Z> ]
G41
G3 X[ #<Start_X> + #<Start_Radius> ] Y[ #<Start_Y> ] Z [ #<Current_Z> ] I[ #<Start_Radius> ] J0
F [ #<Feed_XY> ]
O112 while [ #<Current_Radius> + #<Step_Over> LT #<End_Radius> ]
#<Current_Radius> = [ #<Current_Radius> + #<Step_Over> ]
G3 X[ #<Start_X> ] Y[ #<Start_Y> + #<Current_Radius> ] R[ #<Current_Radius> ]
G3 X[ #<Start_X> + #<Current_Radius> ] Y[ #<Start_Y> ] R [ #<Current_Radius> * -1 ]
O112 endwhile
G3 X[ #<Start_X> ] Y[ #<Start_Y> + #<End_Radius> ] R[ #<End_Radius> ]
G3 X[ #<Start_X> ]Y[ #<Start_Y> + #<End_Radius> ] I0 J[ #<End_Radius> * -1]
G3 X[ #<Start_X> - #<Start_Radius>] ] Y[ #<Start_Y> + [ #<End_Radius> - #<Start_Radius> ] ] Z[ #<Current_Z> + #<Cut_Depth> ] R[ #<Start_Radius> ]
o100 endwhile
G0 X[ #<Start_X> ] Y[ #<Start_Y> ] Z [ #<Safe_Z> ]
M2
`