I sold this to a fellow for $60 so it would be fair if you donated to PayPal patrik@kavorka-racing.com.
This is the letter I sent to the other fellow. He got it working.
Code:
Dear Fellow
First line in g71-sub must include an x-motion.
Only one g-code per line.
No line without a g-code.
No comments.
The code control for some, but not all, types of "over-cut" so you are responsible for programming something that the tool can actually do.
I have this in my ini file:
[PYTHON]
TOPLEVEL = /home/patrik/linuxcnc/python/toplevel.py
PATH_APPEND = /home/patrik/linuxcnc/python
[RS274NGC]
REMAP=G71 modalgroup=1 argspec=PDrikjlfst python=g71
Parameters:
P = Sub number.
D = Stock removal cut depth.
R = Stock removal retract height.
I = X-allowance.
K = Z-allowance.
J = Constant surface-feed factor [0-1]. Blends between using the tool center or the contact point for calculating the feed.
L = Dive angle. Must be steeper than the contour.
F = Feed for stock removal
S = Spindle speed for stock removal
T = Tool to use for finishing
Some have default values. I only remember that J has default value 0.5.
Q = Blend-radius from this line to the next (used in the sub).
Any feed programmed in the sub will be used during finishing (s might work the same).
Code:
%
(Test g71)
G7 G18 G21 G54 G90 G95 G97 S1500 G64 P.01
g28
t1 m6 g43 (Load tool)
m3
(This section has nothing to do with g71. We use it to run extra finishing-only passes when the first part must be in tolerance.)
g92.1 (Reset offset values)
g0 x91 z2 (g71 start position. This x-value should be the stock boundary.)
#<offset_x> = -0.2 (Save for extra finishing. Diameter if g7. Minus removes less when turning outside.)
#<offset_z> = -0 (Save for extra finishing. Minus removes less.)
g92 x[#<_x> * [1 + #<_lathe_diameter_mode>] + #<offset_x>] z[#<_z> + #<offset_z>]
(g71 Ignores everything but p, d, r, i, k, j, l, f, s, t)
g71 p71 d2 i0.2 l30 f0.27 s1500 (t2 k.1 r4 j.5)
(g71 o-cycle, ignores everything but g0, 1, 2, 3, 7, 8, 90, 91, 90.1 ,91.1, x, z, r, i, k, q, f, s, m. No comments allowed.)
o71 sub
g0 x48.5 f0.16 s2000
g1 z1
x54.5 z-2
z-11
x59.614 z-13.557
z-61
x56.5 z-63
z-69 q4
x71.9 q1
x91.9 z-269
o71 endsub
(Tool paths generated by g71, call the ones you want. You can view the code in a text editor.)
o<stock_removal> call
o<roughing> call
o<finishing> call (This can be run alone for extra finishing passes.)
m5
g91 g28 x1 z0
g92.1 (Reset offset values)
m2
o<contour> call (Used mostly for reference, to preview if the other tool paths look correct.)
%