Discussion:
G76 Tapered Treads
(too old to reply)
Kirk Wallace
2016-09-03 22:24:59 UTC
Permalink
Raw Message
I just finished a first pass at G76 tapered threading.
My code is here:
http://www.wallacecompany.com/tmp/G76/G76-7b.cc

I have done about a minute's worth of testing so it may not work well.
Here are a couple plots:
http://www.wallacecompany.com/tmp/G76/Screenshot-g76_kw-1a.png
http://www.wallacecompany.com/tmp/G76/Screenshot-g76_kw-2a.png

and notes:
http://www.wallacecompany.com/tmp/G76/path_notes.svg

http://www.wallacecompany.com/tmp/G76/

This was prompted by trying to put together a manual entry together but
there were some issues that popped up that I need to work out:
http://www.wallacecompany.com/t_tmp/G76_doc/G76-2a.html

Any comments are welcome.

--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Gene Heskett
2016-09-04 01:46:24 UTC
Permalink
Raw Message
On Saturday 03 September 2016 18:24:59 Kirk Wallace wrote:

> I just finished a first pass at G76 tapered threading.
> My code is here:
> http://www.wallacecompany.com/tmp/G76/G76-7b.cc
>
> I have done about a minute's worth of testing so it may not work well.
> Here are a couple plots:
> http://www.wallacecompany.com/tmp/G76/Screenshot-g76_kw-1a.png
> http://www.wallacecompany.com/tmp/G76/Screenshot-g76_kw-2a.png
>
> and notes:
> http://www.wallacecompany.com/tmp/G76/path_notes.svg
>
> http://www.wallacecompany.com/tmp/G76/
>
> This was prompted by trying to put together a manual entry together
> but there were some issues that popped up that I need to work out:
> http://www.wallacecompany.com/t_tmp/G76_doc/G76-2a.html
>
> Any comments are welcome.

I'll give it a good shakedown as soon as its in master-rt. I have some
code that somewhat works, but is a bigger PITA to setup and run.

ATM, and I'm DIW over the weekend as I forgot to engage the backgear late
this after noon, the motor request was for 300 revs, it wound up to full
revs and something in the box behind the motor popped, and the LM317 5
volt supply in the driver box also opened up. I have replaced the LM317
and its working again, but I've not turned the lathe around to see what
made the pop in the motor controller box. In any event, I am DIW until
I can get to TSC Tuesday and source another handfull of the nuts I am
boring to 50 tpi threads, 2 of those, and one with a taper of 7 degrees,
but still at 50 tpi. Since machine position reference has been lost,
and I'll have to start all over again fine tuning, very very carefully
as I an on the last chip for my internal threading tool. So it makes no
diff to me whether I use my cobbled up code, or yours and I'd love to
test it. ASAP once I have more nuts in hand.

I'm working on, in my mind, an automatic e-stop to be triggered in 50
milliseconds if the motor is enabled, but no edges have come out of the
encoder. I ought to be able to hack that into the hal file easy enough.

What I need at the same time is a big red, flashing pop up thats says
something to the effect of a "hey big dummy, the backgear is in
neutral!" With the lever behind the headstock, its generally behind the
mag base of a dial I keep stuck on the top of the headstock for
centering work in the 4 jaw. 100% PEBKAC, but theres not a chair
involved.

Some days it doesn't pay to gnaw thru the straps and get up.

Oh, I took the wipers off one end of the saddle & darned if they aren't
leather, heavy stuff all of 5/32" thick. And the bottoms feel like 60
grit sandpaper. Felt, here we come while I don't have anything else to
do over the weekend.

Have a happy and fun times Labor Day weekend folks.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
andy pugh
2016-09-04 07:01:23 UTC
Permalink
Raw Message
On 3 September 2016 at 23:24, Kirk Wallace <***@wallacecompany.com> wrote:
> I just finished a first pass at G76 tapered threading.
> My code is here:
> http://www.wallacecompany.com/tmp/G76/G76-7b.cc

Just so we don't tread on each-others's toes here.
You appear to be using D to define the taper?
I know why you chose this, it is because nothing else is available.
However it clashes with my (un-merged) multi-spindle patch:
https://github.com/LinuxCNC/linuxcnc/blob/andypugh/JA14_multispindle/configs/sim/axis/lathe_multispindle/README

Ideally I would use E for spindle number, but E is taken. I suspect
that entry and exit tapers are very rarely used, and that E is
"wasted" but we probably shouldn't go breaking existing G-code.

Perhaps the Cabal needs to decide who gets to claim D in G76 :-)

