{"id":12476,"date":"2022-07-19T00:10:26","date_gmt":"2022-07-19T00:10:26","guid":{"rendered":"https:\/\/bryceautomation.com\/?p=12476"},"modified":"2022-07-19T00:10:29","modified_gmt":"2022-07-19T00:10:29","slug":"controllogix-structured-text-functions","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/","title":{"rendered":"ControlLogix Structured Text Functions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction to ControlLogix Structured Text Functions<\/h2>\n\n\n\n<p>ControlLogix Structured Text Functions allow us to perform the same calculations several times through a processor scan.  For example, we might want to convert Celsius to Fahrenheit.  We simply create another routine that acts as our function.  After that, we can pass and receive parameters from this subroutine.  To call a subroutine as a function, we use the JSR statement.  The JSR statement contains the input and return parameters.<\/p><div id=\"bryce-2912372672\" 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<h2 class=\"wp-block-heading\">Create Your Tags<\/h2>\n\n\n\n<p>Before we begin we&#8217;ll create some tags.  This will give us some values to pass to the subroutine and a place to put the value that we convert.   Let&#8217;s create three tags to hold Celsius Values.  We&#8217;ll also create three Fahrenheit tags to store the result.  Additionally we&#8217;ll create a tag as a workspace for our subroutine to read and store data.  All of these tags will have the REAL Data Type.  This allows us to store decimal point values in the tags.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"444\" height=\"244\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-129.png\" alt=\"\" class=\"wp-image-12489 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-129.png 444w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-129-300x165.png 300w\" data-sizes=\"(max-width: 444px) 100vw, 444px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 444px; --smush-placeholder-aspect-ratio: 444\/244;\" \/><\/figure>\n\n\n\n<p>While we&#8217;re here, let&#8217;s go over to &#8220;Monitor Tags&#8221;.  We&#8217;ll populate the Celsius tags with some random values.  Later on, we&#8217;ll convert these values to Fahrenheit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"643\" height=\"225\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-130.png\" alt=\"\" class=\"wp-image-12490 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-130.png 643w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-130-300x105.png 300w\" data-sizes=\"(max-width: 643px) 100vw, 643px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 643px; --smush-placeholder-aspect-ratio: 643\/225;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Create Your Subroutine for ControlLogix Structured Text Functions<\/h2>\n\n\n\n<p>At this point, we are ready to create the subroutine.  Right click on the program you wish to add the subroutine to and select &#8220;New Routine&#8221;.  We&#8217;ll just name this &#8220;CTOF&#8221;.  Be sure to make this a &#8220;Structured Text&#8221; type routine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"494\" height=\"273\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-122.png\" alt=\"\" class=\"wp-image-12481 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-122.png 494w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-122-300x166.png 300w\" data-sizes=\"(max-width: 494px) 100vw, 494px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 494px; --smush-placeholder-aspect-ratio: 494\/273;\" \/><\/figure>\n\n\n\n<p>Additionally, I&#8217;m going to delete the MainRoutine and add it back as Structured Text.  In order to delete the MainRoutine, I went to the properties of the MainProgram.  On the Configuration tab, I made CTOF the main routine temporarily.  After I created the MainRoutine as a structured text routine, I went back to the properties of the program to make it the main routine again.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"201\" height=\"111\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-123.png\" alt=\"\" class=\"wp-image-12482 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 201px; --smush-placeholder-aspect-ratio: 201\/111;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add Logic to Your MainRoutine<\/h2>\n\n\n\n<p>In the MainRoutine, we&#8217;ll add a JSR Instruction.  The JSR instruction does not always have to go in the MainRoutine.  It can go in any routine that is already executing within our program.  In this case, we don&#8217;t have a choice though.  Only one routine is executing.  It&#8217;s important to realize, though, that when you nest subroutines, you cannot go more than 32 deep.  You will fault the processor.<\/p>\n\n\n\n<p>First let&#8217;s try this with only one JSR.  Once we get that working we will go back and add the other two.  The first JSR instruction will take data from Celsius1.  This is called the INPUT parameter.  Likewise, when we receive an answer back from the subroutine, we will place this value into Fahrenheit1.  We call this the RETURN parameter.  Do NOT finalize your edits yet.  If you finalize edits before the subroutine is set up properly, you will fault the processor.  It needs to be able to receive and return the correct number of parameters.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"298\" height=\"93\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-124.png\" alt=\"\" class=\"wp-image-12483 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 298px; --smush-placeholder-aspect-ratio: 298\/93;\" \/><\/figure>\n\n\n\n<p>The format is: JSR(CTOF,1,Celsius1,Fahrenheit1);   <\/p>\n\n\n\n<p>Basically, we are jumping to the CTOF routine.  We have 1 input parameter.  The input parameter is Celsius1, and the return parameter is Fahrenheit1.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add Logic to Your Subroutine<\/h2>\n\n\n\n<p>Let&#8217;s add the following logic to your subroutine.  As you can see we need an SBR as the first instruction.  This SBR will receive a value from the JSR that called it.  It&#8217;s important to realize that this subroutine does not know what tag the value came from.  There could be hundreds of JSR&#8217;s passing values to our subroutine.  All we know is that we are getting a value.  We will place this value into our workspace.  Be sure to end each command with a semicolon.<\/p>\n\n\n\n<p>After the SBR we&#8217;ll calculate the Fahrenheit value.  Workspace := Workspace * 1.8 + 32;  It&#8217;s OK to store the answer back to Workspace, because after we convert the Celsius value we don&#8217;t need that original value anymore.<\/p>\n\n\n\n<p>Finally we need to return the converted value (workspace) back to the JSR.  Remember, we don&#8217;t know where the JSR will place the value.    The JSR Knows that.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"346\" height=\"202\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-127.png\" alt=\"\" class=\"wp-image-12487 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-127.png 346w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-127-300x175.png 300w\" data-sizes=\"(max-width: 346px) 100vw, 346px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 346px; --smush-placeholder-aspect-ratio: 346\/202;\" \/><\/figure>\n\n\n\n<p>Now if you go back to the Tags, you should see that our first conversion is working.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"330\" height=\"233\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-128.png\" alt=\"\" class=\"wp-image-12488 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-128.png 330w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-128-300x212.png 300w\" data-sizes=\"(max-width: 330px) 100vw, 330px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 330px; --smush-placeholder-aspect-ratio: 330\/233;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Finish up the Main Routine<\/h2>\n\n\n\n<p>At this point, we just need to go back and add the other two JSR&#8217;s to the MainRoutine.  We do not have to modify the subroutine. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png\" alt=\"\" class=\"wp-image-12491 lazyload\" width=\"525\" height=\"323\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png 733w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131-300x185.png 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131-570x350.png 570w\" data-sizes=\"(max-width: 525px) 100vw, 525px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 525px; --smush-placeholder-aspect-ratio: 525\/323;\" \/><\/figure>\n\n\n\n<p>Now if we check our tags, everything should be working!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"648\" height=\"224\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-132.png\" alt=\"\" class=\"wp-image-12492 lazyload\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-132.png 648w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-132-300x104.png 300w\" data-sizes=\"(max-width: 648px) 100vw, 648px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 648px; --smush-placeholder-aspect-ratio: 648\/224;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Summary of  ControlLogix Structured Text Functions<\/h2>\n\n\n\n<p>In short we just need to create a subroutine one time.  We can have as many JSR&#8217;s as we like in other parts of the program without modifying this subroutine.  The JSR simply passes a value (or values) to the subroutine.  The subroutine manipulates the data then returns it back to the JSR.  The JSR then places the data it receives into the tags for the return parameter.<\/p>\n\n\n\n<p>Keep in mind that you could also do something similar to this using <a href=\"https:\/\/bryceautomation.com\/index.php\/2017\/06\/12\/controllogix-add-on-instructions\/\">Add-On Instructions.<\/a><\/p>\n\n\n\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-2424871747\" 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 Structured Text Functions ControlLogix Structured Text Functions allow us to perform the same calculations several times through a processor scan. For example, we might want to convert Celsius to Fahrenheit. We simply create another routine that acts as our function. After that, we can pass and receive parameters from this subroutine. To <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":12491,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[770,771,433,769],"class_list":{"0":"post-12476","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-controllogix","8":"tag-functions","9":"tag-passing-parameters","10":"tag-structured-text","11":"tag-stx","12":"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 Structured Text Functions - Bryce Automation<\/title>\n<meta name=\"description\" content=\"Using ControlLogix Structured Text Functions. We&#039;ll create a subroutine to accept and return parameters from a JSR Instruction.\" \/>\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\/07\/19\/controllogix-structured-text-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ControlLogix Structured Text Functions - Bryce Automation\" \/>\n<meta property=\"og:description\" content=\"Using ControlLogix Structured Text Functions. We&#039;ll create a subroutine to accept and return parameters from a JSR Instruction.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/\" \/>\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-07-19T00:10:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-19T00:10:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png\" \/>\n\t<meta property=\"og:image:width\" content=\"733\" \/>\n\t<meta property=\"og:image:height\" content=\"451\" \/>\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\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"ControlLogix Structured Text Functions\",\"datePublished\":\"2022-07-19T00:10:26+00:00\",\"dateModified\":\"2022-07-19T00:10:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/\"},\"wordCount\":829,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/image-131.png\",\"keywords\":[\"Functions\",\"Passing Parameters\",\"structured text\",\"STX\"],\"articleSection\":[\"ControlLogix\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/\",\"name\":\"ControlLogix Structured Text Functions - Bryce Automation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/image-131.png\",\"datePublished\":\"2022-07-19T00:10:26+00:00\",\"dateModified\":\"2022-07-19T00:10:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"Using ControlLogix Structured Text Functions. We'll create a subroutine to accept and return parameters from a JSR Instruction.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/image-131.png\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/image-131.png\",\"width\":733,\"height\":451,\"caption\":\"Structured Text JSR Instruction\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2022\\\/07\\\/19\\\/controllogix-structured-text-functions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ControlLogix Structured Text Functions\"}]},{\"@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 Structured Text Functions - Bryce Automation","description":"Using ControlLogix Structured Text Functions. We'll create a subroutine to accept and return parameters from a JSR Instruction.","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\/07\/19\/controllogix-structured-text-functions\/","og_locale":"en_US","og_type":"article","og_title":"ControlLogix Structured Text Functions - Bryce Automation","og_description":"Using ControlLogix Structured Text Functions. We'll create a subroutine to accept and return parameters from a JSR Instruction.","og_url":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2022-07-19T00:10:26+00:00","article_modified_time":"2022-07-19T00:10:29+00:00","og_image":[{"width":733,"height":451,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.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\/07\/19\/controllogix-structured-text-functions\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"ControlLogix Structured Text Functions","datePublished":"2022-07-19T00:10:26+00:00","dateModified":"2022-07-19T00:10:29+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/"},"wordCount":829,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png","keywords":["Functions","Passing Parameters","structured text","STX"],"articleSection":["ControlLogix"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/","url":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/","name":"ControlLogix Structured Text Functions - Bryce Automation","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png","datePublished":"2022-07-19T00:10:26+00:00","dateModified":"2022-07-19T00:10:29+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"Using ControlLogix Structured Text Functions. We'll create a subroutine to accept and return parameters from a JSR Instruction.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2022\/07\/image-131.png","width":733,"height":451,"caption":"Structured Text JSR Instruction"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2022\/07\/19\/controllogix-structured-text-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"ControlLogix Structured Text Functions"}]},{"@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\/12476","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=12476"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/12476\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/12491"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=12476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=12476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=12476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}