spinninquin
Plastic
- Joined
- Oct 1, 2015
- Location
- USA
I have a few questions rolled into one, so hopefully I can explain it well enough. This is on a Makino a61nx with Pro6 controller.
I'll start with the situation: I have a part family that have the same bolt pattern -let's say 4 holes all spaced 1.5" off center horizontally- with the datum being the left, top edge of the material. The distance from this datum to the first hole changes depending on the length of stock being used. Example, first hole is at X1.5 Y-0.5, with 3 holes following 1.5" off center. Then the next piece the first hole might be at X2.125 Y-0.5, with 3 holes following 1.5" off center.
My programs are written exclusively with a Main program that calls up a lot of sub routines because I have 4 of these (always the same length stock at the moment) on 2 sides of the tombstone at once. I use extended offsets to change between parts. I don't want to have to maintain a multitude of sub routines for something that I think I can do with a single sub routine. My thoughts are to locate the drill at the first hole in the main program, then call up a sub, and do an incremental move with K value in the canned cycle. These are rudimentary values but it'd look something like this:
---------------------------
(Main)
(SAFETY BLOCK)
(TOOL CALL)
(SPINDLE CALL)
G0 G54.1P1 X1.5 Y-0.5
M98P1000
G0G59Z0.(Z SAFETY RETRACTION PLANE)
G0 G54.1 P2 X2.125 Y-0.5
M98P1000
(END OF PROGRAM CODES)
(Sub routine)
O1000
Z.1
G99G81Z-1.15R.1F12.
G91 X1.5 K3
G80
G90 G0 Z.5
M99
---------------------------
If I ran this, would the holes in P1 be at: X1.5, X3., X4.5, and X6.? In P2 would they be at: X2.125, X3.625, X5.125, and X6.625?
I'm planning on using macros to determine the first X location based on material length. The macro will also snake back and forth so it's not always starting on the left-most hole. I just want to make sure this G91 and K approach will work prior to diving into it.
I'll start with the situation: I have a part family that have the same bolt pattern -let's say 4 holes all spaced 1.5" off center horizontally- with the datum being the left, top edge of the material. The distance from this datum to the first hole changes depending on the length of stock being used. Example, first hole is at X1.5 Y-0.5, with 3 holes following 1.5" off center. Then the next piece the first hole might be at X2.125 Y-0.5, with 3 holes following 1.5" off center.
My programs are written exclusively with a Main program that calls up a lot of sub routines because I have 4 of these (always the same length stock at the moment) on 2 sides of the tombstone at once. I use extended offsets to change between parts. I don't want to have to maintain a multitude of sub routines for something that I think I can do with a single sub routine. My thoughts are to locate the drill at the first hole in the main program, then call up a sub, and do an incremental move with K value in the canned cycle. These are rudimentary values but it'd look something like this:
---------------------------
(Main)
(SAFETY BLOCK)
(TOOL CALL)
(SPINDLE CALL)
G0 G54.1P1 X1.5 Y-0.5
M98P1000
G0G59Z0.(Z SAFETY RETRACTION PLANE)
G0 G54.1 P2 X2.125 Y-0.5
M98P1000
(END OF PROGRAM CODES)
(Sub routine)
O1000
Z.1
G99G81Z-1.15R.1F12.
G91 X1.5 K3
G80
G90 G0 Z.5
M99
---------------------------
If I ran this, would the holes in P1 be at: X1.5, X3., X4.5, and X6.? In P2 would they be at: X2.125, X3.625, X5.125, and X6.625?
I'm planning on using macros to determine the first X location based on material length. The macro will also snake back and forth so it's not always starting on the left-most hole. I just want to make sure this G91 and K approach will work prior to diving into it.