Is your pitch defined along the Z axis, or along the surface? Is Steve
B still around?

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 08:03:08 UTC
Permalink
Raw Message
On 09/04/2016 12:01 AM, andy pugh wrote:
> On 3 September 2016 at 23:24, Kirk Wallace <***@wallacecompany.com> wrote:
>> I just finished a first pass at G76 tapered threading.
>> My code is here:
>> http://www.wallacecompany.com/tmp/G76/G76-7b.cc
>
> Just so we don't tread on each-others's toes here.
> You appear to be using D to define the taper?
> I know why you chose this, it is because nothing else is available.
> However it clashes with my (un-merged) multi-spindle patch:
> https://github.com/LinuxCNC/linuxcnc/blob/andypugh/JA14_multispindle/configs/sim/axis/lathe_multispindle/README
>
> Ideally I would use E for spindle number, but E is taken. I suspect
> that entry and exit tapers are very rarely used, and that E is
> "wasted" but we probably shouldn't go breaking existing G-code.
>
> Perhaps the Cabal needs to decide who gets to claim D in G76 :-)

The D conflict is new to me, so I don't know how to respond. I too
thought entry/exit tapers would be rarely used but Smid seems to have
them in his threading examples, so I thought it would be worth the
effort to provide for them.

> Is your pitch defined along the Z axis, or along the surface? Is Steve
> B still around?

The lead is along the Z axis, in other words the feed is adjusted using
the tangent of the thread taper angle for any tapers used. (Crud, I
forgot to check if it is the included angle or the angle to the axis. I
need to fix this.)

Even with two line codes, Fanuc has multiple features encoded in a
parameter's value, such as two digits for one feature and two for
another. This would tend to break old LinuxCNC code, except E uses
0,1,2, and 3 for the entry taper locations. Adding a tens digit might be
used for something. Adding a G76.1 code may be an option too.


--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 15:21:26 UTC
Permalink
Raw Message
On 09/04/2016 01:03 AM, Kirk Wallace wrote:
... snip
> Even with two line codes, Fanuc has multiple features encoded in a
> parameter's value, such as two digits for one feature and two for
> another. This would tend to break old LinuxCNC code, except E uses
> 0,1,2, and 3 for the entry taper locations. Adding a tens digit might be
> used for something. Adding a G76.1 code may be an option too.
>
>

Ugh, L not E. E is the distance along the Z axis that is the width of an
end taper. L is the flag for 0 = no taper, 1 = entry, 2 = exit, 3 = both.

Sorry about that.

--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Andy Pugh
2016-09-04 15:53:05 UTC
Permalink
Raw Message
> On 4 Sep 2016, at 18:21, Kirk Wallace <***@wallacecompany.com> wrote:
>
> E is the distance along the Z axis that is the width of an
> end taper

I have used E for spindle number.
I wonder if I could use N?

I realise that N is used for line numbers, but Linuxcnc ignores them.
Maybe N as s parameter to other commands could be brought in to use? It would involve treating N differently depending on where in the block it is.

Not standard G code, but then I am not aware that the is a standard miltispindle G-code.
------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 17:19:51 UTC
Permalink
Raw Message
On 09/04/2016 08:53 AM, Andy Pugh wrote:
>
>
>> On 4 Sep 2016, at 18:21, Kirk Wallace <***@wallacecompany.com> wrote:
>>
>> E is the distance along the Z axis that is the width of an
>> end taper
>
> I have used E for spindle number.
> I wonder if I could use N?
>
> I realise that N is used for line numbers, but Linuxcnc ignores them.
> Maybe N as s parameter to other commands could be brought in to use? It would involve treating N differently depending on where in the block it is.
>
> Not standard G code, but then I am not aware that the is a standard miltispindle G-code.

Have you given L some thought? The first two digits could be spindle
number, the second two the end taper flag?

> // L - Indicator for which options are needed
> int flags = 0;
> if(block->l_flag) {
> CHKS((block->l_number < 0 || block->l_number > 9999),
> (_("In G76, if L is used it must be: 0 = no taper, 1 = entry, 2 = exit, 3 = both or 1xx for spindle 1 or ...")));
> flags = block->l_number;
> }
> int entry_taper = flags & 1;
> int exit_taper = flags & 2;
> int spindle_number_1 = flags & 100;


How do you invoke the spindle call?


--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
andy pugh
2016-09-04 18:53:23 UTC
Permalink
Raw Message
On 4 September 2016 at 18:19, Kirk Wallace <***@wallacecompany.com> wrote:

> Have you given L some thought? The first two digits could be spindle
> number, the second two the end taper flag?

It's a possibility. I need to think about it some more.

The idea of making N more useful is starting to appeal to me.

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

------------------------------------------------------------------------------
John Thornton
2016-09-04 16:05:29 UTC
Permalink
Raw Message
I always use an exit taper...

JT

On 9/4/2016 3:03 AM, Kirk Wallace wrote:
> On 09/04/2016 12:01 AM, andy pugh wrote:
>> On 3 September 2016 at 23:24, Kirk Wallace <***@wallacecompany.com> wrote:
>>> I just finished a first pass at G76 tapered threading.
>>> My code is here:
>>> http://www.wallacecompany.com/tmp/G76/G76-7b.cc
>> Just so we don't tread on each-others's toes here.
>> You appear to be using D to define the taper?
>> I know why you chose this, it is because nothing else is available.
>> However it clashes with my (un-merged) multi-spindle patch:
>> https://github.com/LinuxCNC/linuxcnc/blob/andypugh/JA14_multispindle/configs/sim/axis/lathe_multispindle/README
>>
>> Ideally I would use E for spindle number, but E is taken. I suspect
>> that entry and exit tapers are very rarely used, and that E is
>> "wasted" but we probably shouldn't go breaking existing G-code.
>>
>> Perhaps the Cabal needs to decide who gets to claim D in G76 :-)
> The D conflict is new to me, so I don't know how to respond. I too
> thought entry/exit tapers would be rarely used but Smid seems to have
> them in his threading examples, so I thought it would be worth the
> effort to provide for them.
>
>> Is your pitch defined along the Z axis, or along the surface? Is Steve
>> B still around?
> The lead is along the Z axis, in other words the feed is adjusted using
> the tangent of the thread taper angle for any tapers used. (Crud, I
> forgot to check if it is the included angle or the angle to the axis. I
> need to fix this.)
>
> Even with two line codes, Fanuc has multiple features encoded in a
> parameter's value, such as two digits for one feature and two for
> another. This would tend to break old LinuxCNC code, except E uses
> 0,1,2, and 3 for the entry taper locations. Adding a tens digit might be
> used for something. Adding a G76.1 code may be an option too.
>
>


------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 17:07:57 UTC
Permalink
Raw Message
On 09/04/2016 09:05 AM, John Thornton wrote:
> I always use an exit taper...
>
> JT

I thought there might be some (real machinists) that use end tapers. I
don't know why but I don't know a lot of things.


--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Gene Heskett
2016-09-04 10:05:29 UTC
Permalink
Raw Message
On Sunday 04 September 2016 03:01:23 andy pugh wrote:

> On 3 September 2016 at 23:24, Kirk Wallace
<***@wallacecompany.com> wrote:
> > I just finished a first pass at G76 tapered threading.
> > My code is here:
> > http://www.wallacecompany.com/tmp/G76/G76-7b.cc
>
> Just so we don't tread on each-others's toes here.
> You appear to be using D to define the taper?
> I know why you chose this, it is because nothing else is available.
> However it clashes with my (un-merged) multi-spindle patch:
> https://github.com/LinuxCNC/linuxcnc/blob/andypugh/JA14_multispindle/c
>onfigs/sim/axis/lathe_multispindle/README
>
> Ideally I would use E for spindle number, but E is taken. I suspect
> that entry and exit tapers are very rarely used, and that E is
> "wasted" but we probably shouldn't go breaking existing G-code.

I do use the E to define a retract speed within the ability of a stepper
to achieve w/o losing a step. For some reason I've long forgotten, it
was backing out at an apparent speed that was greater than the defined
MAX_VEL and would occasionally slip a step.

However, this may have been fixed at the same time the backlash moves
were made subject to the MAX_ACCEL and MAX_VEL limits. As that fix was
several 2.x versions ago, it is something I have not recently tested as
I got into the habit of speccing an exit taper of (usually) .35. For my
usage, entrance is generally a couple mm's off the end of the workpiece.
That move is not under cutting forces load, and has never been a
problem. On the little monster, thats a 435oz 8 wire motor wired
parallel, so it can move right snappy. The E.35, at the spindle speeds
involved is actually slower than the full retract to the 'drive line'
for the retrace move as I was observing it running yesterday.

