Hello Guest it is July 22, 2019, 06:22:38 AM

Author Topic: More TURN Threading Questions  (Read 14597 times)

0 Members and 1 Guest are viewing this topic.

Re: More TURN Threading Questions
« Reply #10 on: July 24, 2008, 10:02:33 PM »
Hi Dan,
I'm not familiar with G33...didn't see it in the Mach Turn manual.
I don't normally use the threading wizard, I prefer to set the parameters manually using the syntax found in the manual.
Here is a clip of the settings. The full description of each parameter is in the manual.

Offline RICH

  • *
  •  7,342 7,342
    • View Profile
Re: More TURN Threading Questions
« Reply #11 on: July 27, 2008, 10:42:23 PM »
Thanks for the post on how threading cycle is supposed to work. I must have read the index part a 100 times.
I fooled around with my little lathe today. The index pulse was monitored using my multimeter ( has HZ capability )  allowing a comparison to the mach rpm readout before, during, and along the cut. The motor speed was set at 100 rpm / 1.67 HZ. so it was easy to monitor. A slow feed rate of 5 IPM. I use a single slotted disc, backlash compensation, and exact stop. The rpm didn't wander enough to mention when not cutting.

Since a 20 TPI is a stretch for the little Sherline the motor slows down. Now when it slowed down the mach dro never changed by by more than 2 rpm ( from a 100 to 98 ) but the measure index pulse reading at times went down to 94 rpm.
You could see the effect of motor slow down by the change in the width on the uncut surface . ( at this point you would think a botched thread, missed steps ) Towards the end of the thread cut the the feed rate display would  change briefly to something different than initial feedrate.

Z returns for next cut, backlash implemented,rpm is back to 100.

During the next cut, visually watching the cutting ( with a mounted microscope ) you could see that the z feed rate is changed ( even though the feedrate indication is showing 5 ipm) since it's not following the bottom of the v in the thread of the last cut.
The cycles repeat until .....finished good thread!

I did this test and others not to question if the programed cycle worked as stated but rather to confirm  my machine was doing what it was instructed to do. Sometimes it behaves like me and dosn't listen!


Offline Hood

  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: More TURN Threading Questions
« Reply #12 on: July 28, 2008, 02:44:26 AM »
Good to know it works as its meant to. There is no way for me to test it as my spindle has over 20HP at 1000 RPM so not much is going to slow that down in a threading operation.

Re: More TURN Threading Questions
« Reply #13 on: July 28, 2008, 06:02:28 PM »
Just a bit more from the "Founding Fathers".
Hi Guys:

Having read the various experiences I think I can shed some light on the
matter. I havent decided how to
"fix " the trouble as yet. But I think I have ahandle on whats happening..
to explain , I have to go a bit deeper
than Id normally go. This sort of problem is hard to repair because each
person has their own theories on what is going on,
and often those theories are based on faulty logic of what exactly Mach3 is
doing internally. I think Im seeing a pattern though..

1) How mach3 times the spindle..

When feeding a index input to mach3, mach times how many interrupts it
takes from pulse to pulse. Knowing that the pulse
frequency of your machine is a known constant I use the formula:
RPM = 60 / (IntsPerRotation * (1/ ((double)Engine.PulseCount)));

This gives me the true spindle RPM based on your pulse count from the Diags
screen.. and the number of interrupts taken between spindle pulses. I
probably should have designed it on the actual CPU clocks taken between
Index inputs. The end result of the way its done means that if your diags
page shows a rock solid pulse frequency, as it does for most, the rpm
reading will also be accurate. BUT if the diags page shows a fluctuation on
the pulse count, the RPM will be in error by the % variation of the pulser

