Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: axion68 on June 09, 2011, 01:22:50 AM

Title: Spindle RPM lock error while threading
Post by: axion68 on June 09, 2011, 01:22:50 AM
I am setting up a new machine and am stuck on threading using the thread wizard.  I can disable spindle feedback and it runs the code just fine.  If I enable spindle feedback it gets to the point of locking spindle rpm and stalls with a non-numerical number locked(see attached screenshot).  I am picking up a index pulse and mach 3 sees rpm.  Can someone guide me in the right direction?

Thanks
Jacob
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 09, 2011, 04:13:42 AM
The diagnostics should not be used now, it was meant for earlier versions whilst Art was trying to figure out where problem were. Disable the plugin and see if it works.
The things you need for threading are
Use Index input(Not Timing)
Take the tick out of disable Spindle relays, even if your spindle is totally manually controlled
Use spindle feedback in sync mode
Have Index debounce low, I always have 0 but some need a small amount
Make sure your spindle pulley setup is correct  if controlling from Mach as you need the spindle speed set to Max there for the gear you are using (if any)
Call the spindle from Code, MDI   by using a M3 or M4


Hood
Title: Re: Spindle RPM lock error while threading
Post by: axion68 on June 09, 2011, 12:16:05 PM
Ok, I have disabled the diagnostics with no success.  I do have an index input (oops, timing is stuck in my head from ignitions), mach 3 has full spindle control and I am in sync mode.  My debounce interval is set at 120 and index debounce is set at 75.  I have tried setting the debounce values from 0-200 with no luck.  I am calling the spindle speed from MDI before I run the code.  Anything else I should check or try?

Thanks again!
Jacob
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 09, 2011, 12:53:35 PM
Can you attach your xml please and I will see if I can find a problem.
Hood
Title: Re: Spindle RPM lock error while threading
Post by: axion68 on June 09, 2011, 02:01:22 PM
XML attached.

Thanks again, I really appreciate it.
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 09, 2011, 02:55:00 PM
Seems to be working fine here when I simulate the index pulse. What is the code that you are using? Could you be trying to move faster than your Z axis is capable of ?
Hood
Title: Re: Spindle RPM lock error while threading
Post by: axion68 on June 09, 2011, 04:04:50 PM
G0 G40 G18 G80 G50 G90
T101M6
G00  X1.66
G00 Z0
G00 X1.66
M03 S500
G76 X1.6 Z-0.5 Q0 P0.05 J0.005 L45 H0.01 I29 C0 B0.005 T0
M9
M5
M30


That was from the threading wizard.  Just trying to see it in action.  The only thing I have done was remove "G00 G53 X0 Z0" from the 2nd line because I don't have any switches.  What is weird is the code works when I disable spindle feedback.  The Z axis should move at that speed.  I have also turned the rpm way down just to see if that was the case and no dice.  The spindle turns on and it just hangs after that.

Thanks again
Jacob
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 09, 2011, 04:09:41 PM
When the sync is disabled it will work fine as it is not looking for the index, it is basically in simulation mode.

