Program restarts after M30

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
schric11
Posts: 28
Joined: Sat Feb 01, 2014 12:36 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: Oak = A900768, AllinoneDc =A000430
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Pittsburgh 15239

Program restarts after M30

Post by schric11 »

Hey,

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.
Sword
Posts: 652
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Thorp WI

Re: Program restarts after M30

Post 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

N100

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.
Scott
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Program restarts after M30

Post 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).
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Program restarts after M30

Post 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.
schric11
Posts: 28
Joined: Sat Feb 01, 2014 12:36 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: Oak = A900768, AllinoneDc =A000430
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Pittsburgh 15239

Re: Program restarts after M30

Post 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
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Program restarts after M30

Post 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.
schric11
Posts: 28
Joined: Sat Feb 01, 2014 12:36 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: Oak = A900768, AllinoneDc =A000430
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Pittsburgh 15239

Re: Program restarts after M30

Post by schric11 »

I shut off repeat, then replaced m30 with m2. the program runs and the line box gets to m2 (when running the program) and the machine stops but the cycle time keeps counting and the program stays at the end ...should it do that?

I guess I'm wondering if I can get the control to stop counting time and show the beginning of the program when the cycle ends through the parameters.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Program restarts after M30

Post by cncsnw »

The function of M2 is to wait for the cycle start button, then restart the program (just as you report it doing above).

As far as I know, there is no way to get CNC12 to redraw running G-code screen to show that it is running the first line of the program, without having it be running the program. If it is running the program, then the cycle timer will be counting.

If you want it to go back to the start of the program first (and draw that part of the program on the screen), then wait for cycle start, you could use M102 at the end of the program, and an M0 on the first line of the program.

If you don't want the cycle timer to continue counting, then just let the program end (no M2, no M30, no M102, no "GOTO __"). Then press Cycle Start when you want it to start running again.
Post Reply