2) How do we correct the feed during the thread. (assuming 25Khz for numbers

The system plans the motion as always in advance of the thread being cut,
the pulses are all lined up for output. If the number of interrupts between
index pulses stays the same as the premotion samples, then no correction is
made. ( Those that get perfect threads likely have no slowdown so no
correction is applied or have a rock stable pulse count on the diags). If
the index pulse time for the any rotation is found to be longer than the
sampled time ( say 600 interrupts per rotation is normal, and we now have
610 during the cut..) the system know knows that we put out 10 step slots
too much to the steppers or servos. So for the next rotation, we inject 10
waits states evenly though the single rotation so that 10 slot steps are
delayed by 40us each evenly spaced though the next rotation. This means at
the end of the second rotation we now are evenly matched in number of
rotations vs the number of total step slots produced. A step slot is not
usually a step itself. Again this requires a bit of an explanation. Mach 3
works on step time slots more than steps. The buffer hold in it 2 seconds of
motion, evenly divided to 40us slots. Actual motion steps may only occur
every 25th slot or so depenfing on speed. You can think of it as a buffer ot
4096 slots, but if the motor only has to move 100 steps in that time, then
though there are 4096 slots, only every 409.6 slots is a step put out.
Correction of the threading stretches the 4096 slots to be put out a bit
slower by injecting a wait state where the current slot is held until next
interrupt and then output resumes. The motor sees this as a very minor
jitter in time, and the total number of steps is correct. The buffer may
look like this for example before correction...

i = interrupt, S = Step

i,i,i,i,S,i,i,i,i,S,i,i,i,i,S ...ect..

The above is clocked out at interrupt rate. The disance between S's is a
function of acceleration and velocity. During a thread correction.. we'll
add a wait state.. so the buffer may look like this..


The spacing of the w's, ( wait states), is derived from a bresenham
divider and is very accurate as to how best to slow the precreated stream.
This has proven itself in many area's of mach3, so thats not where the error
must lie. these waits states, unless your traveling at top speed of the
motors have very little effect if any on the motor motion other than to slow
it. For each w state imposed, there may be up top 100 or more i states where
nothign happens anyway, so the induced jitter is less than 1% typically, and
thats a pretty safe spot. At most it creates a sligh "correction" sound in
the motors motion. I havent heard of anyone losing steps as a result, so as
a corrective action for spindle slowdown it does achive its proper end
effect as long as we dont have any of the problems below..

2) So wheres the error:

My thinking is that the error only shows on some machines due to 2
possabilities. First, that user with trouble may not have a solid pulse
number on the diags page. This can be caused by many things, interfering
processes or bad driver operation where it wont lock to speed. PRobably
unnoticable unless your threading as Mach3 tends to smooth the output train
enough that variations cuh as this only become critical in threading runs.
The second possability is a slighly varying index pulse in time.Ive seen
many sensors, ( my own included) that vause RPM variations due to being too
sensitive and varying in time from pulse to pulse. Adjusting senstivity
solved my own issue with that.

Bottom line.. the best performace will be if the diags shows a rock solid
pulse frequency, and the RPM shows as stable when your just running a
spindle and not threading.

I have to give some though as to if perhaps using the CPU clock rather
than counting interrupts woudl solve most of this, the CPU clock I can read
in nanoseconds time base, so if the pulseing engine is a bit erratic in
timing , then the cpu clock woudl self correct for that.. in the meantime,
check the pulse frequency on the diags..is it stable? if not, try shutting
off everythign in the startup of msconfig, even if your unaffected in other
situations. Threading is very suceptable to variations, and since my
computers tend to be rock solid in this, Im suspecting its why the variation
inthreadin is hard for me to track down..

Im really thinking that I need to option the "correction" algorithm so you
can turn it off to see if that stops the threads from destroying
themselves.. Ill talk to Brian about updating the application code to give
you a checkbox to turn off correction while I
think about a driver update to switch to actual nanosecond time base instead
of interrupt count time base. Being able to turn off correction, but leave
triggerign alone will IMO, probably fix up almost all problematic threads to
only show the effect of a
slowing spindle. Most have no slowing spindle during a thread, so the
floating pulse frequency causes the corection to hurt rather than help the
final product..

Let me know how your experience match the above explanation or not.. :-)

