Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: P_D_B on March 16, 2013, 05:49:36 PM

Title: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 16, 2013, 05:49:36 PM
I have an interesting issue.  I have had this happen with three different programs.  When I load a complex 3d modelling program in Mach that has more than five toolpaths all in the same program, when I start the program the program starts as normal but when it moves in G00 rapid the steppers will overrun.  My cam program is Aspire 4 but this also happened with programs I made with 3 as well.  If I output single toolpaths or split the program in half ie. 3 toolpaths in each program, it will work fine.  I am at a loss but like I said only with certain programs.  I have run more than 100 programs. The programs range in number of lines from 300,000 to 600,000.  Any suggestions.

Pete
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Hood on March 16, 2013, 07:29:29 PM
What do you mean they overrun? Physically go further than they are meant to? Do the DROs correspond to that overrun?
Hood
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 16, 2013, 11:05:50 PM
Hood,
By overrun I mean it is driving the steppers so hard it actually loses steps.  It will happen with any axis.  But it will only do it with certain programs.  It acts the same as if you are in motor tuning and have the velocity too high.  It will miss a lot of them and be off by many inches (centimeters).  It only happens at tool change.  Going to or when returning from.  The tooling is not any different than other programs I am running.  I have looked at the G code and it is the same calls that are in the other programs.  The only thing I noticed but I do not remember if it was normal was that when I load a program and it say generate toolpaths, that dialog process bar will complete really fast but until the program is ready to run is a while afterward.  So why would it do this when all toolspaths are output to a single file but if you output a single toolpath to a single file it will not.  If you output all toolpaths to a single file again, it will rapid so fast to over drive the steppers.  I have loaded gcode, over driven, closed gcode, loaded again, still does it, powered down for several minutes, restarted tried again, still over drives, load another program, works fine, load that program again, over drives, load only a single toolpath, works fine.  I almost give up.

Sorry for the long rant, only trying to give you the steps I have taken so far.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 16, 2013, 11:41:54 PM
If you're suggesting this is somehow a problem in Mach3, I suggest you come up with another theory.  It is almost certainly something in your machine - either a mechanical or electrical problem.  It could be something in the configuration of your PC causing excessive jitter in the step pulse timing.  If you're operating near the mid-band resonance of your steppers, a small vibration can cause the steppers to fall out of position, losing a step.  Electrical noise can also cause step pulses to be lost, or added.  If you work at it, you should be able to come up with a very short, simple sequence of G-code commands that will induce the failure at a high rate.  That has to be the first step towards finding a resolution.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 12:05:43 AM
Ray,
I somewhat understand what you are referring to.  I just do not understand why it will repeatedly do it with the same gcode.  I have re-run many of the other gcodes and it does not happen. It only happens on the same programs.  The feeds are the same.  There has to be something I am missing.  The sequence in the Gcode appears to be the same.  Losing a step is one thing.  One step is 0.0003" but I am losing up to 3.0000" when it happens.  That is a lot of steps.  The problem programs will not run at all, it always happens.  That is what has me confused.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 17, 2013, 12:21:28 AM
Which is exactly why you need to narrow down *exactly* what it is about the section of code that causes the problem.  You need to whittle it down to a short, simple section of code that reliably induces the failure.  There absolutely is such a sequence.  That will be the quickest path to finding the actual root cause.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Tweakie.CNC on March 17, 2013, 03:46:40 AM
Hi Pete,

If you could zip and post (or e-mail me) a copy of the GCode which has the repeatable problem I would be happy to run it here and if the problem shows on my system then perhaps I could suggest a possible solution.

Tweakie.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Hood on March 17, 2013, 03:49:52 AM
Can you attach your xml and the code and if you can say where roughly in the code it happens it may help but a Ray says its more likely mechanical/e,ectrical.
Hood
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 12:58:04 PM
My work is an electo-mechanical technician by trade, so I believe you that there is something a miss.  However Rapid is Rapid not matter where the G00 is called.  So why is it that it only happens on certain programs.  I am trying to build a good sequence of events that lead up to it and this is the common denominator.  That being said.  I am also going to look at the tool change macro.  I am using Mach Blue Probing by  Big Tex screenset.

