{"id":15133,"date":"2023-05-16T00:00:00","date_gmt":"2023-05-16T00:00:00","guid":{"rendered":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/"},"modified":"2025-07-03T14:11:24","modified_gmt":"2025-07-03T14:11:24","slug":"ni-crio-connection-to-azure-iot-hub","status":"publish","type":"our_work","link":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/","title":{"rendered":"NI-cRIO Connection to Azure IoT Hub"},"content":{"rendered":"\n<p>DMC developed a custom Python web app using FastAPI. FastAPI is a modern web framework for building APIs in Python. The APIs of the web app wrapped Microsoft\u2019s Azure IoT Hub SDK for Python. In the end, the web app exposed the following APIs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Send a message to the IoT hub (device to cloud messaging)<\/li>\n\n\n\n<li>Receive messages from the IoT hub (cloud to device messaging)<\/li>\n<\/ul>\n\n\n\n<p>The customer was seeking to improve their operations by connecting their field assets to the cloud. In the field, NI CompactRIO (cRIO) controllers were running a custom LabVIEW real-time app to control hardware and log data on the field equipment. The data was all there, but the data was distributed and only accessible from HMIs out in the field. They needed a simple solution to make their data actionable and viewable centrally.<\/p>\n\n\n\n<p>The web app\u2019s APIs were available to the LabVIEW app via LabVIEW\u2019s HTTP Client toolkit. When the LabVIEW app collected data, it simply made an HTTP request to the web app to send the message to the IoT hub. This limited changes and impact on the LabVIEW real-time app.<\/p>\n\n\n\n<p>Our customer\u2019s equipment is often in remote locations, so internet connectivity is not consistent. DMC built in a local caching implementation using SQLite. This allowed offline field devices to preserve messages without internet connection. With caching, the web app could also build larger messages, limiting the number of messages sent to the IoT hub. Azure IoT hub charges per message, so this is a cost-saving feature.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"634\" height=\"292\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2023\/05\/27152455\/image.png\" alt=\"Azure IoT Hub Diagram\" class=\"wp-image-32669\" srcset=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2023\/05\/27152455\/image.png 634w, https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2023\/05\/27152455\/image-300x138.png 300w\" sizes=\"(max-width: 634px) 100vw, 634px\" \/><\/figure>\n\n\n\n<p>The connection to Azure provided our customer with valuable insights into their field equipment. They can better schedule with live data, analyze failures, and perform preventative maintenance. The Azure IoT Hub provides a secure and scalable platform for aggregating and storing data and the web app. The Azure IoT Hub also enables many data analysis and visualization tools such as CosmosDB and PowerBI dashboards.<\/p>\n\n\n\n<p><strong>Learn more about DMC&#8217;s <a href=\"https:\/\/www.dmcinfo.com\/services\/test-and-measurement-automation\/labview-programming\/\" target=\"_blank\" rel=\"noreferrer noopener\">LabVIEW Programming<\/a> and <a href=\"https:\/\/www.dmcinfo.com\/contact\/\" target=\"_blank\" rel=\"noreferrer noopener\">contact us<\/a> today for your next project.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DMC developed a custom Python web app using FastAPI. FastAPI is a modern web framework for building APIs in Python. The APIs of the web app wrapped Microsoft\u2019s Azure IoT Hub SDK for Python. In the end, the web app exposed the following APIs: The customer was seeking to improve their operations by connecting their [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":15132,"template":"","meta":{"customer":"Halliburton","summary":"DMC developed a Python-based software solution to connect field devices to Azure IoT Hub.","description":"","customer_benefits":"<ul>\r\n <li>Secure<\/li>\r\n <li>Scalable<\/li>\r\n <li>Allowed for actionable and centrally viewable data<\/li>\r\n <li>Increased ability to build larger messages<\/li>\r\n <li>Limited the number of messages sent<\/li>\r\n <li>Cost efficient<\/li>\r\n <li>Better scheduling abilities<\/li>\r\n <li>Implemented preventative maintenance<\/li>\r\n<\/ul>","components_used":"<ul>\r\n <li><a href=\"https:\/\/www.ni.com\/docs\/en-US\/bundle\/labview-real-time-module\/page\/lvrthowto\/tutorial_creating_a_real_time_application.html\" target=\"_blank\">LabVIEW Real-Time Application<\/a><\/li>\r\n <li><a href=\"https:\/\/www.ni.com\/docs\/en-US\/bundle\/labview\/page\/lvcomm\/http_client.html\" target=\"_blank\">LabVIEW HTTP Client toolkit<\/a><\/li>\r\n <li><a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/iot\/?ef_id=_k_CjwKCAjw9pGjBhB-EiwAa5jl3H6IZIh4U2soHohby7zUL_F4BXINZztKk1iA2dcmZ_KGWAVqzc4YSBoC7jgQAvD_BwE_k_&amp;OCID=AIDcmm5edswduu_SEM__k_CjwKCAjw9pGjBhB-EiwAa5jl3H6IZIh4U2soHohby7zUL_F4BXINZztKk1iA2dcmZ_KGWAVqzc4YSBoC7jgQAvD_BwE_k_&amp;gad=1&amp;gclid=CjwKCAjw9pGjBhB-EiwAa5jl3H6IZIh4U2soHohby7zUL_F4BXINZztKk1iA2dcmZ_KGWAVqzc4YSBoC7jgQAvD_BwE\" target=\"_blank\">Microsoft Azure IoT Hub<\/a><\/li>\r\n<\/ul>","project":"Halliburton:cRIO Cloud Exploratory Phase","author":"Andy Corbato &amp; Christian Owen","notes":""},"work_category":[701,685,710,684],"class_list":["post-15133","our_work","type-our_work","status-publish","has-post-thumbnail","hentry","work_category-data-analysis-data-mining-and-reporting","work_category-labview","work_category-oil-and-gas-engineering","work_category-test-measurement-automation"],"yoast_head":"<title>NI-cRIO Connection to Azure IoT Hub | 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\/our-work\/ni-crio-connection-to-azure-iot-hub\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NI-cRIO Connection to Azure IoT Hub\" \/>\n<meta property=\"og:description\" content=\"DMC developed a custom Python web app using FastAPI. FastAPI is a modern web framework for building APIs in Python. The APIs of the web app wrapped Microsoft\u2019s Azure IoT Hub SDK for Python. In the end, the web app exposed the following APIs: The customer was seeking to improve their operations by connecting their [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/\" \/>\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:modified_time\" content=\"2025-07-03T14:11:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/\",\"url\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/\",\"name\":\"NI-cRIO Connection to Azure IoT Hub | DMC, Inc.\",\"isPartOf\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png\",\"datePublished\":\"2023-05-16T00:00:00+00:00\",\"dateModified\":\"2025-07-03T14:11:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png\",\"width\":1400,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Work\",\"item\":\"https:\/\/www.dmcinfo.com\/our-work\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NI-cRIO Connection to Azure IoT Hub\"}]},{\"@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\"]}]}<\/script>","yoast_head_json":{"title":"NI-cRIO Connection to Azure IoT Hub | 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\/our-work\/ni-crio-connection-to-azure-iot-hub\/","og_locale":"en_US","og_type":"article","og_title":"NI-cRIO Connection to Azure IoT Hub","og_description":"DMC developed a custom Python web app using FastAPI. FastAPI is a modern web framework for building APIs in Python. The APIs of the web app wrapped Microsoft\u2019s Azure IoT Hub SDK for Python. In the end, the web app exposed the following APIs: The customer was seeking to improve their operations by connecting their [&hellip;]","og_url":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/","og_site_name":"DMC, Inc.","article_publisher":"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929","article_modified_time":"2025-07-03T14:11:24+00:00","og_image":[{"width":1400,"height":500,"url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/","url":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/","name":"NI-cRIO Connection to Azure IoT Hub | DMC, Inc.","isPartOf":{"@id":"https:\/\/www.dmcinfo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage"},"image":{"@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png","datePublished":"2023-05-16T00:00:00+00:00","dateModified":"2025-07-03T14:11:24+00:00","breadcrumb":{"@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#primaryimage","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27165527\/unnamed-file-150.png","width":1400,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/www.dmcinfo.com\/our-work\/ni-crio-connection-to-azure-iot-hub\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Work","item":"https:\/\/www.dmcinfo.com\/our-work\/"},{"@type":"ListItem","position":2,"name":"NI-cRIO Connection to Azure IoT Hub"}]},{"@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"]}]}},"_links":{"self":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/our_work\/15133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/our_work"}],"about":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/types\/our_work"}],"author":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/users\/8"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media\/15132"}],"wp:attachment":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media?parent=15133"}],"wp:term":[{"taxonomy":"work_category","embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/work_category?post=15133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}