Development, begins together.
Banner alanı
IFM Sensor

Comparison of MQTT and OPC UA Protocols from an OEM Perspective

Erkan Teskancan

Kurumsal
  • OLM MUH
  • MQTT_OPCUA_1.jpg

    ## Comparison of MQTT and OPC UA Protocols from an OEM Perspective

    Although MQTT and OPC UA protocols offer different approaches, their fundamental purpose is the same: to transfer data from one device to another. The choice of method depends on understanding how each protocol works.

    In modern factories, machines generate data such as production counts, product test values, and machine efficiency. This data is transferred from machines to servers or cloud systems for the evaluation of key performance indicators (KPIs) and metrics.

    The data transmission method is usually determined by customer demands or application requirements. Before building the factory of the future, the choice of which protocol to use, or a combination of both, must be made, and the advantages and disadvantages of both protocols should be examined from the perspective of a control software designer.

    ### MQTT Protocol

    MQTT is a popular Internet of Things (IoT) messaging protocol originally developed for data transmission via satellite. It was developed by Andy Stanford-Clark and Arlen Nipper to send sensor data from oil pipelines to control facilities. The protocol is designed to be lightweight, with low power consumption and the ability to handle intermittent connections.

    ### OPC UA Protocol

    OPC UA is an industrial communication standard based on Microsoft's Object Linking and Embedding (OLE) technology. It was adapted for the automation sector by the OPC Foundation and developed as a platform-independent, security-enhanced, and scalable protocol.

    ### How the Protocols Work

    MQTT transmits small amounts of data using a publish/subscribe (pub/sub) model. Devices publish data to specific topics, and clients subscribe to these topics. Data can be published, queued, or overwritten as frequently as desired. The MQTT system is effective in situations where the connection is unreliable or in applications where web browsers are clients.

    MQTT_OPCUA_2.jpg

    OPC UA, on the other hand, provides direct access to the machine's internal variables, allowing real-time data reading and variable browsing. It is specifically designed for automation and is supported by most PLCs, although it may require a license. OPC UA can operate in client/server or pub/sub models and offers advanced security controls.

    ### MQTT and OPC UA Use Cases

    MQTT is fast and reliable for small data packets, but it is not natively supported by many control systems; it requires an additional card or gateway. OPC UA is preferred for live and large data streams, is internally supported by most control systems, but requires a robust network connection.

    ### Considerations for Protocol Selection

    When developing automation equipment, customer demands are guiding. Existing communication technologies can be used, or new solutions can be preferred. Factors such as data volume, real-time requirements, and data transfer to the cloud influence the decision-making process. My personal preference is OPC UA because it provides easy access to real-time data and simplifies sending data to the control system. For cloud integration, MQTT is directly compatible with services like AWS.

    In both protocols, data should be kept organized and as compact as possible, and processing costs should be considered when transferring data to the cloud.

    ### MQTT and OPC UA Features

    • MQTT provides fast and low power consumption for small data packets.
    • MQTT uses a publish/subscribe model and is resilient to connection interruptions.
    • OPC UA offers real-time data access and direct control over machine variables.
    • OPC UA is platform-independent and has advanced security features.
    • MQTT is not directly supported by most control systems, while OPC UA is mostly built-in.
    • OPC UA is more complex and may require a license.
    • MQTT facilitates integration with cloud systems (such as AWS).

    This guide aims to assist industry professionals in understanding the protocols and choosing the most suitable solution.

    MQTT_OPCUA_3.jpg
     
    Back
    Top