{"id":14431,"date":"2022-11-20T07:08:54","date_gmt":"2022-11-20T07:08:54","guid":{"rendered":"https:\/\/bryceautomation.com\/?p=14431"},"modified":"2022-11-20T07:08:57","modified_gmt":"2022-11-20T07:08:57","slug":"controllogix-for-instruction","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/","title":{"rendered":"ControlLogix FOR Instruction"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction to the ControlLogix FOR Instruction<\/h2>\n\n\n\n<p>The ControlLogix FOR Instruction allows us to execute a routine for a specific number of times.   To understand how a FOR loop works, let&#8217;s go back and look at some examples of BASIC from 1975.  In this example, we will print the value of 1 to 10 to our screen.<\/p><div id=\"bryce-3621333778\" 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<pre class=\"wp-block-code\"><code>10 FOR X = 1 TO 10\n20 PRINT X\n30 NEXT X\n40 END<\/code><\/pre>\n\n\n\n<p>Let&#8217;s take a look at another example.  In this example, we print &#8220;HELLO&#8221; to the display 5 times.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>10 FOR X = 1 TO 5\n20 PRINT \"HELLO\"\n30 NEXT X\n40 END<\/code><\/pre>\n\n\n\n<p>In ControlLogix, this is important for use in <a href=\"https:\/\/bryceautomation.com\/index.php\/2017\/06\/12\/controllogix-indirect-addressing\/\">Indirect Addressing<\/a>.   We can use X as our index.  For example, if we want to calculate the volume of 32 tanks, we can just use the same logic over and over again.  We just use X to represent the tank number.  Each time we call a subroutine, we increment X to perform our volume calculations on the next tank.<\/p>\n\n\n\n<p>In this post, we&#8217;ll take a look at a simple FOR instruction just to understand it&#8217;s operation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create the Subroutine and Tags<\/h2>\n\n\n\n<p>Before we set up the FOR Instruction, we&#8217;ll set up a new subroutine and tags.  First, we&#8217;ll create a routine called FORRoutine.  We&#8217;ll just make this a ladder diagram.  Do not add a JSR to this routine.  We will call this routine through the FOR Instruction later on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"366\" height=\"232\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-22.png\" alt=\"\" class=\"wp-image-14434 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-22.png 366w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-22-300x190.png 300w\" data-sizes=\"(max-width: 366px) 100vw, 366px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 366px; --smush-placeholder-aspect-ratio: 366\/232;\" \/><\/figure>\n\n\n\n<p>At this point, we&#8217;ll create a couple tags that we&#8217;ll need to demonstrate the FOR Loop.  These tags will be &#8220;TankIndex&#8221;, and &#8220;TestValue&#8221;.  Both tags will have the DINT data type.  Additionally, we will have two BOOL bits.  ExecuteFOR will be the bit we toggle to test our loop.  We&#8217;ll create FORONS as a tag for a one shot.  The purpose of this tag is to execute the FOR instruction just one time when we toggle our ExecuteFOR bit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"457\" height=\"181\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-25.png\" alt=\"\" class=\"wp-image-14437 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-25.png 457w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-25-300x119.png 300w\" data-sizes=\"(max-width: 457px) 100vw, 457px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 457px; --smush-placeholder-aspect-ratio: 457\/181;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add the ControlLogix FOR Instruction<\/h2>\n\n\n\n<p>In the MainRoutine, we&#8217;ll add our FOR instruction.  The routine that we call is &#8220;FORRoutine.  The Index is our variable.  This will reflect how many times the loop executes.  Obviously, this will start at the Initial value.  It will end at the terminal value.  Our Step Size is how much the index will change by each time the loop executes.  When we toggle the &#8220;ExecuteFOR&#8221; bit, the FOR instruction executes just one time.  This is because of our ONS instruction.  Without the ONS, the FOR would execute every scan.  There is nothing wrong with executing the FOR every scan though if that is what you need.  It&#8217;s important to realize, though, that it will affect your scan time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"468\" height=\"297\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-26.png\" alt=\"\" class=\"wp-image-14438 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-26.png 468w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-26-300x190.png 300w\" data-sizes=\"(max-width: 468px) 100vw, 468px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 468px; --smush-placeholder-aspect-ratio: 468\/297;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add Test Logic<\/h2>\n\n\n\n<p>At this point, we&#8217;ll add some logic to the FORRoutine so we can verify that our loop did execute 10 times.  We&#8217;ll just use an ADD Statement.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"462\" height=\"281\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-27.png\" alt=\"\" class=\"wp-image-14439 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-27.png 462w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-27-300x182.png 300w\" data-sizes=\"(max-width: 462px) 100vw, 462px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 462px; --smush-placeholder-aspect-ratio: 462\/281;\" \/><\/figure>\n\n\n\n<p>In the MainRoutine, toggle the &#8220;ExecuteFOR&#8221; bit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"460\" height=\"299\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png\" alt=\"\" class=\"wp-image-14440 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png 460w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28-300x195.png 300w\" data-sizes=\"(max-width: 460px) 100vw, 460px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 460px; --smush-placeholder-aspect-ratio: 460\/299;\" \/><\/figure>\n\n\n\n<p>Now, let&#8217;s go look at the ADD instruction in the FORRoutine.<\/p>\n\n\n\n<p>As you can see, the test value is now 10.  This means that our loop executed 10 times.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"467\" height=\"281\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-29.png\" alt=\"\" class=\"wp-image-14441 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-29.png 467w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-29-300x181.png 300w\" data-sizes=\"(max-width: 467px) 100vw, 467px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 467px; --smush-placeholder-aspect-ratio: 467\/281;\" \/><\/figure>\n\n\n\n<p>Toggle the &#8220;ExecuteFOR&#8221; bit off then back on.  You will see the test value increments to 20.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"465\" height=\"284\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-30.png\" alt=\"\" class=\"wp-image-14442 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-30.png 465w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-30-300x183.png 300w\" data-sizes=\"(max-width: 465px) 100vw, 465px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 465px; --smush-placeholder-aspect-ratio: 465\/284;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Summary of the ControlLogix FOR Instruction<\/h2>\n\n\n\n<p>In short, the FOR instruction will execute a routine a specific number of times.  Each time the routine executes, the index changes according to the step number.  Typically you will use this in indirect addressing to perform calculations on an array of similar pieces of equipment.  This includes tanks, motors, or valves.  The FOR instruction sounds intimidating, but it&#8217;s operation is very simple.  It&#8217;s a cornerstone command that is in nearly every programming language including BASIC, C++, PASCAL, PHP, and Java.  <\/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-159509584\" 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 the ControlLogix FOR Instruction The ControlLogix FOR Instruction allows us to execute a routine for a specific number of times. To understand how a FOR loop works, let&#8217;s go back and look at some examples of BASIC from 1975. In this example, we will print the value of 1 to 10 to our <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":14440,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[867,45,869],"class_list":{"0":"post-14431","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-controllogix","8":"tag-for","9":"tag-indirect-addressing","10":"tag-loop","11":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ControlLogix FOR Instruction - Bryce Automation<\/title>\n<meta name=\"description\" content=\"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.\" \/>\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\/11\/20\/controllogix-for-instruction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ControlLogix FOR Instruction - Bryce Automation\" \/>\n<meta property=\"og:description\" content=\"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/\" \/>\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-11-20T07:08:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-20T07:08:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png\" \/>\n\t<meta property=\"og:image:width\" content=\"460\" \/>\n\t<meta property=\"og:image:height\" content=\"299\" \/>\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\\\/11\\\/20\\\/controllogix-for-instruction\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"ControlLogix FOR Instruction\",\"datePublished\":\"2022-11-20T07:08:54+00:00\",\"dateModified\":\"2022-11-20T07:08:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/\"},\"wordCount\":605,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/image-28.png\",\"keywords\":[\"FOR\",\"Indirect Addressing\",\"LOOP\"],\"articleSection\":[\"ControlLogix\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/\",\"name\":\"ControlLogix FOR Instruction - Bryce Automation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/image-28.png\",\"datePublished\":\"2022-11-20T07:08:54+00:00\",\"dateModified\":\"2022-11-20T07:08:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/image-28.png\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/image-28.png\",\"width\":460,\"height\":299,\"caption\":\"ControlLogix FOR Instruction\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/11\\\/20\\\/controllogix-for-instruction\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ControlLogix FOR Instruction\"}]},{\"@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 FOR Instruction - Bryce Automation","description":"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.","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\/11\/20\/controllogix-for-instruction\/","og_locale":"en_US","og_type":"article","og_title":"ControlLogix FOR Instruction - Bryce Automation","og_description":"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.","og_url":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2022-11-20T07:08:54+00:00","article_modified_time":"2022-11-20T07:08:57+00:00","og_image":[{"width":460,"height":299,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.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\/11\/20\/controllogix-for-instruction\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"ControlLogix FOR Instruction","datePublished":"2022-11-20T07:08:54+00:00","dateModified":"2022-11-20T07:08:57+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/"},"wordCount":605,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png","keywords":["FOR","Indirect Addressing","LOOP"],"articleSection":["ControlLogix"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/","url":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/","name":"ControlLogix FOR Instruction - Bryce Automation","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png","datePublished":"2022-11-20T07:08:54+00:00","dateModified":"2022-11-20T07:08:57+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"The ControlLogix FOR Instruction will execute a routine a specific number of times. Each time, it will change the Index by the step value.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/11\/image-28.png","width":460,"height":299,"caption":"ControlLogix FOR Instruction"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/11\/20\/controllogix-for-instruction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"ControlLogix FOR Instruction"}]},{"@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\/14431","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=14431"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/14431\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/14440"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=14431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=14431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=14431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}