Dont know why its not working for you unless your index pulse is not stable enough, however the diagnostics above looked OK, even though they should not be used with later drivers.
It is the Index Debounce that p[ertains to the Index pulse so set that to zero and see if your RPM readings are stable.
Hood
Title: Re: Spindle RPM lock error while threading
Post by: RICH on June 09, 2011, 06:42:47 PM
What are you using to get the index pulse? ie; slotted disc....a reed switch by any chance?
What version of Mach?
See page 9 of Threading on the Lathe-Mach3 Turn and do the triggering test.

Always use the "Calc number of passes" in the wizard as that will warn you if you are exceeding you max velocity for a given spindle rpm for the thread.

RICH
Title: Re: Spindle RPM lock error while threading
Post by: axion68 on June 10, 2011, 12:16:22 AM
I tried the index debounce at 0 with no luck. Anything after 375 and my rpm reads wrong. I have tried several settings between 0 and 375.

I am getting an index pulse from a magnetic pickup and have done the triggering test.

I am using the latest stable version of mach 3.

Does anyone know if the current version of Mach 3 will show a locked rpm in the diagnostic information plugin even though it might not be compatible anymore? I think that has something to do with my problem as it does not lock on a number (see attached pic in first post).

Thanks again
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 10, 2011, 04:01:29 AM
Dont know what to suggest other than as mentioned before disabling the plugin in the plugins menu, it may be that it is still affecting things.
If your RPM is steady and accurate without averaging on then I can see no reason why you are not getting threading to work.
Hood
Title: Re: Spindle RPM lock error while threading
Post by: RICH on June 10, 2011, 08:05:26 AM
Quote
index debounce at 0 with no luck. Anything after 375 and my rpm reads wrong
The index debounce determines how manny times Mach will look at the index signal to confirm the signal. High values and you will see that
triggering will take longer, some will work at 0, I use a value of 10.
I also use a magnetic sensor, namely a Halls affect and it is fast sensing, some mag sensors like a reed are not fast enough at higher  rpm's
and thus won't work right. That's why I asked what type so look at the specs of your sensor and see if it is limited.
Signal quality at higher rates may be different than low rates so you may want to look at the signal with an o'scope. If the signal is not clean
it can influence triggering timing and output.  Sorry i can't be more specific.

Quote
locked rpm in the diagnostic information plugin
Disable that plugin  / don't use it or any others from the thread testing thread, it is not functional and most of them required a specific related driver.

Spindle speed averaging, if on, will influence the threading accuracy since Mach reads the rpm  to four decimal places ( if i recall correctly).....more accurately than you can measure it. Depending on your lathe system you may not even notice the affect on the finished thread lead.
I would still recommend users use it.

One reason threading will not work is if you don't have a licensed Mach.

Since you have an index signal per the testing, rpm is read accurately ( to some rpm range ) , i think the problem is the sensor signal.
Lower the rpm for a selected thread and see if it triggers for the lower range.

RICH
 
Title: Re: Spindle RPM lock error while threading
Post by: axion68 on June 10, 2011, 09:26:43 PM
I went through my sensor wiring and rerouted the wires so they were clear of any other wiring. Now the threading works, not sure if it was a loose wire or the wires picking up interference.  Thanks again for all the help!
Title: Re: Spindle RPM lock error while threading
Post by: RICH on June 11, 2011, 08:53:18 AM
Glad you got it working. I will assume that the sensor wiring was shielded, and if not , running it past anything that generates an electrical field can change the signal and cause problems.
The shield should be grounded or provide for a continous shield along it's entire routing ie; not grounded at sensor..though say a plug/ jack/ connection...and terminate / ground to a separate ground
which is not part of some electric circuit.

RICH
Title: Re: Spindle RPM lock error while threading
Post by: Kryten on June 28, 2011, 09:21:43 AM
I've just upgraded to R3.043.022 and have seen similar problems that I didn't have in the old version ( R2.something).
The spindle speed doesn't show the right value above 600RPM ( used to be ok at 1000 RPM ). This happened very occasionally with the old version but was instantly fixed by restarting Mach3, however it seemed more of a scaling factor than what is happening now. Now it seems to be a permanent fault.

Also the threads finish with a groove instead of withdrawing the tool ( creating a shear point ), using the same G Code that used to withdraw the tool during the last turn of the chuck.
I used a "run from here command" to go over the thread again ( a few lines before the threading cycle ) and it didn't pick up the thread exactly - this has never happened before.

The spindle pulse is fiber optic so there is no noise getting into the signal. It was perfect right up until Mach 3 was upgraded.

Everything was fine with the old version until I tried to edit the G Code after scrolling down a bit in the G Code window in Mach 3. I got an error message asking if I wanted Mach 3 to recover-which flashed about 100 times, and had to reboot the computer. I couldn't get Mach 3 running again so I updated to R3.043.022.

I would like to know which version of Mach 3 was the last before the threading cycle was changed. I don't need the spindle speed correction in the new threading cycle as my spindle doesn't change speed when cutting threads.

Thanks,
Glen.
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 28, 2011, 09:32:10 AM
Have you looked in the change log?
Hood
Title: Re: Spindle RPM lock error while threading
Post by: Kryten on June 28, 2011, 10:39:09 AM
I had a look in the changelog but couldn't make out where the complete rebuild of the threading function started. There seemed to be many comments like "Threading Driver update for the P POrt" & "Driver update for threading".

I've installed Version R2.63 and most of the problems I mentioned in R3.043.022 disappeared. The spindle speed now displays correctly and the thread can be re-cut. I just have to try to get the threading tool to withdraw during the last turn now.

I'm sure the "L" value in the G76 cycle used to be the number of degrees of rotation it takes to withdraw the tool. In R3.043.022  if the "L" value is 45 it cuts a sharp groove for a full rotation after the Z axis has stopped and then does a 45 degree chamfer. An "L" value of 45 should withdraw the tool during 45 degrees of rotation. An "L" value of zero should remove the tool at maximum speed at the end of the last rotation of the helix BEFORE the z axis stops moving.

All the parts I have made before had the tool withdraw without leaving a groove and had an "L" value of zero.

A sharp groove is the best way to make the weakest possible component.

Thanks,
Glen.


I may try an even earlier version of Mach 3 to see if it fixes it later.
Title: Re: Spindle RPM lock error while threading
Post by: RICH on June 29, 2011, 09:17:48 PM
Quote
which version of Mach 3 was the last before the threading cycle was changed
I would need to go back a number of years since it was actualy broke at one time and if memory serves me it was even before R3.041.22.... forget the past versions  for threading.
Use at least  3.042.032 and even better 3.042.034 and beyond.....I use 034.

Quote
I don't need the spindle speed correction in the new threading cycle as my spindle doesn't change speed when cutting threads.
Well maybe .....but...... it is changing some and you just can't see it via a DRO. For the most accurate threading the spindle speed averaging can help some, it all depends on
just how good your lathe system is and you will need to really accurately measure the thread lead over the length to even find accuracy differences. The basis of Mach holding a lead accuracy is shown in the write-up in figure 4.4.5. Class 1 threads, when not chasing, will be not be possible for most lathe users.  If you are happy with the results then don't check it's use in config. 

Quote
try to get the threading tool to withdraw during the last turn now.
The axis needs to be fast enough to withdraw during the degree of rotation and the Z  must slow down to achieve the pullout. A 90 degree pullout at fast feedrates for example would be impossible. See the note at the top of page 34 in the write-up on the L value. The fastest I  could test threading at was around 120 IPM and that was scary fast threading for me.

BTW, I like to use G32 code output from the wizard as i can see the code for each pass and makes for easy modification in one so desires. To each their owne. ;)

RICH 
Title: Re: Spindle RPM lock error while threading
Post by: Kryten on June 30, 2011, 12:35:57 PM
Thanks Rich,
It looks like a high value in the CV setting makes it withdraw the tool early to try and keep a constant velocity - inadvertently creating the correct tool withdrawal function. I had set this to a low value when I reinstalled Mach 3 because I've had major accuracy issues using CV on a router. The threads I was cutting were 2mm pitch @ 300 RPM.

The original point I made about the displayed actual RPM in version  R3.043.022 being wrong above 600 RPM seems valid as it was fixed as soon as I installed Version R2.63.

Also, there has been a bug with the G Code window for a long time. I don't know if it has been fixed in later versions but the way to test it is to feed hold while running a G Code and then press Edit G Code. I realize it's not something you would normally do, but you can forget it's only in feed hold and not stop if you're looking for an error in the G Code. The last time the bug occurred I had only scrolled down in the G Code window and then wanted to change something in the code. The bug produces a never ending cycle of error messages until it locks up the computer. This is in Mach 3 Turn ( several versions ).

Regards, Glen.
Title: Re: Spindle RPM lock error while threading
Post by: Hood on June 30, 2011, 01:39:24 PM
Also, there has been a bug with the G Code window for a long time. I don't know if it has been fixed in later versions but the way to test it is to feed hold while running a G Code and then press Edit G Code. I realize it's not something you would normally do, but you can forget it's only in feed hold and not stop if you're looking for an error in the G Code. The last time the bug occurred I had only scrolled down in the G Code window and then wanted to change something in the code. The bug produces a never ending cycle of error messages until it locks up the computer. This is in Mach 3 Turn ( several versions ).

Regards, Glen.

Cant recall seeing this but suppose its something I only do occasionally as like you say sometimes you forget. Anyway just tried here with the lockdown and you get an error message telling you to stop before editing, so looks like its fine now, not sure when/if  it was fixed as I have never seen the problem you get.
Hood
Title: Re: Spindle RPM lock error while threading
Post by: RICH on June 30, 2011, 05:34:09 PM
Quote
looks like a high value in the CV setting makes it withdraw the tool early to try and keep a constant velocity
Not sure how CV interacts, if any, with the set feed rate of the thread cycle ....Art would need to comment...

Quote
displayed actual RPM in version  R3.043.022 being wrong above 600 RPM seems valid as it was fixed as soon as I installed Version R2.63
No comment on the old versions, they are history in my book, just let the old dogs quit hunting.......  ;)
RICH