{"id":2684,"date":"2021-08-22T06:21:05","date_gmt":"2021-08-22T06:21:05","guid":{"rendered":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/?page_id=2684"},"modified":"2023-01-21T05:46:00","modified_gmt":"2023-01-21T05:46:00","slug":"ur-script-thread-in-script-file-example","status":"publish","type":"page","link":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/ur-script-thread-in-script-file-example\/","title":{"rendered":"UR Script: Thread in Script file example."},"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<p>This example shows how to make a Thread in a script file.<\/p>\n\n\n\n<p>Prepare the script file &#8211; (here using Notepad)<\/p>\n\n\n\n<p>This thread will turn digital output 1 on and off in 1 second interval. The file is saved with the name &#8220;blink.txt&#8221; in the same directory as were the GUI program where the script file is to be used.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/blog\/universal-robots-zacobria-thread-in-script-file-example\/universal-robots-zacobria-thread-in-script-file-example.jpg\" alt=\"universal-robots-zacobria-thread-in-script-file-example\"\/><figcaption class=\"wp-element-caption\">universal-robots-zacobria-thread-in-script-file-example<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Make a program in GUI.<\/p>\n\n\n\n<p>Insert (import) the script file at top level. Use the &#8220;File&#8221; function for importing the script file into GUI.<\/p>\n\n\n\n<p>Call the script file with a single line script command using format thrd = run myThread()<\/p>\n\n\n\n<p>Use the &#8220;Line&#8221; function for writing a single line script command.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.zacobria.com\/blog\/universal-robots-zacobria-thread-in-script-file-example\/universal-robots-zacobria-thread-in-script-example.jpg\" alt=\"universal-robots-zacobria-thread-in-script-file-example\"\/><figcaption class=\"wp-element-caption\">universal-robots-zacobria-thread-in-script-file-example<\/figcaption><\/figure>\n<\/div>\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><\/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 This example shows how to make a Thread in a script file. Prepare the script file &#8211; (here using Notepad) This thread will turn digital output 1 on and off in 1 second interval. The file is&#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\/ur-script-thread-in-script-file-example\/\">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-2684","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\/2684","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=2684"}],"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\/2684\/revisions"}],"predecessor-version":[{"id":3156,"href":"https:\/\/www.zacobria.com\/universal-robots-knowledge-base-tech-support-forum-hints-tips-cb2-cb3\/index.php\/wp-json\/wp\/v2\/pages\/2684\/revisions\/3156"}],"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=2684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}