--- title: "DCM config file - General file with several functions." slug: "dcm-config-file-general-file-with-several-functions" tags: ["Data Collection Module", "JSON config", "DCM", "Examples", "Modbus TCP", "OPC UA", "dataserver"] updated: 2021-05-26T06:12:12Z published: 2021-05-26T06:12:12Z canonical: "kb.secomea.com/dcm-config-file-general-file-with-several-functions" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.secomea.com/llms.txt > Use this file to discover all available pages before exploring further. # DCM config file - General file with several functions. 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" ] } ] } ``` ## Related - [Getting started with DCM - Amazon IoT Core](/getting-started-with-dcm-amazon-iot-core.md) - [Getting started with DCM - Schneider Electric EcoStruxture (Machine Advisor)](/getting-started-with-dcm-schneider-electric-ecostruxture-machine-advisor.md) - [Getting Started with DCM - Azure IoT Hub](/getting-started-with-dcm-azure-iot-hub.md) - [Dataserver Microsoft Azure IoT Hub](/microsoft-azure-iot-hub-dataserver.md) - [Dataserver Amazon IoT Core](/amazon-iot-core-dataserver.md) - [DCM config file structure and editing](/dcm-config-file-structure-and-editing.md) - [Data Collection Module by Secomea (Introduction)](/data-collection-module-by-secomea-introduction.md)