avatar  


Recently viewed tickets

Log out

DCM config file - Modbus TCP examples

1. Modbus collector with 2 samplepoints and delivering data to Secomea Cloud (DCC)
{
"ConfigName": "Modbus",
"ConfigDescription": "Example configuration for Modbus",
"CheckpointInterval": 600,
"Collectors": [
{
"CollectorName": "ModbusDevice",
"CollectorDescription": "My first modbus",
"Protocol": "ModBus/TCP",
"ConnectRetryMin": 2,
"ConnectRetryMax": 240,
"ModbusAccess": {
"ModbusFCs": [
{
"ModbusFCID": 1,
"ModbusFCSlaveAddress": 1,
"ModbusFC": "holding-registers",
"ModbusFCStart": 0,
"ModbusFCCount": 5,
"ModbusFCSampleInterval": 2
}
],
"ModbusTimeout": 1000
},
"SamplePoints": [
{
"SampleName": "Value1",
"SampleDescription": "Sample value1",
"SamplesSaved": 100,
"SampleDataType": "int16",
"SampleUnit": "RawNumber",
"ModbusValue": {
"FCREF": 1,
"FCOffset": 0
},
"SampleLowerLimit": 0,
"SampleUpperLimit": 1000,
"SampleLimitDiscard": true,
"SampleLimitAlarm": true
},
{
"SampleName": "Value2",
"SampleDescription": "Sample value2",
"SamplesSaved": 100,
"SampleDataType": "int16",
"SampleUnit": "RawNumber",
"ModbusValue": {
"FCREF": 1,
"FCOffset": 1
},
"SampleLowerLimit": 0,
"SampleUpperLimit": 1000,
"SampleLimitDiscard": false,
"SampleLimitAlarm": false
}
]
}
],
"DataServers": [
{
"ConnectRetryMax": 60,
"ConnectRetryMin": 2,
"DatasrvName": "DCC",
"DatasrvProtocol": "SCI/SPD",
"IOPin": false,
"SCISPDParams": {
"DevCertName": "dccdevcert",
"DevPkeyName": "dccprivkey",
"PushInterval": 5,
"RootCAName": "dccrootca",
"SCIServerAddr": "dcm-dcc.secomea.com",
"SPDPort": 443,
"Security": "TLS1.2"
}
}
]
}


