{"id":617,"date":"2023-08-16T09:08:00","date_gmt":"2023-08-16T09:08:00","guid":{"rendered":"https:\/\/joseamaita.com\/en\/?p=617"},"modified":"2023-08-16T14:29:53","modified_gmt":"2023-08-16T14:29:53","slug":"opc-router-tutorial-calculator","status":"publish","type":"post","link":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/","title":{"rendered":"OPC Router Tutorial Calculator"},"content":{"rendered":"\n<p>Following the third part of the <a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial\/\">OPC Router tutorial<\/a>, I&#8217;m presenting how to perform multiple calculations using the &#8220;Calculator&#8221; object. Remember, we&#8217;re configuring and running a project for \u201cPap\u00edn\u201d, a fictional potato bread factory.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Why_an_OPC_Router_tutorial_with_a_Calculator\" >Why an OPC Router tutorial with a Calculator?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Working_with_OPC_Router_MQTT_and_a_Calculator\" >Working with OPC Router, MQTT and a Calculator<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Knowing_your_Plugins\" >Knowing your Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Knowing_your_Transfer_Objects\" >Knowing your Transfer Objects<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Configuring_your_Plugins\" >Configuring your Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Creating_your_Fourth_Template\" >Creating your Fourth Template<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Working_with_Instances_from_Templates\" >Working with Instances from Templates<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Compile_Save_and_Publish_your_OPC_Router_Project_Configuration_with_MQTT_and_a_Calculator\" >Compile, Save and Publish your OPC Router Project Configuration with MQTT and a Calculator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Publish_and_Subscribe_to_MQTT_Data\" >Publish and Subscribe to MQTT Data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Exploring_More_Functions\" >Exploring More Functions<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Multiplication\" >Multiplication<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Division\" >Division<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Average\" >Average<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Concatenate\" >Concatenate<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#Conditional\" >Conditional<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_an_OPC_Router_tutorial_with_a_Calculator\"><\/span>Why an OPC Router tutorial with a Calculator?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Because &#8220;learning by doing&#8221; with examples is fun. Also, this particular functionality can bring us an interesting use case: the advantage of changing our collected data by applying arithmetic and logical operations when needed (i.e. engineering unit conversion). See below a list of posts that complete this tutorial:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial\/\">Getting Started with OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-sql\/\">Connect an OPC DA server to Microsoft SQL Server<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-mqtt\/\">Connect an MQTT data source to InfluxDB Cloud<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\">Perform multiple calculations within OPC Router<\/a> (this post)<\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-linux\/\">Run an OPC Router application with Linux and Docker<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-simulator\/\">Build a process data simulator with Python, CSV and OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-rest\/\">Explore basic RESTful web services within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-telegram\/\">Build a Telegram basic interaction within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-sms\/\">Build an SMS basic interaction within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-whatsapp\/\">Build a WhatsApp basic interaction within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-teams\/\">Build a Teams basic interaction within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-backend\/\">Explore advanced RESTful web services within OPC Router<\/a><\/li><li><a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-portainer\/\">Run an OPC Router application with Portainer<\/a><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Working_with_OPC_Router_MQTT_and_a_Calculator\"><\/span>Working with OPC Router, MQTT and a Calculator<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Knowing_your_Plugins\"><\/span>Knowing your Plugins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>To begin with, the configuration of <a href=\"https:\/\/www.opc-router.com\/\">OPC Router<\/a> starts with your licensed plugins. There are several categories such as &#8220;Cloud \/ IoT&#8221;, &#8220;Topfloor&#8221;, &#8220;Shopfloor&#8221;, &#8220;Storage&#8221;, &#8220;Advanced&#8221;, &#8220;Messaging&#8221; and &#8220;Printer&#8221;.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"289\" height=\"303\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_009.png\" alt=\"opc router tutorial calculator 1\" class=\"wp-image-275\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_009.png 289w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_009-286x300.png 286w\" sizes=\"auto, (max-width: 289px) 100vw, 289px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"291\" height=\"916\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_010.png\" alt=\"opc router tutorial calculator 2\" class=\"wp-image-276\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_010.png 291w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/05\/img_p_04_010-95x300.png 95w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to notice <strong>MQTT<\/strong>.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Knowing_your_Transfer_Objects\"><\/span>Knowing your Transfer Objects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>At this point, we&#8217;re going to need four (4) transfer objects to solve our use case:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_001.png\" alt=\"opc router tutorial calculator 3\" class=\"wp-image-621\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to notice <strong>Variables<\/strong>, <strong>Constant Values<\/strong>, <strong>MQTT trigger<\/strong>, and <strong>Calculator<\/strong>.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_your_Plugins\"><\/span>Configuring your Plugins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Following identification, OPC Router needs to configure every licensed plugin. Let&#8217;s start creating a new plug in instance with <strong>MQTT<\/strong> (double click on the object):<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-2 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"269\" height=\"299\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_002.png\" alt=\"opc router tutorial calculator 4\" class=\"wp-image-625\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"206\" height=\"99\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_003.png\" alt=\"opc router tutorial calculator 5\" class=\"wp-image-626\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>At this point, <a href=\"https:\/\/joseamaita.com\/en\/mqtt-on-a-raspberry-pi\/\">define a remote MQTT broker using a Raspberry Pi<\/a> and press the &#8220;Check connection&#8221; button to test connectivity. Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"434\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_004.png\" alt=\"opc router tutorial calculator 6\" class=\"wp-image-725\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_004.png 600w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_004-300x217.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"434\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_005.png\" alt=\"opc router tutorial calculator 7\" class=\"wp-image-727\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_005.png 600w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_005-300x217.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"434\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_006.png\" alt=\"opc router tutorial calculator 8\" class=\"wp-image-728\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_006.png 600w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_006-300x217.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Creating_your_Fourth_Template\"><\/span>Creating your Fourth Template<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>In similar fashion to the third part of the tutorial, a template is the correct approach once again. Let&#8217;s create a new Calculator template <strong>MPow<\/strong> within CALC folder (VSD motor power):<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-3 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"534\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_003.png\" alt=\"opc router tutorial calculator 9\" class=\"wp-image-855\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_003.png 563w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_003-300x285.png 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"300\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_004.png\" alt=\"opc router tutorial calculator 10\" class=\"wp-image-856\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_004.png 347w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_004-300x259.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Watch an empty design panel so you can start building your template:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"239\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_005-1024x239.png\" alt=\"opc router tutorial calculator 11\" class=\"wp-image-857\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_005-1024x239.png 1024w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_005-300x70.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_005-768x179.png 768w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_005.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Also, create the code that identifies the <strong>MPow<\/strong> variable:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"429\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_006.png\" alt=\"opc router tutorial calculator 12\" class=\"wp-image-860\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_006.png 472w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_006-300x273.png 300w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Additionally, create the global variable that will track the calculation. Make sure to set &#8220;Data Type&#8221; to &#8220;Untyped&#8221; given that it will be used for several different operations.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"429\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_023.png\" alt=\"opc router tutorial calculator 13\" class=\"wp-image-897\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_023.png 472w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_023-300x273.png 300w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Drag and drop these three blocks as shown here:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"194\" height=\"246\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_007.png\" alt=\"opc router tutorial calculator 14\" class=\"wp-image-900\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Insert the MQTT trigger block:<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-4 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"214\" height=\"1010\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_029.png\" alt=\"opc router tutorial calculator 15\" class=\"wp-image-776\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"196\" height=\"97\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_030.png\" alt=\"opc router tutorial calculator 16\" class=\"wp-image-777\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to create template variable &#8220;<strong>ds_mqttb_connection<\/strong>&#8221; for MQTT links:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"307\" height=\"157\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_038.png\" alt=\"opc router tutorial calculator 17\" class=\"wp-image-802\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_038.png 307w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_038-300x153.png 300w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Edit the MQTT trigger block and make sure it looks like this:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"372\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_008.png\" alt=\"opc router tutorial calculator 18\" class=\"wp-image-864\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_008.png 549w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_008-300x203.png 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"173\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_009.png\" alt=\"opc router tutorial calculator 19\" class=\"wp-image-865\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Insert the Calculator block:<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-5 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"730\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_010.png\" alt=\"opc router tutorial calculator 20\" class=\"wp-image-867\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_010.png 263w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_010-108x300.png 108w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"188\" height=\"91\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_011.png\" alt=\"opc router tutorial calculator 21\" class=\"wp-image-868\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Double click to start editing the Calculator Transfer Object:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"567\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_012.png\" alt=\"opc router tutorial calculator 22\" class=\"wp-image-871\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_012.png 819w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_012-300x208.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_012-768x532.png 768w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, we&#8217;re going to add two numbers. To do just that, press the &#8220;New&#8221; button to start inserting placeholders &#8220;A&#8221; and &#8220;B&#8221;:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"136\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_013.png\" alt=\"opc router tutorial calculator 23\" class=\"wp-image-873\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_013.png 444w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_013-300x92.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"136\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_014.png\" alt=\"opc router tutorial calculator 24\" class=\"wp-image-874\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_014.png 444w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_014-300x92.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_015.png\" alt=\"opc router tutorial calculator 25\" class=\"wp-image-875\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_015.png 615w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_015-300x276.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Secondly, press the &#8220;Further&#8221; button to browse all functions available:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"122\" height=\"372\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_016.png\" alt=\"\" class=\"wp-image-878\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_016.png 122w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_016-98x300.png 98w\" sizes=\"auto, (max-width: 122px) 100vw, 122px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"674\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_017.png\" alt=\"\" class=\"wp-image-879\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_017.png 962w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_017-300x210.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_017-768x538.png 768w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Select &#8220;SUM&#8221; and press the &#8220;OK&#8221; button to continue.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"963\" height=\"345\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_018.png\" alt=\"\" class=\"wp-image-881\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_018.png 963w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_018-300x107.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_018-768x275.png 768w\" sizes=\"auto, (max-width: 963px) 100vw, 963px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Then, make sure the &#8220;Formula&#8221; field is <strong>SUM(A,B)<\/strong>:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"164\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_019.png\" alt=\"\" class=\"wp-image-903\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_019.png 476w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_019-300x103.png 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Press the &#8220;Test&#8221; button to start inspecting the function result:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"567\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_020.png\" alt=\"\" class=\"wp-image-885\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_020.png 480w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_020-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 15 and 6) and check the correct result for the sum operation (21). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_021.png\" alt=\"\" class=\"wp-image-887\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_021.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_021-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Confirm the configured Calculator block:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"182\" height=\"199\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_022.png\" alt=\"\" class=\"wp-image-889\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to link blocks as shown here to complete your fourth template:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"336\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_024.png\" alt=\"\" class=\"wp-image-902\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_024.png 882w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_024-300x114.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_024-768x293.png 768w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Working_with_Instances_from_Templates\"><\/span>Working with Instances from Templates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>With your fourth template, a new instance is required now. Start creating it using the contextual menu:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"452\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_025.png\" alt=\"\" class=\"wp-image-905\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_025.png 562w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_025-300x241.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"393\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_026.png\" alt=\"\" class=\"wp-image-906\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_026.png 865w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_026-300x136.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_026-768x349.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Check the new instance:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"355\" height=\"373\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_027.png\" alt=\"\" class=\"wp-image-907\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_027.png 355w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_027-286x300.png 286w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>In the design panel, double click to check value in template variable according to actual MQTT link:<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"307\" height=\"52\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_028.png\" alt=\"\" class=\"wp-image-908\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_028.png 307w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_028-300x51.png 300w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"392\" height=\"351\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_029.png\" alt=\"\" class=\"wp-image-909\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_029.png 392w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_029-300x269.png 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Compile_Save_and_Publish_your_OPC_Router_Project_Configuration_with_MQTT_and_a_Calculator\"><\/span>Compile, Save and Publish your OPC Router Project Configuration with MQTT and a Calculator<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>At this time, you need to compile, save and publish the connection you just created by clicking the &#8220;Go productive&#8221; button:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"354\" height=\"445\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_030.png\" alt=\"\" class=\"wp-image-911\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_030.png 354w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_030-239x300.png 239w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"339\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_031.png\" alt=\"\" class=\"wp-image-912\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_031.png 885w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_031-300x115.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_031-768x294.png 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"356\" height=\"1006\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_032.png\" alt=\"\" class=\"wp-image-913\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_032.png 356w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_032-106x300.png 106w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Meanwhile, the project is saved and published.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"418\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_033.png\" alt=\"\" class=\"wp-image-916\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_033.png 673w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_033-300x186.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Press the &#8220;Yes&#8221; button to start the OPC Router service and run your application.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"159\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_048.png\" alt=\"\" class=\"wp-image-822\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_048.png 465w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_07_048-300x103.png 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Publish_and_Subscribe_to_MQTT_Data\"><\/span>Publish and Subscribe to MQTT Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>From a <a href=\"https:\/\/joseamaita.com\/en\/mqtt-on-a-raspberry-pi\/\">Raspberry Pi<\/a>, publish and subscribe to some MQTT data to test our first calculation:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>$ mosquitto_pub -h 192.168.1.188 -t \"vsd_motor_p\" -m 15 -d<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"225\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034.png\" alt=\"\" class=\"wp-image-922\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034.png 770w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034-300x88.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034-768x224.png 768w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"336\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_035.png\" alt=\"\" class=\"wp-image-921\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_035.png 884w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_035-300x114.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_035-768x292.png 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result (15 + 6 = 21).<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Exploring_More_Functions\"><\/span>Exploring More Functions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Are you ready to explore and try more functions? Well, I am \ud83d\ude42<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, stop the OPC Router service:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"432\" height=\"165\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_036.png\" alt=\"\" class=\"wp-image-924\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_036.png 432w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_036-300x115.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"380\" height=\"131\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_037.png\" alt=\"\" class=\"wp-image-926\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_037.png 380w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_037-300x103.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Go back to the &#8220;MPow&#8221; template and double click to the Calculator block to start editing it:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_038.png\" alt=\"\" class=\"wp-image-928\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_038.png 819w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_038-300x207.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_038-768x531.png 768w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>At this point, you can do one of two things: press the &#8220;Further&#8221; button to explore listed functions or type a valid formula yourself in the &#8220;Formula&#8221; field (this could include the use of template variables).<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"818\" height=\"567\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_039.png\" alt=\"\" class=\"wp-image-929\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_039.png 818w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_039-300x208.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_039-768x532.png 768w\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Multiplication\"><\/span>Multiplication<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Type <strong>A*B<\/strong> in the &#8220;Formula&#8221; field and press the &#8220;Test&#8221; button to start checking:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_040-1.png\" alt=\"\" class=\"wp-image-933\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_040-1.png 480w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_040-1-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 6 and 15) and check the correct result for the multiplication operation (90). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_041.png\" alt=\"\" class=\"wp-image-935\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_041.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_041-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Repeat the section &#8220;Compile, Save and Publish your OPC Router Project Configuration with MQTT and a Calculator&#8221; to apply changes.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Publish and subscribe to the same MQTT data to test our second calculation:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$ mosquitto_pub -h 192.168.1.188 -t \"vsd_motor_p\" -m 15 -d<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"225\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034.png\" alt=\"\" class=\"wp-image-922\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034.png 770w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034-300x88.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_034-768x224.png 768w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"334\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_042.png\" alt=\"\" class=\"wp-image-938\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_042.png 881w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_042-300x114.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_042-768x291.png 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result (6 * 15 = 90).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Division\"><\/span>Division<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Type <strong>A\/B<\/strong> in the &#8220;Formula&#8221; field and press the &#8220;Test&#8221; button to start checking:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_043.png\" alt=\"\" class=\"wp-image-939\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_043.png 480w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_043-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 6 and 15) and check the correct result for the division operation (0.4). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_044.png\" alt=\"\" class=\"wp-image-941\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_044.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_044-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Repeat the section &#8220;Compile, Save and Publish your OPC Router Project Configuration with MQTT and a Calculator&#8221; to apply changes.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Publish and subscribe to the same MQTT data to test our third calculation:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$ mosquitto_pub -h 192.168.1.188 -t \"vsd_motor_p\" -m 15 -d<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"334\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_045.png\" alt=\"\" class=\"wp-image-943\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_045.png 886w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_045-300x113.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_045-768x290.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result (6 \/ 15 = 0.4).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Average\"><\/span>Average<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Press the &#8220;Further&#8221; button, select <strong>AVERAGE<\/strong> and press the &#8220;OK&#8221; button:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"525\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_046.png\" alt=\"\" class=\"wp-image-955\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_046.png 953w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_046-300x165.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_046-768x423.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to type <strong>AVERAGE(A,B)<\/strong> in the &#8220;Formula&#8221; field and press the &#8220;Test&#8221; button to start checking:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"479\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_047.png\" alt=\"\" class=\"wp-image-945\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_047.png 479w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_047-254x300.png 254w\" sizes=\"auto, (max-width: 479px) 100vw, 479px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 6 and 15) and check the correct result for the average operation (10.5). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_048.png\" alt=\"\" class=\"wp-image-946\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_048.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_048-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Compile, save, publish and subscribe to the same MQTT data.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"334\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_049.png\" alt=\"\" class=\"wp-image-947\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_049.png 884w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_049-300x113.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_049-768x290.png 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result ((6 + 15) \/ 2 = 10.5).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Concatenate\"><\/span>Concatenate<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Press the &#8220;Further&#8221; button, select <strong>CONCATENATE<\/strong> and press the &#8220;OK&#8221; button:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"525\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_050.png\" alt=\"\" class=\"wp-image-949\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_050.png 953w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_050-300x165.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_050-768x423.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to type <strong>CONCATENATE(A,B)<\/strong> in the &#8220;Formula&#8221; field and press the &#8220;Test&#8221; button to start checking:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"566\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_051.png\" alt=\"\" class=\"wp-image-950\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_051.png 480w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_051-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 6 and 15) and check the correct result for the concatenation operation (615). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_053.png\" alt=\"\" class=\"wp-image-951\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_053.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_053-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Compile, save, publish and subscribe to the same MQTT data.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"332\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_054.png\" alt=\"\" class=\"wp-image-953\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_054.png 887w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_054-300x112.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_054-768x287.png 768w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result (615).<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conditional\"><\/span>Conditional<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Press the &#8220;Further&#8221; button, select <strong>IF<\/strong> and press the &#8220;OK&#8221; button:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"525\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_055.png\" alt=\"\" class=\"wp-image-957\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_055.png 953w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_055-300x165.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_055-768x423.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Acknowlege that you need three parts: a logical test (i.e. A greater than B or A &gt; B), a value if the logical test is <em>True<\/em> (i.e. 100) and a value if the logical test is <em>False<\/em> (i.e. -100).<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure to type <strong>IF(A&gt;B,100,-100)<\/strong> in the &#8220;Formula&#8221; field and press the &#8220;Test&#8221; button to start checking:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"567\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_056.png\" alt=\"\" class=\"wp-image-960\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_056.png 480w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_056-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter any placeholder values (for instance, 6 and 15) and check the correct result for the conditional operation (-100 or logical test is <em>False<\/em> because A is not greater than B). Finally, press the &#8220;OK&#8221; button twice to save changes and close the window.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"363\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_057.png\" alt=\"\" class=\"wp-image-962\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_057.png 556w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_057-300x196.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Compile, save, publish and subscribe to the same MQTT data.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"334\" src=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_058.png\" alt=\"\" class=\"wp-image-964\" srcset=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_058.png 884w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_058-300x113.png 300w, https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_058-768x290.png 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Notice the expected result (-100).<\/li><\/ul>\n\n\n\n<p>Did you enjoy this OPC Router tutorial with a Calculator? I&#8217;d love to hear from you.<\/p>\n\n\n\n<p>Stay tuned and follow part 5 of this tutorial! \ud83d\ude0e<\/p>\n\n\n\n<p>For other articles like this one in English, click <a href=\"https:\/\/joseamaita.com\/en\/blog\/\">here<\/a>. To see them in Spanish, click <a href=\"https:\/\/joseamaita.com\/blog\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following the third part of the OPC Router tutorial, I&#8217;m presenting how to perform multiple calculations using the &#8220;Calculator&#8221; object. Remember, we&#8217;re configuring and running a project for \u201cPap\u00edn\u201d, a fictional potato bread factory. Why an OPC Router tutorial with a Calculator? Because &#8220;learning by doing&#8221; with examples is fun. Also, this particular functionality can&hellip;&nbsp;<a href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">OPC Router Tutorial Calculator<\/span><\/a><\/p>\n<div class='heateor_sss_sharing_container heateor_sss_vertical_sharing heateor_sss_bottom_sharing' style='width:44px;left: -10px;top: 100px;-webkit-box-shadow:none;box-shadow:none;' data-heateor-sss-href='https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617'><div class=\"heateor_sss_sharing_ul\"><a aria-label=\"Facebook\" class=\"heateor_sss_facebook\" href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617\" title=\"Facebook\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#0765FE;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path fill=\"#fff\" d=\"M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z\"><\/path><\/svg><\/span><\/a><a aria-label=\"Twitter\" class=\"heateor_sss_button_twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?text=joseamaita.com%20-%20The%20place%20where%20I%20make%20things%20happen.&url=https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617\" title=\"Twitter\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_twitter\" style=\"background-color:#55acee;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-4 -4 39 39\"><path d=\"M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Linkedin\" class=\"heateor_sss_button_linkedin\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617\" title=\"Linkedin\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_linkedin\" style=\"background-color:#0077b5;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path d=\"M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Whatsapp\" class=\"heateor_sss_whatsapp\" href=\"https:\/\/api.whatsapp.com\/send?text=joseamaita.com%20-%20The%20place%20where%20I%20make%20things%20happen.%20https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617\" title=\"Whatsapp\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#55eb4c;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-6 -5 40 40\"><path class=\"heateor_sss_svg_stroke heateor_sss_no_fill\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\" d=\"M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046\"><\/path><path d=\"M 7 19 l -1 6 l 6 -1\" class=\"heateor_sss_no_fill heateor_sss_svg_stroke\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\"><\/path><path d=\"M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Telegram\" class=\"heateor_sss_button_telegram\" href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617&text=joseamaita.com%20-%20The%20place%20where%20I%20make%20things%20happen.\" title=\"Telegram\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_telegram\" style=\"background-color:#3da5f1;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path fill=\"#fff\" d=\"M25.515 6.896L6.027 14.41c-1.33.534-1.322 1.276-.243 1.606l5 1.56 1.72 5.66c.226.625.115.873.77.873.506 0 .73-.235 1.012-.51l2.43-2.363 5.056 3.734c.93.514 1.602.25 1.834-.863l3.32-15.638c.338-1.363-.52-1.98-1.41-1.577z\"><\/path><\/svg><\/span><\/a><a aria-label=\"Reddit\" class=\"heateor_sss_button_reddit\" href=\"https:\/\/reddit.com\/submit?url=https%3A%2F%2Fjoseamaita.com%2Fen%2Fwp-json%2Fwp%2Fv2%2Fposts%2F617&title=joseamaita.com%20-%20The%20place%20where%20I%20make%20things%20happen.\" title=\"Reddit\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_reddit\" style=\"background-color:#ff5700;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-3.5 -3.5 39 39\"><path d=\"M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z\" fill=\"#fff\"\/><\/svg><\/span><\/a><a class=\"heateor_sss_more\" aria-label=\"More\" title=\"More\" rel=\"nofollow noopener\" style=\"font-size: 32px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;\" href=\"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617\" onclick=\"event.preventDefault()\"><span class=\"heateor_sss_svg\" style=\"background-color:#ee8e2d;width:40px;height:40px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;\" onclick=\"heateorSssMoreSharingPopup(this, 'https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617', 'joseamaita.com%20-%20The%20place%20where%20I%20make%20things%20happen.', '' )\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" viewBox=\"-.3 0 32 32\" version=\"1.1\" width=\"100%\" height=\"100%\" style=\"display:block;\" xml:space=\"preserve\"><g><path fill=\"#fff\" d=\"M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z\" fill-rule=\"evenodd\"><\/path><\/g><\/svg><\/span><\/a><\/div><div class=\"heateorSssClear\"><\/div><\/div>","protected":false},"author":1,"featured_media":850,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[17,5,3,29,22],"tags":[24,25,31,23,32],"class_list":["post-617","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-transfer","category-english","category-industrial-automation","category-mqtt","category-opc-router","tag-data-transfer","tag-industrial-automation","tag-mqtt","tag-opc-router","tag-raspberry-pi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OPC Router Tutorial Calculator - joseamaita.com<\/title>\n<meta name=\"description\" content=\"Following the third part of the OPC Router tutorial, I&#039;m presenting how to perform multiple calculations using the &quot;Calculator&quot; object.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OPC Router Tutorial Calculator - joseamaita.com\" \/>\n<meta property=\"og:description\" content=\"Following the third part of the OPC Router tutorial, I&#039;m presenting how to perform multiple calculations using the &quot;Calculator&quot; object.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"joseamaita.com\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-16T09:08:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-16T14:29:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png\" \/>\n\t<meta property=\"og:image:width\" content=\"335\" \/>\n\t<meta property=\"og:image:height\" content=\"367\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jos\u00e9 Alberto Maita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jos\u00e9 Alberto Maita\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\"},\"author\":{\"name\":\"Jos\u00e9 Alberto Maita\",\"@id\":\"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4\"},\"headline\":\"OPC Router Tutorial Calculator\",\"datePublished\":\"2023-08-16T09:08:00+00:00\",\"dateModified\":\"2023-08-16T14:29:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\"},\"wordCount\":1263,\"image\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png\",\"keywords\":[\"Data Transfer\",\"Industrial Automation\",\"MQTT\",\"OPC Router\",\"Raspberry Pi\"],\"articleSection\":[\"Data Transfer\",\"English\",\"Industrial Automation\",\"MQTT\",\"OPC Router\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\",\"url\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\",\"name\":\"OPC Router Tutorial Calculator - joseamaita.com\",\"isPartOf\":{\"@id\":\"https:\/\/joseamaita.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png\",\"datePublished\":\"2023-08-16T09:08:00+00:00\",\"dateModified\":\"2023-08-16T14:29:53+00:00\",\"author\":{\"@id\":\"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4\"},\"description\":\"Following the third part of the OPC Router tutorial, I'm presenting how to perform multiple calculations using the \\\"Calculator\\\" object.\",\"breadcrumb\":{\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage\",\"url\":\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png\",\"contentUrl\":\"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png\",\"width\":335,\"height\":367},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/joseamaita.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OPC Router Tutorial Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/joseamaita.com\/en\/#website\",\"url\":\"https:\/\/joseamaita.com\/en\/\",\"name\":\"joseamaita.com\",\"description\":\"The place where I make things happen.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/joseamaita.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4\",\"name\":\"Jos\u00e9 Alberto Maita\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/joseamaita.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dfc4d3fa06e5fa2aee2ef3834715e1b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dfc4d3fa06e5fa2aee2ef3834715e1b8?s=96&d=mm&r=g\",\"caption\":\"Jos\u00e9 Alberto Maita\"},\"url\":\"https:\/\/joseamaita.com\/en\/author\/joseamaita\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OPC Router Tutorial Calculator - joseamaita.com","description":"Following the third part of the OPC Router tutorial, I'm presenting how to perform multiple calculations using the \"Calculator\" object.","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:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/","og_locale":"en_US","og_type":"article","og_title":"OPC Router Tutorial Calculator - joseamaita.com","og_description":"Following the third part of the OPC Router tutorial, I'm presenting how to perform multiple calculations using the \"Calculator\" object.","og_url":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/","og_site_name":"joseamaita.com","article_published_time":"2023-08-16T09:08:00+00:00","article_modified_time":"2023-08-16T14:29:53+00:00","og_image":[{"width":335,"height":367,"url":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","type":"image\/png"}],"author":"Jos\u00e9 Alberto Maita","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jos\u00e9 Alberto Maita","Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#article","isPartOf":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/"},"author":{"name":"Jos\u00e9 Alberto Maita","@id":"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4"},"headline":"OPC Router Tutorial Calculator","datePublished":"2023-08-16T09:08:00+00:00","dateModified":"2023-08-16T14:29:53+00:00","mainEntityOfPage":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/"},"wordCount":1263,"image":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage"},"thumbnailUrl":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","keywords":["Data Transfer","Industrial Automation","MQTT","OPC Router","Raspberry Pi"],"articleSection":["Data Transfer","English","Industrial Automation","MQTT","OPC Router"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/","url":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/","name":"OPC Router Tutorial Calculator - joseamaita.com","isPartOf":{"@id":"https:\/\/joseamaita.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage"},"image":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage"},"thumbnailUrl":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","datePublished":"2023-08-16T09:08:00+00:00","dateModified":"2023-08-16T14:29:53+00:00","author":{"@id":"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4"},"description":"Following the third part of the OPC Router tutorial, I'm presenting how to perform multiple calculations using the \"Calculator\" object.","breadcrumb":{"@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#primaryimage","url":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","contentUrl":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","width":335,"height":367},{"@type":"BreadcrumbList","@id":"https:\/\/joseamaita.com\/en\/opc-router-tutorial-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/joseamaita.com\/en\/"},{"@type":"ListItem","position":2,"name":"OPC Router Tutorial Calculator"}]},{"@type":"WebSite","@id":"https:\/\/joseamaita.com\/en\/#website","url":"https:\/\/joseamaita.com\/en\/","name":"joseamaita.com","description":"The place where I make things happen.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/joseamaita.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/joseamaita.com\/en\/#\/schema\/person\/b53d49d3ddf8f348fed0d484b541b1a4","name":"Jos\u00e9 Alberto Maita","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joseamaita.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dfc4d3fa06e5fa2aee2ef3834715e1b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dfc4d3fa06e5fa2aee2ef3834715e1b8?s=96&d=mm&r=g","caption":"Jos\u00e9 Alberto Maita"},"url":"https:\/\/joseamaita.com\/en\/author\/joseamaita\/"}]}},"jetpack_featured_media_url":"https:\/\/joseamaita.com\/en\/wp-content\/uploads\/sites\/2\/2022\/06\/img_p_09_002.png","_links":{"self":[{"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/comments?post=617"}],"version-history":[{"count":77,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617\/revisions"}],"predecessor-version":[{"id":2817,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/posts\/617\/revisions\/2817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/media\/850"}],"wp:attachment":[{"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/media?parent=617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/categories?post=617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joseamaita.com\/en\/wp-json\/wp\/v2\/tags?post=617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}