I have wondered about those usages, and it occurs to me that these usages
of an alpha character should have their "scope" restricted to the life
of the canned cycle being executed, to disappear with the stack cleanup
as that particular canned cycle was exiting. The fact that its even
being discussed tells me it is non-volatile. It IMO, should be a
volatile value, eliminating the chance of cross-talk when one cycle sets
it, and the other (possible the same) canned cycle used someplace else
leaves it out as an option.

> Perhaps the Cabal needs to decide who gets to claim D in G76 :-)
>
> Is your pitch defined along the Z axis, or along the surface? Is Steve
> B still around?

For the usage I can imagine, pitch s/b along the Z axis on a (single
spindle) lathe. On a mill whose head can be laid over, I have used G33.1
along the X axis several times so I know that works. But I've never
tried G76 that way. Should it?

It does seem to open a can of worms...

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
andy pugh
2016-09-04 10:47:02 UTC
Permalink
Raw Message
On 4 September 2016 at 11:05, Gene Heskett <***@shentel.net> wrote:
> I have wondered about those usages, and it occurs to me that these usages
> of an alpha character should have their "scope" restricted to the life
> of the canned cycle being executed, to disappear with the stack cleanup
> as that particular canned cycle was exiting. The fact that its even
> being discussed tells me it is non-volatile.


No, the multi-spindle G76 needs a letter to tell it which spindle to
synchronise to.


--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 15:52:42 UTC
Permalink
Raw Message
On 09/04/2016 03:47 AM, andy pugh wrote:
> On 4 September 2016 at 11:05, Gene Heskett <***@shentel.net> wrote:
>> I have wondered about those usages, and it occurs to me that these usages
>> of an alpha character should have their "scope" restricted to the life
>> of the canned cycle being executed, to disappear with the stack cleanup
>> as that particular canned cycle was exiting. The fact that its even
>> being discussed tells me it is non-volatile.
>
>
> No, the multi-spindle G76 needs a letter to tell it which spindle to
> synchronise to.

Canned cycles tend to have sticky parameters so that one only needs to
invoke the G command to repeat the process with only adding the
parameters that change.

Here is a canned cycle that drills a new hole just by adding an X and Y
to a new block.

(Drilling)
T 3 M6 G43 H 3

S 4000 (RPM)
M8 (Coolant ON)
M3 (Spindle ON, Forward)
F 100.00 (Z Feed, inches/minute)

G0 X 0.0000 Y 0.0000 (Hole 1 of 3)
G0 Z 0.3000 (Z Clear)
G90 G98 (Absolute Distance Mode, Canned return to Z or R)
G81 Z -4.0000 R 0.0000 (Canned Drill)
X 0.0000 Y 1.0000 (Hole 2)
X 0.0000 Y 2.0000 (Hole 3)

G80 (Cancel canned cycle)

G0 Z 0.3000

M9 (Coolant OFF)
M5 (Spindle OFF)

G30 Z 0.3 (Go in Z only to preset G30 location)
G30 (Go to preset G30 location)

M30 (End of Program)

~~~~~
On another issue, as far as I can tell, G76 only works along Z. I
thought that calling X, Y, or Z would locate the destination of the line
of action,but only Z works. A Y word errors out. An X can add an X
motion at the very end of the command. I did not retain this X move in
my version, but have the tool return to the starting point along the
tool clearance line.
~~~~~
In the wider world, G76 has a completely different function between
mills and lathes.





--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Gene Heskett
2016-09-04 21:16:02 UTC
Permalink
Raw Message
On Sunday 04 September 2016 11:52:42 Kirk Wallace wrote:

> On 09/04/2016 03:47 AM, andy pugh wrote:
> > On 4 September 2016 at 11:05, Gene Heskett <***@shentel.net>
wrote:
> >> I have wondered about those usages, and it occurs to me that these
> >> usages of an alpha character should have their "scope" restricted
> >> to the life of the canned cycle being executed, to disappear with
> >> the stack cleanup as that particular canned cycle was exiting. The
> >> fact that its even being discussed tells me it is non-volatile.
> >
> > No, the multi-spindle G76 needs a letter to tell it which spindle to
> > synchronise to.
>
> Canned cycles tend to have sticky parameters so that one only needs to
> invoke the G command to repeat the process with only adding the
> parameters that change.
>
> Here is a canned cycle that drills a new hole just by adding an X and
> Y to a new block.
>
> (Drilling)
> T 3 M6 G43 H 3
>
> S 4000 (RPM)
> M8 (Coolant ON)
> M3 (Spindle ON, Forward)
> F 100.00 (Z Feed, inches/minute)
>
> G0 X 0.0000 Y 0.0000 (Hole 1 of 3)
> G0 Z 0.3000 (Z Clear)
> G90 G98 (Absolute Distance Mode, Canned return to Z or R)
> G81 Z -4.0000 R 0.0000 (Canned Drill)
> X 0.0000 Y 1.0000 (Hole 2)
> X 0.0000 Y 2.0000 (Hole 3)
>
> G80 (Cancel canned cycle)
>
> G0 Z 0.3000
>
> M9 (Coolant OFF)
> M5 (Spindle OFF)
>
> G30 Z 0.3 (Go in Z only to preset G30 location)
> G30 (Go to preset G30 location)
>
> M30 (End of Program)
>
> ~~~~~
I think what I ,meant to say is that a canned cycle should have its own
private versions of all these option letters. So E could have one
meaning for Andy's spindle thing, and another, different canned routine
could have its own private E,I,L,H,K,J yadda.

I, in my poking at the sleeping dog, have only rarely used a #number
variable high enough to stay out of the call stacks hair. Generally I
use global declarations, so a call is a simple call with no argument
passing to complicate the works,

So someplace in the #200 to #4990 map numbered map we can use for our own
uses, there ought to be room to declare a private, nv storage area for
each of the "canned' cycles use, without impinging on a neighbor.

The reason I ended it at 4990 is that I have one machine that I cobbled
up a touchoff storage so I could home it, and return to the exact same
position. This was at least a decade ago. So on that machine, my list of
saved vars starts at #4990, not #5000. But I see thats now built into
Linuxcnc. So if you build down from there (4999), my code will likely be
the only code on the planet you break. Thats a shrug because I don't
need it anymore.

> On another issue, as far as I can tell, G76 only works along Z. I
> thought that calling X, Y, or Z would locate the destination of the
> line of action,but only Z works.

ISTR finding that to be the case, waaaaay back up the calendar count.
For that, we can use a G33.

> A Y word errors out. An X can add an
> X motion at the very end of the command. I did not retain this X move
> in my version, but have the tool return to the starting point along
> the tool clearance line.

I can see no reason to do otherwise. To allow it is IMO, inviting a tool
crash. And I don't need any more help as I get those just from my own
typu's. ;)

> ~~~~~
> In the wider world, G76 has a completely different function between
> mills and lathes.

Yes.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Andy Pugh
2016-09-05 05:14:34 UTC
Permalink
Raw Message
> On 5 Sep 2016, at 00:16, Gene Heskett <***@shentel.net> wrote:
>
> o someplace in the #200 to #4990 map numbered map we can use for our own
> uses, there ought to be room to declare a private, nv storage area for
> each of the "canned' cycles use, without impinging on a neighbor.

The interpreter doesn't "use" the #PARAMS at all. It echoes some internal state to them, but never reads them.

And the issue here is different. It comes down to which letters of the alphabet don't currently have a meaning if used on a g-code line with a G76 in it.
------------------------------------------------------------------------------
Chris Morley
2016-09-05 06:27:46 UTC
Permalink
Raw Message
________________________________
From: Andy Pugh <***@gmail.com>
Sent: September 5, 2016 5:14 AM
To: EMC developers
Subject: Re: [Emc-developers] G76 Tapered Treads



> On 5 Sep 2016, at 00:16, Gene Heskett <***@shentel.net> wrote:
>
> o someplace in the #200 to #4990 map numbered map we can use for our own
> uses, there ought to be room to declare a private, nv storage area for
> each of the "canned' cycles use, without impinging on a neighbor.

The interpreter doesn't "use" the #PARAMS at all. It echoes some internal state to them, but never reads them.

And the issue here is different. It comes down to which letters of the alphabet don't currently have a meaning if used on a g-code line with a G76 in it.
Andy Pugh
2016-09-05 06:51:27 UTC
Permalink
Raw Message
> On 5 Sep 2016, at 09:27, Chris Morley <***@hotmail.com>
> Andy
> Could you not use an m or g code to select a spindle modelly.
> Then the gcode g76 (for instance) would just use the currently selected spindle.

Possibly, but I decided I preferred an extra modifier code so that it was possible to (for example) set the speed of several spindles then start them simultaneously.

Or, as another example, run a live-tool thread grinder in CSS mode while running a G76 synched to the main spindle.
------------------------------------------------------------------------------
Gene Heskett
2016-09-05 07:58:33 UTC
Permalink
Raw Message
On Monday 05 September 2016 01:14:34 Andy Pugh wrote:

