Skip to main content

Create a Device Connection

Overview​

A device connection defines how the EFM Emerson ROC module communicates with an Emerson ROC or ROC Plus device and how data is collected from the device. Configure the connection in the Ignition Gateway to specify the device address, communication settings, security, polling behavior, and other device-specific options.

Create the Device Connection​

To create a device connection via Ignition Scripting, see Creating Device Connection with Ignition Scripting. Otherwise, follow the steps below to create a device connection through the Ignition Gateway UI.

  1. In the Ignition Gateway UI, select Config > OPC UA > Device Connections.
  2. Select Create new Device....
  3. Select EFM Emerson ROC from the device list.
  4. Configure the device connection settings as described below.
  5. Select Create New to save the device connection.

Configure Device Connection​

General​

Enter a Name and Description for the device connection. The device is enabled by default.

  • Name - Specifies the name of the device connection.
  • Description - Specifies a description for the device connection.
  • Enabled - Enables or disables the device connection.

Connectivity​

The Connectivity settings define the protocol and addressing information used to communicate with the Emerson ROC device.

Refer to the field descriptions shown in the image below when configuring the connectivity settings.

  • Protocol Type - Specifies the protocol used by the device. Options are ROC and ROC_PLUS.
  • Hostname - Specifies the hostname or IP address of the device.
  • TCP Port - Specifies the TCP port used to communicate with the device.
  • Socket Timeout - Specifies the TCP socket operation timeout in seconds. A value of 0 represents an infinite timeout, while -1 uses the system default.
  • ROC Unit Code - Specifies the station address unit code of the ROC device.
  • ROC Group Code - Specifies the station address group code of the ROC device.
  • Host Unit Code - Specifies the station address unit code of the Ignition host.
  • Host Group Code - Specifies the station address group code of the Ignition host.
  • Periodic Mapping - Specifies the Periodic History Mapping to use when History polling is enabled.
  • Configuration Mapping - Specifies the Configuration Mapping to use when Configuration, Event, or History polling is enabled.
  • Add All TLP Definitions - Adds all TLP Definitions configured in the module to the device connection. Disable this option if the device uses TLP Definitions that are not compatible with the device.

Security​

The Security settings configure authentication and access control for the Emerson ROC device.

Refer to the field descriptions shown in the image below when configuring the security settings.

  • Security Enabled - Enables security on the ROC device.
  • Operator ID - Specifies the three-character operator ID used to authenticate with the ROC device.
  • Password - Specifies the four-digit password used to authenticate with the ROC device.
  • Access Level Enabled - Enables access-level control for the configured Operator ID.
  • Access Level - Specifies the access level to use when access-level control is enabled. Valid values are 0–5.

Import Policies​

The Import Policies determine how existing TLP Templates and Poll Groups are handled when they are imported into the device configuration.

The default value for both policies is UPDATE.

  • TLP Template Import Policy
    • UPDATE — Updates existing TLP Templates.
    • REPLACE — Replaces existing TLP Templates.
  • Poll Group Import Policy
    • UPDATE — Updates existing Poll Groups.
    • REPLACE — Replaces existing Poll Groups.

Date/Time​

The Date/Time settings control how timestamps are interpreted and whether the ROC real-time clock (RTC) is synchronized with the Ignition system.

  • Date Time Offset - Specifies the offset, in seconds, applied to the device clock to convert timestamps to UTC. The default is 0.
  • Observe Daylight Saving - Enables daylight saving time adjustments.
  • Sync ROC RTC - Synchronizes the ROC RTC with the local time of the Ignition system.
  • Sync Expression - Specifies the Quartz Cron expression used to schedule ROC RTC synchronization. The default is 0 0 0 * * ?.

Records​

The Records settings control how frequently the module polls the Emerson ROC device for Alarm, Event, and History records.

A value of -1 disables polling for that record type.

  • Alarm Scan Rate - Specifies how frequently the module polls for Alarm records, in seconds.
  • Event Scan Rate - Specifies how frequently the module polls for Event records, in seconds.
  • Minute History Scan Rate - Specifies how frequently the module polls for Minute History records, in seconds.
  • Periodic History Scan Rate - Specifies how frequently the module polls for Periodic History records, in seconds.
  • Daily History Scan Rate - Specifies how frequently the module polls for Daily History records, in seconds.

Records Signature​

The Records Signature settings configure digital signatures for records.

  • Enable Signature - Enables a digital signature on all Records.
  • Algorithm - Specifies the hashing algorithm used to generate the digital signature. Supported algorithms include SHA_1, SHA_224, SHA_256, SHA_384, and SHA_512.
  • Change Password? - Enables generation of a new password for the record signature.
  • Password - Specifies the password used to generate the PBE secret key for encrypting the digital signature.

CFX File Generation​

The EFM Emerson ROC 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.

⚠️ Available in release 4.0.15 and newer.

