Horizontal drilling program cycle

Moderators: TomKerekes, dynomotion

Post Reply
gui_marchioro
Posts: 59
Joined: Sun Aug 21, 2022 11:22 pm

Horizontal drilling program cycle

Post by gui_marchioro » Wed Feb 08, 2023 11:58 pm

Hello all,

In addition to the vertical drills, in my woodworking cnc there are horizontal drills too.
I know that there is canned cycles using the commands G8x, but none of them seems to fit in a horizontal drilling operation.

So I am wondering if there is a way to create a command to perform canned cycles by giving parameters, in the same way of G81 for example, but specifically for horizontal operations.

Thanks for any thoughts or ideas.

Sincerely,
Guilherme

dynomotion
Site Admin
Posts: 15
Joined: Fri Nov 24, 2017 8:22 pm

Re: Horizontal drilling program cycle

Post by dynomotion » Thu Feb 09, 2023 12:52 am

You can change the plane the canned cycle operates in with G17, G18, G19.

gui_marchioro
Posts: 59
Joined: Sun Aug 21, 2022 11:22 pm

Re: Horizontal drilling program cycle

Post by gui_marchioro » Thu Feb 09, 2023 10:45 pm

Interesting, I'll try it. Thanks!

Extending the question. My woodworking machine has two vertical saws, one for X, and the other for Y axis. I wish to block the movements in one of the directions to prevent a mechanical colision when one of them is selected.

For example, when the vertical saw that cut in X direction is selected, the movement in Y direction is not allowed.

Which would be the best way to implement such a feature?

Sincerely,
Guilherme

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Horizontal drilling program cycle

Post by TomKerekes » Fri Feb 10, 2023 3:07 pm

Hi Guilherme,

You might use a C Program running in a forever loop to monitor the X and Y saw destinations and if more than one is not at its home position then disable all axes.
Regards,

Tom Kerekes
Dynomotion, Inc.

gui_marchioro
Posts: 59
Joined: Sun Aug 21, 2022 11:22 pm

Re: Horizontal drilling program cycle

Post by gui_marchioro » Tue May 02, 2023 2:57 am

You can change the plane the canned cycle operates in with G17, G18, G19.
Hello Tom,

I have finally tested this commands to change the plane.

It worked for drilling operation when the the hole pointed to the negative direction from the axis.
But, when in the opposite direction the KMotion pops a G code error stating that the parameter R from G81 is smaller than the x or y in the plane selected.

The following sketch shows a 2D square with horizontal holes in X and Y. It represents in which directions the cycles from G81 worked or not:
sketch_horizontal_drilling.PNG
sketch_horizontal_drilling.PNG (11.64 KiB) Viewed 526 times
You can see a way to solve this problem?

Sincerely,
Guilherme

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Horizontal drilling program cycle

Post by TomKerekes » Tue May 02, 2023 4:33 pm

Hi Guilherme,

Unfortunately the Canned cycles are expecting to only drill "down" not up.

I suppose you could reconfigure (reverse) the axes for those cases. But offsets might then get complicated.

You might use a subroutine for the cycle as shown below:

Code: Select all

(G90 G81 G98 X1 Y0 Z-5 R-10)
#1 = 1 (X Drill location)
#2 = 0 (Y Drill location)
#3 = -5 (Z Drill Depth)
#4 = -10 (R Retract height)
M98 P81 F100

M98 P81 #1=2 #2=2 (Drill at 2,2)
M98 P81 #1=3 #2=1 (Drill at 3,2)
M30 

O81 (Canned drill cycle subroutine)
G0 Z#4 (Goto retract height)
G0 X#1 Y#2 (Goto Drill location)
G1 Z#3 (Drill)
G0 Z#4 (retract)
M99
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply