PDA

View Full Version : Mach3 Lathe Threading Struggles



mondrota
28-07-2018, 02:24 PM
Welcome and thanks for reading my post.
So basically I'm trying to cut some threads on my Boxford Model B that I converted to CNC and am using Mach3 to control it.
The spindle is driven by a VFD, controlled by a breakout board 0-10v signal.
I have a spindle feedback system installed and it's fairly steady (the fluctuation is about 3rpm).
If I have the Closed Loop Spindle Control ticked, the threading program runs fine but it seems like every pass is slightly out in relation to the previous one and the final thread is all messed up.
If I have the Closed Loop Spindle Control unchecked, the program starts to run but pauses just before it is about to cut the thread. Is it waiting for the RPM to stabilise?
If I have Use Spindle Feedback In Sync Mode checked, the same thing happens as above.
Please have a look at the attached pictures, I hope they will help you guys diagnose the problem.
Any help would be much appreciated.

battwell
30-07-2018, 10:53 AM
Mach 3 cannot do succesful threading without a motion controller.
It's single pulse effort never worked unless it had a very high inertia motor to keep it at exactly the same speed along the thread. The box ford hasn't got this!

mondrota
30-07-2018, 01:44 PM
Thank you for your reply, I should have said that I'm now using a 1hp 3 phase motor to drive the spindle, it doesn't seem to slow down while cutting.
Anyway, what is bugging me is that the threading program won't start if the "Use Spindle Feedback In Sync Mode" is checked. And it needs to be checked according to some sources.
Also, some people report that they have good results in threading using the parallel port :
https://www.machsupport.com/forum/index.php?topic=9861.0
For this reason I'm thinking it's a matter of getting the settings right... But you guys would know better.
Does anyone have other ideas?

battwell
30-07-2018, 04:29 PM
i tried for ages to get this working on my boxford- just kept breaking tools!
buy uccnc or pokeys- or one of the other threading controllers!

magicniner
30-07-2018, 09:27 PM
A friend of mine struggled to get his lathe threading again with Mach3 after someone swapped his failed inductive pickup for an optical one, I widened the slot in his rotor to around 5 degrees which seemed to sort it out.

m_c
30-07-2018, 11:13 PM
There are plenty people who've successfully threaded with Mach and a parallel port. IIRC there was an issue with the parallel port on it not being able to handle the spindle speeding up during a threading move, but Art fixed it once somebody could consistently reproduce the problem.

Have you ran through the Mach threading guide? It's buried somewhere on the Mach forum.
It's a long time since I've used Mach3 on the lathe, so I'd say you're far more likely to get help on the Mach forum, but make sure you mention you're using a parallel port, and post your configuration XML so people can check your settings.

battwell
01-08-2018, 01:27 PM
the problem with mach threading is its handled in the pc. the pc can be interupted by anything else - so can never be real time.
i tried every combination to get succesful threading- but it wasnt repeatable enough. - ie if 1 pass out of 100 fails to sync properly- the tool is broken and the thread ruined.
( i even updated my boxford with mitsubishi servos- so it could respond much faster than a stepper.
the only way ive found to get a thread right is to follow an encoder. - direct into a motion controller.
heres an example of it in its simplest form. running via a uc300 eth motion controller. - encoder is 2 optos reading the pulse wheel.
https://www.youtube.com/watch?v=GnDHt4IQdpo

m_c
01-08-2018, 11:26 PM
If the PC can handle the step generation, then it should handle threading, as IIRC threading is handled in the low level parallel port driver code.

I used to cut threads using my old Conect with it's DC spindle motor, although it was running a Smoothstepper, but it was still only using a single slot sensor. I'd guess the toothed belt drive from the motor probably helped by eliminating belt slip and reducing how much the spindle speed changed under load, as the KBIC done a good job at maintaining speed under load.

It does seem to be something that works perfectly well, or gives endless headaches.

battwell
02-08-2018, 09:32 AM
personally- i wouldnt waste my time now with the old parallel port- it was done as a hack by art to get mach 3 going- (and worked darned well for most things- router and mill based)
if you want to do threading properly- add a cheap(ish ) motion controller- where the motion is calculated real time in hardware- not software. hit and miss/ will it wont it scenario isnt much good when your making a part- especially if the material and tooling is expensive.
ken crouch was one of the first to do real encoder threading using a galil controller. ive tested the code here for him at the time.
the results are superb- even being able to stop and restart a thread half way along. - skip to 2.3 of this video to see how easy it is.
https://www.youtube.com/watch?v=JfnQxDPWoEQ

mondrota
02-08-2018, 07:15 PM
Thank you all for your input. Out of curiosity, what would this cheap-ish controller cost? Can someone point me to a website? I'm trying to do things on a budget as it's only a hobby lathe for a hobby "machinist" 😊

battwell
03-08-2018, 10:49 AM
Thank you all for your input. Out of curiosity, what would this cheap-ish controller cost? Can someone point me to a website? I'm trying to do things on a budget as it's only a hobby lathe for a hobby "machinist" ��

not many of the manufacturers fully support lathe.
uccnc from cncdive.com works fine running code and threading (but doesnt have a dedicated lathe screen set).- i will be using this on my boxford- shortly. about £180 (fine if your using a cam package that supports lathe- or know how to manipulate things.)
acorn- seems to be about the best for lathe at the moment-as in well proven in the states. but ive not tried one- ask chaz or dean for their opinion on it. this requires windows 10 , touchscreen etc.
mach3 with pokeys- is supposed to work- again- ive not used a pokeys.
then there are the galil- most expensive new- but this was done for bigger old analogue machines.

the research and choice is yours :-)

mondrota
03-08-2018, 01:15 PM
Thank you 👍
Just before I go spending £££ on more stuff, there is this thing that keeps bugging me.
Like I said in the original post:
If I have the "Use Spindle Feedback In Sync Mode" checked, the program starts to run but pauses just before it is about to cut the thread and sits there waiting for something I assume.

From what I could gather reading forums, people say that this option should be ticked for threading.
Does anyone know why this is happening?

Thanks!

battwell
03-08-2018, 02:50 PM
that was only tested on a few versions- it doesnt work in most as it wasnt succesful. only the spindle index pulse is used. (unless you get a motion controller)
the main reason for this is that the code is being processed in software- it has to see the pulses- calculate and pass the motion info on. this can take more than 1 slot of processing time- so it will always be done late. if it takes 2 processing slot time cycles because the pc is doing something- then its definately out of sync. - so it fails.
while these processing periods are very short time spans- the job is rotating fast- so it can make a big difference.
in hardware in a threading cycle- the interupt to the hardware processor is shut off- so all it does is the threading cycle- it can process the information in nanoseconds.

just today ive tested rigid peck tapping - which is the holy grail in the world of motion syncronisation. and it worked perfectly using the uc300 eth from cnc drive.com and using their uuccnc software . (which is my goto controller now for most things as it works so well!

m_c
03-08-2018, 10:29 PM
What should happen with Mach3 threading, is the tool moves to the start point, it then waits for the spindle speed to stabilise, and then the threading move should synchronise with the spindle pulse.

However I did just remember, if Mach calculates that the axes can't respond quick enough to the spindle speed for the given move, then motion will just hang. It could be worth dropping the spindle speed down a good bit, and re-running the code.

battwell
04-08-2018, 09:28 AM
multi slot indexing- does not work at all.
only single slot index. (and that index window has to be quite a wide slot- so it can be seen by the sensor in under 5ms.)

i widened the index slot on my boxford 125 to about 20mm long- and it would index every time. - but would still break tools etc.
i have to cut a new index wheel now- so i can run mine with uccnc. - next job once the triac is finished.

m_c
04-08-2018, 10:51 AM
Just had a search, there is a quite a good threading guide here - http://www.machsupport.com/forum/index.php/topic,13017.0.html
However it doesn't cover that much of the setup, and even the main turn manual (http://www.machsupport.com/wp-content/uploads/2013/02/Mach3Turn_1.84.pdf) is a bit sparse on details, other than saying the pulse has to be a minimum of 200 microseconds. Battwell is correct in that multi-slot doesn't work, so ignore that.

Battwell, the 5ms is likely to be the sensor response time, which is another often overlooked problem. I always used sensors from a reputable source with known response/trigger times. I've seen some sensors that have quite a long response time, and some from cheap sources give no figures, so are a bit hit or miss as to whether they work reliably. They also have to switch cleanly, which can be affected by non ideal sensors, and any optos in the signal chain (some BOBs use low speed optos, which may increase response times).

You just need to work through everything one step at a time.
Is the index pulse being fed back reliably?
You mention you have the RPM displayed, but is it accurate. Unless you're running closed loop, it should always be off from the requested RPM by at least a few RPM. From what I remember, Mach will show the commanded speed by default, not the actual speed.
Also, is the index LED going on and off on the diagnostic page when you move the spindle slot back and forth through whatever sensor you're using?

Are your axis tuned to accelerate/decelerate fast enough?
If they're set too slow, Mach will calculate they can't move fast enough, and just hang at any threads. Try running the spindle as slow as possible, and air cut a very small pitch thread. If it works, then check your motor tuning. Lathes will appear to run very well with low acceleration, it's only when you try threading that the poor acceleration will show.


If none of that shows a problem, then post on the machsupport forum. There are guys on there who know far better about potential problems than on here.

Ger21
04-08-2018, 06:44 PM
There are plenty people who've successfully threaded with Mach and a parallel port.

And there are also plenty of people that haven't.
Last time there was a lengthy discussion about it on the Yahoo group, the general consensus was that it's broken, but does work for some people.
It apparently worked better on older versions of Mach3, which of course had other issues.

magicniner
04-08-2018, 11:16 PM
And there are also plenty of people that haven't.

I'll ask Ian what version he uses which works for him.
One common denominator in his implementations is that he's not tight and buys good quality components, I suspect it makes a difference.

mondrota
06-08-2018, 11:55 AM
[/QUOTE]

You just need to work through everything one step at a time.
Is the index pulse being fed back reliably?
You mention you have the RPM displayed, but is it accurate. Unless you're running closed loop, it should always be off from the requested RPM by at least a few RPM. From what I remember, Mach will show the commanded speed by default, not the actual speed.
Also, is the index LED going on and off on the diagnostic page when you move the spindle slot back and forth through whatever sensor you're using?

Are your axis tuned to accelerate/decelerate fast enough?
If they're set too slow, Mach will calculate they can't move fast enough, and just hang at any threads. Try running the spindle as slow as possible, and air cut a very small pitch thread. If it works, then check your motor tuning. Lathes will appear to run very well with low acceleration, it's only when you try threading that the poor acceleration will show.


If none of that shows a problem, then post on the machsupport forum. There are guys on there who know far better about potential problems than on here.[/QUOTE]

The STrue is always slightly out unless I run it in closed loop spindle control mode.
I tried running the threading program at 200 rpm but again it wouldn't actually start threading.
On the Diagnostics info screen the "missing index pulse detected" remains unchecked so I think there is no problem with that.
However I just noticed that the "rotation speed real-time" is about 180000rpm
Whilst the "application end rpm" is 598ish.
Would this be a problem?
I've attached a photo of this screen in my original post.

mondrota
06-08-2018, 12:02 PM
Okay I think I found the problem (or a symptom) but I still need the cure :)
So I noticed that on the turn diagnostics screen the "Locked RPM" and "current RPM Variation" read 0 and "Highest Variation during thread" reads 1% when the Spindle Feedback is disabled. This is when the program will run the threading but with poor results.
However, when the Spindle feedback is enabled, all of the above fields on the diagnostic screen read " 1.#INF "
Please have a look at the attached picture.
For some reason I can't attach the other one with the fields reading the " 1.#INF "
24636
I have a feeling that for some reason mach3 cant syncthe threading to the spindle speed.
I found a thread describing the same problem here:
http://www.machsupport.com/forum/index.php/topic,18679.0/wap2.html
The person having this problem managed to sort it out just by fiddling with the sensor wiring. I've tried rerouting the wires but to no avail. Is there anything else that would cause the syncinc to fail?

Many thanks!

