Hey there! As a supplier of Fanuc CNC Lathes, I often get asked about how to program a peck drilling operation on these machines. Peck drilling is a crucial technique, especially when dealing with deep holes, as it helps to break chips and prevent chip packing, which can lead to tool damage and poor hole quality. In this blog post, I'll walk you through the steps of programming peck drilling on a Fanuc CNC Lathe, sharing some tips and tricks along the way.
Understanding Peck Drilling
Before we dive into the programming part, let's quickly understand what peck drilling is. Peck drilling involves drilling a short distance into the workpiece, then retracting the drill bit slightly to clear the chips. This process is repeated until the desired hole depth is reached. This technique is essential for deep holes because chips can get trapped in the flutes of the drill bit, causing it to overheat and break. By periodically retracting the drill, we can ensure that the chips are removed, and the drill bit stays cool.
Fanuc CNC Lathe Basics
First things first, let's talk a bit about the Fanuc CNC Lathe. These machines are known for their reliability, precision, and user-friendly programming interface. They come with a variety of features that make programming and operating a breeze. Whether you're a beginner or an experienced machinist, the Fanuc CNC Lathe has something to offer.
Setting Up the Machine
Before you start programming, you need to set up the machine properly. This includes mounting the drill bit in the tool holder, setting the workpiece in the chuck, and ensuring that the machine is calibrated correctly. Make sure that the drill bit is sharp and in good condition, as a dull bit can cause poor hole quality and increase the risk of breakage.
Programming Peck Drilling on Fanuc CNC Lathe
Now, let's get into the actual programming. The Fanuc CNC Lathe uses G-code for programming, which is a standard language used in CNC machining. To program peck drilling, we'll use the G74 cycle. Here's a basic example of how to program a peck drilling operation:
N10 G20 (Set units to inches)
N20 T0101 (Select tool 1 and set tool offset)
N30 S500 M03 (Spindle speed 500 RPM, clockwise rotation)
N40 G00 X1.0 Z0.1 (Rapid move to starting position)
N50 G74 R0.1 (Retract distance after each peck)
N60 G74 X0.0 Z-1.0 P0.2 Q0.1 F0.005 (Peck drilling cycle)
N70 G00 Z1.0 (Rapid move to clearance position)
N80 M05 (Stop spindle)
N90 M30 (End program)
Let's break down this code:
- N10 G20: This line sets the units to inches. You can use G21 to set the units to millimeters if needed.
- N20 T0101: This line selects tool 1 and sets the tool offset. Make sure that the tool offset is set correctly to ensure accurate machining.
- N30 S500 M03: This line sets the spindle speed to 500 RPM and starts the spindle in a clockwise direction.
- N40 G00 X1.0 Z0.1: This line moves the tool rapidly to the starting position.
- N50 G74 R0.1: This line sets the retract distance after each peck. In this case, the drill bit will retract 0.1 inches after each peck.
- N60 G74 X0.0 Z-1.0 P0.2 Q0.1 F0.005: This is the peck drilling cycle. Here's what each parameter means:
- X0.0: The final X position of the hole.
- Z-1.0: The final Z position of the hole.
- P0.2: The peck depth. In this case, the drill bit will drill 0.2 inches into the workpiece with each peck.
- Q0.1: The minimum peck depth. This is used to ensure that the drill bit doesn't peck too shallowly.
- F0.005: The feed rate. This determines how fast the drill bit moves into the workpiece.
- N70 G00 Z1.0: This line moves the tool rapidly to the clearance position.
- N80 M05: This line stops the spindle.
- N90 M30: This line ends the program.
Tips and Tricks
Here are some tips and tricks to help you get the most out of your peck drilling operation:


- Adjust the peck depth: The peck depth should be adjusted based on the material being drilled and the diameter of the drill bit. A general rule of thumb is to keep the peck depth between 2 and 3 times the diameter of the drill bit.
- Use coolant: Coolant helps to keep the drill bit cool and flush out the chips. Make sure that the coolant is flowing properly during the drilling operation.
- Check the chips: After each peck, check the chips to make sure that they are being removed properly. If the chips are long and stringy, you may need to adjust the peck depth or the feed rate.
- Use a pilot hole: For deep holes, it's a good idea to use a pilot hole first. This helps to guide the drill bit and prevent it from wandering.
Other Considerations
When programming peck drilling on a Fanuc CNC Lathe, there are a few other things to keep in mind. For example, if you're working on a Slant Lathe, you may need to adjust the programming slightly to account for the angle of the lathe bed. Additionally, if you're using a CNC Turn Mill Center Machine, you'll have more advanced features and capabilities, such as the ability to perform milling operations in addition to turning and drilling.
Conclusion
Programming a peck drilling operation on a Fanuc CNC Lathe is not as complicated as it may seem. By following the steps outlined in this blog post and using the tips and tricks provided, you'll be able to program peck drilling operations with ease. Remember to always set up the machine properly, use the correct G-code, and adjust the parameters based on the material and the drill bit.
If you're interested in purchasing a Fanuc CNC Lathe or have any questions about programming or operating these machines, don't hesitate to reach out. We're here to help you get the most out of your machining operations. Contact us today to start a conversation about your specific needs and how we can assist you.
References
- Fanuc CNC Lathe Operator's Manual
- CNC Machining Handbook

