The integration concept can be extended to share measure and KPI data with more “Real Time” systems by using the MQTT protocol. Important KPIs relating to operator performance can now be made available for users in traditional SCADA/HMI solutions to make decisions based on KPIs that cannot be calculated with data originating solely from the control system, for example, Planned vs. Actual Production.
This leverages Flow as a decision support system, making information available to anyone and everyone in the plant, from Operations to Management.
The merging of real time visualization KPIs and historical KPIs has becomes ever more important to truly optimize plant efficiency and performance. This can be achieved by the MQTT consumer.
Potentially, OPC sources can also be updated via this method. (Most drivers that SCADA/HMI systems use to connect to a MQTT Broker can also act as an OPC Server).
The Flow MQTT Consumer act as a bridge between Flow data and an MQTT Broker.
The MQTT Consumer supports three different type of protocols to construct your MQTT Topic and Payload:
- Custom
- Sparkplug B
- Flow Topic Definition
Configuring an MQTT Consumer
To create a connection to a MQTT Consumer, right-click on Data Consumers to add a new Consumer. Select “More”.
This will list the MQTT Consumer called “MQTT Broker”. Select The “MQTT Broker” consumer to open its editor:
To successfully push data to a MQTT Consumer, the following properties needs to be set.
|
Name to identify the consumer. |
|
Location of the server or address where your MQTT Broker is defined (Server Name or IP Address). |
|
Port of the MQTT Broker |
|
Specify SSL, SSL Protocol and Certificate Name |
|
Username to connect to the MQTT Broker (if required). |
|
Password to connect to the MQTT Broker (if required). |
|
Select the Quality of Service for the payload to the MQTT Broker. |
|
Select from either Custom, SparkplugB, or a Flow Topic and Payload definition. |
|
If “Custom Protocol” is selected, this property will be visible to define a custom Payload. |
|
If “Custom Protocol” is selected, this property will be visible to define a custom Topic. |
After configuring the properties, test the connection by clicking the “Test” button. If successful, a pop-up will confirm your connection or display an error message describing the issue that needs to be rectified.
Protocols
Custom Protocol Definition
If "Custom" is selected from the protocol drop-down menu, you can define custom Payload and Topic definitions.
Custom Payload and Topics definitions are configured per measure, in the Integration tab.
Certain properties may be used as placeholders to be replaced by the MQTT Consumer before sending a message.
A Topic Example is provided below:
/[parent]/[measureName]/[measureID]
Properties available to use in the Topic Definition include:
- [modelattribute(“ModelAttributeName”)]
- [parent]
- [measurename]
- [intervaltype]
- [measureid]
- [measureuom]
- [hierarchicalname]
- [periodend]
- [periodstart]
- [periodendutc]
- [periodstartutc]
- [quality]
- [timeschemeshift]
- [measurevalue]
A Payload Example is provided below:
{"name":"[measurename]","Value":"[measurevalue]"}
Properties available to use in the Payload Definition include:
- [modelattribute(“ModelAttributeName”)]
- [parent]
- [measurename]
- [intervaltype]
- [measured]
- [measureformat]
- [measureuom]
- [hierarchicalname]
- [periodend]
- [periodstart]
- [periodendutc]
- [periodstartutc]
- [quality]
- [timeschemeshift]
- [measurevalue]
- [formattedvalue]
SparkPlugB
The Flow MQTT Consumer implements the SparkplugB protocol definition to automatically configure a Topic and Payload structure to build out a Flow-specific namespace for any subscriber that can consume the SparkplugB definition, and allows for the auto-population of device tags.
An Example of the namespace can be seen below:
The implementation of the SparkplugB protocol will generate a namespace with the following hierarchical structure:
Flow Topic Definition
The "Flow Topic Definition" Topic Format implements the following definition structure: