Page 1 of 1

Program restarts after M30

Posted: Thu Sep 22, 2022 2:58 pm
by schric11

I have a question is there a parameter that reruns the program without hitting cycle start...?

I set my part counter to 132 and turn repeat on. The problem is the program goes to M30 and then reruns the program. I have to add an M00 to stop the machine and load another part. My other machine doesn't do that.

Re: Program restarts after M30

Posted: Thu Sep 22, 2022 4:14 pm
by Sword
My preferred way is by using a remote cycle start button connected to an input set to CycleStart2. Then any job that requires a part/blank to be changed, has this bit of code at the end that sends it back to the beginning (or wherever N100 is placed).

Code: Select all


Body of code

M200 "Press Cycle Start to continue\nCycle Cancel to quit"
GOTO 100
My post processor automatically puts it in every file, but it's commented out. If/when I need it, I just uncomment it and also make any modifications for park position or spindle control if needed.

Re: Program restarts after M30

Posted: Fri Sep 23, 2022 1:17 am
by cncsnw
In some software versions (e.g. v3.14), the default M30 acts like an M2 (restart the program).

In other software versions (e.g. v3.12 and earlier), the default M30 does nothing at all (allowing the program to end).

In other software versions (e.g. v3.16 and later) the default M30 action is selectable by Parameter 2, bit 6.

If you are going to use the "job repeat" function, then you want M30 to do nothing. If you are using v3.14, you can probably accomplish that by creating a blank "mfunc30.mac" file.

However, if you are changing parts by hand between cycles, then there is no reason to use the "job repeat" function. That is intended for auto-loading machines (e.g. bar feed or bar puller).

Re: Program restarts after M30

Posted: Fri Sep 23, 2022 12:21 pm
by cncsnw
You could also just delete the M30 code from the end of your CNC programs. Then they will end normally when they come to the end of the file, regardless of what CNC11 or CNC12 version you happen to be using.

Re: Program restarts after M30

Posted: Mon Sep 26, 2022 12:35 pm
by schric11
thank you, I will try shutting off repeat and or deleting m30

I do not see any documentation on bit 6 of parameter 2 (G code interpretation) CNC 12-D Mill V4.14

Re: Program restarts after M30

Posted: Tue Sep 27, 2022 12:48 pm
by cncsnw
It probably has not made it into the manual yet.

From the release notes for CNC11 v3.16:
Lathe: The "Restart Program" action of the default M30 is now selectable. Parameter 2 bit 6 (value 64) selects whether or not the default M30 will act like a default M2 (Restart Program). If set on, the default M30 will be equivalent to the default M2.