{"id":2680,"date":"2021-08-22T06:17:13","date_gmt":"2021-08-22T06:17:13","guid":{"rendered":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/?page_id=2680"},"modified":"2023-01-21T05:43:58","modified_gmt":"2023-01-21T05:43:58","slug":"up-script-popup-messages","status":"publish","type":"page","link":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/up-script-popup-messages\/","title":{"rendered":"UP Script: Popup Messages"},"content":{"rendered":"\n<p><a title=\"Visit Zacobria &amp; Webshop &amp; Universal-Robots solutions.\" href=\"https:\/\/www.zacobria.com\/automation\/webshop\/\">Visit Zacobria Webshop<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Popup messages send via Script from a PC.<\/h3>\n\n\n\n<p>The UR script manual mention this syntax.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/script-popup-messages\/universal-robots-zacobria-script_popup_messages-1\/\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/wp-content\/uploads\/2012\/12\/universal-robots-zacobria-script_popup_messages-1.jpg\" alt=\"universal-robots-zacobria-script_popup_messages-1\" class=\"wp-image-642\"\/><\/a><\/figure>\n\n\n\n<p>But as \u201c (apostrophe) is a protected character in Python&nbsp; &#8211; then it is neseccary to insert in \\ from of \u201c in order to actually send the \u201c when using Python.<\/p>\n\n\n\n<p>Python program running on PC.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Echo client program<\/h1>\n\n\n\n<p>import socket<br>import time<\/p>\n\n\n\n<p>HOST = &#8220;192.168.0.9&#8221;&nbsp;&nbsp;&nbsp; # The remote host<br>PORT = 30002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The same port as used by the server<br>s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>s.connect((HOST, PORT))<br>s.send (&#8220;set_digital_out(2,True)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p><strong>s.send (&#8220;popup(\\&#8221;Messages\\&#8221;, title=\\&#8221;The Headline in the Blue box\\&#8221;,<\/strong> blocking=True)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p>s.send (&#8220;set_digital_out(2,False)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p>data = s.recv(1024)<\/p>\n\n\n\n<p>print &#8220;Good bye!&#8221;<br>Provides this result on the Robot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/script-popup-messages\/universal-robots-zacobria-script_popup_messages-2\/\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/wp-content\/uploads\/2012\/12\/universal-robots-zacobria-script_popup_messages-2.jpg\" alt=\"universal-robots-zacobria-script_popup_messages-2\" class=\"wp-image-643\"\/><\/a><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Echo client program<\/h1>\n\n\n\n<p>import socket<br>import time<\/p>\n\n\n\n<p>HOST = &#8220;192.168.0.9&#8221;&nbsp;&nbsp;&nbsp; # The remote host<br>PORT = 30002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The same port as used by the server<br>s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>s.connect((HOST, PORT))<br>s.send (&#8220;set_digital_out(2,True)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p><strong>s.send (&#8220;popup(\\&#8221;Messages\\&#8221;, title=\\&#8221;The Headline in the Blue box\\&#8221;, warning=True, error=False)&#8221; + &#8220;\\n&#8221;)<\/strong><br>time.sleep (1)<\/p>\n\n\n\n<p>s.send (&#8220;set_digital_out(2,False)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p>data = s.recv(1024)<\/p>\n\n\n\n<p>print &#8220;Good bye!&#8221;<br>Provides this result on the Robot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/script-popup-messages\/universal-robots-zacobria-script_popup_messages-3\/\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/wp-content\/uploads\/2012\/12\/universal-robots-zacobria-script_popup_messages-3.jpg\" alt=\"universal-robots-zacobria-script_popup_messages-3\" class=\"wp-image-644\"\/><\/a><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Echo client program<\/h1>\n\n\n\n<p>import socket<br>import time<\/p>\n\n\n\n<p>HOST = &#8220;192.168.0.9&#8221;&nbsp;&nbsp;&nbsp; # The remote host<br>PORT = 30002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The same port as used by the server<br>s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>s.connect((HOST, PORT))<br>s.send (&#8220;set_digital_out(2,True)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p><strong>s.send (&#8220;popup(\\&#8221;Messages\\&#8221;, title=\\&#8221;The Headline in the Blue box\\&#8221;, warning=False, error=True)&#8221; + &#8220;\\n&#8221;)<\/strong><br>time.sleep (1)<\/p>\n\n\n\n<p>s.send (&#8220;set_digital_out(2,False)&#8221; + &#8220;\\n&#8221;)<br>time.sleep (1)<\/p>\n\n\n\n<p>data = s.recv(1024)<\/p>\n\n\n\n<p>print &#8220;Good bye!&#8221;<br>Provides this result on the Robot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/script-popup-messages\/universal-robots-zacobria-script_popup_messages-4\/\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/universal-robots-zacobria-forum-hints-tips-how-to\/wp-content\/uploads\/2012\/12\/universal-robots-zacobria-script_popup_messages-4.jpg\" alt=\"universal-robots-zacobria-script_popup_messages-4\" class=\"wp-image-645\"\/><\/a><\/figure>\n\n\n\n<form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\" target=\"_top\"><input name=\"cmd\" type=\"hidden\" value=\"_s-xclick\"><br><input name=\"hosted_button_id\" type=\"hidden\" value=\"5UM6A44W2P6PN\">\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><input name=\"on0\" type=\"hidden\" value=\"Contribute moderator\">Contribute moderator<\/td>\n<\/tr>\n<tr>\n<td><select name=\"os0\">\n<option value=\"Option 1\">Option 1 $50.00 SGD<\/option>\n<option value=\"Option 2\">Option 2 $100.00 SGD<\/option>\n<option value=\"Option 3\">Option 3 $500.00 SGD<\/option>\n<\/select><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><input name=\"currency_code\" type=\"hidden\" value=\"SGD\"><br><input alt=\"PayPal \u2013 The safer, easier way to pay online!\" name=\"submit\" src=\"https:\/\/www.paypalobjects.com\/en_GB\/SG\/i\/btn\/btn_buynowCC_LG.gif\" type=\"image\"><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.paypalobjects.com\/en_GB\/i\/scr\/pixel.gif\" alt=\"\" width=\"1\" height=\"1\" border=\"0\"><\/p>\n<\/form>\n\n\n\n<p><strong>Disclaimer:<\/strong> While the Zacobria Pte. Ltd. believes that information and guidance provided is correct, parties must rely upon their skill and judgement when making use of them. Zacobria Pte. Ltd. assumes no liability for loss or damage caused by error or omission, whether such an error or omission is the result of negligence or any other cause. Where reference is made to legislation it is not to be considered as legal advice. Any and all such liability is disclaimed.<\/p>\n\n\n\n<p>If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.<\/p>\n\n\n\n<p>Author:<br><a href=\"https:\/\/plus.google.com\/u\/0\/116832821661215606670?rel=author\">By Zacobria Lars Skovsgaard<\/a><br>Accredited 2015-2018 Universal Robots support Centre and Forum.<br><br><br><\/p>\n\n\n\n<p><a href=\"https:\/\/twitter.com\/share\">Tweet<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/twitter.com\/zacobria\">Follow @zacobria<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visit Zacobria Webshop Popup messages send via Script from a PC. The UR script manual mention this syntax. But as \u201c (apostrophe) is a protected character in Python&nbsp; &#8211; then it is neseccary to insert in \\ from of \u201c&#8230; <\/p>\n<div class=\"more-link-container\"><a class=\"more-link\" href=\"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/up-script-popup-messages\/\">Read More<\/a><\/div>\n","protected":false},"author":1,"featured_media":2481,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/full-width-page.php","meta":{"footnotes":""},"class_list":["post-2680","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/pages\/2680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/comments?post=2680"}],"version-history":[{"count":7,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/pages\/2680\/revisions"}],"predecessor-version":[{"id":3130,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/pages\/2680\/revisions\/3130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/media\/2481"}],"wp:attachment":[{"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/media?parent=2680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}