Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: chrisjh on June 26, 2007, 07:56:53 AM

Title: Mach3 won't reach last position requested in G Code
Post by: chrisjh on June 26, 2007, 07:56:53 AM
Hi All,

I am having problems with Mach3 not completing the movement to the last x, y, z position requested in some G codes that I have written.  This occurs in both simulation and on my milling machine. 

It appears that if a requested Z position is reached before  a requested X position, Mach3 stops.  When the code is run for the next part, Mach3 "remembers" that it did not reach the requested X destination and completes the move that it should have done previously.  If a requested X position is reached before a requested Z position, all appears to be OK.

Below is an example of my faulty code:

(This routine spot drills 8 holes)
(CJH 26Jun07)

G00 G17 G21 G40 G49 G50 G64 G80 G90 G94
M6 T1 (TOOL Ø5 Spot Drill)
F1000
M3 S2500
M8
G00 X8 Y14.2 Z5

(Spot Drill Routine)
N1G81 X8. Y14.2 Z-2.1 R3 F50 G99
N2 X27.5
N3 X47.5
N4 X57.5
N5 X87.5
N6 X97.5
N7 X117.5
N8 X137.
N9G80

M9 M5
G00 X0 Y0 Z50
M30 (End and rewind)

It is the line "G00 X0 Y0 Z50" that X0 is never reached despite the fact that the following M30 command is reached and operates correctly.  The X position reached is always approx 29mm.

Am I missing something?

Regards

Chrisjh

Title: Re: Mach3 won't reach last position requested in G Code
Post by: Brian Barker on June 26, 2007, 04:02:00 PM
Please check your motor tuning settings... It sounds like you have your X axis motor vel higher then Mach3 can drive it

Also if you would like please post your XML and I will have a look at it

Thanks
Brian
Title: Re: Mach3 won't reach last position requested in G Code
Post by: chrisjh on June 26, 2007, 10:28:08 PM
Thanks Brian,

I'll have a play with the motor settings.

Attached is the xml file that I use.

Regards

Chrisjh

Title: Re: Mach3 won't reach last position requested in G Code
Post by: Brian Barker on June 27, 2007, 09:11:48 AM
Hello Chris,
Please retune your motors in the motor tuning and save the the settings. I can see that your motors are set to go faster then you have the driver set to run. That should fix your problem.
Thanks
Brian
Title: Re: Mach3 won't reach last position requested in G Code
Post by: chrisjh on June 27, 2007, 07:21:06 PM
Problem now fixed!!! Thanks Brian.

The X and Y stepper motor velocity settings were 2100 instead of 1450.  I have now set these settings to 1450mm/min (according to the Syil manual for my machine the maximum is 1495mm/min if pulses from the controlling computer is 25000). 

The above settings have totally fixed the problem and also cured another problem.  That is, the movement in x and y was erratic, jerky and hesitant until the velocity was reset to 1450mm/min.

Kind Regards

Chrisjh in Brisbane Australia
Title: Re: Mach3 won't reach last position requested in G Code
Post by: Brian Barker on June 27, 2007, 10:19:07 PM
Cool :) You will be making parts in no time!

Thanks
Brian