==== PLC Predefined (Reserved) Procedure names ==== Most of PLC procedure names represent miscellaneous code. However there are a few reserved PLC names used as a standard event handlers. Table. List of reserved PLC Procedures ^ PLC name ^ PLC description ^ | EST | **Emergency Stop** Handler - procedure executed if Emergency Stop Button pressed. **Emergency Stop Input** is General purpose binary input assigned as Emergency in [[mycnc:mycnc_configuration_dialogs#alarms|Alarms configuration dialog]] | | OFF | **OFF moving** procedure executed when **Stop** button pressed. Procedure may contain Stop Handler - stop motion program, clear motion buffer, lift tool to safe height, Off spindle (plasma power source, laser, gas cutting or so) | | SPN | **Spindle Speed** Control - Procedure executed if on-screen Spindle button pressed (Spindle speed +, -, set) or single "S" code executed when g-code program running | | TRIG01 - TRIG08 | Trigger #1-#8 Activated Handler procedures. Procedure executed when if corresponding trigger activated. Trigger is General purpose input defined in [[mycnc:mycnc_configuration_dialogs#triggers|Triggers configuration dialog]] and activated in PLC procedure. | Additionally, different M-codes are typically reserved for certain procedures. It's recommended to use codes M101-M999 for custom procedures. ^ Name ^ M-code number ^ | G_M_USER_BEGIN_1 | 75 | | G_M_USER_END_1 | 88 | | G_M98_SUB_RUN | 98 | | G_M99_SUB_END | 99 | | G_M_USER_BEGIN | 101 | | G_M_USER_END | 199 | | G_M_MYUSER_BEGIN | 200 | | G_M_MYUSER_END | 999 |