M30 Macro

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

Moderator: cnckeith

cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

So what you are asking has nothing to do with how CNC codes are run and what action M30 takes; but instead has to do with what you want CNC12 to display on the screen when it is *not* running a job.

If you are using CNC12 v5.06 or newer, you should be able to get what you want by setting Parameter 417 = 1.
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 »

P 417 =1 is already set. However, it should not stop at M30 after a program has been processed. It should rewind to the beginning of the program.
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 »


chapter 6
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

However, it should not stop at M30 after a program has been processed. It should rewind to the beginning of the program.
What kind of "stop at M30" are you observing?

Does the program stop running (returning you to the main screen, which has options like F1/Setup, F2/Load, F3/MDI etc.)?

Or does the program continue running, and what it is running is a code that prompts you to press Cycle Start to continue? If that is the case, then you probably have an M2 or M0 code in a custom M30 macro. You can delete the custom M30, and then the program will just end like it is supposed to.

If you allow the program to end -- that is, allow CNC12 to continue running your CNC program codes until it completes the last line in the file -- then it will automatically "rewind" to the beginning of the program; in the sense that, the next time you press Cycle Start, the program will start running from the beginning.

Is it your wish to use an M30 code at some point other than at the end of a program; and yet still have it cause the program to end, so that when you restart the program it starts at the beginning? If so, you might be able to get that behavior by writing a custom M30 macro that contains (only) an M99.

Maybe what you are trying to say is that, with no custom M30, the control performs all the actions you want and expect in response to your CNC codes and your pressing of the Cycle Start key; but, after the program is done running and the main screen options have returned, the screen continues to display the last few lines executed, instead of once again displaying the first lines of the program file?

Assuming the "preview" option is selected with P417 = 1, then yes, it would make some sense for the screen display to resume "previewing" the job, once the job has finished running. However, that would need to happen only if the job ran to completion with no errors. In the case of errors, faults, or cancellation, it is important to continue to show on the screen the section of the program that was running when the problem occurred.
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 »



no M30 macro
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 »



with M30 macro (M02)
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 »

The key is in the Message Window. Without M30 the message window shows "Press CYCLE START to start job". With M30 the Message Window shows " Press CYCLE START to continue".
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.
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

Also note the function keys available across the bottom of the screen.

If a program cycle is still running (e.g. running an M2 and waiting for you to press Cycle Start so it can continue running back at the beginning), then the options at the bottom of the screen will include F3/Repeat, F4/Skips and F9/Rapid.

If no program cycle is running (because the job reached the end of the file and is finished) then the usual main-screen options will appear: F1/Setup, F2/Load, F3/MDI, F4/Run, etc..
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 »

Now I still don't know how to get M30 to automatically jump to the beginning of the program without restarting it. So basically as if you had just loaded it. Maybe someone from Centroid can say something.
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: M30 Macro

Post by cncsnw »

You could submit a software change request to Centroid, suggesting that if "G code preview" is enabled with P417, and the last job ran to a successful completion, then the CNC12 main screen display should (perhaps after a short delay) revert to displaying the preview of the top of the job, instead of continuing to show the last lines that were running.

Until such a software change is made there is nothing you can do -- M30 or no -- that will make CNC12, after the job is complete, display the first lines of the program on the screen without actually starting to execute those lines.
Post Reply