# What is a single signal and how is it calculated according to the Omnimes system?

In the **OmniMES** system, the concept of a *single signal* refers to a precisely defined event or value coming from a specific device, machine, or PLC. This signal is transmitted to the system using the standardized **MQTT Sparkplug B** format.


---

## Signal configuration - view from OmniMES (first image)

 ![](https://docs.omnimes.com/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2RmMTUxNTFiLThmMzItNDVkNi1iZjE4LTZmZmZhNjg4ZGIwNy83NWI5MjljNS0yODQzLTQ2MWItYThkNi1kMDgxYTcwNGZmNmQvaW1hZ2UucG5nIiwidHlwZSI6ImF0dGFjaG1lbnQiLCJpYXQiOjE3OTU0MzA3MDAsImV4cCI6MTc5NTUxNzEwMH0.TVw3fftVGQe_wciR9xgj1FU1NzZWy4fBQHwCMYAcer4 " =2196x346")

In the first screenshot, we see the **status configurator**, where the user defines a single signal with the following parameters:

* **MQTT Topic**: `spBv1.0/companyID/DDATA/machineID/Local HMI`
* **Tag (Sparkplug B metric)**: `MES/Machine6/HMI1/M_STATE`
* **Value**: `1`
* **Data type**: Event
* **Profile**: Production
* **Machine, Line, Factory**: Used to map the signal to the correct organizational units in the system.

  

This means that a **single signal** in OmniMES is essentially a rule that says:  
\*"If metric\* `*Y*` *with value* `*Z*` *appears under topic* `*X*`*, treat it as a defined event (e.g. machine started production)."*


---

## Receiving the signal - view from MQTT.fx (second image)

 ![Sparkplug B message - MQTT.fx](https://docs.omnimes.com/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2RmMTUxNTFiLThmMzItNDVkNi1iZjE4LTZmZmZhNjg4ZGIwNy9jMDJmNjM4ZC1hOWY1LTRiZmUtOWFiYy00N2Q3ZDNjMjczMjcvaW1hZ2UucG5nIiwidHlwZSI6ImF0dGFjaG1lbnQiLCJpYXQiOjE3OTU0MzA3MDAsImV4cCI6MTc5NTUxNzEwMH0.VKNTLhHP6N5aLdap-PN4VEmjCNDsLWwE9Lebj5pGJGQ)

Here we see a **real Sparkplug B message** published by a device:

`{"timestamp": 1748613351195,"metrics":[{"name": "MES/Machine6/HMI1/M_STATE","dataType": "UInt16",       "value": 1 }],"seq": 69 }`

In this example, **MQTT.fx** is listening to the topic:

  
`spBv1.0/companyID/DDATA/machineID/Local HMI`

The message contains one metric: `MES/Machine6/HMI1/M_STATE` with a value of `1`.  
If the value had been `3` instead, and such a signal was defined in OmniMES, the system would have interpreted it, for example, as the **start of a machine failure**.


---

## **How does OmniMES "calculate" or detect a signal?**

It's not a traditional calculation - it's rather a process of **detection and matching**:


1. The system subscribes to specific MQTT topics.
2. For every incoming message:
   * It parses the list of metrics.
   * For each metric, it checks if there's a match with a predefined signal.
   * If the combination of `tag + value` matches a defined signal, it records it as an **event** with the associated timestamp, machine, and status.
3. These events are later used for:
   * KPI calculations (e.g., OEE),
   * downtime reports,
   * generating alerts,
   * machine activity history.


---

## **Summary**

A **single signal** in OmniMES is a *specific Sparkplug B metric value* defined in the status configurator. When that exact value appears in a message on the broker, the system treats it as a meaningful event (e.g., failure, stop, production start).

**Comparison example:**

**Actual signal from the MQTT broker:**

`{"timestamp": 1748613351195,"metrics":[{"name": "MES/Machine6/HMI1/M_STATE","dataType": "UInt16",       "value": 1 }],"seq": 69 }`

**Signal defined in OmniMES:**

* **Tag**: `MES/Machine6/HMI1/M_STATE`
* **Value**: `1`
* **Profile**: Failure

If the metric name and value match, the event is triggered in OmniMES.

---

**Documents**

- [OmniPlatform](https://docs.omnimes.com/s/cb8b19e0-ec6d-4e1a-8690-b0ddd67ad1cd/doc/omniplatform-7z9SIECi68)
- [Omnienergy](https://docs.omnimes.com/s/cb8b19e0-ec6d-4e1a-8690-b0ddd67ad1cd/doc/omnienergy-56aRDgnYFZ)
- [Omnimes](https://docs.omnimes.com/s/cb8b19e0-ec6d-4e1a-8690-b0ddd67ad1cd/doc/omnimes-eGDa0U5cyr)
- [FAQ](https://docs.omnimes.com/s/cb8b19e0-ec6d-4e1a-8690-b0ddd67ad1cd/doc/faq-IFQjCNYt1Q)
- [Cybersecurity & Compliance (CRA)](https://docs.omnimes.com/s/cb8b19e0-ec6d-4e1a-8690-b0ddd67ad1cd/doc/cybersecurity-compliance-cra-pPJBcC6sBf)