Create a Device Connection
Overview
A device connection defines how the ABB Totalflow module communicates with a Totalflow flow computer and how data is collected from the device. Configure the connection in the Ignition Gateway to specify the device address, communication settings, and data polling behavior.
Create the Device Connection
To create a device connection via Ignition Scripting, see the Creating Device Connection with Ignition Scripting section below. Otherwise, follow the steps below to create a device connection through the Ignition Gateway UI.
- In the Ignition Gateway UI, select Config > OPC UA > Device Connections.
- Select Create new Device...
- Select EFM ABB Totalflow from the device list.
- Configure the device connection settings as described below in Configure Device Connection.
- Select Create New to save the device connection.




Configure Device Connection
General
Fill out the device Name and Description. The default selection to Enable the device is checked.

Device
Currently supported Board Types are:
- G3 - ABB G3 Flow Computer
- G4 - ABB G4 Flow Computer
- NGC - ABB Natural Gas Chromatograph

Connectivity
Refer to the field descriptions shown in the image below when configuring the Hostname, TCP Port, and Socket Timeout.
CONNECTION TYPE
PERSISTENT- The ABB Totalflow driver keeps a TCP connection open and this connection is being shared by all polling threads.ON_DEMAND(default, recommended) - A TCP connection is opened by each polling thread when it needs to poll and closed upon completion. Note that ABB Totalflow device still allows only one connection at a time.


Auto Setup
If Auto-discovery is enabled, the driver automatically:
- Connects to the device
- Discovers installed Totalflow applications
- Generates device-specific application definitions
- Generates Array-Register templates
- Generates the default poll group
Select the desired Auto Setup options to automatically generate the device configuration. If you choose to disable Auto Setup, you must manually configure the device connection. Descriptions for each Auto Setup option are pictured below.

Import Policies
Note: Defaults are set to UPDATE.
Array-Register Template Import Policy
UPDATE- update existing Array-Register TemplatesREPLACE- replace existing Array-Register Template
Poll Group Import Policy
UPDATE- update existing poll groupsREPLACE- replace existing poll groups

DB2 Protocol
DB2 Protocol settings configure the communication parameters used to connect to and exchange data with the ABB Totalflow device over the DB2 protocol. Refer to the field descriptions shown in the image below when configuring the device connection.

RBAC
RBAC settings configure Role-Based Access Control (RBAC) when it is enabled on the ABB Totalflow device. The Operator ID and Password are used to authenticate requests to devices configured for RBAC.
- RBAC Enabled (default: deselected) - Enables RBAC authentication for the device.
- Operator ID - Specifies the operator ID used for authentication when RBAC is enabled. If RBAC is not enabled, leave blank.
- Password - Specifies the operator password used for authentication when RBAC is enabled. If RBAC is not enabled, leave blank.

Date/Time
Date Time Offset is the value of the offset, in seconds, to add to the Totalflow device clock to convert to UTC.
Example, if your Totalflow device is set for CST, you would set this parameter to
7200to convert any timestamps to UTC.

Records
The Records settings control how the module collects and processes Alarm, Event, Periodic History, and Daily History records from the Totalflow device. Specific details are also provided in the descriptions in the screenshots below.
-
Alarm Source - Specifies whether alarms are collected from Periodic History or Alarm Log records.
-
Alarm Scan Rate - Specifies how frequently the module polls for Alarm records.
-
Event Scan Rate - Specifies how frequently the module polls for Event records.
-
Periodic History Scan Rate - Specifies how frequently the module polls for Periodic History records.
-
Daily History Scan Rate - Specifies how frequently the module polls for Daily History records.
-
Record Info Scan Rate - Controls how frequently the module checks the device for new Alarm, Event, and History records. When new records are detected, the corresponding record poller is notified.
-
Max. Records to Read - Specifies the maximum number of records the module reads during a single poll.
-
Periodic Mapping - Specifies the mapping used to convert Totalflow Periodic and Daily History structures into Flow-Cal Meter Periodic Transactions.

Records Signature
- Enable Signature - Checkbox to enable a digital signature field on all Records. Default is de-selected.
- Algorithm - The hashing algorithm to use when generating the digital signature. Options:
SHA_1,SHA_224,SHA_256,SHA_384andSHA_512. - Password - The password used to generate the PBE secret key for encrypting the digital signature.

Common Exchange Format (CFX)
The EFM ABB Totalflow Driver can generate Flow-Cal Common File Exchange (CFX) files containing meter configuration, Alarm, Event, and Periodic History data.
CFX files can be used to transfer field data to Flow-Cal or other systems that support the CFX format. When CFX generation is enabled, the driver creates a .cfx file and corresponding
.cfx.md5 file for each configured meter. Files are maintained on the Ignition Gateway where the driver is installed.
CFX is configured in the EFM ABB Totalflow Device Connection settings. MQTT Transmission is only required if you want to publish CFX files.
- Enable CFX - Enables CFX file generation for the device.
- Flow Computer Brand - Identifies the flow computer manufacturer. Maximum 20 characters.
- Flow Computer Model - Identifies the flow computer model. Maximum 20 characters.
- Flow Computer Software Version - Identifies the flow computer software version. Maximum 20 characters.
- CFX Publish Time Expression - A Quartz Cron expression that determines when CFX files are copied to the MQTT Transmission publish directory. The default is
0 0 0/2 * * ?(every two hours starting at midnight). - CFX Cutoff Time Expression - A Quartz Cron expression that determines when CFX files are moved to the MQTT Transmission publish directory and a new CFX file is started. The default is
0 0 0 L * ? *(the last day of each month). This setting must not be empty. - CFX File Transfer - Selects the MQTT Transmission File definition used to publish CFX files. The default is None, which creates and maintains CFX files without publishing them.
Note: The CFX Cutoff Time Expression should occur after the CFX Publish Time Expression.

Publish CFX Files with MQTT Transmission
To publish CFX files, configure an MQTT Transmission File definition with automatic publishing enabled. The File definition must specify the directory where CFX files will be published.
Then, in the EFM ABB Totalflow device connection:
- Select the MQTT Transmission File definition from CFX File Transfer.
- Configure the CFX Publish Time Expression.
- Configure the CFX Cutoff Time Expression.
The driver copies or moves CFX and MD5 files to the directory configured by the MQTT Transmission File definition. MQTT Transmission automatically publishes files placed in this directory.
After successful transfer, MQTT Transmission removes the files from the publish directory. MQTT Engine receives and processes the files according to its configured Base File Directory.
Sparkplug
To publish records such as Alarms, Events, and History through MQTT Transmission, configure the device's Sparkplug settings to match the MQTT Transmission Transmitter that will publish the data.
If a Transmitter is not already configured, create an [MQTT Transmitter] (link)and configure its [Sparkplug Settings] (link) using the Group ID and Edge Node ID values specified for the device connection. If a Transmitter already exists, such as one used to publish live or polled data, configure the device to use the same Group ID and Edge Node ID as the existing Sparkplug Edge Node.
Configure the following settings:
- Group ID - Identifies the logical group containing the Edge Node and its devices.
- Edge Node ID - Identifies the Sparkplug Edge of Network (EoN) Node.
- Device ID - Identifies the Sparkplug Device. Optional in version 4.0.14 and later.

Advanced Properties
The Advanced Settings control optional behavior related to tag organization and polling. The default values are recommended unless your application requires different behavior.

Configure the following settings:
- Use INI Categories - Appends INI category names to tag folder paths.
- Poller Watchdog Rate - Specifies how frequently the module checks that polling threads are running. Set to
0to disable the poller watchdog. - AAR Alarms - Specifies AAR alarms using a semicolon-separated list of comma-separated alarm definitions. Example:
alarm1,value1;alarm2,value2;alarm3,value3.

