mycnc:stop_end_program
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:stop_end_program [2019/10/28 12:12] – created ivan | mycnc:stop_end_program [2019/10/28 13:48] – ivan | ||
---|---|---|---|
Line 9: | Line 9: | ||
* %%__HANDLER_GCODE_STOP%% (Settings > Config > PLC > Software PLC) | * %%__HANDLER_GCODE_STOP%% (Settings > Config > PLC > Software PLC) | ||
- | The actions taken upon pressing the button differ depending on the sequence | + | The exact actions taken upon pressing the Stop button differ depending on the number |
<code C M02.plc> | <code C M02.plc> | ||
Line 39: | Line 39: | ||
};</ | };</ | ||
- | If the Stop button is pressed | + | {{: |
+ | |||
+ | If the Stop button is pressed | ||
<code C OFF.plc># | <code C OFF.plc># | ||
Line 64: | Line 66: | ||
};</ | };</ | ||
+ | {{: | ||
+ | |||
+ | The two separate commands allow for a variety of stopping configurations. M02.plc procedure will often be set to have some sort of lift control to prevent issues due to the working tool potentially coming into contact with the working material/ | ||
+ | |||
+ | Sometimes, when issues arise with the lift procedure, or with any of the processes described in the M02 procedure, it is advisable to click the Stop button twice in order to obtain a complete and total G-code run shutdown (if that is the way that the codes have been set up). | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | <code C __HANDLER_GCODE_STOP> | ||
+ | { | ||
+ | exit(99); | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | As can be seen from the code above code, in its default configuration the handler will simply activate and then close, not performing any additional actions. However, in situations where it is necessary to add a command which will activate whenever the G-code run has stopped, %%__HANDLER_GCODE_STOP%% can be altered. For example, the code can be changed to look the following way if it is necessary, for example, to turn off the output port #3 whenever the run is stopped: | ||
+ | |||
+ | <code C __HANDLER_GCODE_STOP> | ||
+ | { | ||
+ | portclr(3); | ||
+ | exit(99); | ||
+ | }; | ||
+ | </ | ||
+ | In non-default configurations, | ||
mycnc/stop_end_program.txt · Last modified: 2024/02/21 13:54 by ivan