Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: JoePage on November 14, 2011, 03:43:20 PM

Title: Looses position when running a cycle
Post by: JoePage on November 14, 2011, 03:43:20 PM
Hi, I have a CNC lathe that I converted to run on mach 3 but I'm having some issues with it. When I type in the G-codes manually one line at a time the lathe performs exactly as it should, but when I run a program it looses its place by quite a large amount - 10mm or so. I really need to get it sorted because manual machining is taking me too long. Help would be appreciated, thanks

Below is a bit of the code.
G21 G40
G00 Z5 X30
G01 Z0 F100
G01 X-2 F50
G00 Z5
G00 X25 Z2
G01 Z-38 F100
G00 X30
G00 Z5
M01
G00 X0
G00 X24 Z2   All ok until it gets to here, it only moves to about x12 but says x24 in software, I have to hit e-stop otherwise it would crash
G01 Z-38 F100
G00 X30
G00 Z5
M01
G00 X0
G00 X23 Z2 Does exactly the same here losing a further 10mm
G01 Z-38 F100
G00 X30
G00 Z5
Title: Re: Looses position when running a cycle
Post by: Chaoticone on November 14, 2011, 05:09:59 PM
Sounds like you may be looseing steps to me. Try detuning your accel and velocity by 50% and see if that helps.

Brett
Title: Re: Looses position when running a cycle
Post by: JoePage on November 14, 2011, 06:06:06 PM
Hi, If I type in all of this G code line by line then it does it all fine, when it is put all in one program it does not. I can type G0 Z0, Z500, Z0, X200, X0, X200 all in the manual command and it wont lose a single step, put this into a program and it will lose several hundred steps.
Title: Re: Looses position when running a cycle
Post by: Hood on November 14, 2011, 06:10:14 PM
Can you attach your xml please, will see if I can replicate your problem here with your settings.
Hood
Title: Re: Looses position when running a cycle
Post by: JoePage on November 14, 2011, 06:19:16 PM
I will attach the xml tomorrow, software is on different computer to what I'm using at the moment.
Title: Re: Looses position when running a cycle
Post by: Hood on November 14, 2011, 06:22:37 PM
Ok no problems getting late here anyway :)
Hood
Title: Re: Looses position when running a cycle
Post by: Chaoticone on November 14, 2011, 06:41:17 PM
Im thinking it may be loosing then when running in auto because you are changeing directions so fast.  I think inertia and accel are what you are fighting.

Brett
Title: Re: Looses position when running a cycle
Post by: fixittt on November 21, 2011, 11:38:11 AM
also you may try turning off the viewport.  this is an issue with very large g codes that i have run in the past,  now its standard practice to always turn off the viewport before pressing GO