Hopp til hovedinnhold Hopp til søk Gå til hovednavigasjon

Fjernovervåking og IIoT

MQTT vs OPC UA: getting machine data into IT systems

How MQTT and OPC UA differ in communication model, data description and security, and which ICP DAS devices support each protocol.

MQTT vs OPC UA: getting machine data into IT systems
Foto: Brian Kostiuk · CC0 · Wikimedia Commons

Most automation projects eventually have to deliver machine data to systems outside the control network: a SCADA server, an MES, a database or a cloud platform. Two protocols dominate that task. This article compares MQTT vs OPC UA in practical terms: how each one communicates, how data is described and secured, and which systems typically receive it. It ends with an overview of ICP DAS devices that support one or both protocols.

Two different communication models

MQTT is a publish/subscribe protocol. Devices connect as clients to a central broker and publish messages to topics such as site1/line2/press4/temperature. Applications that subscribe to a topic receive its messages. Publishers and subscribers do not need to know about each other. The default ports are 1883 for plain TCP and 8883 for MQTT over TLS.

OPC UA is mostly used as client/server. The device or gateway runs an OPC UA server, and a client such as a SCADA system connects to it, browses the address space, reads and writes values and subscribes to changes. The default port is 4840. The specification also defines a publish/subscribe mode, but most installed servers and clients use client/server.

This matters for network design. With MQTT the field device opens the connection, which suits sites behind NAT or a firewall that only allows outgoing traffic. With OPC UA client/server, the client must be able to reach the server, so both are usually on the same network or connected through a VPN.

Information model versus payload

MQTT transports bytes. The protocol does not define what a message contains, so topic structure, payload format (often JSON), units and timestamps must be agreed between sender and receiver. Conventions such as Sparkplug B add a defined payload, but only if both sides support them.

OPC UA includes an information model. Each value is a node with a data type, a timestamp, a status code and optional attributes such as engineering unit and description. A client can browse the server to find out what is available, without a separate register list.

In practice, MQTT is quick to set up and flexible, but documenting topics and payloads is your job. OPC UA takes more configuration on both sides, but the data describes itself.

Security

MQTT relies on TLS for encryption, user name and password or client certificates for authentication, and access rules in the broker that control who may publish or subscribe to which topics. OPC UA has security built into the protocol: application certificates, the security modes None, Sign and SignAndEncrypt, and user authentication. In both cases the protection only works when it is configured. A broker on port 1883 without authentication, or an OPC UA endpoint with security mode None, is open to anyone who can reach it.

MQTT vs OPC UA at a glance

MQTTOPC UA
ModelPublish/subscribe through a brokerClient/server (PubSub optional)
Connection directionDevice connects out to the brokerClient connects to the server in the device
Default ports1883, 8883 (TLS)4840
Data descriptionTopics and payload defined by the userInformation model with types, units, timestamps and status
Delivery optionsQoS 0, 1 and 2, retained messages, last willSubscriptions with sampling and publishing intervals
Typical receiversBrokers, cloud IoT services, databases, IT applicationsSCADA, MES, historians, HMIs with an OPC UA client

Choosing for your project

  • Choose MQTT when many distributed devices send data to a central or cloud system, when sites connect over 4G or the Internet, or when IT already runs a broker.
  • Choose OPC UA when a SCADA, MES or historian on the plant network should read structured data through its OPC UA client.
  • Use both when the same data is needed on the plant floor and in IT. A communication server can serve OPC UA to SCADA and publish the same values to a broker.

Check what the receiving system supports before choosing field hardware. The receiver usually decides the protocol.

ICP DAS devices with MQTT and OPC UA

Both protocols in one device

The UA series communication servers (UA-2241M, UA-2841M, UA-5231M and UA-7231M) read data over Modbus TCP, Modbus RTU/ASCII, MQTT and EtherNet/IP and provide it through an OPC UA server, MQTT and SNMP at the same time. They include an MQTT broker, write data to databases such as MS SQL, MySQL and MariaDB with offline data recovery, and support HTTPS, an OpenVPN client and IP whitelists.

ICP DAS OPC UA I/O modules such as the U-7526M (AI, AO, DI and DO) and U-7544M (8 DI and 8 DO), combine built-in I/O with an OPC UA server and client, an MQTT client and a RESTful API that can run simultaneously. They have a two-port Ethernet switch, can be powered over PoE and support IF-THEN-ELSE rules.

MQTT at device level

  • WISE edge controllers such as WISE-5231M and WISE-2841M: MQTT client with publish, subscribe and SSL, plus Modbus TCP/RTU and SNMP.
  • WISE-75xxM I/O modules such as WISE-7526M: MQTT client (non-SSL) and Modbus TCP.
  • ET-2200 Ethernet I/O such as ET-2217: publishes I/O status, subscribes to topics and reconnects automatically.
  • ETS-7200 cybersecurity I/O such as ETS-7255: MQTT with optional TLS, Modbus TCP/TLS and HTTPS.
  • MQ-7200M modules such as MQ-7244M: MQTT 3.1 and Modbus TCP.
  • CL-200 data loggers such as CL-202-E for CO2, temperature and humidity: Modbus TCP and MQTT over Ethernet.

