Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: DataDyne on October 21, 2020, 04:03:07 PM

Title: Mach 3 Programming Question
Post by: DataDyne on October 21, 2020, 04:03:07 PM
Hi,

I have 2 programs that are nearly identical to each other (mirror images). The designs were made in Cut2D and then the coding was transferred over to Mach 3.

Program 1 does what it's supposed to at the end. Air turns off, tooling stops and goes back to the home position.

Program 2 for some reason does not stop at all. Instead it goes back to the start point (not even the home position) and starts over. It's like it's stuck on repeat.

Any idea why this would be happening? Is it a bug in the code? A setting in Mach 3 that would make the program start over automatically? I'm sure you can tell by now that I'm new to this software so any help would be appreciated.

Thanks!
Title: Re: Mach 3 Programming Question
Post by: Graham Waterworth on October 21, 2020, 04:36:43 PM
Has the second program got a M99 or M47 at the end?
Title: Re: Mach 3 Programming Question
Post by: DataDyne on October 22, 2020, 08:16:50 AM
No. it has an M09 to turn off the air. Then some coordinates to go back to the start and home position. Then an M30.
Title: Re: Mach 3 Programming Question
Post by: Tweakie.CNC on October 23, 2020, 01:01:05 AM
Could you attach your problem Gcode file.
Title: Re: Mach 3 Programming Question
Post by: DataDyne on October 23, 2020, 08:26:58 AM
Could you attach your problem Gcode file.

Attached is the last bit of coding.
Line N247741 is when the air turns off but then after that it repeats the cycle.
Title: Re: Mach 3 Programming Question
Post by: Tweakie.CNC on October 23, 2020, 08:43:54 AM
That's perhaps not that helpful.
If you attach the complete problem file then it can be run here to see if there is an issue with the Gcode itself. At least that would rule out one possibility.
Title: Re: Mach 3 Programming Question
Post by: DataDyne on October 23, 2020, 11:11:01 AM
That's perhaps not that helpful.
If you attach the complete problem file then it can be run here to see if there is an issue with the Gcode itself. At least that would rule out one possibility.

Here you go
Title: Re: Mach 3 Programming Question
Post by: ZASto on October 23, 2020, 12:46:13 PM
It simulates normally.
Two passes over same geometry at 0.0625 and 0.125 depth.
Could not find any errors in your code.
Title: Re: Mach 3 Programming Question
Post by: DataDyne on October 23, 2020, 01:36:00 PM
It simulates normally.
Two passes over same geometry at 0.0625 and 0.125 depth.
Could not find any errors in your code.

Bingo! I think this is the problem. I only need one pass at 0.125 depth. Thanks.
I'll update the coding and hopefully it solves my problem