Reset Custom M-codes on Machine Disable?

More
5 months 1 day ago #346746 by Todd Zuercher
I started playing with the on_abort.ngc and it might work. I need to play a little more. At this point it does a little more than I want it to. It will trigger it for F2 (what I want), but also triggers it when exiting a running milling file with the escape key (not what I want) and the machine does not enter machine off.

The machine state I'm dealing with is particular about how it is entered and exited. I can't simply turn it on or off without the machine moving, when the M-code is active, it can be turned off without issue when the machine is not enabled (in machine off). So I only want the on_abort sequence to cancel my M-code state when the machine is aborting to machine off. Aborting to a machine on state, such as when aborting a running g-code file, the M-code state needs to be left alone, and the operator will have to clear it themselves (else the machine will shutdown with following error alarms.)

In the remap instructions I read about making some things conditional. I'm going to try to play with that now.

Please Log in to join the conversation.

More
5 months 1 day ago #346747 by Todd Zuercher
Yes with adding the conditional code from the manual seems to be working just the way I want it to.
Here is what I have in the on_abort.ngc file
Code:
o<on_abort> sub o100 if [#1 eq 5]     (machine on) o100 elseif [#1 eq 6]     (machine off)     M123 o100 elseif [#1 eq 7]     (estopped)     M123 o100 elseif [#1 eq 8]     (msg, abort pressed) o100 else     (DEBUG, error parameter is [#1]) o100 endif o<on_abort> endsub %

Please Log in to join the conversation.

Time to create page: 0.033 seconds
Powered by Kunena Forum