{"id":22330,"date":"2019-01-10T12:02:59","date_gmt":"2019-01-10T12:02:59","guid":{"rendered":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs-2\/"},"modified":"2025-12-23T10:21:47","modified_gmt":"2025-12-23T15:21:47","slug":"dmc-writes-a-custom-mqtt-driver-for-siemens-plcs","status":"publish","type":"post","link":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/","title":{"rendered":"DMC Writes a Custom MQTT Driver for Siemens PLCs"},"content":{"rendered":"\n<p>DMC has found that more of our customers need their PLCs in remote locations to be able to not only report data to a central server&nbsp;but also be capable of accepting commands from the central server.<\/p>\n\n\n\n<p>If this sounds a lot like the Internet of Things, that\u2019s because it is. Only instead of the more common \u201cthings\u201d such as light bulbs or thermostats, DMC is connecting large industrial equipment.<\/p>\n\n\n\n<p><i><img decoding=\"async\" alt=\"The PLC library only requires a few blocks to get up and running with MQTT communication\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160745\/TIA-Portal-project-with-MQTT-driver-1.png\"><br>\nThe PLC library only requires a few blocks to get up and running with MQTT communication.<\/i><\/p>\n\n\n\n<p>While DMC\u2019s <a href=\"https:\/\/www.dmcinfo.com\/services\/embedded-development-and-embedded-programming\">embedded <\/a>and <a href=\"https:\/\/www.dmcinfo.com\/services\/application-development\">application development<\/a> service groups have been providing IoT solutions, industrial controllers have been slightly slower to adapt to the latest IoT trends. PLCs are normally only performing local communication and do not implement common IoT communication protocols. DMC has found the <a href=\"http:\/\/mqtt.org\/\">MQTT<\/a> protocol is one of the widely adopted IoT communication protocols, and it is a lightweight protocol making it easier to implement on a PLC.<\/p>\n\n\n\n<p>Fortunately, DMC had already written an MQTT driver for Siemens PLCs and even presented it at the <a href=\"https:\/\/www.dmcinfo.com\/latest-thinking\/blog\/id\/9411\/2017-siemens-automation-summit-to-feature-5-dmc-presentations\">2017 Siemens Automation Summit<\/a>. Unfortunately, the driver could only push data from the PLC to a server. There are gateways out there that can be purchased to act as a gateway from a PLC to a remote server, but it would be better to have an integrated library to save on hardware costs and control cabinet space.&nbsp;We had a project that required two-way communication, so I have extended the driver to support communication from the server to the PLC. This driver will serialize any structure in a PLC data block and send it to the server as a raw byte array.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">Structured Text<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ MQTT communication control driver\n#MQTT(sInClientID := 'ClientID',\n      sInUserName := 'UserName',\n             sInPassword := '12345',\n             TCON_Param := \"MQTT_TCON_Param\",\n             ERROR_MQTT := #MQTT_Errors);\n\n       \n \/\/ Serialize message Structure to be sent\n       \"fcMQTT_SerializeMessageRaw\"(sInSerial:='PLC Serial Number or Other Identifier',\n                                    sInTopic:='Server MQTT Topic',\n                             sInVersion:='v1', \/\/If you have your server running multiple sets of the same topic\n                             iInQoS:=0,\n                             Message:=\"dbMQTT_Data\".ConfigData,\n                             bOutMessageSerialized=>#bTemp); \/\/Turns true when message has entered queue\n\n\/\/Subscribe to message and send to DB\n\"fcMQTT_DeserializeMessageSubscribe\"(sInTopic:='Server MQTT Topic',\n                                     iInQoS:=0,\n                                     iInBufferIndex:=0, \/\/Must be unique for incoming topics\n                                     sInSerial:='PLC Serial Number or Other Identifier',\n                                     sInVersion:='v1',\n                                     Message=>\"dbMQTT_Data\".TestTopic,\n                                     bOutNewMessage=>#bTemp); \/\/Turns true when a new message has been received<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A9955\">\/\/ MQTT communication control driver<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">#MQTT(sInClientID := <\/span><span style=\"color: #CE9178\">&#39;ClientID&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      sInUserName := <\/span><span style=\"color: #CE9178\">&#39;UserName&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">             sInPassword := <\/span><span style=\"color: #CE9178\">&#39;12345&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">             TCON_Param := &quot;MQTT_TCON_Param&quot;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">             ERROR_MQTT := #MQTT_Errors);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #6A9955\">\/\/ Serialize message Structure to be sent<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       &quot;fcMQTT_SerializeMessageRaw&quot;(sInSerial:=<\/span><span style=\"color: #CE9178\">&#39;PLC Serial Number or Other Identifier&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                    sInTopic:=<\/span><span style=\"color: #CE9178\">&#39;Server MQTT Topic&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                             sInVersion:=<\/span><span style=\"color: #CE9178\">&#39;v1&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #6A9955\">\/\/If you have your server running multiple sets of the same topic<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                             iInQoS:=<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                             Message:=&quot;dbMQTT_Data&quot;.ConfigData,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                             bOutMessageSerialized=&gt;#bTemp); <\/span><span style=\"color: #6A9955\">\/\/Turns true when message has entered queue<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/Subscribe to message and send to DB<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">&quot;fcMQTT_DeserializeMessageSubscribe&quot;(sInTopic:=<\/span><span style=\"color: #CE9178\">&#39;Server MQTT Topic&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     iInQoS:=<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     iInBufferIndex:=<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #6A9955\">\/\/Must be unique for incoming topics<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     sInSerial:=<\/span><span style=\"color: #CE9178\">&#39;PLC Serial Number or Other Identifier&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     sInVersion:=<\/span><span style=\"color: #CE9178\">&#39;v1&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     Message=&gt;&quot;dbMQTT_Data&quot;.TestTopic,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                     bOutNewMessage=&gt;#bTemp); <\/span><span style=\"color: #6A9955\">\/\/Turns true when a new message has been received<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><i>Only a few functions and function blocks are needed to get up and running with MQTT communication on a Siemens PLC.<\/i><\/p>\n\n\n\n<p>We have used this driver for a few projects already, and it has proven to be robust enough to deploy into the field. The driver has been able to communicate with applications running on both <a href=\"https:\/\/aws.amazon.com\/\">Amazon Web Services<\/a> and <a href=\"https:\/\/azure.microsoft.com\/en-us\/\">Microsoft Azure<\/a>.<\/p>\n\n\n\n<p><i><img decoding=\"async\" alt=\"MQTT can now be used with a Siemens PLC for communication to Amazon Web Services and Microsoft Azure\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Mqtt-siemens-azure-aws-1.png\"><br>\nMQTT can now be used with a Siemens PLC for communication to Amazon Web Services and Microsoft Azure.<\/i><\/p>\n\n\n\n<p>The driver is available at&nbsp;<a href=\"https:\/\/github.com\/jcondonDMC\/SiemensMQTT\">https:\/\/github.com\/jcondonDMC\/SiemensMQTT<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-features\">Features<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Establishes unencrypted MQTT connection on port 1883 (can be configured for other ports)<\/li>\n\n\n\n<li>No limit on the number of MQTT publish topics\n \n \n<ol class=\"wp-block-list\" type=\"a\">\r\n  \n\n<li>Supports QoS 0 &amp; 1<\/li>\n\n\r\n <\/ol>\n<\/li>\n\n\n\n<li>Supports subscribing to 10 server topics\n \n \n<ol class=\"wp-block-list\" type=\"a\">\r\n  \n\n<li>Supports QoS 0 &amp; 1<\/li>\n\n\r\n <\/ol>\n<\/li>\n\n\n\n<li>Can be used on S7-1200 and S7-1500 PLCs<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-future-updates\">Future Updates<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Optimize memory management of incoming topics<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Having this library enables DMC (and other users) to connect their existing Siemens PLCs to the Internet of Things without the need for additional hardware.<\/p>\n\n\n\n<p>Learn more about DMC&#8217;s <a href=\"https:\/\/www.dmcinfo.com\/services\/manufacturing-automation-and-intelligence\">Manufacturing Automation and Intelligence<\/a> services.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DMC has found that more of our customers need their PLCs in remote locations to be able to not only report data to a central server&nbsp;but also be capable of accepting commands from the central server. If this sounds a lot like the Internet of Things, that\u2019s because it is. Only instead of the more [&hellip;]<\/p>\n","protected":false},"author":135,"featured_media":22331,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[731,732,757],"tags":[],"class_list":["post-22330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-manufacturing-automation-intelligence","category-plc","category-siemens-plc"],"yoast_head":"<title>DMC Writes a Custom MQTT Driver for Siemens PLCs | DMC, Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DMC Writes a Custom MQTT Driver for Siemens PLCs\" \/>\n<meta property=\"og:description\" content=\"DMC has found that more of our customers need their PLCs in remote locations to be able to not only report data to a central server&nbsp;but also be capable of accepting commands from the central server. If this sounds a lot like the Internet of Things, that\u2019s because it is. Only instead of the more [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\" \/>\n<meta property=\"og:site_name\" content=\"DMC, Inc.\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-10T12:02:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-23T15:21:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png\" \/>\n\t<meta property=\"og:image:width\" content=\"230\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"James Condon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Condon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\"},\"author\":{\"name\":\"James Condon\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/ca4961876b0bb5fd7df77ebad9595a1a\"},\"headline\":\"DMC Writes a Custom MQTT Driver for Siemens PLCs\",\"datePublished\":\"2019-01-10T12:02:59+00:00\",\"dateModified\":\"2025-12-23T15:21:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\"},\"wordCount\":468,\"publisher\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png\",\"articleSection\":[\"Manufacturing Automation &amp; Intelligence\",\"PLC\",\"Siemens PLC\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\",\"url\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\",\"name\":\"DMC Writes a Custom MQTT Driver for Siemens PLCs | DMC, Inc.\",\"isPartOf\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png\",\"datePublished\":\"2019-01-10T12:02:59+00:00\",\"dateModified\":\"2025-12-23T15:21:47+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png\",\"width\":230,\"height\":230,\"caption\":\"Custom MQTT For Siemens Thumbnail\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dmcinfo.com\/#website\",\"url\":\"https:\/\/www.dmcinfo.com\/\",\"name\":\"DMC, Inc.\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dmcinfo.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\",\"name\":\"DMC, Inc.\",\"url\":\"https:\/\/www.dmcinfo.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png\",\"width\":418,\"height\":167,\"caption\":\"DMC, Inc.\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929\",\"https:\/\/www.instagram.com\/dmcengineering\",\"https:\/\/www.youtube.com\/DMCEngineering\",\"https:\/\/www.linkedin.com\/company\/dmc-engineering\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/ca4961876b0bb5fd7df77ebad9595a1a\",\"name\":\"James Condon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.dmcinfo.com\/wp-content\/uploads\/wpo365\/profile-images\/135.png\",\"contentUrl\":\"\/\/www.dmcinfo.com\/wp-content\/uploads\/wpo365\/profile-images\/135.png\",\"caption\":\"James Condon\"},\"url\":\"https:\/\/www.dmcinfo.com\/blog\/author\/jamesc\/\"}]}<\/script>","yoast_head_json":{"title":"DMC Writes a Custom MQTT Driver for Siemens PLCs | DMC, Inc.","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:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/","og_locale":"en_US","og_type":"article","og_title":"DMC Writes a Custom MQTT Driver for Siemens PLCs","og_description":"DMC has found that more of our customers need their PLCs in remote locations to be able to not only report data to a central server&nbsp;but also be capable of accepting commands from the central server. If this sounds a lot like the Internet of Things, that\u2019s because it is. Only instead of the more [&hellip;]","og_url":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/","og_site_name":"DMC, Inc.","article_publisher":"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929","article_published_time":"2019-01-10T12:02:59+00:00","article_modified_time":"2025-12-23T15:21:47+00:00","og_image":[{"width":230,"height":230,"url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png","type":"image\/png"}],"author":"James Condon","twitter_card":"summary_large_image","twitter_misc":{"Written by":"James Condon","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#article","isPartOf":{"@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/"},"author":{"name":"James Condon","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/ca4961876b0bb5fd7df77ebad9595a1a"},"headline":"DMC Writes a Custom MQTT Driver for Siemens PLCs","datePublished":"2019-01-10T12:02:59+00:00","dateModified":"2025-12-23T15:21:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/"},"wordCount":468,"publisher":{"@id":"https:\/\/www.dmcinfo.com\/#organization"},"image":{"@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png","articleSection":["Manufacturing Automation &amp; Intelligence","PLC","Siemens PLC"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/","url":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/","name":"DMC Writes a Custom MQTT Driver for Siemens PLCs | DMC, Inc.","isPartOf":{"@id":"https:\/\/www.dmcinfo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage"},"image":{"@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png","datePublished":"2019-01-10T12:02:59+00:00","dateModified":"2025-12-23T15:21:47+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/blog\/22330\/dmc-writes-a-custom-mqtt-driver-for-siemens-plcs\/#primaryimage","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27160744\/Custom-MQTT-For-Siemens-Thumbnail.png","width":230,"height":230,"caption":"Custom MQTT For Siemens Thumbnail"},{"@type":"WebSite","@id":"https:\/\/www.dmcinfo.com\/#website","url":"https:\/\/www.dmcinfo.com\/","name":"DMC, Inc.","description":"","publisher":{"@id":"https:\/\/www.dmcinfo.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dmcinfo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dmcinfo.com\/#organization","name":"DMC, Inc.","url":"https:\/\/www.dmcinfo.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png","width":418,"height":167,"caption":"DMC, Inc."},"image":{"@id":"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929","https:\/\/www.instagram.com\/dmcengineering","https:\/\/www.youtube.com\/DMCEngineering","https:\/\/www.linkedin.com\/company\/dmc-engineering"]},{"@type":"Person","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/ca4961876b0bb5fd7df77ebad9595a1a","name":"James Condon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/image\/","url":"\/\/www.dmcinfo.com\/wp-content\/uploads\/wpo365\/profile-images\/135.png","contentUrl":"\/\/www.dmcinfo.com\/wp-content\/uploads\/wpo365\/profile-images\/135.png","caption":"James Condon"},"url":"https:\/\/www.dmcinfo.com\/blog\/author\/jamesc\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/22330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/users\/135"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/comments?post=22330"}],"version-history":[{"count":2,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/22330\/revisions"}],"predecessor-version":[{"id":39382,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/22330\/revisions\/39382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media\/22331"}],"wp:attachment":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media?parent=22330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/categories?post=22330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/tags?post=22330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}