- Real X/Y/Z vibration RMS data streaming from a Balluff condition monitoring sensor
- A reComputer vPLC reading sensor data via Modbus TCP/IP over IO-Link
- A reComputer R1100 bridging data from the vPLC (OPC UA) to ThingsBoard’s MQTT Broker using Node-RED
- ThingsBoard Calculated Fields compute ISO 10816 vibration severity and machine health status in real time
- A professional dashboard with a color-coded gauge, alarms, and a dynamic machine health card
Hardware & Software Used
Hardware
Software
- OpenPLC vPLC Runtime (on reComputer R2100)
- Node-RED (on reComputer R1100)
- ThingsBoard Community Edition (on reComputer R1100)
System Architecture
Before diving into the steps, it’s helpful to understand how data flows through the system.Step 1: Hardware Setup (vPLC + IO-Link)
This step is covered in detail in the Virtual PLC interfacing with IO-Link Master article. In summary, the vPLC:- Connects to the Balluff IO-Link Master over Modbus TCP/IP
- Reads X/Y/Z VRMS and Temperature from registers
IW1–IW8 - Uses a custom C++ WTOR function block to byte-swap Big-Endian 32-bit floats into usable
REALvalues - Stores the results in
rX_VRMS,rY_VRMS,rZ_VRMS, andrTemp
REAL gives garbage values — the byte swap is mandatory. The WTOR function block handles this automatically.Step 2: Expose vPLC Data via OPC UA
The vPLC exposes its runtime variables as an OPC UA Server. This allows the reComputer R1100 to read live values without changing the PLC program.192.168.100.10 with the actual IP address of your vPLC.
Step 3: Bridge OPC UA to MQTT using Node-RED
The reComputer R1100 runs Node-RED as the middleware layer. It acts as an OPC UA client that reads vibration values from the vPLC and publishes them to ThingsBoard’s MQTT broker every second.Install the OPC UA node in Node-RED
Build the flow

Trigger (every 1 second)
Trigger (every 1 second)
Create a Device Profile in ThingsBoard

Create a new device

How to Link your device to the “Vibration Sensor” device Profile
Step 1: Go to Entities → DevicesStep 2: Click on OpenPLC (your device) to open its detailsStep 3: Click the pencil/edit icon () in the top right of the details panelStep 4: Find the “Device profile” field — currently showsdefaultStep 5: Click on it and select “Vibration Sensor” from the dropdown

Format and publish the PLC data to the MQTT Broker
Verify data is arriving in ThingsBoard

Step 4: Create Calculated Fields in ThingsBoard
This is where the raw sensor data becomes actionable. ThingsBoard v4.0 introduced Calculated Fields, a built-in logic layer that transforms incoming telemetry in real time without any external scripts or rule chains. We will create two calculated fields:- Overall Vibration Severity: combines X/Y/Z into a single ISO 10816 metric
- Machine Status: classifies the severity into a human-readable health state
Create the calculated fields

Calculated Field 1: Overall Vibration Severity (ISO 10816)

sqrt(X² + Y² + Z²) rather than the maximum individual axis, it gives you the true Euclidean magnitude of the vibration vector. This is the correct approach for ISO 10816 compliance and eliminates false negatives, a situation where all three axes are below threshold individually, but combined vibration is dangerously high.Calculated Field 2: Machine Status
| Argument name | Type | Key | Default value |
|---|---|---|---|
| vibration_severity | Latest telemetry | vibration_severity | 0 |

Setting a default value ofAdd this Script:0is important. Without it, ifvibration_severityhas not yet been computed, the argument receivesnull, the comparison fails, and the status incorrectly showsCRITICAL.

| Zone | Severity range | Status | Meaning |
|---|---|---|---|
| A | 0 – 2.3 mm/s | HEALTHY | Good - new or recently serviced |
| B | 2.3 – 4.5 mm/s | WARNING | Acceptable - monitor closely |
| C | 4.5 – 7.1 mm/s | CRITICAL | Unsatisfactory - schedule maintenance |
| D | > 7.1 mm/s | EMERGENCY | Unacceptable - risk of damage |
Step 5: Configure Alarms
Navigate to your Device Profile → Alarm Rules tab. Create three alarm rules based onvibration_severity:

Alarm 1: Motor Vibration Warning

Alarm 2: Motor Vibration Critical

Alarm 3: Motor Vibration Emergency

vibration_severity for alarms instead of individual axes?Alarming on individual X/Y/Z values creates two problems: false negatives (all axes below threshold but combined severity is dangerous) and false positives (one axis spikes from a single knock while overall severity stays in Zone A). The combined severity metric is ISO-compliant and gives a much cleaner alarm signal.Step 6: Build the Dashboard
Machine Health card (HTML Value Card)

machine_statusNavigate to ‘Appearance’. Paste the following into the HTML section:Widget 1: Warning Card

- Click + Add widget → Cards → Alarm count
- Configure:
Widget 2: Critical Alarms Card
Widget 3: Motor Image
- Click + Add widget → Traditional SCADA Fluid system→ Right motor pump
Vibration Severity Gauge (ISO 10816 bands)

vibration_severityConfigure the colour bands to match ISO 10816 zones in the Scale settings:
Tri-Axial Vibration Chart

plc_rSensorX_vrms, plc_rSensorY_vrms, plc_rSensorZ_vrms

Motor Temperature Trend

Vibration Severity Trend Chart

vibration_severityAdd threshold lines at 2.3, 4.5, and 7.1 mm/s so operators can immediately see how close the severity is to each ISO zone boundary.
Add Alarm Table

Final dashboard layout
How It All Connects
Looking back at the full pipeline:- The Balluff BCM sensor measures tri-axial vibration (X/Y/Z RMS) and temperature continuously
- The Balluff IO-Link Master exposes sensor data over Modbus TCP
- The reComputer vPLC reads registers every scan cycle, byte-swaps Big-Endian floats, and exposes clean
REALvalues via its OPC UA server - Node-RED on the reComputer R1100 polls the OPC UA server every second and publishes a JSON payload to ThingsBoard via MQTT
- ThingsBoard Calculated Fields compute vibration severity (
sqrt(X²+Y²+Z²)) and classify machine health (HEALTHY / WARNING / CRITICAL / EMERGENCY) in real time, no external scripts needed - Alarm rules fire when severity crosses ISO 10816 zone boundaries, with structured alarm messages including rounded axis values
- The dashboard gives operators instant visual feedback through a colour-coded health card, ISO-banded gauge, and trend charts