1. Modbus collector delivering to 2 cloud (Cumulocity & Secomea Cloud)
{
  "ConfigName": "TVO53",
  "ConfigDescription": "Test configuration for Modbus > SDCC & C8Y and Event triggering",
  "CheckpointInterval": 600,
  "Collectors": [
    {
      "CollectorName": "Test1ModbusDevice",
      "CollectorDescription": "My first modbus",
      "Protocol": "ModBus/TCP",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 240,
      "ModbusAccess": {
        "ModbusFCs": [
          {
            "ModbusFCID": 1,
            "ModbusFCSlaveAddress": 1,
            "ModbusFC": "coils",
            "ModbusFCStart": 27,
            "ModbusFCCount": 64,
            "ModbusFCSampleInterval": 5
          },
          {
            "ModbusFCID": 2,
            "ModbusFCSlaveAddress": 1,
            "ModbusFC": "inputs",
            "ModbusFCStart": 3,
            "ModbusFCCount": 53,
            "ModbusFCSampleInterval": 3
          },
          {
            "ModbusFCID": 3,
            "ModbusFCSlaveAddress": 1,
            "ModbusFC": "holding-registers",
            "ModbusFCStart": 100,
            "ModbusFCCount": 33,
            "ModbusFCSampleInterval": 2
          }
        ],
        "ModbusTimeout": 1000
      },
      "SamplePoints": [
        {
          "SampleName": "Test1_REG108",
          "SampleDescription": "Temperature register",
          "SamplesSaved": 100,
          "SampleDataType": "int16",
          "SampleUnit": "rawADC",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 8
          },
          "SampleLowerLimit": 0,
          "SampleUpperLimit": 1000,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Test1_REG100",
          "SampleDescription": "2nd Temperature register",
          "SamplesSaved": 100,
          "SampleDataType": "int16",
          "SampleUnit": "rawADC",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 0
          },
          "SampleLowerLimit": 0,
          "SampleUpperLimit": 1000,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Test1_REG107",
          "SampleDescription": "1st switch",
          "SamplesSaved": 100,
          "SampleDataType": "int16",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 7
          },
          "SampleLowerLimit": 0,
          "SampleUpperLimit": 1000,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Test1_REG114",
          "SampleDescription": "2nd switch",
          "SamplesSaved": 100,
          "SampleDataType": "int16",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 14
          },
          "SampleLowerLimit": 0,
          "SampleUpperLimit": 1000,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Test1_REG125",
          "SampleDescription": "Register 9 setting",
          "SamplesSaved": 100,
          "OnlySaveOnChanged": true,
          "SampleDataType": "sbyte",
          "ModbusValue": {
            "FCREF": 3,
            "FCOffset": 25
          },
          "SampleLowerLimit": 0,
          "SampleUpperLimit": 8,
          "SampleLimitDiscard": true,
          "SampleLimitAlarm": true
        },
        {
          "SampleName": "Test1_REG108_DIV",
          "SampleDescription": "Register 9 value divided by 100",
          "SamplesSaved": 100,
          "SampleDataType": "double",
          "SampleUnit": "Volt DC",
          "Aggregation": {
            "Function": "compute",
            "Expression": "Test1_REG108, 100, /",
            "TriggerSample": "Test1_REG108"
          }
        },
        {
          "SampleName": "Test1_REG100_DIV",
          "SampleDescription": "Register 1 value divided by 100",
          "SamplesSaved": 100,
          "SampleDataType": "double",
          "SampleUnit": "Volt DC",
          "Aggregation": {
            "Function": "compute",
            "Expression": "Test1_REG100, 100, /",
            "TriggerSample": "Test1_REG100"
          }
        }
      ]
    }
  ],
  "DataServers": [
    {
      "DatasrvName": "secomea_c8y",
      "DatasrvProtocol": "C8Y/REST",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 10,
      "C8YParams": {
        "C8YRegisterURL": "https://SecomeaPresales.cumulocity.com",
        "RegName": "c8yreg",
        "C8YRootCAName": "cumulocityROOTCA",
        "PushInterval": 5
      }
    },
    {
"ConnectRetryMax": 60,
"ConnectRetryMin": 2,
"DatasrvName": "DCC-pilot",
"DatasrvProtocol": "SCI/SPD",
"IOPin": true,
"SCISPDParams": {
"DevCertName": "dccdevcert",
"DevPkeyName": "dccprivkey",
"PushInterval": 5,
"RootCAName": "dccrootca",
"SCIServerAddr": "dcm-dcc.secomea.com",
"SPDPort": 443,
"Security": "TLS1.2"
}
} ] }


2. One collector with simulated data and One collector with Modbus and event aggregation delivering to 2 clouds (Cumulocity & Secomea Cloud)