Re: More TURN Threading Questions
« Reply #14 on: July 29, 2008, 04:41:27 PM »
If any of you are experiencing any discrepancies while threading, as I am,  I strongly suggest that you follow this topic on the Yahoo forum.
AND this:
There's ONE guy there.... Art somebody ::)..... that really seems to know what he is talking about. ;)
RC 8)
« Last Edit: July 29, 2008, 05:15:03 PM by Overloaded »

Offline RICH

  • *
  •  7,342 7,342
    • View Profile
Re: More TURN Threading Questions
« Reply #15 on: July 29, 2008, 06:40:39 PM »
I would have thought that by now, about a week since your first post, that there would have been a lot of
users posting problems with threading or about threading. I gave up about 2 months ago on threading figuring I would waite for the SS to mature and went back to another program which allows electronic gearing ( use of an encoder along with a stepper). But I want to use MACH, plain and simple!
I started looking at the Yahoo posts, CNC zone, there's a lot out there. What can be frustrating is trying to filter out or find what Hood posted. So if you guys find relevant info please continue to post here. It will shorten the learning curve and and eliminate frustration for manny. 
Understanding of how something works provides a good basis for solving individual problems. Why this thread is so good is that it starts putting in one place what I believe are key elements which allow you to analyze or look for what should be going on.

So you got me off my duff and I am now threading on the lathe.  :) And it was fun!
Still not satisfied with the results but at least gaining valuable experience and will use provided insight to try some things in an progressive way.

PS: I now understand Art's comment saying  "that threading is lot more complicated than someone may imagine".

Offline Hood

  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: More TURN Threading Questions
« Reply #16 on: July 29, 2008, 07:08:59 PM »
Well Art has it fixed for you puny spindle motor guys :D
 It will be available in the next release of Mach, not sure when that will be as its a biggie this time, loads of bug fixes from what I gather :)


Offline Hood

  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: More TURN Threading Questions
« Reply #17 on: July 29, 2008, 07:11:11 PM »
Rich, what is not good about your threading? is it similar to the problems the guys on Yahoo were seeing?
Re: More TURN Threading Questions
« Reply #18 on: July 29, 2008, 07:23:08 PM »
Hood,:D :D :D :) :D :D :)

I would have thought so too. I don't think there are quite as many Turners as there are Millers and Routers. The ones that do threading, probably have them big ol' hosses like Hoods or are just cutting a regular class 1 or 2 thread. Mine works beautifully for that...all day long if it had to.
It's the delicate closer tolerance stuff that I'm having problems with. 48 and 56 TPI in brass and 0-1.
Part of my problem is that I have a V belt from the motor to the spindle that is not perfect. It rides at varying depths in the pulleys and causes the index to wander 1 to 2, maybe 3 rpm. I made new pulleys that are dead true but cannot find a perfect V belt. If the new fix doesn't correct the threading, I will go to timing pulleys and a flat timing belt, probably will regardless.
Looks like the new release will be soon. (Get well quick Brian...that's what you get for taking time to eat) :D
RC :)
« Last Edit: July 29, 2008, 08:31:12 PM by Overloaded »

Offline RICH

  • *
  •  7,342 7,342
    • View Profile
Re: More TURN Threading Questions
« Reply #19 on: July 29, 2008, 08:44:21 PM »
I havn't done enough tests to put in perspective, yet........    I was doing some 1/4 - 40  & 10-32 x 1/2" long and looks like the first and last 1/3 of the thread are cut well but the mid 1/3 looks like more cutting is occuring one side and it looks like crap when magnified. I didn't check if there is any gain or loss of pitch. Using gummy Al dosn't help so will fool around with brass or some 1012L. I just scanned the Yahoo posts at work so got only a little flavor.

Need to look over the ones RC just posted.

Have a nice Gaertner toolroom microscope so I can measure things accuractely. Same goes for magnified pictures.
If you want me to try some stuff let me know. I'm in no hurry and have time . Will keep track of things and can post how things turn out.

The machine is limited for threading, but in a way, it allows for finding stuff that you would not otherwise come across.