> > On 5 Sep 2016, at 00:16, Gene Heskett <***@shentel.net> wrote:
> >
> > o someplace in the #200 to #4990 map numbered map we can use for our
> > own uses, there ought to be room to declare a private, nv storage
> > area for each of the "canned' cycles use, without impinging on a
> > neighbor.
>
> The interpreter doesn't "use" the #PARAMS at all. It echoes some
> internal state to them, but never reads them.
>
> And the issue here is different. It comes down to which letters of the
> alphabet don't currently have a meaning if used on a g-code line with
> a G76 in it.

This I suppose could be, but to use the spindle startup on the same line
as a G76 or any of the G33's has a bad code odor to me.

I always start the spindle at the set speed, issue a G4p1 for it to
stabilize on the next line, do any position moves needed to get it to
the G76 starting position, in two separate moves so theres no
possibility of a tool crash, and the G76 with all its options on a 5th
line.

If its not already running from a previous cutting action.

My motion.spindle-at-speed always comes from a near module IF there is an
encoder. The belt and suspenders approach. The lack of an encoder on
the toy mill means those commands are not on its menu.

I need to fix that, but the %$#^ gears are nylon. But it hasn't a big
enough pony motor to pull a 4-40 tap anyway without pecking at it. Toy
mill has 200 watt toy motor. :( I've had plans for quite a while to put
the 400 watt motor I took out of the 7x12, on top of the toy. , running
it with the same rebuilt controller used now as the fix of replacing a
crappy hexfet with one from a dead computer psu reduced its heat rise by
about 100F, but I'd throw the whole box away and use a timing belt drive
with a sliding plate for a quick change gear change. With a much wider
gear change. About a 4/1 stepdown for low, and a 1/2 or 1/3 step up for
pcb or wood carving. Some guy used to make a 3 speed kit for it, but I
was 5 years too late for that party according to Chris Woods at LMS, so
I'd have to make my own.

Perhaps when this Sheldon is making swarf again?

Todays project, since the little monster is on the disabled list, is to
widen the gib cutaway on the bottom of its saddle so a wider gib strip
can be used. All 3 are shop made and neither of the front ones
actually fits the machined for it area on the bottom of the saddle.
Because that tilted the gib with one edge of it sitting 50 thou higher,
the thru bolt from the top is bent and the threads don't fit which is
why it needs a much longer wrench handle than the OEM wrench has. So I'm
going to make that flat wide enough for a full length strip that is wide
enough to actually function as a gib. And replace the bolt but its made
out of pure un-obtainium so it will have a hex head, or maybe even an
Allen cap screw.

Whats in there is not wide enough to reach under the bed lip properly
according to the wear pattern on these which is considerable. That would
reduce the localized psi causing the wear under cutting forces. A full
length brass bar, if I can find one, and shim for fit like the rear one
is. With the rack out of the way, I can make both of them a lot wider.
And both front and rear should be wider IMO. They are narrower than
whats in the little monster right now. If I can source it, a couple feet
of .375"x1.25" brass bar seems like the ticket.

Thanks Andy.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Gene Heskett
2016-09-04 11:10:22 UTC
Permalink
Raw Message
On Sunday 04 September 2016 06:05:29 Gene Heskett wrote:

> On Sunday 04 September 2016 03:01:23 andy pugh wrote:
> > On 3 September 2016 at 23:24, Kirk Wallace
>
> <***@wallacecompany.com> wrote:
> > > I just finished a first pass at G76 tapered threading.
> > > My code is here:
> > > http://www.wallacecompany.com/tmp/G76/G76-7b.cc
> >
> > Just so we don't tread on each-others's toes here.
> > You appear to be using D to define the taper?
> > I know why you chose this, it is because nothing else is available.
> > However it clashes with my (un-merged) multi-spindle patch:
> > https://github.com/LinuxCNC/linuxcnc/blob/andypugh/JA14_multispindle
> >/c onfigs/sim/axis/lathe_multispindle/README
> >
> > Ideally I would use E for spindle number, but E is taken. I suspect
> > that entry and exit tapers are very rarely used, and that E is
> > "wasted" but we probably shouldn't go breaking existing G-code.
>
> I do use the E to define a retract speed within the ability of a
> stepper to achieve w/o losing a step. For some reason I've long
> forgotten, it was backing out at an apparent speed that was greater
> than the defined MAX_VEL and would occasionally slip a step.
>
> However, this may have been fixed at the same time the backlash moves
> were made subject to the MAX_ACCEL and MAX_VEL limits. As that fix
> was several 2.x versions ago, it is something I have not recently
> tested as I got into the habit of speccing an exit taper of (usually)
> .35. For my usage, entrance is generally a couple mm's off the end of
> the workpiece. That move is not under cutting forces load, and has
> never been a problem. On the little monster, thats a 435oz 8 wire
> motor wired parallel, so it can move right snappy. The E.35, at the
> spindle speeds involved is actually slower than the full retract to
> the 'drive line' for the retrace move as I was observing it running
> yesterday.
>
> I have wondered about those usages, and it occurs to me that these
> usages of an alpha character should have their "scope" restricted to
> the life of the canned cycle being executed, to disappear with the
> stack cleanup as that particular canned cycle was exiting. The fact
> that its even being discussed tells me it is non-volatile. It IMO,
> should be a volatile value, eliminating the chance of cross-talk when
> one cycle sets it, and the other (possible the same) canned cycle used
> someplace else leaves it out as an option.
>
> > Perhaps the Cabal needs to decide who gets to claim D in G76 :-)
> >
> > Is your pitch defined along the Z axis, or along the surface? Is
> > Steve B still around?
>
> For the usage I can imagine, pitch s/b along the Z axis on a (single
> spindle) lathe. On a mill whose head can be laid over, I have used
> G33.1 along the X axis several times so I know that works. But I've
> never tried G76 that way. Should it?
>
> It does seem to open a can of worms...
>
> Cheers, Gene Heskett

