Thread: how to rapid in a hole then peck drill coming out of the hole to clear

1. how to rapid in a hole then peck drill coming out of the hole to clear

My question... How do you program a peck drill cycle that starts at the bottom of a hole?

I have an Okuma control where I can do this in one line:
G73 X0 Z-2(feed distance) K-.95(rapid in distance) L.05(retract to start position after this amount) D.05(peck amount)

This line will rapid to z-.95, then drill z-.05 more, retract to start position, rapid back within parameter setting of previous depth, then repeat this sequence until Z distance is met.

What is the best way to do this on a fanuc lathe?
Thanks

2. To the best of my knowledge you can not do this on a fanuc lathe with a standard canned cycle. You will have to either long hand the code or write a macro.

Stevo

3. The closest is Back Boring Cycle (G87) for a single-point tool, but it has continuous feed and available on milling machines only.

4. Program each peck as a separate drilling cycle?

DP

5. christinandavid Program each peck as a separate drilling cycle?

I have been using this method, and was hoping that someone had a better method...

Does anyone know how to do something like this in a macro?

6. Lets say you start at Z-100 and want to drill to Z-200 in 5mm pecks...

#1=100.
WHILE[#1LT200.]DO1
G0Z[#1+1.]
G1Z[#1-5.]F100
G0Z0.
#1=#1+5.
END1

Of course, you could go further and make it as easy to alter as a pecking cycle if you feel the need. Let us know if you need that flexibility.

DP

7. This sounds like it might work. Can you please explain each line for me?

Could you explain how to make it as easy to alter as a peck cycle?

8. Originally Posted by bilbo2
My question... How do you program a peck drill cycle that starts at the bottom of a hole?

I have an Okuma control where I can do this in one line:
G73 X0 Z-2(feed distance) K-.95(rapid in distance) L.05(retract to start position after this amount) D.05(peck amount)

This line will rapid to z-.95, then drill z-.05 more, retract to start position, rapid back within parameter setting of previous depth, then repeat this sequence until Z distance is met.

What is the best way to do this on a fanuc lathe?
Thanks
For some strange reason, I thought you want to drill by advancing (pecking) in positive Z-direction! You perhaps want to drill from, say, Z-100 to Z-200, and want to avoid pecking up to Z-100. If so, this can be very easily done by manipulating the R-point. Pecking would start from R-point.

From a book:

Position of R-point
In G-code system B and C, depending on certain parameter settings, R would either always be incremental distance from the initial level (irrespective of G90/G91), or it can be either absolute coordinate or incremental distance from the initial level (depending on G90 and G91, respectively). In system A, which we are following, this is again parameter dependent; it can be either absolute coordinate or incremental distance from the initial level. Since parameter settings are going to vary on different machines, the best way would be to execute a program on the machine, in a safe working zone, to find out whether R is absolute or incremental. Another way would be to set the parameter 5102#6 to 0, which would force R to always be the incremental distance from initial level, in all the three G-code systems. The incremental distance would always be negative in this case.

Another issue regarding its value, in side drilling (in front drilling, it is always the actual distance), is that whether it would be a diameter value (in diameter programming) or a radius value (even in diameter programming), depending on parameters. Therefore, either conduct an experiment on the machine to find out what it is, or set parameter 5102#7 to 0 which would always force it to be a radius value.

9. Sinha, I believe the need is to retract beyond the R-point in this case, ie back to the I-point as such. I would be surprised if a G83 could be defined in a way that produces this result. Saying that, I've never had the need to try it...

Please be aware bilbo that I have no idea regarding the difference in capabilities between your control and mine, but this would be my more flexible approach (my first example was simplified to portray the concept): -

G0 G90 X0 (Or whatever command puts your drill in position)
#2=? (Input your Start Drilling Z)
#3=? (Input your Final Z Depth)

WHILE[#2GT#3]DO1 (Pecking Loop Start)
#6=#2-#4 (Current Peck Depth)
IF[#6LT#3]THEN #6=#3 (Sets Peck Depth to Final Depth if it overshoots)
G0 Z#2+1. (stands off a mil)
G1 Z#6 F#5
G0 Z#1
#2=#2-#4 (Resets Hole Depth for next pass)
END1 (Pecking Loop End)

Pgm continues once depth is reached.....

Notice that this example is a little more foolproof than the previous example. The next step would be to save the loop in a separate program and set up a G-code to call that program from your main programs. Basically you input the G code value into a parameter then create a program with a number that relates to that parameter. I'm sure someone will chip in to the conversation with the exact parameters and procedure for you.

You could, for example, call the program with a G183 R? Z? Q? C? F?
Where R is your Drilling start position, Z is your final Drill position, Q is your peck, C is your Clearance Retract Position and F is your Feed. To use particular letters for each variable you need to ensure the #numbers in the cycle correspond to those letters (it's not a perfectly alphabetical sequence) - in this example your separate cycle would therefore look like this: -

%
O9??? (Deep Drill Cycle)

WHILE[#18GT#26]DO1 (Pecking Loop Start)
#7=#18-#17 (Current Peck Depth)
IF[#7LT#26]THEN #7=#26 (Sets Peck Depth to Final Depth if necessary)
G0 Z#18+1.
G1 Z#7 F#9
G0 Z#3
#18=#18-#17 (Resets Hole Depth for next pass)
END1 (Pecking Loop End)

%

The next step would be to put in some safety logic to flag any crazy/backwards instructions and prevent them being carried out.

DP

10. Originally Posted by christinandavid
Sinha, I believe the need is to retract beyond the R-point in this case, ie back to the I-point as such.
From a book:

Final retraction after hole machining
There is some difference in the way these cycles are commanded/behave in different G-code systems. The description here refers to system A. System-B and system-C cycles are similar to canned cycles on milling machines, with provision for selection between R-point retraction and initial-level retraction with G99 and G98, respectively. In system A, the final retraction is up to the initial level, if parameter 5161#1 is set to 0 (its default value). When this parameter is set to 1, the final retraction is up to the R-point.

11. I think he needs to retract fully beyond the point at which he wants to start drilling at each peck.

I think your article is referring to retract behaviour after completion of canned cycle (ie between hole positions).

Of course I can only vouch for the behaviour of the machining centre I currently operate...I dont know lathes...thankfully.

DP

12. Originally Posted by christinandavid
I think he needs to retract fully beyond the point at which he wants to start drilling at each peck.
This can be done by calling the drilling cycle repeatedly without a Q-word for each cutting depth till the bottom is reached.

Originally Posted by christinandavid
I think your article is referring to retract behaviour after completion of canned cycle (ie between hole positions).
DP
Yes.

We are discussing for somebody who does not appear to be much interested!

Page 1 of 2 12 Last

1. Fanuc &gt; drilling canned cycles on a lathe for G-code system A - Page 2
09-04-2013, 07:26 PM