What's new
What's new

Incremental Offsetting

TwoWheeler

Aluminum
Joined
Jan 25, 2021
I admit to not being a fan of (and thus not very fluent in) "Amish Programming" (G-Code) :D but once in a while it's the right tool for the job.

I have to drill four holes in a 1" square pattern...6 times, with a 1.75" linear spacing, then shift down on Y and do another row. It's only a 2mm hole, so what I've done in the past was to just use the machine to rapid to each coordinate, use M00 to have it stop there, drill the hole by hand with my sensitive feed drill chuck and then when I hit the green button, move to the next position, like this:

G0 X-.5 Y.5

M00

G0 Y-.5

M00

G0 X.5

M00

G0 Y.5

M00

G0 X0 Y0

M00

G0 X1.75

M00

So, at this point, it's indexed to the next pattern...and now I need to reset the zero and run the above again.

(Fagor control, but this is so basic, the codes should be pretty universal...and the machine doesn't speak Macro).
 
Make a subprogram for the pattern in the incremental mode.
Place the tool at appropriate places, one-by-one, and call the same subprogram every time.
If the patterns are arranged in a definite manner, nested subprograms can be used to make the program tidy.
 
So, call the four hole pattern as a sub program...but how do I increment the pattern on X?

I suppose I could call a fixture offset for each repeat, but that seems messy.

Looking through the list of Gcodes for my controller, I see "G59 - additive zero offset" which sounds like it might be what I'm looking for, but I have no idea of the sin tax (😉). Also, I don't see M98 for calling a subprogram listed, which seems bizarre.
 
Last edited:
(main program)
G90 G00 XY (Go to top left hole for 1st part)
M00
(call sub program, repeat 6x)

(repeat as needed for multiple Y lines)

----------------------------------------------------

(sub program)
G91 Y-1.00 (bottom left)
M00
X1.00 (bottom right)
M00
Y1.00 (top right)
M00
X0.75 (to top left of next pattern)
M00
M99
 
You could do something like the following:
The example is for a Fanuc Control, but the Fagor Control will have equivalent features:
Given that the Pitch between the square sets of holes is 1.75", the distance from the top right hole of one square set to the top left of the next set will be 0.75". Therefore, position the tool 0.75" in a minus direction in X to the location of where the first hole will be drilled. In the next block, call the Drill Cycle to set the Drilling Depth, the "R" Plane and Feed Rate. However, by specifying Zero number of repeats with K0, a hole won't be drilled at the dummy, first location.

G90 G00 X-1.25 Y0.5 (Locate to dummy position X-0.75 of the first hole position)
G98 G81 Z-0.5 R0.020 K0 F_ _ (Call Drill Cycle to set Drill Depth, R Plane and Feed Rate)

M98 P61002 (Call Subprogram for Square Pattern and Repeat 6 times)
G90 X-1.25 Y-1.0 K0 (Position to dummy position for start of the next row of square pattern holes)
M98 P61002 (Call Subprogram for Square Pattern and Repeat 6 times)
G80


O1002 (Subprogram for Square Pattern of Holes)
G91 X0.75
Y-1.0
X1.0
Y1.0
M99

Regards,

Bill
 
He is not sure if M98 is available on his control.
From his opening Post, it seemed that he just wanted a concept.

The OP should specify the actual model of the Fagor Control being used. However, most models have features to be able to machine:

G61 - Multiple machining in a rectangular pattern (Exactly what the OP wants to do)
or
G62 - Multiple machining in a grid pattern (This would also work for the OP's purpose)

In each case, the Canned cycle is first defined, followed by the G61 or G62 definition.

Regards,

Bill
 
The OP should specify the actual model of the Fagor Control being used. However, most models have features to be able to machine:

G61 - Multiple machining in a rectangular pattern (Exactly what the OP wants to do)
or
G62 - Multiple machining in a grid pattern (This would also work for the OP's purpose)

In each case, the Canned cycle is first defined, followed by the G61 or G62 definition.
The Fagor 8055i supposedly does support G61/G62. I'd never heard of those two and will have to look into them more. I largely rely on CAM software, (especially after 25 years of mold work) but once in a while I need to be able to do stuff like this. Would that be defined at the end of the program and called as a sub?

I ended up using 12 fixture offset calls and just copying and pasting the hole pattern coordinates and M00's. It was kind of ugly and confused the hell out of the student who is helping me, but it worked. 😉

Thanks.
 








 
Back
Top