===== Show Custom Message Box from PLC ===== In order to create a custom popup window in myCNC software for an event like an emergency button press, a software PLC procedure can be added to the myCNC software for the user's specific needs and requirements. In order to do so, go to CNC Settings > PLC > Software PLC, then create a new popup window following the instructions below: 1. Press the **Create New** button in the Software PLC window {{:plc:001-open-create-window.jpg}} 2. Name your new window and press the **Confirm** button {{:plc:002-custom-box-name.jpg}} 3. Click **Save** and **Build All** {{:plc:003-custom-box-save-build-all.jpg}} At this point, the popup window's code must be edited to appear when a specific event occurs. 4. Copy and paste the following code into the window instead of the window's current contents, then click **Save** and **Build All** again in order to trigger the PLC disk image reflashing process: main() { do { if (portget(3)!=0) //Port 3 is used here. Use the actual port number for your particular setup { gvarset(9101,1); //Brings up window 01. Windows 01 through 63 can be assigned to a different trigger action such as a port set/clear, etc }; }while(1); }; 5. In order to insert information into this popup window, we can open CNC Settings > Screen > Popup Messages, and then press **Create New** {{:plc:004-custom-box-save-popup-window-new.jpg}} 6. Fill in the information regarding your new popup window and press the **Save** button. The Hide Timeout field is in seconds (specifies the amount of time that the message box will be present on the screen for). {{:plc:005-custom-box-popup-window-info.jpg}} At this point, whenever the selected port will send a message to a controller (for example, when a button is pressed), the software should bring up a popup window that will go away after the number of seconds specified in the Hide Timeout field. {{:plc:006-custom-box-popup-window-success.jpg}} ====Deprecated version (1280 series profiles)==== [[plc:plc_show_custom_message_box:old_version|Showing a custom message box in older software]]