Connecting a Beckhoff PLC and a Modbus TCP PV inverter to Azure IoT Hub
To illustrate the functionality of the Router service, the configuration of a simple Signal Route is shown.
It reads the Signals GVL.Line1.Weight
and GVL.Line1.Temperature
from a Target named Beckhoff
and a Signal named Power,2,12,ir,r
from the Target PV Inverter
every 30s
. If a value changes, it sends this value together with a Constant Timestamp
and a Property Location = Belgium
to the Target IoT Hub
. Before sending, it renames the first two signals to Line1.Weight
and Line1.Temperature
.
Corresponding Edge
configuration and Device Twin
definition to activate the ADS Target service:
- Edge-UI
- Device Twin

Beckhoff
is in this example the Name
of the Target. This can be any unique name.
{
"Router": {
"SignalRoutes": {
"IoT Hub Stream": {
"Enabled": true,
"Sources": [
{
"TargetName": "Beckhoff",
"Signals": [
"GVL.Line1.Weight",
"GVL.Line1.Temperature"
],
"Conditions": {}
},
{
"TargetName": "PV Inverter",
"Signals": [
"Power,2,12,ir,r"
],
"Conditions": {}
}
],
"Destinations": [
{
"TargetName": "IoT Hub",
"ScrapeInterval": 30,
"ScrapeTrigger": "OnChange",
"Constants": {
"Timestamp": "[[TIME]]"
},
"Properties": {
"Location": "Belgium"
},
"SignalMap": {
"/GVL\./": null
}
}
]
}
},
"Enabled": true
}
}
To delete a Route via the Device Twin, it have to be set to null
.
To delete a Route via the Azure IoT Hub Device Twin, it must be available in the desired
section before setting it to null
. Otherwise this null
property will not be sent to the Edge device. This is the standard behaviour of the Azure IoT Hub.