- Posts: 4
- Thank you received: 0
X moving before W axis retracts
2 years 8 months ago #292820
by cncrcelec
X moving before W axis retracts was created by cncrcelec
Here's a puzzling one: I ran a test file that drills some holes. The X axis starts moving before the W axis has retracted. See the holes in the middle (horizontal) row - the leftmost hole and the third of four in that row - in the photo attached. Where do I look to solve this one? It only seems to happen in the X direction; not when diagonal moves are next in the sequence.
David
test_holes.ngc
holes_5mm.ngc
David
test_holes.ngc
Code:
M6 T1 (6mm dia end mill)
#<offset> = 10
#<numholes> = 2
#<feedrate> = 1500
;G52 X100 Y100 (Local Coordinate System Offset)
G0 X0 Y0 W2
o<holes_5mm> call [0] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [45] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [90] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [135] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [180] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [225] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [270] [#<numholes>] [10] [#<offset>] [#<feedrate>]
G0 X0 Y0 W2
o<holes_5mm> call [315] [#<numholes>] [10] [#<offset>] [#<feedrate>]
;G52 X0 Y0
M2
holes_5mm.ngc
Code:
(filename holes_6mm.ngc)
(Row of holes from current position going at an angle - 0 East, 90 North etc)
(Hafele 013.15.715 screws need about 8mm deep holes @ 5mm dia)
(Hafele 329.71.523 hinge dowel cam need ~11mm deep holes @ 5mm dia @ 32mm centres)
(Hafele 329.74.513 hinge mount plate 3mm steel euro screw needs ~11.3mm deep holes @ 5mm dia @ 32mm centres)
(Bunnings shelf panels - predrilled 12mm deep holes @ 32mm centres)
o<holes_5mm> sub
#<angle> = #1
#<numHoles> = #2
#<holeSpacing> = #3
#<offset> = #4
#<feedrate> = #5
#<ox> = #5420
#<oy> = #5421
#<ow> = #5428
;(DEBUG,Test debug!!)
#10=0
O1 while [#10 lt #<numHoles>]
#<distance> = [#<offset> + #10 * #<holeSpacing>]
#<xx> = [cos[#<angle>] * #<distance>] (adj = COS a * hyp)
#<yy> = [sin[#<angle>] * #<distance>] (opp = SIN a * hyp)
G0 X[#<ox> + #<xx>] Y[#<oy> + #<yy>]
G1 W-12 F[#<feedrate>] (Drill hole)
G00 W[#<ow>] (retract to rapid height)
#10 = [#10 + 1]
O1 endwhile
o<holes_5mm> endsub
M2
Please Log in to join the conversation.
2 years 8 months ago #292851
by Aciera
Replied by Aciera on topic X moving before W axis retracts
I can't totally explain what is going on but I tend to throw in quebusters when I use loops, try this in your 'holes_5mm,ngc' (Note the two lines with 'M66 E0 L0' at the beginning and at the end):
Code:
O1 while [#10 lt #<numHoles>]
M66 E0 L0
#<distance> = [#<offset> + #10 * #<holeSpacing>]
#<xx> = [cos[#<angle>] * #<distance>] (adj = COS a * hyp)
#<yy> = [sin[#<angle>] * #<distance>] (opp = SIN a * hyp)
G0 X[#<ox> + #<xx>] Y[#<oy> + #<yy>]
G1 W-12 F[#<feedrate>] (Drill hole)
G00 W[#<ow>] (retract to rapid height)
#10 = [#10 + 1]
M66 E0 L0
O1 endwhile
Please Log in to join the conversation.
2 years 8 months ago #292888
by cncrcelec
Replied by cncrcelec on topic X moving before W axis retracts
Thanks Aciera, the
M66 E0 L0 (wait on input)
fixes the issue.
In testing, I also found G61 (Exact Path Mode) also fixes the issue.
Attachment not found
In testing, I also found G61 (Exact Path Mode) also fixes the issue.
Attachment not found
Please Log in to join the conversation.
2 years 8 months ago #292917
by Aciera
Replied by Aciera on topic X moving before W axis retracts
Ah, good to know, I've tried tweaking G64 but I have not tried G61. That seems more convenient as it can just be put in the preamble.
Please Log in to join the conversation.
Time to create page: 1.158 seconds
