M30 Macro

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

Moderator: cnckeith

Houseman303
Posts: 106
Joined: Sun Nov 12, 2023 1:33 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A901313
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Switzerland

M30 Macro

Post by Houseman303 »

Who can help me? I've studied TB300 and also the instructions for writing macros, but I can't figure it out. (I can only think of M5 and Goto 0, but it won't be that easy.)

M30 should:
jumps back to the beginning of the program
Nigelo
Posts: 370
Joined: Tue Dec 11, 2018 4:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: F045DA80C8B8-0905181172
E415F6F70BC3-0318203049
98F07B91FC6B-0123236802
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: M30 Macro

Post by Nigelo »

What exactly are you trying to accomplish? You are not correct as there is no "should" about it - Perhaps you mean "I would like to..."

M30 designates END of Program and by default, performs no operation. It is therefore understandable that the final lines of your program remain on screen to provide useful end of program information. However, simply pressing cycle start at this stage will rerun the same program without additional steps e.g. no Reloading program is required.

If you are looking to rerun program, say 5 times to "mass" produce 5 parts, then after loading program and graphing to check for errors, hit RUN and set Repeat to ON and enter 5 followed by Enter. Now hit Cycle Start. Your Program will, of course, need a step at the start that allows loading further stock to be machined if not automatically done with an auto loader. The system will keep track of the number of parts machined until it reaches 5 in this example.

Note that entering 5 in the RUN menu and leaving Repeat set to the default OFF will require a Cycle Start to restart each subsequent part.
Hope this helps
Nigel

"You can lead a horse to water but you cannot force it to drink"
tblough
Posts: 3102
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: M30 Macro

Post by tblough »

If you want your program to run continuously, add a block number at the beginning if there is not one already at the line you would like to resume from. Then add a GOTO nnn line, where nnn is the prior selected line number, near the bottom of the program. You want to position the goto after the last movement lines, but before the shut down lines at the end.

You need to understand G-code so you can position the return marker and goto statements in the correct spots. For instance, do you want to leave the spindle and coolant running at the end and restart at the first cutting move? Or, do you want to stop and restart the spindle each loop? Do you need a pause for the operator to switch parts? Do you want to display any informative messages?

What you are asking for is not a simple thing, and could cause serious injury. That is why there is no "canned" solution to automatically restart a program.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Houseman303
Posts: 106
Joined: Sun Nov 12, 2023 1:33 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A901313
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Switzerland

Re: M30 Macro

Post by Houseman303 »

The M30 should reset the display to the beginning of the program, not restart it.
Nigelo
Posts: 370
Joined: Tue Dec 11, 2018 4:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: F045DA80C8B8-0905181172
E415F6F70BC3-0318203049
98F07B91FC6B-0123236802
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK

Re: M30 Macro

Post by Nigelo »

Houseman303 wrote: Thu Dec 28, 2023 10:36 am The M30 should reset the display to the beginning of the program, not restart it.
I repeat there is no "should" about it and what are you trying to do other than pick holes in software that functions correctly? Read the manual.
Hope this helps
Nigel

"You can lead a horse to water but you cannot force it to drink"
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

M30 "should" rewind the spool of punched paper tape, so that the next Cycle Start starts over at the beginning of the program. :-)

Sadly, Centroid controls lack spools of tape, so we have to settle for behavior where M30 just ends the program, and Cycle Start starts at the beginning by default.
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

If you want M30 to go back to the beginning and run from there, just make your own M30 macro (file mfunc30.mac) that contains either an M2 (if you want it to move Z to home and wait for Cycle Start) or M102 (if you do not want it to move to home or wait for Cycle Start). Then your M30 will do what you want.
Houseman303
Posts: 106
Joined: Sun Nov 12, 2023 1:33 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A901313
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Switzerland

Re: M30 Macro

Post by Houseman303 »

M2 is not the solution. The control waits for the cycle start on the M30 and when I do that, the program restarts and waits when the tool is changed.
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

If you do not want the control to wait for Cycle Start, then put in M102 instead of M2.
Houseman303
Posts: 106
Joined: Sun Nov 12, 2023 1:33 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A901313
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Switzerland

Re: M30 Macro

Post by Houseman303 »

M30 is not supposed to do anything other than display the program from the beginning on the screen. do not restart and run. The background for me is to know exactly which program is loaded. That's right at the top, but I don't really look there all the time. For me there is no limitation on the program name/description in the program.
Post Reply