On the receiving side, BRK-2841M is a dedicated MQTT broker for MQTT 3.1, 3.1.1 and 5.0 with QoS, retained messages, last will, authentication, encryption and bridging. It writes to databases such as MySQL and buffers data on microSD during outages.

OPC UA in controllers

Win-GRAF PACs such as XP-9188-IoT and RPAC-2658M run IEC 61131-3 programs and include an OPC UA server, so control and data access are handled in one device.

Send us a description of your data sources and the receiving system, and our technical sales team will suggest a suitable combination.

Produkter for dette bruksområdet

PET-7017-10 CR
PET-7017-10 CR PET-7017-10 PoE Ethernet I/O Module, 10/20-ch Analog Input

The PET-7017-10 is a PoE-powered Ethernet analog input module for engineers who need voltage or current measurement on a networked I/O node. Its inputs can be set as 10 differential or 20 single-ended channels in software, and each channel can be given its own range, so one module can serve mixed sensor types on the same network.Each channel offers a choice of voltage ranges from ±150 mV to ±10 V and current ranges of ±20 mA, 0 ~ 20 mA and 4 ~ 20 mA, selected with jumpers. Resolution is 16-bit, and the module has two sampling modes: normal mode at 10 Hz total and fast mode at 50 Hz total. Open wire detection is available for 4 ~ 20 mA inputs, and differential channels are rated for 240 Vrms overvoltage protection.Configuration and monitoring are handled through a built-in web server with Web HMI, and the module supports Modbus TCP and Modbus UDP. Access is controlled by ID, password and IP filter. The unit is powered either from PoE (IEEE 802.3af, Class 1) or from a +12 ~ +48 VDC terminal block, and it mounts on a DIN rail.ApplicationsBuilding automationFactory automationMachine automationRemote maintenanceRemote diagnosisTesting equipment

Vanlig pris: 2 971,11 kr per stk. · mengderabatt fra 10 stk.
AR-200 CR
AR-200 CR AR-200 Accelerometer Data Logger, 2-ch IEPE Input

AR-200 CR is a dynamic signal acquisition module for vibration monitoring and analysis. It accepts two IEPE accelerometers, each supplied with a built-in 3 mA excitation current, and digitises the signals with a 16-bit converter. Sampling of both channels runs simultaneously, at rates up to 200 kHz per channel.Recordings are written to a Micro SD card, so data can be taken away and analysed offline. Capture can be started by a push button, a schedule, an analog threshold, a digital input or a remote command from the supplied utility on a host PC, which also lets you set the sampling rate and scheduling for each application. A single relay output and one digital input add basic event handling to the unit.The logger suits panel or machine installations that need to run unattended. It works from a wide +10 to +30 VDC supply, operates from -25 to +75 °C, and provides 4 kV contact ESD protection on all terminals. Mounting is by wall or DIN-rail.ApplicationsVibration monitoring and analysisIndustrial automationFactory automationProcess automation

Vanlig pris: 6 233,10 kr per stk. · mengderabatt fra 10 stk.
AR-400 CR
AR-400 CR AR-400 Accelerometer Data Logger, 4-ch IEPE Input

The AR-400 is a dynamic signal acquisition module for vibration monitoring and analysis. It samples four channels simultaneously with 16-bit resolution and supplies a built-in 3 mA excitation current for IEPE accelerometers, so compatible sensors can be connected directly without an external supply.Acquired data is written to a micro SDHC card (4 to 32 GB), allowing offline analysis after capture. Recording can be started by push button, schedule, analog threshold, digital input or remote trigger from the utility software installed on a host PC, which also handles sample rate and sampling schedule settings.Suited to condition monitoring setups where vibration data must be captured at defined times or on defined events.Includes a relay output (Form A, 5A@250 VAC) and a digital input for use within trigger or control logic.ApplicationsVibration monitoring and analysisIndustrial automationFactory automationProcess automation

Vanlig pris: 7 116,12 kr per stk. · mengderabatt fra 10 stk.
CA-LLD-DC100-L010
CA-LLD-DC100-L010 CA-LLD-DC100-L010 Liquid Leak Detection Cable, Without Position, 1 m

CA-LLD-DC100-L010 is a 1 m liquid leak detection cable for monitoring large areas where leaks may travel along an unpredictable route. Its sensing wires make it a practical choice for open floors and surfaces with several possible leak points, rather than a single fixed sensing spot.The cable has a 6 mm fluoropolymer carrier. Its sensing wires are 2 × 30 AWG, enclosed in a conductive fluoropolymer jacket. It can be fixed directly to water supply and return lines, so it can cover pipework as well as the surrounding floor area. The maximum continuous operating temperature is 70 °C.This ordering code is the without position variant, supplied in a 1 m length. It is RoHS and WEEE certified.ApplicationsLeak detection in open areasMonitoring water supply and return linesCovering larger surface areas with multiple potential leak points

Vanlig pris: 373,99 kr per stk. · mengderabatt fra 10 stk.

Mer om Fjernovervåking og IIoT

Trenger du hjelp til å velge?

Vi kjenner ICP DAS-sortimentet og hjelper deg med å finne riktig modul, tilbehør eller reservedel.

Kontakt teknisk salg

For bedriftskunder

  • Mengderabatt trekkes automatisk
  • Ingen dansk mva ved levering til Norge
  • Datablad og fullstendige spesifikasjoner for alle produkter
Opprett bedriftskonto