Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: helmholtz on September 26, 2016, 08:05:38 PM

Title: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 26, 2016, 08:05:38 PM
I've been using Mach3 Turn for many months on a converted bench lathe and everything has worked as I expected so far. Most of my problems have been easily solved by reading the forum posts.

I recently added a C6 speed control board from cnc4pc so I could use spindle control (I use the C10 breakout board, and C3 index pulse card). I thought I configured it pretty well and get close to the requested spindle speed, both in the Mach3 DRO and against a laser tach.

BUT, I'm experiencing some really odd behavior with regards to G95 and can't figure out what's going on. On an intermittent basis Mach3 will reduce the feedrate, while executing a program, to some unusually low number like 0.0002"/rev. It will often be on like the first couple of roughing passes, but then Mach begins to execute the feedrate specified in the program on later passes. It usually fixes itself as the program goes on. Sometimes it doesn't, and I have to restart the Mach software.

If I stop the program and enter a feedrate in the MDI, it executes fine. It only occurs while executing a program. At no time do I see a drop in RPM in the Mach 'True spindle speed' DRO

What could possibly be causing Mach to ignore a feedrate as specified in a program, but do so on an intermittent basis, and then execute the feedrate later in the same program?

In general I use the following syntax for example:
G97 S800 M3
G95 F0.004
G01 Z X whatever...

Under 'ports & pins' -> 'spindle setup' both 'spindle speed averaging' and 'use spindle feedback in sync mode' are checked.

What am I missing here?

Thanks for any help!
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 27, 2016, 04:40:06 AM
Does your spindle take a while to get to speed? If so do you have a delay set in Ports and Pins, Spindle Setup page?

Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 27, 2016, 08:46:30 AM
Thanks for the reply Hood.

I used Peter Homann's information (found in many forum posts) to calibrate the spindle. It comes up to speed quickly and is stable.

Under ports & pins, spindle setup, general parameters, all delays are set to '0'.

I've thought this could be an index debounce or debounce interval setting problem?