m_c
06-08-2018, 10:12 PM
I'm not sure on the reliability of the threading diagnostics page.
If you open the diagnostics page with all the LEDs, does the one for the index go on/off as you manually move the spindle slot through the sensor?

It does sound like you've got a sensor problem. How big is the slot you're detecting?
Can you run the spindle any slower than 200rpm?

If it works at really slow speeds, it could be as simple as needing the slot enlarged.

mondrota
07-08-2018, 07:38 AM
Yes, I can run it slower than 200 rpm. And yes, the index led flashes as I move the spindle by hand. I used to use a slotted disc with a proximity sensor, now I'm using a magnet on the shaft with a hall sensor. The pulse is nice and long, the rpm readout is stable even on max speed (about 1800 rpm).
Thanks

mondrota
03-11-2018, 06:52 PM
Okay, it's been a while, and this project was put to a side but now I'm back at it. I bought a cheap USB motion controller from eBay
https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F 163110531211
I plugged it in to my laptop for testing, connected some relays and they work okay, however I don't get any rpm readout! The index light comes on in the diagnostic screen but no matter what I do, the sTrue stays at 0 🤔
Is the controller supposed to tell mach3 what the rpm is?
Did I go wrong by going cheap?
Help!

battwell
04-11-2018, 12:56 PM
you need a controller that will support threading in the controller. this cannot be done in software.
the index signal must be interupt driven- so its very fast.
software will always lag so you will never get the same start point for threading.
you also require spindle encoder - which can be 2 sensors 60 degrees apart
threading- and cheap- are never going to work

mondrota
04-11-2018, 01:32 PM
Thanks for your reply. Will pokeys 57 be suitable for threading?
Thanks

battwell
04-11-2018, 01:54 PM
i think they are supposed to work. but ive never tried one.
have a look through the mach3 forum or contact pokeys to fully confirm.

magicniner
04-11-2018, 06:12 PM
I bought a cheap USB motion controller from eBay

Hmm, not narrowing the angle there! ;-)

m_c
04-11-2018, 08:04 PM
From the top of head in no particular order, the following support turn/single point threading-
Pokeys
PMDX
KFlop
CS-Labs (although I think you may need the higher end controller with an MPG module, and not the cheaper controller)
Centroid


IIRC Pokeys (and possibly PMDX) will work with a basic single/multislot sensor, whereas the rest require a proper quadrature output encoder.

magicniner
04-11-2018, 09:36 PM
Does anyone do a good Stand Alone Controller for lathes?

m_c
04-11-2018, 10:08 PM
Does anyone do a good Stand Alone Controller for lathes?

When I was looking at the Chinese standalone controllers, I'm sure some were available in turn versions.

battwell
05-11-2018, 12:55 PM
https://www.aliexpress.com/item/Powerful-SZGH-CNC1000TDb-2-Two-Axis-CNC-Controller-for-Lathe/2041200809.html?src=google&albch=search&acnt=479-062-3723&isdl=y&aff_short_key=UneMJZVf&albcp=266121556&albag=7593673036&slnk=&trgt=aud-165594907443:dsa-42862830006&plac=&crea=64152518716&netw=g&device=c&mtctp=b&memo1=1o1&albbt=Google_7_search&aff_platform=google&gclid=Cj0KCQiA8f_eBRDcARIsAEKwRGd-8AkRkCtc89bOJ1fig8hkd7_2QMRqr5Tkbcw0j2D0VwgOwyDvXu caAi6yEALw_wcB

mondrota
14-11-2018, 07:30 PM
Okay, I got myself a pokeys 57u but something tells me that's not over. Does anyone know if I can wire the stepper drivers and relays directly to the pokeys?

Thanks!

Chaz
14-11-2018, 08:11 PM
Okay, I got myself a pokeys 57u but something tells me that's not over. Does anyone know if I can wire the stepper drivers and relays directly to the pokeys?

Thanks!

Are you going to run Mach 3 or 4?

Pokeys cant thread on Mach 3 ....

mondrota
14-11-2018, 08:49 PM
Im running mach3...

Chaz
14-11-2018, 10:47 PM
Im running mach3...

It wont work. The same reason why I decided to ditch Pokeys (and Mach) and moved to Acorn.