Communication flow - from controller to information in Omnimes

Communication Flow - From PLC to Information in OmniMES

The OmniMES system is designed to operate in industrial environments where data originates from various machines, production lines, and peripheral devices. A key design principle is complete independence from specific equipment manufacturers - provided that the data is ultimately exposed in the MQTT Sparkplug B standard.



1. PLC (Programmable Logic Controller) - source of production data

PLCs (e.g., Fatek, Siemens, Allen-Bradley, WAGO) are responsible for directly controlling machines. They collect data such as:

  • current cycle status (production / downtime / failure),

  • production counters,

  • cycle durations,

  • analog values (e.g., temperature, pressure),

  • diagnostic signals.

This data is available within the PLC as registers, flags, or variables (e.g., M123.0, DB20.DBD12, Tag1, etc.).


2. Communication Gateway - transforming data to MQTT Sparkplug B

The gateway (hardware or software) connects to the PLC using industrial protocols:

  • Modbus RTU/TCP

  • OPC UA

  • S7 Communication

  • EtherNet/IP, etc.

The gathered data is:

  • read cyclically (e.g., every 1 second),

  • mapped to Sparkplug B metrics (metric.name, metric.value, metric.datatype),

  • encapsulated into an MQTT Sparkplug B message (according to birth message or data message structure),

  • and published to the MQTT broker under the appropriate topic (e.g., spBv1.0/Line1/Device1/DBIRTH).


3. MQTT Broker (e.g., EMQX, Mosquitto) - data distribution hub

The broker acts as the central communication node. Its responsibilities include:

  • maintaining sessions for publishers (gateways) and subscribers (OmniMES),

  • queuing and transmitting messages in real time,

  • managing connection statuses (e.g., automatically notifying about lost device connectivity via DEATH messages).

OmniMES subscribes to specific broker topics and receives data as soon as it is published.


4. OmniMES System - analysis, processing, and visualization

OmniMES receives MQTT Sparkplug B data and performs several operations:

Decoding and validation

  • Interpreting metrics from Sparkplug B messages.

  • Validating data types, units, and sources.

Buffering and storing to database

  • Data is stored in PostgreSQL + TimescaleDB (a time-series database, TSDB), with appropriate timestamps.

  • The system may apply aggregation, throttling, or duplicate filtering.

Analysis and business logic

  • Calculating KPIs (OEE, MTBF, performance).

  • Detecting anomalies, downtimes, and failures.

  • Triggering alerts or automated actions.

Visualization and reporting

  • Converting data into charts, dashboards, and PDF reports.

  • Supporting scheduling, shift-based comparisons, CSV/Excel exports.