{"id":9965,"date":"2022-01-19T15:34:50","date_gmt":"2022-01-19T15:34:50","guid":{"rendered":"https:\/\/bryceautomation.com\/?p=9965"},"modified":"2022-01-19T15:54:27","modified_gmt":"2022-01-19T15:54:27","slug":"controllogix-if-then-statement","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/","title":{"rendered":"ControlLogix IF \/ THEN Statement"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction to ControlLogix IF \/ THEN Statement<\/h3>\n\n\n\n<p>The most common instruction is the ControlLogix IF \/ THEN Statement.  This is for Structured Text routines.  Structured Text is an easy way to program complex algorithms.  Additionaly,  some vendors prefer to use all structured text routines.  One of the reasons to use structured text is that you can write logic without using Studio 5000.    Later on, the developer will simply past the logic into a structured text routines.  <\/p><div id=\"bryce-2999772534\" class=\"bryce-afterfirst bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"7728240895\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n\n<p>The problem with structured text is that many technicians are intimidated by this programming method.  Really, though, it&#8217;s just logic that you write in plain English.  Ladder logic has the advantages of symbols which make logic easy to troubleshoot.  On the other hand, structured text routines can be difficult to follow.<\/p>\n\n\n\n<p>Undeniably, though, you are more likely to call the vendor for support.  This could be one of the motives behind vendors that use structured text.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Relating Ladder to Structured Text<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Convert XIC to Structured Text<\/h4>\n\n\n\n<p>To begin, let&#8217;s talk about how we could convert ladder to text.    Once you get the hang of this, it will seem very easy.  Let&#8217;s start with a simple rung:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"375\" height=\"183\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-27.png\" alt=\"\" class=\"wp-image-9966 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-27.png 375w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-27-300x146.png 300w\" data-sizes=\"(max-width: 375px) 100vw, 375px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 375px; --smush-placeholder-aspect-ratio: 375\/183;\" \/><\/figure>\n\n\n\n<p>Let&#8217;s convert this to a simple if&#8230; then&#8230; statement.  In this case, we would say &#8220;IF A THEN B&#8221;.  When A (is true), we want to energize B.  Likewise, if A goes false, we want B to go false.<\/p>\n\n\n\n<p>Now, let&#8217;s look at how we would write logic in structured text for this statement.  Structured text will use a similar format.  In structured text, however, we must terminate each command with a semicolon.  Additionally, we need to state when we wish to shut our output off.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"213\" height=\"181\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-28.png\" alt=\"\" class=\"wp-image-9967 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 213px; --smush-placeholder-aspect-ratio: 213\/181;\" \/><\/figure>\n\n\n\n<p>We have an operator &#8221; := &#8220;.  This sets a tag to a specific value.  In this case, when A is true, we set B equal to 1.  This will energize the output bit.  On the other hand, if A is NOT true, then we shut off B.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Convert XIO to Structured Text (NOT Statement)<\/h4>\n\n\n\n<p>At this point, consider the following rung.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"415\" height=\"207\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-29.png\" alt=\"\" class=\"wp-image-9968 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-29.png 415w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-29-300x150.png 300w\" data-sizes=\"(max-width: 415px) 100vw, 415px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 415px; --smush-placeholder-aspect-ratio: 415\/207;\" \/><\/figure>\n\n\n\n<p>First, convert this rung to plain English.  We would say, &#8220;IF NOT A THEN B&#8221;.  In other words, we want B to be the opposite of A.  There are a couple ways to do this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"194\" height=\"172\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-30.png\" alt=\"\" class=\"wp-image-9969 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 194px; --smush-placeholder-aspect-ratio: 194\/172;\" \/><\/figure>\n\n\n\n<p>When A goes false, we energize B.  Likewise, if A goes true, then we shut off B.<\/p>\n\n\n\n<p>Here is another way that we could accomplish this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"255\" height=\"192\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png\" alt=\"\" class=\"wp-image-9970 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 255px; --smush-placeholder-aspect-ratio: 255\/192;\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Structured Text AND Statement<\/h4>\n\n\n\n<p>Next, let&#8217;s consider the following logic:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"419\" height=\"248\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-32.png\" alt=\"\" class=\"wp-image-9972 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-32.png 419w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-32-300x178.png 300w\" data-sizes=\"(max-width: 419px) 100vw, 419px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 419px; --smush-placeholder-aspect-ratio: 419\/248;\" \/><\/figure>\n\n\n\n<p>As we did before, we&#8217;ll convert this to plain English.  In this case, we have an AND statement.  Both A AND B need to be high to get C.  Just A is not enough, and just B is not enough.  We must have both.  Let&#8217;s see what this would look like in structured text:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"315\" height=\"211\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-33.png\" alt=\"\" class=\"wp-image-9973 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-33.png 315w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-33-300x201.png 300w\" data-sizes=\"(max-width: 315px) 100vw, 315px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 315px; --smush-placeholder-aspect-ratio: 315\/211;\" \/><\/figure>\n\n\n\n<p>When A AND B are true we get C.  Otherwise, we shut off C.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">OR Statement (ControlLogix IF \/ THEN Statement)<\/h4>\n\n\n\n<p>This time, we&#8217;ll look at a branch.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"401\" height=\"212\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-34.png\" alt=\"\" class=\"wp-image-9974 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-34.png 401w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-34-300x159.png 300w\" data-sizes=\"(max-width: 401px) 100vw, 401px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 401px; --smush-placeholder-aspect-ratio: 401\/212;\" \/><\/figure>\n\n\n\n<p>Here, we would simply say, &#8220;IF A OR B THEN C&#8221;.  In other words, if A is true, we would get C.  Likewise, if we have B, then we will have C.  Additionally both instructions can be true.  This is not exclusive.<\/p>\n\n\n\n<p>In structured text, we would write this as:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"253\" height=\"194\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-35.png\" alt=\"\" class=\"wp-image-9975 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 253px; --smush-placeholder-aspect-ratio: 253\/194;\" \/><\/figure>\n\n\n\n<p>It&#8217;s important to realize that we must shut off our output if the condition is not true.<\/p>\n\n\n\n<p>For more complex logic, you can use parenthesis to group data together.  For example:  If  ((A OR B) and (C OR D) Then E.  In this statement A OR B HAS to be true.  Likewise, with C OR D.  One of those have to be true as well.  Once these conditions are met, then our output would energize.<\/p>\n\n\n\n<p>For more information, visit the <a href=\"https:\/\/bryceautomation.com\/index.php\/category\/controllogix\/\">ControlLogix Category Page!<\/a><\/p>\n\n\n\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-628522254\" class=\"bryce-after-content bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"4667596182\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Introduction to ControlLogix IF \/ THEN Statement The most common instruction is the ControlLogix IF \/ THEN Statement. This is for Structured Text routines. Structured Text is an easy way to program complex algorithms. Additionaly, some vendors prefer to use all structured text routines. One of the reasons to use structured text is that you <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":9970,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[434,433],"class_list":{"0":"post-9965","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-controllogix","8":"tag-if-then","9":"tag-structured-text","10":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ControlLogix IF \/ THEN Statement - Bryce Automation<\/title>\n<meta name=\"description\" content=\"Using the ControlLogix IF \/ THEN Statement in a structured text routines. Additionally, we&#039;ll cover NOT, AND, and OR statements.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ControlLogix IF \/ THEN Statement - Bryce Automation\" \/>\n<meta property=\"og:description\" content=\"Using the ControlLogix IF \/ THEN Statement in a structured text routines. Additionally, we&#039;ll cover NOT, AND, and OR statements.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/\" \/>\n<meta property=\"og:site_name\" content=\"Bryce Automation\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ricky.bryce.7\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-19T15:34:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-19T15:54:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png\" \/>\n\t<meta property=\"og:image:width\" content=\"255\" \/>\n\t<meta property=\"og:image:height\" content=\"192\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ricky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"ControlLogix IF \\\/ THEN Statement\",\"datePublished\":\"2022-01-19T15:34:50+00:00\",\"dateModified\":\"2022-01-19T15:54:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/\"},\"wordCount\":635,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/image-31.png\",\"keywords\":[\"if then\",\"structured text\"],\"articleSection\":[\"ControlLogix\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/\",\"name\":\"ControlLogix IF \\\/ THEN Statement - Bryce Automation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/image-31.png\",\"datePublished\":\"2022-01-19T15:34:50+00:00\",\"dateModified\":\"2022-01-19T15:54:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"Using the ControlLogix IF \\\/ THEN Statement in a structured text routines. Additionally, we'll cover NOT, AND, and OR statements.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/image-31.png\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/image-31.png\",\"width\":255,\"height\":192,\"caption\":\"if then\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/01\\\/19\\\/controllogix-if-then-statement\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ControlLogix IF \\\/ THEN Statement\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/\",\"name\":\"Bryce Automation\",\"description\":\"Automating Home and Industry...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bryceautomation.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\",\"name\":\"Ricky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"caption\":\"Ricky\"},\"sameAs\":[\"http:\\\/\\\/bryceautomation.com\",\"https:\\\/\\\/www.facebook.com\\\/ricky.bryce.7\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ricky-bryce-4367a416\\\/\"],\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/author\\\/ricky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ControlLogix IF \/ THEN Statement - Bryce Automation","description":"Using the ControlLogix IF \/ THEN Statement in a structured text routines. Additionally, we'll cover NOT, AND, and OR statements.","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:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/","og_locale":"en_US","og_type":"article","og_title":"ControlLogix IF \/ THEN Statement - Bryce Automation","og_description":"Using the ControlLogix IF \/ THEN Statement in a structured text routines. Additionally, we'll cover NOT, AND, and OR statements.","og_url":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2022-01-19T15:34:50+00:00","article_modified_time":"2022-01-19T15:54:27+00:00","og_image":[{"width":255,"height":192,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png","type":"image\/png"}],"author":"Ricky","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"ControlLogix IF \/ THEN Statement","datePublished":"2022-01-19T15:34:50+00:00","dateModified":"2022-01-19T15:54:27+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/"},"wordCount":635,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png","keywords":["if then","structured text"],"articleSection":["ControlLogix"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/","url":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/","name":"ControlLogix IF \/ THEN Statement - Bryce Automation","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png","datePublished":"2022-01-19T15:34:50+00:00","dateModified":"2022-01-19T15:54:27+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"Using the ControlLogix IF \/ THEN Statement in a structured text routines. Additionally, we'll cover NOT, AND, and OR statements.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/01\/image-31.png","width":255,"height":192,"caption":"if then"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/01\/19\/controllogix-if-then-statement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"ControlLogix IF \/ THEN Statement"}]},{"@type":"WebSite","@id":"https:\/\/bryceautomation.com\/#website","url":"https:\/\/bryceautomation.com\/","name":"Bryce Automation","description":"Automating Home and Industry...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bryceautomation.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7","name":"Ricky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","url":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","caption":"Ricky"},"sameAs":["http:\/\/bryceautomation.com","https:\/\/www.facebook.com\/ricky.bryce.7","https:\/\/www.linkedin.com\/in\/ricky-bryce-4367a416\/"],"url":"https:\/\/bryceautomation.com\/index.php\/author\/ricky\/"}]}},"_links":{"self":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/9965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/comments?post=9965"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/9965\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/9970"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=9965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=9965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=9965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}