Efficient Code for Repetitive Arcs Centered on 21 Holes?

More
23 Oct 2020 11:24 - 23 Oct 2020 11:26 #186997 by Scrappy_000
Y'all,

First, some background on who I am which might help lead to an answer, whether it falls along the lines of "This is easy..." or "This is too advanced for your current skill set." I'm a hobbyist who has been regularly but infrequently using LinuxCNC for about four years now, and so far I've hand-coded everything because what I've needed to make has been rather simple (e.g. a basic carburetor spacer), so I haven't had a real need to learn CAD/CAM (what I want to make is another subject altogether). I probably don't know enough at this point to ask the right question(s) and/or this might not be the right sub-forum (as in it should be in "O Codes (subroutines) and NGCGUI"), but here goes...

My current need is to fabricate two flanges with 21 fastener holes between them, with each hole being surrounded by an o-ring groove. Due to the constraints of the existing parts I must to work with, the wall between the o-ring groove and fastener hole is going to be only about 0.050" wide, so getting everything concentric is a must.

I know I can fat-finger it (and risk errors) or make a spreadsheet that will spit out the necessary G02/G03, but is there a simple method to do something that basically says "Go to X 2.374 Y 0.125. Now think X 2.374 Y 0.125 is X 0 Y 0. Do this G02. Now this X 0 Y 0 is X 2.374 Y 0.125 again. Go to the next X/Y and do the same thing."?

Even if this would require too much time learning/implementing for something I really need to get done quickly, it's probably something I would like to learn in the future (i.e. to spit out a set of repetitive parts from one piece of material).

Thanks in advance,
Scrappy
Last edit: 23 Oct 2020 11:26 by Scrappy_000. Reason: redundant words, poor flow on a couple of sentences

Please Log in or Create an account to join the conversation.

More
23 Oct 2020 15:38 #187005 by MaHa
The following user(s) said Thank You: Scrappy_000

Please Log in or Create an account to join the conversation.

More
23 Oct 2020 19:11 #187012 by Scrappy_000
Thanks, MaHa. That doesn't look as if that's what I'm after. To put it another way, I'm looking to take a given G02/G03 and repetitively use it on multiple center points, without changing anything about the G02/G03 other than the point it's centered on.

Please Log in or Create an account to join the conversation.

More
23 Oct 2020 19:29 - 23 Oct 2020 19:31 #187014 by MalteS
This is how I'd do it

Move to x / y
Use G10 L20 P1 X0 y0 to set new 0 Point
Execute your code
Repeat

See linuxcnc.org/docs/html/gcode/g-code.html#gcode:g10-l20

Malte
Last edit: 23 Oct 2020 19:31 by MalteS.
The following user(s) said Thank You: Scrappy_000

Please Log in or Create an account to join the conversation.

More
23 Oct 2020 20:35 #187020 by Scrappy_000
Thanks, MalteS. That looks as if it might do the trick!

Please Log in or Create an account to join the conversation.

More
24 Oct 2020 08:22 #187080 by Aciera
That is definitely something you could use a subroutine for.

Here is a well explained example:
github.com/araisrobo/linuxcnc/blob/maste...eful-subroutines.ngc
The following user(s) said Thank You: Scrappy_000

Please Log in or Create an account to join the conversation.

More
24 Oct 2020 11:41 #187098 by Scrappy_000
Thanks, Aciera. That's in the vein of my need, plus a lot more intriguing possibilities past the immediate task at hand, in particular the math within the subroutines.

Please Log in or Create an account to join the conversation.

Time to create page: 0.169 seconds
Powered by Kunena Forum