{"id":3631,"date":"2019-03-25T17:45:13","date_gmt":"2019-03-25T20:45:13","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/disabling-tags-from-a-plc-that-has-failed\/"},"modified":"2019-06-10T14:33:18","modified_gmt":"2019-06-10T17:33:18","slug":"disabling-tags-from-a-plc-that-has-failed","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/","title":{"rendered":"Disabling tags from a PLC that has failed."},"content":{"rendered":"<div align=\"justify\">\n<p>On a serial network, you can use a single driver to communicate with several devices; depending on the protocol being used, each tag&#8217;s <i>N1 <\/i>parameter will be responsible for telling them apart.<\/p>\n<p>Whenever there is a communication failure with a certain device (which can be expected on a large network), the driver will continue trying to read this device&#8217;s tags; this can cause the responses to fail or be delayed, thus giving it the false appearance of system hanging.<\/p>\n<p>This article features a demo application which disables tag reading in a device when it has failed for a certain time. The application has one control tag per device; when the tag&#8217;s quality turns bad, a counter will start up to check its quality periodically. If the quality remains bad after a certain time, the tags in the device won&#8217;t be read anymore.<\/p>\n<p>The application retrieves three I\/O tags and a two-element block from different devices. The I\/O driver being used in the example is Modicon Modbus Master. To simulate the devices, you can use any Modbus simulator that enables simulating more than one device with different IDs.<\/p>\n<p>In this application, the driver was connected via ethernet (because of the simulator being used, which does not interfere with the proposed solution). We use <b>MOD_RSSIM<\/b> simulator, which is attached to this article and can also be downloaded from <a href=\"http:\/\/www.plcsimulator.org\">this site<\/a>.<\/p>\n<p>This article also features a library called <b>desabilitaleituraemerro<\/b>.lib which contains only one XObject, called <b>xoDisable<\/b>. This object contains scripts for enabling and disabling tag reads. For each device to be controlled, a new instance of <b>xoDisable <\/b>must be added to the data server (data folder).<\/p>\n<p>To each new instance added to the main project, fill out the following <b>xoDisable<\/b>&#8216;s properties:<\/p>\n<p><i><b>AppDriver<\/b><\/i>: driver to which the device belongs<br \/>\n<b><i>Database<\/i><\/b>: database object where &#8220;read enabled&#8221; or &#8220;read disabled&#8221; messages are recorded<br \/>\n<i><b>IDEquip<\/b><\/i>: the device&#8217;s ID on the network (<i>N1 <\/i>parameter in the I\/O driver)<br \/>\n<i><b>Table<\/b><\/i>:\u00a0 name of the table where read events are recorded<br \/>\n<i><b>ControlTag<\/b><\/i>: checks if communication has failed. This is the only tag whose read is not disabled when in fail<br \/>\n<i><b>PresetValue<\/b><\/i>: time interval (in seconds) when communication is checked when in fail<\/p>\n<p>To enable the counter tag in the <b>xoDisable<\/b>&#8216;s instance where the device has failed (<i>N1<\/i>), you must add a script to the driver&#8217;s <i>OnCommError <\/i>event. Example:<\/p>\n<div align=\"left\"><span style=\"font-family: Courier New;\">Sub Driver_OnCommError(EvtType, Size, Element, N1, N2, N3, N4)<br \/>\n&#8216;Script that checks which N1 has failed and enables a counter.<br \/>\nif N1 = 1 then<br \/>\nApplication.GetObject(&#8220;Data.xoDriver1&#8221;).CounterTag.Enabled = true<br \/>\nelseif N1 = 2 then<br \/>\nApplication.GetObject(&#8220;Data.xoDriver2&#8221;).CounterTag.Enabled = true<br \/>\nend if<br \/>\nEnd Sub<\/span><\/div>\n<p>To use this application, follow these procedures:<\/p>\n<ol>\n<li>Execute a Modbus simulator that simulates two PLCs at port 502, or the use two PLCs, whose network IDs are 1 and 2, and which contain <b>Holding Register<\/b>-type variables with addresses ranging from 1 to 5.<\/li>\n<li>Open the application in edition mode, set up the driver&#8217;s connection IP, and run the application.<\/li>\n<li>At the Modbus simulator, disable only one (control) variable of one of the PLCs, or then completely disable one of the simulating PLCs.<\/li>\n<li>Wait for Elipse E3&#8217;s timing and check whether the other tags&#8217; reading has been disabled.<\/li>\n<li>Enable again the variable or PLC previously disabled.<\/li>\n<li>Reading will be reestablished after one good-quality variable is read.<\/li>\n<\/ol>\n<p>The demo application was developed with Elipse E3 version 4.6 build 162.<\/p>\n<h3>Attachments:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/DisableReadOnError.zip\">DisableReadOnError.zip<\/a><\/p>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/mod_RSsim_8_20-1.zip\">mod_RSsim_8_20 (1).zip<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>On a serial network, you can use a single driver to communicate with several devices; depending on the protocol being used, each tag&#8217;s N1 parameter will be responsible for telling&hellip;<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[753,763],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Disabling tags from a PLC that has failed. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disabling tags from a PLC that has failed.\" \/>\n<meta property=\"og:description\" content=\"On a serial network, you can use a single driver to communicate with several devices; depending on the protocol being used, each tag&#8217;s N1 parameter will be responsible for telling&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:45:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-10T17:33:18+00:00\" \/>\n<meta name=\"author\" content=\"Enrico Busnello Amorim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Enrico Busnello Amorim\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\"},\"author\":{\"name\":\"Enrico Busnello Amorim\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/aa880bd098677c1ae91fa708e17cdc12\"},\"headline\":\"Disabling tags from a PLC that has failed.\",\"datePublished\":\"2019-03-25T20:45:13+00:00\",\"dateModified\":\"2019-06-10T17:33:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\"},\"wordCount\":574,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"IODriver \/ IOServer\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\",\"name\":\"[:pt]Disabling tags from a PLC that has failed.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:45:13+00:00\",\"dateModified\":\"2019-06-10T17:33:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disabling tags from a PLC that has failed.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/aa880bd098677c1ae91fa708e17cdc12\",\"name\":\"Enrico Busnello Amorim\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/13943145ceed05bf229301fae63da878?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/13943145ceed05bf229301fae63da878?s=96&d=mm&r=g\",\"caption\":\"Enrico Busnello Amorim\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/enrico\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Disabling tags from a PLC that has failed. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Disabling tags from a PLC that has failed.[:] - Elipse Knowledgebase","og_description":"On a serial network, you can use a single driver to communicate with several devices; depending on the protocol being used, each tag&#8217;s N1 parameter will be responsible for telling&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:45:13+00:00","article_modified_time":"2019-06-10T17:33:18+00:00","author":"Enrico Busnello Amorim","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Enrico Busnello Amorim","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/"},"author":{"name":"Enrico Busnello Amorim","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/aa880bd098677c1ae91fa708e17cdc12"},"headline":"Disabling tags from a PLC that has failed.","datePublished":"2019-03-25T20:45:13+00:00","dateModified":"2019-06-10T17:33:18+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/"},"wordCount":574,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["IODriver \/ IOServer","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/","url":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/","name":"[:pt]Disabling tags from a PLC that has failed.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:45:13+00:00","dateModified":"2019-06-10T17:33:18+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/disabling-tags-from-a-plc-that-has-failed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Disabling tags from a PLC that has failed."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/aa880bd098677c1ae91fa708e17cdc12","name":"Enrico Busnello Amorim","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/13943145ceed05bf229301fae63da878?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/13943145ceed05bf229301fae63da878?s=96&d=mm&r=g","caption":"Enrico Busnello Amorim"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/enrico\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3631"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3631"}],"version-history":[{"count":4,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3631\/revisions"}],"predecessor-version":[{"id":5971,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3631\/revisions\/5971"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}