User Tools

Site Tools


plc:plc_show_custom_message_box

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plc:plc_show_custom_message_box [2019/05/17 10:53] ivanplc:plc_show_custom_message_box [2019/05/17 11:20] ivan
Line 14: Line 14:
 At this point, the popup window's code must be edited to appear when a specific event occurs.  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:+4. Copy and paste the following code into the window instead of the window's current contents, then click **Save** and **Build All** again:
 <code> <code>
 main() main()
Line 23: Line 23:
 { {
  
-if (portget(3)!=0)+if (portget(3)!=0) //Port 3 is used here. Use the actual port number for your particular setup
 { {
- gvarset(9101,1);  + gvarset(9101,1);  //Brings up window 01. Windows 01 through 63 can be assigned to different tasks
 }; };
  
Line 33: Line 33:
 </code> </code>
  
-5. In order to edit the newly created window, we can open CNC Settings > Screen > Popup Messages+5. In order to edit the newly created 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. 
 +{{: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==== ====Deprecated version====
plc/plc_show_custom_message_box.txt · Last modified: 2019/09/16 15:54 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki