Skip to content

Clarify now using M2 - #4845

Open
dirkx wants to merge 1 commit into
LinuxCNC:masterfrom
dirkx:feat_m2_warning
Open

dirkx wants to merge 1 commit into
LinuxCNC:masterfrom
dirkx:feat_m2_warning

Conversation

@dirkx

@dirkx dirkx commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Minor tweak to not confuse punters like me.

@grandixximo

Copy link
Copy Markdown
Contributor

Thanks for this. Did you run into something unexpected with M2 in a subroutine that led you here? If so, could you share the program?

As far as I can tell the caution itself is out of date. The behaviour it describes (sub file left open, not returning to the main program) was fixed in the interpreter shortly after the caution was written: M2/M30 now unwinds all call levels and goes back to the main program file. That is the case on both master and 2.9. I write M2 in my own subs, under if statements, and have not seen any problem with it.

If nothing weird turned up, I would rather drop the caution, or replace it with a line saying M2/M30 in a subroutine ends the program and unwinds all call levels.

@andypugh what is your take on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants