Loading
FT-Optix | MQTT | Studio 5000 | IIoT

Using the MQTT protocol with FactoryTalk Optix, and Studio 5000

Application of the MQTT protocol with FT-Optix and Studio 5000 connecting to a Broker. - [Deploy Time: 60 Minutes]
Network representing data and IT concept. Generative AI
On this page:
  • What is this for?
  • Installation guide
Innovation Center Home Page
 

WHAT IS THIS FOR?

The MQTT (Message Queuing Telemetry Transport) protocol allows the transport and sending of messages via Publisher/subscription, it is based on the client/server model, extremely light, ideal for remote connectivity, sending data to the cloud with little code and minimal bandwidth. These principles make this protocol ideal for "Machine-to-Machine" (M2M) communications and for IoT (Internet of Things) and IIoT (Industrial Internet of Things) applications in order to facilitate the connection of devices, such as sensors, meters, industrial controllers, directly to the cloud.


Factory Talk Optix allows the implementation of applications using MQTT with the advantage of having a communication driver for Ethernet/IP network (among others) as a connection to industrial controllers.


In this note, we present the ways and demonstrate how easy it is to implement MQTT in FactoryTalk Optix, connecting with a CompactLogix automation controller (1769-L36ERM) and sending data via MQTT to a broker, allowing devices and controllers on the factory floor (machines and processes) to send data directly to the cloud.

Downloads

Please note: You will need to agree to the Terms & Conditions for each download.

Files for download ›
Legal Disclaimer Acceptance. ROCKWELL AUTOMATION WILL PROVIDE ACCESS TO ROCKWELL PRODUCTS (BEST PRACTICES, APPLICATIONS AND KNOWLEDGE) ON THE CONDITION THAT YOU ACCEPT AND COMPLY WITH THE FOLLOWING TERMS AND CONDITIONS. YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT BY DOWNLOADING, INSTALLING, COPYING, OR OTHERWISE USING PRODUCTS. IF YOU ARE ACCEPTING THESE TERMS ON BEHALF OF ANOTHER PERSON, COMPANY, OR OTHER LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE FULL AUTHORITY TO BIND THAT PERSON, COMPANY, OR LEGAL ENTITY TO THESE TERMS. IF YOU DO NOT AGREE TO THESE TERMS, DO NOT DOWNLOAD, INSTALL, COPY, ACCESS, OR USE THE PRODUCTS, SOFTWARE AND/OR CLOUD SERVICES. 1. Rockwell Automation retains full ownership and title to all Products and related documentation. No rights or licenses are granted other than those set forth in this Agreement. Company grants to Rockwell Automation a non-exclusive, worldwide, royalty-free, perpetual, non-revocable license to use any feedback Company provides regarding the Products, even if Company has designated the feedback as confidential. Rockwell Automation will be entitled to use the feedback without restriction or compensation to Company. 2. Company may not lease sub-lease, assign, license, sub-license or otherwise transfer any of the Products without the prior written consent of Rockwell Automation. Company may not assign or otherwise transfer access rights to the Products without the prior written consent of Rockwell Automation. Any reverse assembly, reverse engineering, decompilation, and creation of derivative works based on the Products by Company is prohibited. 3. Company acknowledges that Products provided under this Agreement are Rockwell Automation’s Confidential Information and are covered by effective or pending copyrights, patents, trademarks and/or trade secrets of Rockwell Automation, and Company agrees to maintain confidentiality by not disclosing Products or documentation to any third party without the prior written consent of Rockwell Automation and to protect the confidentiality of the Products as it would Company’s own confidential information. Company agrees that its obligation of confidentiality under this paragraph shall survive expiration or termination of this Agreement. 4. Company agrees that Products provided under this Agreement are prototypes and examples and its application and results may vary depending on each customer and project conditions. Rockwell Automation do not warranty the same results. This Agreement shall in no way be construed as a commitment by Rockwell Automation at any time to manufacture and/or offer Products for sale. There is no explicit or implicit service level agreement associated with using the Products. Rockwell Automation does not warrant that the functions contained in the Products will meet Company’s requirements. Company agrees to use all Products only in accordance with the instructions and only for the intended usages identified in the documentation. 5. EXCLUSION OF WARRANTIES AND LIMITATION OF LIABILITY. THE PRODUCTS ARE PROVIDED "AS IS". ROCKWELL AUTOMATION DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ROCKWELL AUTOMATION EXPLICITLY DISCLAIMS ALL WARRANTIES OF NON- INFRINGEMENT AND EXPRESSLY DOES NOT WARRANT THAT THE PRODUCTS, IN WHOLE OR IN PART, WILL BE ERROR FREE OR FREE FROM SECURITY VULNERABILITIES. IN NO EVENT SHALL ROCKWELL AUTOMATION BE LIABLE FOR (i) LOST PROFITS, LOST SAVINGS, DOWNTIME, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR (ii) ANY PERSONAL INJURY, PROPERTY DAMAGE OR ENVIRONMENTAL DAMAGE ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT, WHETHER IN AN ACTION IN CONTRACT, STRICT LIABILITY OR IN TORT INCLUDING NEGLIGENCE. 6. COMPANY AGREES TO INDEMNIFY AND HOLD ROCKWELL AUTOMATION HARMLESS FROM ALL COSTS, AWARDS, DAMAGES, EXPENSES AND FEES (INCLUDING ATTORNEYS FEES) RESULTING FROM OR RELATED TO ANY THIRD-PARTY CLAIMS (INCLUDING EMPLOYEES AND AGENTS OF COMPANY) AGAINST ROCKWELL AUTOMATION, ITS DISTRIBUTORS, AGENTS, OFFICERS, DIRECTORS OR EMPLOYEES FOR PERSONAL INJURY (INCLUDING DEATH), PROPERTY DAMAGE OR ENVIRONMENTAL DAMAGE RELATED TO OR RESULTING FROM THE USE OF THE PRODUCTS. 7. In the event a Product is exported, Company agrees to comply with all applicable United States Export Control Law and Regulations, and the applicable export control laws of other countries. This Agreement shall be governed by the laws of the state of Wisconsin. This Agreement is the complete and exclusive Agreement between Rockwell Automation and the Company, and supersedes all prior agreements, whether written or oral, relating to the Products.


Need Help?

If you need help with an application or have feedback from the Innovation Center, please contact us.

 
General_Images1
General_Images1
General_Images2
General_Images2
 
 

Useful links

  • MQTT: https://mqtt.org/
  • MQTT Software (Servers, Brokers, others): https://mqtt.org/software/
  • FactoryTalk Optix: https://www.rockwellautomation.com/pt-br/products/software/factorytalk/optix/try-it-now.html
  • FactoryTalk Hub: https://home.cloud.rockwellautomation.com
 

GENERAL CHARACTERISTICS

MQTT is a publish/subscribe protocol designed to connect IoT devices. Unlike the HTTP request/response paradigm, MQTT operates in an event-driven manner, allowing messages to be sent to clients. This architectural approach enables highly scalable solutions, decoupling data producers and consumers, eliminating dependencies between them. Two main components for establishing the MQTT connection for publishing and subscribing to messages are the MQTT Clients and the MQTT Broker.


More information about the MQTT protocol: https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt


FactoryTalk® Optix™ enables system developers to improve their processes, efficiency, and deliverables with a modern, cloud-enabled HMI platform that allows you to design, test, and deploy applications directly from a web browser – anytime, anywhere. This new open platform offers:

  • Design options: Create and test your designs in a modern, object-oriented programming environment.
  • Deployment options: Create your application program once and deploy it to any device.
  • Graphics options: Style your graphics to cater to a global audience and deliver a responsive experience.
  • Extensible options: Openness and interoperability through machine-to-machine and machine-to-cloud communications enabled by native OPC UA, MQTT, and IOT connectivity, with an open C# interface.
 

ADVANTAGES

  • Lightweight and efficient - MQTT clients are very small, require minimal resources, so they can be used in small microcontrollers. MQTT message headers are small to optimize network bandwidth.
  • Two-way communications - MQTT enables device-to-cloud and cloud-to-device messaging. This makes it easier to transmit messages to groups of things.
  • Reliable message delivery - Message delivery reliability is important for many IoT use cases. That's why MQTT has 3 defined quality of service levels: 0 - at most once, 1- at least once, 2 - exactly once.
  • Support for untrusted networks - Many IoT devices connect over untrusted cellular networks. MQTT support for persistent sessions reduces the time to reconnect the client with the broker
  • Safety Enabled - MQTT makes it easy to encrypt messages using TLS and authenticate clients using modern authentication protocols such as OAuth.

 

LIMITATIONS AND DISADVANTAGES

  • One of the disadvantages of using the MQTT protocol is that messages are not stored in the Broker.
  • Network dependency. It needs stable and constant connection for proper operation.

 
KNOWLEDGE

  • THEN Windows
  • MQTT – Concepts and fundamentals
  • FT-Optix – Basic Knowledge
  • Studio 5000 – Basic knowledge
  • Visual Studio C# - Basic Knowledge
 

IS THIS USEFUL TO ME?

  • Easy to implement
  • Easy to add new devices/clients in the architecture
  • Has security and encryption features (SSL/TLS)
  • Currently one of the easiest protocols to implement to transport IoT and IIoT telemetry data to the cloud

 

HOW CAN I MAKE IT WORK?
You will need the following software:

1 - FactoryTalk Optix Studio Free/Pro – latest version available - Download: https://www.rockwellautomation.com/pt-br/products/software/factorytalk/optix/try-it-now.html

Important: FactoryTalk Optix Studio uses C# as the backend language – NetLogic. We recommend installing Microsoft Visual Studio 2022 Community (after installing FT-Optix).

No FT-Optix menu, Options>>Optix Studio>>Preferred Code Editor (select Visual Studio) https://visualstudio.microsoft.com/pt-br/vs/community/

2 - MQTT.fx Broker - Download Option: https://mqttfx.jensd.de

Note: There are other sources to download this program

3 - FactoryTalk Studio 5000 Design Studio V30 or higher

Installation Guide

To implement, check the following steps.

 
  1. Step 01
  2. Step 02
  3. Step 03
  4. Step 04
Open All Close All
Step 01 Chevron DownChevron Down
 

Step 01 - Loading the base application (sample) from FactoryTalk Optix Help.

 
Chevron DownChevron Down
Step 02 Chevron DownChevron Down
 

Step 02 - Configuring FT-Optix Application for Communication with Studio 5000.

Chevron DownChevron Down
Step 03 Chevron DownChevron Down
 

Step 03 - Configuring FT-Optix Application for Publish/Subscribe.

Chevron DownChevron Down
Step 04 Chevron DownChevron Down
 

Step 04 - Setting up MQTT.fx Broker and testing the applications.

Chevron DownChevron Down
 

Using the MQTT protocol with FactoryTalk Optix, and Studio 5000

Version 1.0 - July 2024

Subscribe!

Receive new app releases and other news from the Innovation Center directly to your inbox.

I want to subscribe
  1. Chevron LeftChevron Left Rockwell Automation Home Chevron RightChevron Right
  2. Chevron LeftChevron Left Sup... Chevron RightChevron Right
  3. Chevron LeftChevron Left Pro... Chevron RightChevron Right
  4. Chevron LeftChevron Left Downloads Chevron RightChevron Right
  5. Chevron LeftChevron Left Innovation Center Chevron RightChevron Right
  6. Chevron LeftChevron Left Using the MQTT protocol with FactoryTalk Optix and Studio 5000 Chevron RightChevron Right
Please update your cookie preferences to continue.
This feature requires cookies to enhance your experience. Please update your preferences to allow for these cookies:
  • Social Media Cookies
  • Functional Cookies
  • Performance Cookies
  • Marketing Cookies
  • All Cookies
You can update your preferences at any time. For more information please see our {0} Privacy Policy
CloseClose