DCM config file structure and editing
  • 23 Nov 2021
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

DCM config file structure and editing

  • Dark
    Light
  • PDF

Article Summary

Prerequisite:

  • Starter package (SiteManager + accounts) 
  • Other sections in DCM:
  • Getting started
  • Guides
  • Examples
  • Frequently asked questions
  • Troubleshooting

Structure, How to read JSON

The Config file is divided into specific levels as illustrated here by the vertical lines.

When you have more entries within the same level, the previous entry must be followed by a comma ","

So the entries in lines 2, 3 & 13 are at the same level and the comma is placed at the end of lines 2, 12(which is actually the end of the section started at line 3)
This section contains the sections Main config, Collectors and DataServers

The first (and only collector) is lines 4-11
The first (and only samplepoint) is lines 7-9

If another collector should be added,

  • copy line 4-11
  • place a comma at line 11 after the }
  • insert the copy of lines 4-11, so they would become lines 12-19

If another samplepoint should be added:

  • copy line 7-9
  • place a comma at line 9 after the }
  • insert the copy of lines 7-9, so they would become lines 10-12

And so on until the config file is as desired.

Notes

The order in which the samplepoints are listed can have an influence on the function of the individual samplepoints.

With OPC UA it has been experienced that it's important that the samplepoint collecting from External devices must be entered before any aggregations.

Editing, How to edit the JSON file. 

General information about the config file.

  • ConfigName (string, mandatory). Unique name for this configuration file. Follows the rules for names.
  • ConfigDescription (string, optional). Text describing this configuration.
  • CheckpointInterval (integer == 0 or >= 60, optional). The interval with which all data from the internal datasample cache is saved to disk. The more unstable (power) that the SiteManager is, the more often data should be saved. Saving it often, however, will also cost performance and wear on the hard disk/flash. A value of 0 means, it never checkpoints, otherwise, it means an interval in seconds between saves. If not specified the value 15 * 60 (15 minutes) is used.
  • AlarmsSaved (integer >= 4, optional). The number of alarms saved in the store-and-forward database. If this value is not specified, it will default to 32.
  • WaitForNTP (boolean, optional). Synchronize DCM data collection with NTP time. If this parameter is true, all DCM collectors will not begin collecting data until NTP is enabled and configured and NTP has synchronized date/time. If not specified, the value is true.

Since the JSON format itself doesn't define a comment notation, DCM accepts a fieldname comment with any type of value in any section.

There is a concept of a sampleref, which is a string uniquely identifying a sample. The format is CollectorName:SampleName, where the CollectorName: part is optional and the CollectorName used will be the one given by the context. Some contexts do not provide any CollectorName, so here it is mandatory.

{
 "ConfigName": "Name the entire config",
 "ConfigDescription": "Describe the entire config",
 "CheckpointInterval": 600,
 "AlarmsSaved": 10,
 "Collectors": [

 {

 REPLACE THE ENTIRE RED SECTION WITH YOUR COLLECTOR TYPE

 "SamplePoints": [

 {

 "Samplepoint 1": "Values for the tags/samplepoints"

 }

 ]

 }
 ],
 "DataServers": [
 {

 REPLACE THE ENTIRE BLUE SECTION WITH YOUR DATASERVER TYPE

 }
 ]

}



Was this article helpful?