Here is the xml.  The programs are large I will try to Zip them.  One program runs through 2 toolpaths fine until the third tool change (I will note a readme in the zip file).  That is when it always happens.  And the other happens right at the beginning tool change. If they do not zip small enough, give me time to set up a ftp.

Thanks for the help.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 17, 2013, 02:15:57 PM
However Rapid is Rapid not matter where the G00 is called.  So why is it that it only happens on certain programs.

I will disagree with that slightly.  This is a dynamic system, so that one move, by itself, may not really be the issue.  There is another move leading into it, and one leading out of it.  Those can also have an effect, both in the trajectory that Mach3 produces, and in the dynamics of actually executing the moves on the machine.  If you snip a several lines of code both before and after the problem rapid, pre-position the machine, and execute just those lines, does the problem still occur?  If so, then start removing lines from the front and back end, and see where the problem goes away, if at all.  Make sure you duplicate, as fully as possible, the full "environment" as it is when the whole program is running - spindle/coolant, on, etc.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 03:53:31 PM
Maybe one of you can help me understand why this helped.  I went into motor tuning and decreased my velocity to 400 ipm then tried the program.  Still the same problem.  So I went back to motor tuning and increase my acceleration to 40 (10%) of velocity.  Now the program runs.  A little better explanation of how these two relate would be helpful.

Thanks in advance
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Hood on March 17, 2013, 04:11:35 PM
There was a bug a while back in Mach that could cause issues if Z axis was quite a bit different in tuning than X and Y. Ray should be able to fill you in more on that as I am sure he suffered from it. I would have to search back to see so hopefully Ray will chime in.
Anyway I am thinking thats unlikely to be your problem as yours were not that far off each other and unless you have adjusted the Z to the same as X and Y they will actually be further out now.

Hood
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 04:18:47 PM
Hood,

I made all axes the same

Pete
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Hood on March 17, 2013, 04:22:06 PM
Still think its a long shot as I was sure the Z had to be way out compared to other axes but maybe not, Ray will be able to say for sure.

What Rev of Mach are you using?
Hood
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 04:55:51 PM
Version R3.043.022
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 17, 2013, 06:20:40 PM
IIRC, v3.043.022 is the version I had that problem with.  However, it was only an issue when the Z axis was set for lower velocity/acceleration than the other axes, and only when transitioning from a 2-axis arc move to a three-axis move.  Mach3 would ignore the Z axis acceleration, and command it to accelerate at the rate of the other two axes, which, of course Z could not do.  I've been told it was fixed quite some time ago.

Have you tried running with a more recent version of Mach3?  That one is quite old.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 06:27:07 PM
No, I have not upgraded yet.  Few reason why, 1) just was thinking about it the other day but was unsure if it required purchasing again 2) Do not know what all I will have to start over from the beginning again. Whether I will have to redo all brains, screensets and settings. 
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Chaoticone on March 17, 2013, 06:43:23 PM
You shouldn't have to start over at all or buy another licenses.  It would be a good idea to make a copy of your entire C:/Mach3 folder and put it on a thumb drive before any changes, but this is always true and just precautionary.  You should be able to just download and install.  I wouldn't get the development or lockdown on the downloads page right now.  We haven't nailed anything down yet but quite a few suspect problems with them.  I'll let Ray recommend a version.  I'd say 3.043.056 or .057.

ftp://machsupport.com/Mach/ (ftp://machsupport.com/Mach/)

Brett

Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 17, 2013, 06:46:09 PM
Brett,

I can't recommend a version - I stopped using Mach3 well over a year ago.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 07:07:28 PM
Ray,
I have to ask Why you quit using Mach?
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: HimyKabibble on March 17, 2013, 09:31:31 PM
Ray,
I have to ask Why you quit using Mach?


Mostly two reasons - First, I was "lucky" enough to get bit by a bug, at a high rate, that almost nobody else was seeing.  Despite months of effort by Brians part, and Gregs, we were unable to isolate it.  It finally came down to I needed to be able to get my work done, and the bug was nmaking that extremely difficult.  Second, I'd wanted for some time to write my own CNC Controller app, to customize it to my work-flow.  I switched to a KFlop, which eliminated the bug, since I no longer used Mach3 and it allowed me to write my own controller app.  The big may, or may not, have been fixed by now, but it seemed to affect very few people anyway.  I was just "lucky".  So, I now have a very reliable machine, and software that works the way I want it to.  It was a lot of work, but well worth it to me, especially since, as of a few days ago, I have two machines.

