m1 behavior
This may be similar to the question about modifying an m3 code that was just posted, but I figured this would be a very commonly desired option.
Thanks all.
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/gui_axis.html#sec:Manual-Tool-Change
Rick G
Please Log in or Create an account to join the conversation.
...
/o<inspect> call
T2 M6 G43
....
The inspect.ngc file
o<inspect> sub
M5 M9
M1
M3 M8
o<inspect> endsub
M2
John
Please Log in or Create an account to join the conversation.
That said, I do think that it should be an option. The spindle stopping and coolant turning off is pretty standard on most controls when a M1 or M0 command is issued. Would anyone else be interested in such a thing? If so maybe a feature request could be started.
Justin
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
those arent currently in the set of remappable codes, but is doable
any strong reason not to define a new M code and be done?
-Michael
Please Log in or Create an account to join the conversation.
Making a custom mcode to do this is just fine, but I do not know how you could turn it on and off like you can with both m1 and m0 other than use block delete, which would prevent you from using block delete for anything else.
Please Log in or Create an account to join the conversation.
Simply switch to master and you can define a M code to suit your particular needs. None of my commercial CNC controllers do anything more than stop motion with M1 or program pause. Of course you would also have to handle what to turn back on somehow...
John
here's an example how it can be done with remapping (requires master), this is John's example
repackaged as new code:
git.mah.priv.at/gitweb/emc2-dev.git/shor...s/extend-m1-by-remap
Current restrictions:
- M1 cant be remapped directly like M6/M61/T/S/F, so a new code is needed for now
- the M10 is modal group 5, not group 4 like M1, since group 4 cant currently be remapped
Lifting the 'current restrictions' requires some coding on my side. Think what you wish for..
- Michael
Please Log in or Create an account to join the conversation.
see the configs/sim/remap/extend-builtins demo
git.mah.priv.at/gitweb/emc2-dev.git/shor...ads/remap-mgroup4-rc
This needs exercise, so I'd be grateful for feedback
- Michael
Please Log in or Create an account to join the conversation.
I just tested the extended m1 and m0 posted, it works great and is exactly what I needed. Would it be possible to record if it was in m3 or m4 before the m1/ m0 and then start the spindle the same direction after the program is started again. I imagine this would be much like how it checks the coolant....
; record whether mist/flood were on
#<mist> = #<_mist>
#<flood> = #<_flood>
/M5 M9 ; stop spindle, mist+flood off
/m1 (refer to builtin m1)
; restore mist, flood setting
/o100 if [#<mist>]
/ m7
/o100 endif
/o200 if [#<flood>]
/ m8
/o200 endif
Only <mist> and <flood> would be m3 and m4?
Please Log in or Create an account to join the conversation.