Polling Alarms, Events, and History to the Central Ignition Gateway
Overview
The EFM ABB Totalflow module can poll alarm, event, and history data from an ABB Totalflow device at a specified polling rate.
MQTT Transmission can publish this data as Sparkplug RECORD messages to an MQTT server. MQTT Engine receives the records on the central Ignition Gateway, and MQTT Recorder stores them in a configured database.
This tutorial describes how to configure the EFM ABB Totalflow and MQTT modules to collect and publish alarm, event, and history records from a remote/edge Ignition Gateway to a central Ignition Gateway.
Central Gateway Setup
The central Ignition Gateway receives ABB Totalflow records through MQTT Engine and stores them in a database using MQTT Recorder.
Configure MQTT Distributor
MQTT Distributor can remain at its default configuration. For production deployments, configure TLS if MQTT connections traverse an untrusted network.
Configure MQTT Engine
MQTT Engine can remain at its default configuration.
Configure a Database
Create an Ignition database connection for MQTT Recorder to use. For instructions, see Connect to a Database.
Configure MQTT Recorder
- In the Ignition Gateway interface, navigate to the Config tab on the left hand side.
- Select MQTT Recorder > Settings.
- Select the database connection from the Datasource dropdown.
- Optionally, configure a Partition Period to separate recorded data into tables by time period.
The Central Ignition Gateway is now configured to receive MQTT Sparkplug messages from the Remote/Edge Gateway. By default, MQTT Distributor listens for MQTT connections on TCP port 1883. Ensure the operating system firewall and security software allow inbound connections on this port.
Edge Gateway Setup
The remote/edge Ignition Gateway collects data from the ABB Totalflow device and publishes it to the MQTT server. With the Central Ignition Gateway ready to receive MQTT/Sparkplug RECORD messages, configure MQTT Transmission on the remote/edge Ignition Gateway.
Configure the MQTT Transmission Tag Structure
If using the Default Transmitter in MQTT Transmission, create a tag structure with the following hierarchy:
[Tag Provider]/Edge Nodes/[Group ID]/[Edge Node ID]/[Device ID]/...
For example:
- Group ID:
G1 - Edge Node ID:
E1 - Device ID:
Totalflow G4 Sim
The Group ID, Edge Node ID, and Device ID must match the corresponding Sparkplug settings in the EFM ABB Totalflow device configuration. These values associate the Totalflow device with the appropriate MQTT Transmission transmitter and MQTT connection.
Configure the MQTT Transmission Server
Configure MQTT Transmission to connect to the Central Ignition Gateway:
- In the Ignition Gateway, select Configure.
- Select MQTT Transmission > Settings.
- Select the Servers tab.
- Edit the MQTT server configuration.
- Set the server URL to the Central Ignition Gateway's address.
- Verify that the server shows
1 of 1in the Connected column.
Configure the EFM ABB Totalflow Module
Complete the following steps:
- Define the global Array-Register definitions for the ABB Totalflow devices on the Ignition Gateway.
- Skip this step if you are not configuring the driver to poll AAR data.
- Upload the Periodic Mapping files for the ABB Totalflow devices.
- This step can be skipped if the default mappings provided by the driver meet your requirements.
- Create a device connection to the ABB Totalflow device.
- Select the subset of global Array-Register definitions used by the device.
- Skip this step if you are not configuring the driver to poll AAR data.
- Configure the device's scan rates for the record types you want to collect.
Alarms
Alarm data can be collected from either:
- Periodic History Records (Array 250)
- Alarm Log Records (Array 245)
The available alarm source is determined by the Alarm Source setting in the device configuration.
Poll Alarms from Periodic History Records
Set Alarm Source to PERIODIC_HISTORY_RECORDS.
To poll alarms directly:
| Setting | Value |
|---|---|
| Alarm Scan Rate | 0 |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | Positive value |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | -1 |
To poll alarms when the Record Info poller detects new data:
| Setting | Value |
|---|---|
| Alarm Scan Rate | 0 |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | 0 |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | Positive value |
Poll Alarms from Alarm Log Records
Set Alarm Source to ALARM_LOG_RECORDS.
To poll alarms directly:
| Setting | Value |
|---|---|
| Alarm Scan Rate | Positive value |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | -1 |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | -1 |
To poll alarms when the Record Info poller detects new data:
| Setting | Value |
|---|---|
| Alarm Scan Rate | 0 |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | -1 |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | Positive value |
Events
To poll Event records directly, set Event Scan Rate to a positive value and disable the other record pollers:
| Setting | Value |
|---|---|
| Alarm Scan Rate | -1 |
| Event Scan Rate | Positive value |
| Periodic History Scan Rate | -1 |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | -1 |
To poll Events when the Record Info poller detects new data, set Event Scan Rate to 0 and Record Info Scan Rate to a positive value.
| Setting | Value |
|---|---|
| Alarm Scan Rate | -1 |
| Event Scan Rate | 0 |
| Periodic History Scan Rate | -1 |
| Daily History Scan Rate | -1 |
| Record Info Scan Rate | Positive value |
History
To poll Periodic and Daily History records directly, set their scan rates to positive values:
| Setting | Value |
|---|---|
| Alarm Scan Rate | -1 |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | Positive value |
| Daily History Scan Rate | Positive value |
| Record Info Scan Rate | -1 |
To poll History records when the Record Info poller detects new data, set the Periodic and Daily History scan rates to 0 and Record Info Scan Rate to a positive value:
| Setting | Value |
|---|---|
| Alarm Scan Rate | -1 |
| Event Scan Rate | -1 |
| Periodic History Scan Rate | 0 |
| Daily History Scan Rate | 0 |
| Record Info Scan Rate | Positive value |
Verify Records
Once the EFM ABB Totalflow device is configured and MQTT Transmission is connected to the MQTT server, the configured record data is published as Sparkplug RECORD messages.
When new records are collected:
- The EFM ABB Totalflow module polls the device for new data.
- MQTT Transmission publishes the records to the MQTT server.
- MQTT Engine receives the records on the Central Ignition Gateway.
- MQTT Recorder stores the records in the configured database.
Verify that the expected records are appearing in the MQTT Recorder database.