Here is the code I have adapted from counterbore.py's output to try and
be position independent: Single stepped from MDI input
=====================
(counterbore sub)
o100 SUB
(SHCS Counterbore, Diameter = 0.3900, Depth = 0.1750 )
(Number of Cuts 7, Depth of Cut 0.0250)
(Tool Diameter = 0.2500)
(Spiral Down to Depth of each Pass and Spiral Out)
F10.0 S1000 M3 (start spindle) (works)
(Hole Pattern Center is at touched off X0.0000 Y0.0000)
(use polar coord moves to position, then call this sub)
G90 (absolute distance mode) (works)
G0 Z4.2500 (clear fixtures etc) (works)
G91 (relative distance mode)
G0 X0.0000 Y-0.0700 (pre-position to start a G3 move) (works)
(spiral down in relative, so just step z down in additive mode)
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700 (dies here)
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0700 Z-0.0250 J0.0700
(clean up bottom of hole)
G3 X0.0000 Y-0.0700 J0.0700
G90 (back to absolute)
G0 Z4.2500 (clear work and clamps)
G1 X0.0000 Y0.0000 (back to center of pattern)
M5 (turn off spindle)
o100 ENDSUB
( list of locations in polar format, 3 at this time)
#<_clear_work> = 4.5 (inches)
G0 z#<_clear_work> (works)
G61 (works)
G1 F20 @2.5000 ^11 (goes to 1st location, works)
o100 CALL (fails, on first G3, see above)
G0 z#<_clear_work>
G1 F20 @2.5000 ^100
o100 CALL
G0Z#<_clear_work>
G1 F20 @2.5000 ^175
o100 CALL
( etc etc)
M5
M2
======================
Called counterbore5mm.ngc
Won't load-run, 50% error.
What am I doing wrong?
Thank you.
Cheers, Gene Heskett
Gene, I believe your problem is based in incrementing the Y-axis
position in each of the steps. Change the Y-0.0700 to Y 0.0000 for each
of the steps in the subroutine. The only axis you want to increment is
the Z axis.
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
G3 X0.0000 Y-0.0000 Z-0.0250 J0.0700
You want the end of the arc to be in the same place as the start of the
arc, not 0.0700 further in the negative Y direction. As you have coded
it, the arc begins with a radius of 0.0700 and ends with a radius of 0.1400.
Craig
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users