Regards,
Ray L.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on March 17, 2013, 09:37:54 PM
Good for you.  I like hearing about self reliance and the success people do with it.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: BR549 on March 18, 2013, 12:43:03 AM
Try recreating your Gcode file. SOMETIMES there is a Gcode file created that has SOMETHING in it that will drive Mach3 crazy. I have run into it in the past. File seems perfectly normal BUT will go nuts on the same line every time for no apparent reason.

I then delete the file and recreate the file and everything runs fine from then on.

Never could fine the reason or the FIX, just knew it would do it from time to time and break bits and ruin Parts.

(;-) TP



Title: Re: Mach3 Bug? Causing overrun of drives
Post by: jonny quest on March 18, 2013, 03:09:39 PM
IIRC, v3.043.022 is the version I had that problem with.  However, it was only an issue when the Z axis was set for lower velocity/acceleration than the other axes, and only when transitioning from a 2-axis arc move to a three-axis move.  Mach3 would ignore the Z axis acceleration, and command it to accelerate at the rate of the other two axes, which, of course Z could not do.  I've been told it was fixed quite some time ago.

Have you tried running with a more recent version of Mach3?  That one is quite old.

Regards,
Ray L.

Randomly my Z would lose steps with .022 version of Mach, that exact same scenario. I busted up some very expensive tools.

I have since switched to .057 version and a ESS. Haven't really run the machine long enough to see if the problem is still there... because it was very random.

I wonder if I should Make all my axis the same IPM and acceleration... as my Z is still a little lower than the X,Y to be on the safe side?
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on April 27, 2013, 11:53:39 PM
Ok, I updated Mach, still the problem existed.  The machine forum that the machine is based off of suggested my power supply was low and might be the problems with the rapids and not having enough voltage to help with the torque.  So I changed it from a 35VDC to a 58VDC.  Still had same problem even though the motors sound better.  I started a new thread of a different problem that just showed up. See here (http://www.machsupport.com/forum/index.php?topic=24436)  So I did a clean install.  Now I cannot get the problem to reappear so far.  But the new problem is still present.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on May 19, 2013, 09:23:20 PM
Upgraded to the lockdown version and the motor tuning problem went away.  I have now had the ugly head re appear with the motors stalling.  One thing that is consistent is it is happening with programs generated with more than 5 different toolpaths in the same program.  I will lower the velocity for the time being to see if it will solve the problem.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on May 19, 2013, 09:28:29 PM
I should say that with the larger programs, the jog will not function properly but if I close the gcode, jog works properly again.  If you have the larger program loaded and press the z jog button it will not respond and then move almost 2" a short while afterward.  If you close the gcode, a quick tap of the jog button will immediately move the axis.  It is a repeatable action.

Any suggestions?
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Hood on May 20, 2013, 02:51:19 AM
If you have large programmes you can try turning off the toolpath view, it is likely the processing needed to view the toolpath is impacting on your system.
Hood
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on May 20, 2013, 05:27:08 PM
Thanks Hood, I will try that
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on June 13, 2013, 06:02:16 PM
Hood,
That was spot on the money.  That eliminated the stalls and jog problems.  Is there a solution for this other than turning off the toolpath view?  Did like that feature but if I have to live without it I will.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: Chaoticone on June 13, 2013, 06:09:10 PM
Are you running on board graphics or do you have a graphics card?  Adding a card may fix you up.

Brett
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on June 13, 2013, 06:13:52 PM
Graphics card but it is low end.  It is a PCIe 16 first generation slot. 
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on June 13, 2013, 06:16:07 PM
What about an HD7750.  I don't know how much it would help since the slot is not 2.0 or 3.0.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: ger21 on June 13, 2013, 06:28:25 PM
With 600,000 lines of code, I think regardless of the video card, you'll want to turn off the toolpath display. It's a very common issue, as the display is very resource intensive.
Title: Re: Mach3 Bug? Causing overrun of drives
Post by: P_D_B on June 13, 2013, 06:58:33 PM
Understood.  Thanks All