⚠️ The following fields are required when creating a device connection:
- 'Name'
- 'Board Type'
- 'Hostname'
- 'TCP Port'
- 'Board Name'
Creating Device Connection with Ignition Scripting
Device connection configurations for the Cirrus Link drivers can be created through scripting using the standard Ignition function system.device.addDevice().
Note: The Description and Enabled properties may not be configured with this function. By default, the Enabled property is set to
trueand can be disabled with a call tosystem.device.setDeviceEnabled()after creating the connection.
- Device Properties with an asterisk (*) are mandatory properties that must be included in the addDevice call.
ABB Totalflow Keys
| Device Property | Key | Data Type |
|---|---|---|
| Board Type | BoardType | String |
| Hostname | Hostname | String |
| TCP Port | Port | Integer |
| Socket Timeout | SocketTimeout | Integer |
| Connection Type | ConnectionType | String |
| Enable Auto-discovery | EnableAutoDiscovery | Boolean |
| Add All Totalflow Application Definitions | AddAllTotalflowApplicationDefinitions | Boolean |
| Add All Array-Register Definitions | AddAllArrayRegisterDefinitions | Boolean |
| Auto-generate Templates and Poll Group | AutoGenerateDefaultTemplatesAndPollGroup | Boolean |
| Array-Register Template Import Policy | ArrayRegisterTemplateImportPolicy | String |
| Poll Group Import Policy | PollGroupImportPolicy | String |
| Station ID | StationId | String |
| Keep Alive | ConnectionKeepAlive | Integer |
| Host Timeout | HostTimeout | Long |
| Number Retries | NumberRetries | Integer |
| Supervisory Frames | SupervisoryFrames | Integer |
| Password | SecurityCode | String |
| RBAC Enabled | RbacEnabled | Boolean |
| Operator ID | OperatorId | String |
| Password | OperatorPassword | String |
| Date Time Offset | DateTimeOffset | Integer |
| Alarm Source | AlarmSourceSelector | String |
| Alarm Scan Rate | AlarmScanRate | Integer |
| Event Scan Rate | EventScanRate | Integer |
| Periodic History Scan Rate | HistoryPeriodicScanRate | Integer |
| Daily History Scan Rate | HistoryDailyScanRate | Integer |
| Record Info Scan Rate | RecordInfoScanRate | Integer |
| Max Records To Read | MaxRecordsToRead | Integer |
| Periodic Mapping | PeriodicMappingId | Long |
| Enable Signature | EnableSignature | Boolean |
| Hashing Algorithm | HashingAlgorithm | String |
| Password | SignaturePassword | String |
| Group ID | GroupId | String |
| Edge ID | EdgeId | String |
| Device ID | DeviceId | String |
| Use INI Categories | UseIniCategories | Boolean |
| Poller Watchdog Rate | PollerWatchdogRate | Integer |
| Enable CFX | EnableCfx | Boolean |
| Flow Computer Brand | CfxFlowComputerBrand | String |
| Flow Computer Model | CfxFlowComputerModel | String |
| Flow Computer Software Version | CfxFlowComputerSwVerison | String |
| CFX Publish Time | CfxPublishTimeExpression | String |
| CFX Cutoff Time | CfxCuttoffTimeExpression | String |
| CFX File Transfer | CfxFileTransferId | Long |
ABB Totalflow Sample Script
Cirrus Link provides these scripts as examples only, they are not supported or guaranteed to meet any particular functionality. Cirrus Link cannot provide any assistance to modify these scripts to meet a particular need.
#new device connection using default settings
newProps = {}
newProps["BoardType"] = "G4"
newProps["Hostname"] = "10.1.2.3"
newProps["Port"] = 2000
system.device.addDevice(deviceType = "AbbTotalflow",deviceName = "MyABB",deviceProps = newProps)
With the device now established you must configure the Totalflow Applications, Totalflow Application Definitions, Array-Register Definitions, Array-Register Templates and Poll Groups to use.