My index debounce is '0' and the debounce interval is '500'. This setting has yielded accurate and stable 'True RPM' numbers in the DRO. (Any time that I've increased the index debounce to say like 100, my true RPM DRO is much lower than actual RPM).

I've run enough code now to see that it always happens in the beginning of a program and gets corrected during the program.

Thanks for the advice!

Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 27, 2016, 08:48:42 AM
Set the spin up to 1 second and it should help.
Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 27, 2016, 09:40:08 AM
Thanks for the recommendation Hood.

I tried 'Spin up Delay' at 1 sec (also tried 2-5), but noticed no difference in my test program. It always runs the same way.

in the little test program the first few passes will run at F0.0065 but on the last pass it runs at the specified F0.008. I specify S800 and get a True RPM of '776' (both on DRO and measured with laser tach) which is pretty close.

This example isn't terrible as the feed isn't off by too much, but I don't get why it is off at all. Thanks again for trying to help.

Code: [Select]
G20 G90 G18

T0101

( rough )
G95
G97 S800 M3
M08

G0 X0.55
G0 Z-0.2377
G0 X0.5625
G1 F0.001 X0.47
G1 F0.008 Z-1
G0 X0.55
G0 Z-0.2559
G0 X0.5325
G1 F0.001 X0.44
G1 F0.008 Z-1
G0 X0.55
G0 Z-0.2827
G0 X0.5025
G1 F0.001 X0.41
G1 F0.008 Z-0.4011
G0 X0.55
G0 Z0.0
G0 X0.51
G1 F0.008 Z-0.219
G3 X0.5024 Z-0.2239 I-0.005 K0.0
G1 X0.5003 Z-0.2241
G2 X0.4334 Z-0.423 I0.0922 K-0.1178
G3 X0.435 Z-0.4257 I-0.0042 K-0.0027
G1 Z-1

M5
M30
%
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 27, 2016, 11:04:58 AM
ok try unchecking the averaging and see if that helps.
Are you using the parallel port?
Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 27, 2016, 07:28:24 PM
Yes, I'm using the parallel port with a C10 breakout board.

I unchecked 'spindle speed averaging' and the problem got worse. Any program run using G95 resulted in an actual feedrate of 0.0001"/rev regardless of what was in the program.

So, I enabled spindle speed averaging again, but did try un-checking 'use spindle feedback in sync modes'. That worked for some reason.

All programs ran as expected and the correct feedrate was used. There were no noticeable changes to my spindle speed DRO or ability to call a certain spindle speed.

so, my problem appears fixed.

What have I given up by disabling 'use spindle feedback in sync modes'? I assume threading?

Thanks again for your help. I appreciate you taking the time to help me troubleshoot it.
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 27, 2016, 07:35:31 PM
Afraid your problem is not fixed :(
By unchecking the feedback in sync you have basically told Mach to ignore the spindle feedback when determining how fast to move the axis.
With it unchecked you will get the feed per rev that is in your code at the RPM that is in your code, but if your spindle is actually faster or slower than the codes RPM then the axis will not be the correct feedrate.
And yes, threading will not work correctly.

Can you attach your xml and I will take a look and see if I can find a problem in it, also if using Ver 066 of Mach I would suggest you go back to Ver 062.

Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 27, 2016, 07:53:30 PM
sorry, should have attached that xml on the first post. It should be attached to this one.

thanks for clarifying how the sync works. I guess I was only getting good results because my RPM's are pretty stable.

I am using Ver 066 and have seen a number of posts about folks reverting to 062. I'll do that and see if it helps.

Thanks again.
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 28, 2016, 02:30:59 AM
I see you have spindle relays disabled, unless things have changed since I last used the parallel port, then I am surprised you are even seeing a RPM showing in Mach.
Might be worthwhile enabling them and setting up for outputs you are not using, probably have to enable the outputs in Ports and Pins as well.

Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 28, 2016, 01:52:18 PM
Ok, so I enabled spindle relays and routed them to unused pins on my breakout board. So as far as Mach is concerned it thinks it's turning on a physical relay. Unfortunately, no change in the issue.

I also tried deleting my linearity.dat file as I know this is related to spindle speed and let mach rebuild the file on the next restart. This didn't work either.

I reverted the machine to ver 062 from 066, however I don't think I did a 'clean' uninstall. I thought I would have to copy my xml and macros back into the mach3 folder and this was not the case they were still there. I need to do some more forum research on how to revert to a previous version. So, it's possible it is still an issue. I just used the windows 'uninstall a program'.

But for now, anytime 'use spindle feedback in sync mode' is checked I don't get the requested program feedrate. actual feedrate is always much lower. At least I can 'uncheck' it and make parts while I try and figure it out.

I'm hoping it's just a corrupt file somewhere in the mach installation and a clean re-install will fix it but I'm really stumped. I've not seen this symptom anywhere on the forum after a few hours of searching. I've been considering moving away from the parallel port to motion controller (and probably Mach4 as well), but I'm not even convinced that is what is causing my troubles. Thanks again for your help.
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: Hood on September 28, 2016, 02:44:46 PM
All you need to do to install an older version is run the installer, no need to delete anything.
If using a default profile and you have custom macros in that xml's macro folder then you will lose them and the settings in your xml as they will be overwritten. If however you are using a custom profile then it will remain intact and also any custom macros for that profile will be untouched.

I saw  this problem a long time ago on the big lathe when I had the gearbox and the speeds stepped up in sequence, If I commanded a higher range it would take a few seconds to get to speed and if I had zero spin up delay then Mach would see the slow spindle speed and start moving the axis at that rate, next feed call would correct. Adding a spin up delay cured it for me and now I have a servo spindle so no problems even with zero delay.


I think your problem may be the Index input and for some reason Mach does not see the correct RPM when it starts to look for it, maybe try a G4P2 after the spindle call and before your first feed call.

Hood
Title: Re: Mach3 Turn G95 feed rate changes by itself intermittently
Post by: helmholtz on September 29, 2016, 01:01:41 PM
Hood,
You were exactly right, the G4 fixed it.

For whatever reason there is a delay in the index input so that Mach sees a much lower RPM (probably 0 or close to it) when it calculates how to execute G95. I feel like it was ignoring whatever I put in the 'CW delay spin up' parameter, even once I enabled relays but I'm not going to worry about it, as I had tried spin up delay of like 4 seconds with not noticeable effect.

A simple G4 P2000 (milliseconds in my case) gives everything enough time to stabilize so that once a G95 Fx.********* is called it is executed correctly. That also explains why my symptom only appeared in the beginning of a program. If I changed feed rates later Mach of course saw the correct RPM as everything was stable by that point.

Thanks again for walking me through some troubleshooting. The solution makes sense, though I would have never thought of it.