Many actions depend on EMC status - is it in manual, MDI or auto mode? is a program running, paused or idle? You cannot start an MDI command while a G-code program is running, so this needs to be taken care of. Many EMC actions take care of this themselves, and related buttons and menu entries are deactivated when the operation is currently impossible. When using Python event handlers - which are at a lower level than Actions - one needs to take care of dealing with status dependencies oneself. For this purpose, there’s the EMC Stat widget: to associate EMC status changes with event handlers. EMC Stat has no visible component - you just add it to your UI with Glade. Once added, you can associate handlers with its following signals: * state-related: emitted when E-Stop condition occurs, is reset, machine is turned on, or is turned off o state-estop o state-estop-reset o state-on, o state-off * mode-related: emitted when EMC enters that particular mode o mode-manual o mode-mdi o mode-auto * interpreter-related: emitted when the G-code interpreter changes into that mode o interp-run o interp-idle o interp-paused o interp-reading o interp-waiting