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
Last revisionBoth sides next revision
plc:plc_show_custom_message_box [2019/05/17 11:16] ivanplc:plc_show_custom_message_box [2019/09/16 15:53] 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, then click **Save** and **Build All** again: +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: 
-<code>+ 
 +<code c>
 main() main()
  
Line 25: Line 26:
 if (portget(3)!=0) //Port 3 is used here. Use the actual port number for your particular setup 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 different tasks+ 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);+}while(1); 
  
 }; };
 </code> </code>
  
-5. In order to edit the newly created window, we can open CNC Settings > Screen > Popup Messages, and then press **Create New**+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}} {{: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.+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}} {{: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. 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}} {{: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