- Posts: 611
- Thank you received: 114
New option to end a program with % or M2
The idea is that % will just stop the program without all those unwanted changes.
Keep in mind you will have to use the NOM2 option or edit the resulting ngcgui sub before running it it use the % or ngcgui will add a M2 to the end and the % need to be at the beginning.
Rick G
Please Log in or Create an account to join the conversation.
- somenewguy
- Offline
- New Member
-
- Posts: 14
- Thank you received: 0
I am not sure what you mean by NOM2 option, also I can't find the postamble that is being applied to my subs. I see the default preamble std-in.ngc, but there is a single line w/ two comments being appended to the file wit hthe M2 and I don't know where or how to configure that.
Please Log in or Create an account to join the conversation.
If you did not select a postamble then none is being used, the M2 is doing everything.I can't find the postamble that is being applied to my subs. I see the default preamble std-in.ngc, but there is a single line w/ two comments being appended to the file wit hthe M2
M2 does the following
Change from Auto mode to MDI mode.
Origin offsets are set to the default (like G54).
Selected plane is set to XY plane (like G17).
Distance mode is set to absolute mode (like G90).
Feed rate mode is set to units per minute (like G94).
Feed and speed overrides are set to ON (like M48).
Cutter compensation is turned off (like G40).
The spindle is stopped (like M5).
The current motion mode is set to feed (like G1).
Coolant is turned off (like M9).
There is a bit of info here...
linuxcnc.org/docs/html/gcode/overview.html
It is my understanding that if you start with a % and end with a % the last % is just that, end the program. So I am sure to apply a M5 (spindle off) before ending the program an not relying on the end of program or M2 to turn the spindle off.
You can still use a M2 in a program that starts and ends with % however M2 ends the program at the M2 point and noting is read beyond it.
NOM2 is an option for the latest version of ngcgui. Probably only available as a patch or on Master. The default behaviour is for ngcgui to end all subs with a M2, if you select this option then all subs start and end with % and M2 is not automatically added to the end.
To see this create a sub and instead of auto sending it to linuxcnc save it to a file. You can then edit that file before running it to experiment.
Rick G
Please Log in or Create an account to join the conversation.
- somenewguy
- Offline
- New Member
-
- Posts: 14
- Thank you received: 0
Please Log in or Create an account to join the conversation.
somenewguy wrote: ok I think I will continue to sit on 2.5.3, and wait for 2.5.4 to be released.
Might be a long wait, I think the next release will be 2.6
Please Log in or Create an account to join the conversation.
Rick G
Please Log in or Create an account to join the conversation.