Help writing chip breaker custom macro
I thought that I had a copy of the chip breaker turn/dwell program from my old machine but I seem to have misplaced it. So anyone want to help me write one? or if you have one post it?
I want to turn/dwell/turn/dwell/turn...ect
I thought it looked something like this:
%9010
#1 =z end
#2 =turn distance/chip break
#3 =dwell
#4 =feed
IF [#2 LT0] goto2
IF [#3 LT0] goto3
IF [#4 LT0] goto4
while [#5041 LT #1] DO1
G1 W#2 f#4
G4 U#3
END1
N1 #3000=1 (No Z)
N2 #3000=2 (No Q)
N3 #3000=3 (No D)
N4 #3000=4 (No F)
%
My questions are
-How do I define my current Z position. If I remember the old program correctly I thought it was #1=#5401 but I could be wrong. I just looked in the Fanuc manual and think I need to use a #5041-5048 macro but can someone confirm this. Also how do I determine what axis number my X and Z are?
-I want to write the code in the program as G65 Z(end) Q(chip break) D(dwell) F(feed). How do I link Z,Q,D, and F to my sub program? Can I say #2=Q? Or do I use some parameter #'s like Q=#5403?
-In my WHILE statement should I use a Z or W for my feed move? Does it matter? Do I have it written correctly that the loop will end when it hits my end point or could it possibly over-turn by going to the end of the last chip break assuming the chip break distance is not divisible by the overall distance.
-How do I signify the end of the loop? m99?
I know thats kinda a lot so thanks a bunch in advance!
CNC Product Manager / Training Consultant