The EFM Emerson ROC Driver can generate Flow-Cal Common File Exchange (CFX) files containing meter configuration, Alarm, Event, and Periodic History data. CFX files can be maintained on the Ignition Gateway or published through MQTT Transmission.

MQTT Transmission is not required to create and maintain CFX files. It is required to configure CFX file publishing options.

Configure the following settings:

  • Enable CFX - Enables CFX file generation for the device.
  • Flow Computer Brand - Identifies the flow computer manufacturer included in the CFX file. Maximum 20 characters.
  • Flow Computer Model - Identifies the flow computer model included in the CFX file. Maximum 20 characters.
  • Flow Computer Software Version - Identifies the flow computer software version included in the CFX file. Maximum 20 characters.
  • CFX Publish Time Expression - Specifies the Quartz Cron expression used to schedule CFX file publishing. The default is 0 0 0/2 * * ?.
  • CFX Cutoff Time Expression - Specifies the Quartz Cron expression used to finalize and publish the current CFX file and start a new file. The default is 0 0 0 L * ? *. This field 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 Emerson ROC device connection:

  1. Select the MQTT Transmission File definition from CFX File Transfer.
  2. Configure the CFX Publish Time Expression.
  3. 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 and configure its Sparkplug Settings 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.

Advanced Properties​

The Advanced settings control optional behavior related to record identification, timestamps, polling, and watchdog monitoring. The default values are recommended unless your application requires different behavior.

  • Serial Number - Specifies the serial number included in Records to uniquely identify the device. The serial number can be entered manually or configured using a TLP value read from the device.
  • History Time Stamp - Determines whether history timestamps represent the beginning or end of the reporting period. When enabled, timestamps are placed at the beginning of the period.
  • Read Delay - Specifies the polling read delay in milliseconds when device responses may be slow. This may be useful when communicating through a terminal server.
  • Poller Watchdog Rate - Specifies how frequently the module checks that polling threads are running. Set to 0 to disable the poller watchdog.

⚠️ The following fields are required when creating a device connection:

  • 'Protocol Type' is required.
  • 'Hostname' is required.
  • 'TCP Port' is required.
  • 'ROC Unit Code' is required.
  • 'ROC Group Code' is required.
  • 'Host Unit Code' is required.
  • 'Host Group Code' is required.

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 true and can be disabled with a call to system.device.setDeviceEnabled() after creating the connection.

⚠️ Device Properties with an asterisk (*) are mandatory properties that must be included in the addDevice() call.

Device PropertyKeyDatatype
Protocol Type*ProtocolTypeString
Hostname*HostnameString
TCP Port*PortInteger
Socket TimeoutSocketTimeoutInteger
ROC Unit Code*RocUnitCodeInteger
ROC Group Code*RocGroupCodeInteger
Host Unit Code*HostUnitCodeInteger
Host Group CodeHostGroupCodeInteger
Periodic MappingPeriodicMappingIdLong
Configuration MappingConfigurationMappingIdLong
Add All TLP DefinitionsAddAllTLPDefinitionsBoolean
Security EnabledSecurityEnabledBoolean
Operator IDOperatorIdString
PasswordPasswordString
Access Level EnabledAccessLevelEnabledBoolean
Access LevelAccessLevelInteger
Date Time OffsetDateTimeOffsetInteger
Sync ROC RTCSyncDateTimeBoolean
Sync ExpressionSyncDateTimeExpressionString
Alarm Scan RateAlarmScanRateInteger
Event Scan RateEventScanRateInteger
Minute History Scan RateHistoryMinuteScanRateInteger
Periodic History Scan RateHistoryPeriodicScanRateInteger
Daily History Scan RateHistoryDailyScanRateInteger
Enable SignatureEnableSignatureBoolean
AlgorithmHashingAlgorithmString
PasswordSignaturePasswordString
Group IDGroupIdString
Edge IDEdgeIdString
Device IDDeviceIdString
Serial NumberSerialNumberString
History Time StampHistoryTimestampBoolean
Read DelayReadDelayLong
Poll Watchdog RatePollerWatchdogRateInteger
Enable CFXEnableCfxBoolean
Flow Computer BrandCfxFlowComputerBrandString
Flow Computer ModelCfxFlowComputerModelString
Flow Computer Software VersionCfxFlowComputerSwVerisonString
CFX Publish TimeCfxPublishTimeExpressionString
CFX Cutoff TimeCfxCuttoffTimeExpressionString
CFX File TransferCfxFileTransferIdLong

Emerson ROC 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["ProtocolType"] = "ROC"
newProps["Hostname"] = "10.1.2.3"
newProps["Port"] = 2000
newProps["RocUnitCode"] = 10
newProps["RocGroupCode"] = 100
newProps["HostUnitCode"] = 20
newProps["HostGroupCode"] = 200
newProps["HashingAlgororithm"] = "SHA_1"
system.device.addDevice(deviceType = "EmersonRoc",deviceName = "MyROC",deviceProps = newProps)