DCM config file - General file with several functions.
  • 26 May 2021
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

DCM config file - General file with several functions.

  • Dark
    Light
  • PDF

Article Summary

The purpose of this article is to present a DCM config file, that can be used as a reference for building your specific config.

This config file can be used in conjunction with the Reference articles for the various collectors and data servers.

Includes many of the possible range of options.

3 collectors

  • 1 Modbus collector,
  • 1 OPC UA collector with 3 Aggregation sample points
  • 1 collector Alias of the Modbus collector(copy of the Modbus collector for a second Modbus device)  

1 data server

{
  "ConfigName": "Test1",
  "ConfigDescription": "My first test configuration",
  "Collectors": [
    {
      "CollectorName": "Test1Collector",
      "CollectorDescription": "Testing with ModbusTools ModbusSlave",
      "CollectorIPAddr": "10.0.0.42",
      "CollectorPortno": 502,
      "Protocol": "ModBus/TCP",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 240,
      "ModbusAccess": {
        "ModbusFCs": [
          {
            "ModbusFCID": 3,
            "ModbusFCSlaveAddress": 1,
            "ModbusFC": "holding-registers",
            "ModbusFCStart": 0,
            "ModbusFCCount": 10,
            "ModbusFCSampleInterval": 10
          }
        ],
        "ModbusTimeout": 1000
      },
      "SamplePoints": [
        {
          "SampleName": "Value1",
          "SampleDescription": "My first register",
          "SamplesSaved": 10,
          "SampleDataType": "uint16",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 0
          }
        },
        {
          "SampleName": "Value2",
          "SampleDescription": "My second register",
          "SamplesSaved": 10,
          "SampleDataType": "int32",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 7
          },
          "SampleLowerLimit": -8,
          "SampleUpperLimit": 2400,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        }
      ]
    },
    {
      "CollectorName": "Test2Collector",
      "CollectorDescription": "Testing with Prosys OPC-UA Simulation Server",
      "Protocol": "OPC-UA/TCP",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 240,
      "OPCUAAccess": {
        "OPCUASecurityPolicy": "none",
        "OPCUAUserTokenType": "anonynmous",
        "OPCUAPath": "OPCUA/SimulationServer",
        "OPCUATimeStampPolicy": "source"
      },
      "SamplePoints": [
        {
          "SampleName": "Value1",
          "SampleDescription": "My first bool",
          "SamplesSaved": 10,
          "SampleDataType": "bool",
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 2,
            "NodeIdType": "string",
            "NodeIdString": "Value1",
            "OPCUASampleInterval": 5
          }
        },
        {
          "SampleName": "Value2",
          "SampleDescription": "My first Byte",
          "SamplesSaved": 10,
          "SampleDataType": "byte",
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 2,
            "NodeIdType": "numeric",
            "NodeIdNumeric": 2345,
            "OPCUASampleInterval": 2
          }
        },
        {
          "SampleName": "Value3",
          "SampleDescription": "My first Int64",
          "SamplesSaved": 10,
          "SampleDataType": "int64",
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 2,
            "NodeIdType": "guid",
            "NodeIdGuid": "{123e4567-e89b-12d3-a456-426655440000}",
            "OPCUASampleInterval": 27
          },
          "SampleLowerLimit": -23,
          "SampleUpperLimit": 24001,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Value4",
          "SampleDescription": "My first String",
          "SamplesSaved": 10,
          "SampleDataType": "string",
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 2,
            "NodeIdType": "string",
            "NodeIdString": "StatusMessage",
            "OPCUASampleInterval": 1
          },
          "SampleLimitDiscard": false,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Value5",
          "SampleDescription": "A simulation counter",
          "SamplesSaved": 10,
          "SampleDataType": "int32",
          "OPCUAObject": {
            "NodeIdNameSpaceIndex": 5,
            "NodeIdType": "string",
            "NodeIdString": "Counter1",
            "OPCUASampleInterval": 1
          }
        },
        {
          "SampleName": "Value3_AVG",
          "SampleDescription": "My first Aggregation",
          "SamplesSaved": 10,
          "SampleDataType": "uint64",
          "Aggregation": {
            "Function": "avg",
            "Values": [
              "Value3"
            ],
            "TriggerSample": "Value3"
          }
        },
        {
          "SampleName": "Value3_MAX",
          "SampleDescription": "My Second Aggregation",
          "SamplesSaved": 10,
          "SampleDataType": "uint64",
          "Aggregation": {
            "Function": "avg",
            "Values": [
              "Test1Collector:Value2",
              "Value2",
              "Value3"
            ],
            "TriggerSample": "Value3"
          }
        },
        {
          "SampleName": "Value3_Complex",
          "SampleDescription": "My Third Aggregation",
          "SamplesSaved": 10,
          "SampleDataType": "uint64",
          "Aggregation": {
            "Function": "compute",
            "Expression": "Test1Collector:Value2,256,*,Value3,+",
            "TriggerSample": "Value2"
          }
        }
      ]
    },
    {
      "CollectorName": "Another_Test1Collector",
      "CollectorDescription": "A copy of my first fictional collector",
      "CollectorIPAddr": "192.168.0.47",
      "CollectorPortno": 4711,
      "Alias": "Test1Collector"
    }
  ],
  "DataServers": [
    {
      "DatasrvName": "aws_iot",
      "DatasrvProtocol": "AWS/MQTT",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 240,
      "MQTTAWSParams": {
        "BrokerAddr": "a1cn4k05gzdtcl.iot.us-east-2.amazonaws.com",
        "BrokerPort": 8883,
        "RootCA": "awsrootca1",
        "DeviceCert": "awsdevcert1",
        "DevicePrivKey": "awsdevpkey1",
        "PublishInterval": 60,
        "TopicFormat": "%d/%s"
      },
      "SampleList": [
        "Test1Collector:Value1",
        "Test2Collector:",
        "Test1Collector:Value2"
      ]
    }
  ]
}

Was this article helpful?