To continue this thread about G76 and E, I note that it says its an error
if E is more that half the drive line length. All this time I thought,
and have observed, was that it was the fraction of a full turn. Then I
grokked that programming a taper of K height would appear to be a matter
of speccing the drive length way out in the air, and programming E to be
49% of the drive line length. So all the taper would be done on the
workpiece. Longer tapers by moving the starting Z position in units of
the pitch P, and the starting X in K increments and running the same
line of code again. A time killer, but when in Rome...

When I get the little monster operational again, I will need some help in
arriving at a 7 degree included angle, eg 3.5 degrees at the workpiece,
as I think this is worth exploring. The solution to my tapered thread
requirement may have been right under my nose all the time!

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Kirk Wallace
2016-09-04 17:01:51 UTC
Permalink
Raw Message
On 09/04/2016 04:10 AM, Gene Heskett wrote:
... snip
> To continue this thread about G76 and E, I note that it says its an error
> if E is more that half the drive line length. All this time I thought,
> and have observed, was that it was the fraction of a full turn. Then I
> grokked that programming a taper of K height would appear to be a matter
> of speccing the drive length way out in the air, and programming E to be
> 49% of the drive line length. So all the taper would be done on the
> workpiece. Longer tapers by moving the starting Z position in units of
> the pitch P, and the starting X in K increments and running the same
> line of code again. A time killer, but when in Rome...

I tend to think of the end tapers as chamfers. They allow a gradual
start or end. Fiddling with the parameters one can fool G76 to making an
end chamfer look like a tapered thread, but it is not ideal. Half of the
thread length becomes a chamfer, and half becomes wasted in air. Extra I
is needed to drive K into the stock so that the end of the chamfer is
still into the stock by one thread depth, when it really wants to just
break free. I gets really complicated in a hurry.

I attached a rough graphic of what I think needs to be fiddled to get a
tapered thread from the current G76.

>
> When I get the little monster operational again, I will need some help in
> arriving at a 7 degree included angle, eg 3.5 degrees at the workpiece,
> as I think this is worth exploring. The solution to my tapered thread
> requirement may have been right under my nose all the time!
>
> Cheers, Gene Heskett

If you can compile and run the LinuxCNC source it should not be too hard
to try out the G76 with taper and chamfers version.


--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/
Kirk Wallace
2016-09-06 16:06:37 UTC
Permalink
Raw Message
On 09/06/2016 07:24 AM, Gene Heskett wrote:
... snip
> Thats no doubt true, but I've just found that the tapered thread I need
> CAN be done with the G76 we have. Its not even an error if E is as long
> as the drive line - tp_mm. If that value is exceeded, that should be an
> error but in 100% of the cases where the drive line starts off the end
> of the workpiece, it is of zero consequence because what it does is move
> to the I position, and next extends the overshoot distance to the right,
> cutting air, then it runs a taper the full length of the thread, air
> included.

I checked the source for 2.7 and sure enough E is only checked for being
negative:

> double taper_dist = block->e_flag? block->e_number: 0.0;
> if(taper_dist < 0.0) taper_dist = 0.0;

so any E equal to 0 or greater is okidoki.

>
> Angle of the taper is UNK, but for my purposes, may even be slightly more
> than what I was playing with before.

Try to make E equal to the length of the Z move.

rise / Run = tan(theta) so theta = arctan(rise / Run)

rise = K, Run = E so theta = arctan(K/E)

(BTW, NPT pipe threads are specified as a slope which is 3/4" diameter
in 1 foot length, or 1:16, so making E 16 times greater than K should
work for NPT.)

The end taper path is designed to leave the thread at the end of the
taper, so figure out where your final threading pass should be. This
pass should be K deep into the material, but since this will have the
pass leave the material and the end of the pass, add a K's worth to I to
drive it deeper, then add your tool clearance to I. The Z length only
needs to be as long as the thread and enough lead-in to stabilize the
synchronized motion before you start cutting chips. Then lastly, set
your start position by calculating back from the final pass numbers.

> So please do not take away the E of G76.
>
> Any chance you could put a - sign in front of an S number to select the
> spindle, so -s6 s1000 m3 would spin spindle 6 at 1000 revs?

E is needed for end tapers. Andy and I are arm wrestling over D which is
the only letter left for adding features to G76.

I think there are also dot forms of G76, such as G76.1 available for
other features.

--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

------------------------------------------------------------------------------
Gene Heskett
2016-09-06 19:53:57 UTC
Permalink
Raw Message
On Tuesday 06 September 2016 12:06:37 Kirk Wallace wrote:

> On 09/06/2016 07:24 AM, Gene Heskett wrote:
> ... snip
>
> > Thats no doubt true, but I've just found that the tapered thread I
> > need CAN be done with the G76 we have. Its not even an error if E
> > is as long as the drive line - tp_mm. If that value is exceeded,
> > that should be an error but in 100% of the cases where the drive
> > line starts off the end of the workpiece, it is of zero consequence
> > because what it does is move to the I position, and next extends the
> > overshoot distance to the right, cutting air, then it runs a taper
> > the full length of the thread, air included.
>
> I checked the source for 2.7 and sure enough E is only checked for
> being
>
> negative:
> > double taper_dist = block->e_flag? block->e_number: 0.0;
> > if(taper_dist < 0.0) taper_dist = 0.0;
>
> so any E equal to 0 or greater is okidoki.
>
> > Angle of the taper is UNK, but for my purposes, may even be slightly
> > more than what I was playing with before.
>
> Try to make E equal to the length of the Z move.
>
That makes it back up z by 1 p after arriving at cutting depth.

So one must, to get the snapshots I just posted, use an
e=thread-length - p. So I would assume that E is what you would use
below?

> rise / Run = tan(theta) so theta = arctan(rise / Run)
>
> rise = K, Run = E so theta = arctan(K/E)
>
> (BTW, NPT pipe threads are specified as a slope which is 3/4" diameter
> in 1 foot length, or 1:16, so making E 16 times greater than K should
> work for NPT.)
>
I've read that several times, but did not have it committed to wet ram.
Thank you for the reminder.

> The end taper path is designed to leave the thread at the end of the
> taper, so figure out where your final threading pass should be. This
> pass should be K deep into the material, but since this will have the
> pass leave the material and the end of the pass, add a K's worth to I
> to drive it deeper, then add your tool clearance to I.

Sounds workable. Thats what 'wrappers' are for, right?

> The Z length
> only needs to be as long as the thread and enough lead-in to stabilize
> the synchronized motion before you start cutting chips. Then lastly,
> set your start position by calculating back from the final pass
> numbers.
>
> > So please do not take away the E of G76.
> >
> > Any chance you could put a - sign in front of an S number to select
> > the spindle, so -s6 s1000 m3 would spin spindle 6 at 1000 revs?
>
> E is needed for end tapers. Andy and I are arm wrestling over D which
> is the only letter left for adding features to G76.
>
> I think there are also dot forms of G76, such as G76.1 available for
> other features.

G76.1 is an unknown G-Code according to the latest 2.7.x sim. So it is
not available to be. And I just tested the 2.8-pre but I can't, no way
to home it when the driver box is powered down. So until I can do it
from its console, the is it in 2.8.pre remains undetermined.

Thank you, Kirk Wallace.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
andy pugh
2017-04-05 23:48:31 UTC
Permalink
Raw Message
On 3 September 2016 at 23:24, Kirk Wallace <***@wallacecompany.com> wrote:
> I just finished a first pass at G76 tapered threading.
> My code is here:
> http://www.wallacecompany.com/tmp/G76/G76-7b.cc

Where did we end up with this?

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
Loading...