{
  "ConfigDescription": "Test configuration for Modbus > SDCC & C8Y and Event triggering",
  "ConfigName": "TVO53",
  "CheckpointInterval": 600,
  "Collectors": [
    {
      "CollectorName": "SINEsim",
      "CollectorDescription": "DCM Internal Simulation Server",
      "Protocol": "Simulator",
      "SamplePoints": [
        {
          "SampleName": "sine",
          "SampleDescription": "DCM simulation of sine curve",
          "SamplesSaved": 300,
          "SampleDataType": "double",
          "SimulatorData": {
            "SimulatorFunction": "sine",
            "SimulatorInitValue": 1000,
            "SimulatorIncValue": 100,
            "SimulatorSampleInterval": 0
          }
        }
      ]
    },
    {
      "CollectorDescription": "My first modbus",
      "CollectorName": "S6116",
      "ConnectRetryMax": 240,
      "ConnectRetryMin": 2,
      "ModbusAccess": {
        "ModbusFCs": [
          {
            "ModbusFC": "holding-registers",
            "ModbusFCCount": 8,
            "ModbusFCID": 3,
            "ModbusFCSampleInterval": 0,
            "ModbusFCSlaveAddress": 1,
            "ModbusFCStart": 100
          },
          {
            "ModbusFC": "holding-registers",
            "ModbusFCCount": 3,
            "ModbusFCID": 2,
            "ModbusFCSampleInterval": 10,
            "ModbusFCSlaveAddress": 1,
            "ModbusFCStart": 108
          }
        ],
        "ModbusTimeout": 5000
      },
      "Protocol": "ModBus/TCP",
      "SamplePoints": [
        {
          "ModbusValue": {
            "FCOffset": 0,
            "FCREF": 2
          },
          "SampleDataType": "int16",
          "SampleDescription": "1st Switch",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleLowerLimit": 0,
          "SampleName": "EventTrigger",
          "SampleUpperLimit": 1000,
          "SamplesSaved": 10
        },
        {
          "ModbusValue": {
            "FCOffset": 1,
            "FCREF": 2
          },
          "SampleDataType": "int16",
          "SampleDescription": "2nd Switch",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleLowerLimit": 0,
          "SampleName": "SinusTrigger",
          "SampleUpperLimit": 1000,
          "SamplesSaved": 100
        },
        {
          "ModbusValue": {
            "FCOffset": 0,
            "FCREF": 3
          },
          "SampleDataType": "int16",
          "SampleDescription": "B1",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleName": "Temperatur1",
          "SamplesSaved": 100
        },
        {
          "ModbusValue": {
            "FCOffset": 1,
            "FCREF": 3
          },
          "SampleDataType": "int16",
          "SampleDescription": "B2",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleName": "Temperatur2",
          "SamplesSaved": 100
        },
        {
          "ModbusValue": {
            "FCOffset": 2,
            "FCREF": 3
          },
          "SampleDataType": "int16",
          "SampleDescription": "B3",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleName": "Load1",
          "SamplesSaved": 100
        },
        {
          "ModbusValue": {
            "FCOffset": 3,
            "FCREF": 3
          },
          "SampleDataType": "int16",
          "SampleDescription": "B4",
          "SampleLimitAlarm": true,
          "SampleLimitDiscard": true,
          "SampleName": "Load2",
          "SamplesSaved": 100
        },
        {
          "SampleName": "EventValue",
          "SampleDescription": "Event Value computation: When EventTrigger > 500, sample Temp + Load",
          "SamplesSaved": 0,
          "SampleDataType": "double",
          "Aggregation": {
            "Function": "eventcompute",
            "Expression": "EventTrigger,500,>",
            "Values": [
              "Temperatur1",
              "Temperatur1",
              "Load1",
              "Load2"
            ],
            "TriggerSample": "EventTrigger",
            "TriggerNewInterval": 2
          }
        },
        {
          "SampleName": "SinusEvent",
          "SampleDescription": "Event Value computation: When SinusTrigger > 500, sample SimSine",
          "SamplesSaved": 0,
          "SampleDataType": "double",
          "Aggregation": {
            "Function": "eventcompute",
            "Expression": "SinusTrigger,500,>",
            "Values": [
              "SINEsim:sine"
            ],
            "TriggerSample": "SinusTrigger",
            "TriggerNewInterval": 1
          }
        }
      ]
    }
  ],
  "DataServers": [
    {
      "C8YParams": {
        "C8YRegisterURL": "https://secomeard.cumulocity.com",
        "C8YRootCAName": "cumulocityROOTCA",
        "PushInterval": 12,
        "RegName": "c8yreg"
      },
      "ConnectRetryMax": 10,
      "ConnectRetryMin": 2,
      "DatasrvName": "secomea_c8y",
      "DatasrvProtocol": "C8Y/REST"
    },
    {
"ConnectRetryMax": 60,
"ConnectRetryMin": 2,
"DatasrvName": "DCC-pilot",
"DatasrvProtocol": "SCI/SPD",
"IOPin": true,
"SCISPDParams": {
"DevCertName": "dccdevcert",
"DevPkeyName": "dccprivkey",
"PushInterval": 5,
"RootCAName": "dccrootca",
"SCIServerAddr": "dcm-dcc.secomea.com",
"SPDPort": 443,
"Security": "TLS1.2"
}
} ] }
360
Creation date: 11/12/2019 14:15 (skr@secomea.com)      Updated: 20/04/2021 09:40 (jmp@secomea.com)