Wiki source code of 3. Metering Channels

Version 46.1 by Lana on 2025/11/30 19:45

Hide last authors
Lana 22.2 1 == CONTENT ==
Lana 3.2 2
Lana 3.3 3
4 == 1. INTRODUCTION ==
5
6 CENTO is a multifunctional software platform for data collection, processing, and display. This Guide contains a description of setting up metering of electricity, energy resources, as well as other types of metering.
7
8 It is assumed that the user, having read the instructions "User manual" and "Setup manual", is already familiar with the main elements of the interface and how to configure CENTO.
9
Lana 3.4 10 == 2. ELECTRICITY METERING ==
11
12 === 2.1. Device setup ===
13
14 CENTO software can work with a variety of metering devices that have the ability to measure and store power and power profiles. The metering function is enabled by adding the metering protocol corresponding to the device on the **Device editing** page (Settings > Devices, tags, channels > Devices), then, similar to other polling protocols, the parameters of communication with the device (RTU address, TCP/UDP port, timeout and number of connection attempts) and scheduled polling parameters (cron of CENTO rules) are specified, to configure electricity metering, the file number is specified in the "File#" field,  which stores power and power profiles.
15
Lana 21.2 16 We will consider the survey of historical data of interval values of accumulated electricity using the example of SATEC devices. For this purpose, the// SATEC (Modbus TCP)// protocol is used (see Fig 2.1).
Lana 4.2 17
Lana 23.2 18 [[image:Screenshot 2025-11-27 at 18.53.58.png||height="914" width="932"]]
Lana 4.2 19
20 Figure 2.1. Settings of the E/E metering protocol
21
22 Setting up the E/E metering protocol contains the following fields:
23
Lana 22.3 24 [[image:Screenshot 2025-11-27 at 18.56.14.png||height="63" width="404"]]
Lana 7.2 25
26 Selection of the accounting protocol from the drop-down list and its inclusion in the survey.
27
Lana 22.2 28 [[image:Screenshot 2025-11-27 at 18.56.53.png||height="112" width="404"]]
Lana 7.2 29
30 Setting up a poll according to the Cron rule (there can be several) with set attempts and timeouts.
31
Lana 22.2 32 [[image:Screenshot 2025-11-27 at 18.57.26.png||height="146" width="408"]]
Lana 9.2 33
34 Specifying the network address of the device and the port for the TCP connection.
35
Lana 22.2 36 [[image:Screenshot 2025-11-27 at 18.57.54.png||height="96" width="93"]]
Lana 9.2 37
38 Serial number of the E/E metering data file in the device's memory (for devices of the Satec type).
39
Lana 23.2 40 [[image:Screenshot 2025-11-27 at 18.58.26.png||height="80" width="144"]]
Lana 9.2 41
Lana 11.2 42 Device administrator password.
43
Lana 22.3 44 [[image:Screenshot 2025-11-27 at 18.58.55.png||height="114" width="406"]]
Lana 11.2 45
46 Coefficients of conversion of interval values of readings/power (depends on the type of metering device, as well as on the type of connection (direct or with measuring transformers).
47
Lana 22.3 48 [[image:Screenshot 2025-11-27 at 18.59.34.png||height="106" width="410"]]
Lana 11.2 49
Lana 13.2 50 Transformation coefficients of current and voltage transformers, meter coefficient.
51
Lana 22.3 52 [[image:Screenshot 2025-11-27 at 19.00.09.png||height="88" width="217"]]
Lana 13.2 53
54 Specifying the TCP connection number for parallel polling of one device (for example, if the device is connected via a Modbus TCP/Modbus RTU converter, then the number of the trunk to which the device is connected is specified).
55
Lana 22.4 56 [[image:Screenshot 2025-11-27 at 19.00.46.png||height="77" width="216"]]
Lana 13.2 57
Lana 15.2 58 Selection of energy/power profile.
59
Lana 22.4 60 [[image:Screenshot 2025-11-27 at 19.01.19.png||height="152" width="406"]]
Lana 15.2 61
62 Enabling/disabling the time synchronization of the device on the CENTO side, with the configured period of maximum time correction in seconds, as well as the permissible deviation.
63
Lana 22.4 64 [[image:Screenshot 2025-11-27 at 19.01.49.png||height="240" width="133"]]
Lana 15.2 65
Lana 17.2 66 Enabling/disabling a particular channel.
67
Lana 23.2 68 [[image:Screenshot 2025-11-27 at 19.02.20.png||height="68" width="285"]]
Lana 17.2 69
70 Serial number of the record (metering channel) in the E/E metering data file in the device's memory (for devices of the Satec type).
71
Lana 23.2 72 [[image:Screenshot 2025-11-27 at 19.02.51.png||height="100" width="291"]]
Lana 17.2 73
74 When this option is enabled, the specified numbers of energy and power files are not taken into account.
75
Lana 23.2 76 [[image:Screenshot 2025-11-27 at 19.03.24.png||height="101" width="98"]]
Lana 19.2 77
78 Enabling/disabling reading logs from the device.
79
Lana 23.2 80 [[image:Screenshot 2025-11-27 at 19.03.56.png||height="205" width="98"]]
Lana 19.2 81
82 Rounding of channels.
83
84 Viewing and changing the metering parameters in the memory of the metering device is carried out in accordance with the instructions of the operating manual for this device.
85
Lana 21.2 86 === 2.2. Setting up metering channels ===
87
88 Electricity meters often do not need to manually add channels to the list of tags, so all the settings are in the metering protocol.  The display of the used accounting channels from the protocol automatically appears on the **Tags, channels** tab, but with a ban on editing actions.
89
90 [[image:Screenshot 2025-11-27 at 19.06.17.png]]
91
92 Figure 2.2. Display of metering channels
93
94 Clicking on the channel name or its ID, redirects to the **Device editing: editing** page, as shown in Fig. 2.1.
95
Lana 21.3 96 The forms for filling in the fields for setting up electricity metering protocols are different and depend on the type/model of the device, instructions for working with the protocols can be described in different manuals and, if necessary, provided to the User.
97
Lana 22.1 98 == 3. ENERGY METERING (COMING) ==
Lana 21.3 99
Lana 22.1 100 === 3.1. Device Setup (Coming) ===
Lana 21.3 101
Lana 22.1 102 == 4. OTHER TYPES OF METERING ==
103
Lana 23.2 104
105 In addition to metering electricity and energy resources, the CENTO software supports tracking of operating time, emissions and discharges, as well as product accounting.
106
107 Metering can be implemented not only on the basis of specialized metering devices, but also performed in the CENTO software itself on the basis of tags (real-time data). For example, using information about the state of the equipment (0 - disabled and 1- enabled), the user can set up a metering channel that will calculate the operating time of the equipment. And using the processing functions (see Section 5 of this manual), you can form metering channels (increments) from the current capacity, instantaneous flow or an ever-growing meter.
108
Lana 24.2 109 == 5. CALCULATED CHANNELS ==
110
111 If the device installed at any connection does not have the function of storing interval values of electricity/power in the memory, as well as archived values for other types of metering, CENTO has the function of generating interval values from tags (real-time data). In order to create a metering channel, go to Settings > Devices, tags, channels > Calculation channels (see Fig. 5.1).
112
113 [[image:Screenshot 2025-11-30 at 16.26.53.png]]
114
115 Figure 5.1. List of calculated channels
Lana 25.2 116
Lana 32.2 117 === 5.1. Channel from tag ===
Lana 25.2 118
Lana 27.2 119 To create a new metering channel from real-time data (tags), click the button [[image:Screenshot 2025-11-30 at 16.28.39.png||height="18" width="92"]]
Lana 25.2 120
Lana 27.2 121 Then the **Channel from tag:**
122
123 **editing** page opens. When adjusting an already created metering channel, the page **Channel from tag: editing** will open (see Fig.  5.2).
124
125 [[image:Screenshot 2025-11-30 at 16.29.45.png]]
Lana 29.2 126
127 Figure 5.2. Channel from tag: editing
128
129 On the page that opens, specify the name of the channel, its ID (it is written automatically when created, and it does not change for the existing one) and the Code (an optional field), the category of the parameter – electricity/energy resources/technology/emissions/diagnostics/time and the corresponding categories of units of measurement, whether the metering channel has metrological significance, and also fill in the fields:
130
131 [[image:Screenshot 2025-11-30 at 16.30.29.png]]
132
Lana 31.2 133 ID of the tag on the basis of which the calculation channel will be created.
Lana 29.2 134
135 [[image:Screenshot 2025-11-30 at 16.30.53.png]]
136
Lana 31.2 137 Selection of the device in the object tree from which the specified tag ID is taken.
138
139 [[image:Screenshot 2025-11-30 at 16.31.25.png]]
140
141 Function for processing parameter values.
142
143 [[image:Screenshot 2025-11-30 at 16.31.55.png]]
144
Lana 32.2 145 Value aggregation interval.
146
147 [[image:Screenshot 2025-11-30 at 16.32.28.png]]
148
149 Processing the calculated channel with formula input.
150
Lana 35.2 151 === 5.2. Calculated channel ===
Lana 32.2 152
Lana 35.2 153 To create a channel that processes the values of several connections, or interval values, for example, summing up electricity consumption by a group of consumers (total energy consumption) or calculating the balance of consumed energy, click the button on the **Calculated channels** tab (see Fig. 4.1), then click [[image:Screenshot 2025-11-30 at 16.33.58.png||height="22" width="116"]]
154
155 When adjusting an already created metering channel, the **Settlement channel: editing** page opens (see Fig. 5.3).
156
157 [[image:Screenshot 2025-11-30 at 16.34.28.png]]
Lana 37.2 158
159 Figure 5.3. Metering channel: editing page
160
161 On the page that opens, specify the name of the channel, its ID (it is specified automatically when created, but it does not change for the existing one) and the Code (an optional field), the category of the parameter – electricity/energy resources/technology/emissions/diagnostics/time and the corresponding categories of units of measurement, the object and device to which the parameter will be linked.
162
163 In the **Template** field, specify the formula for processing the values of all parameters used in the calculation. The formula can use arithmetic operations, conditions, mathematical functions that are specified in [[image:Screenshot 2025-11-30 at 16.35.23.png||height="30" width="135"]] and the following variables for power channels:
164
165 * ea_imp - energy A+
166 * ea_exp - energy A-
167 * er_imp - energy R+
168 * er_exp - energy R-
169 * pa_imp - power A+
170 * pa_exp - power A-
171 * pr_imp - R+ power
172 * pr_exp is the power of R-
173 * ra_imp - A+ readings
174 * ra_exp - A- readings
175 * rr_imp - R+ readings
176 * rr_exp - R- readings
177
Lana 41.2 178 === 5.3.  Calculated channels via Information Model ===
Lana 39.2 179
180 For calculation channels of the same type, it is possible to define custom formulas that operate based on Information Model objects and their attributes. In addition to tags and channels, the Information Model can also supply supplementary data (e.g., reference information). To create a template, click the create template button [[image:Screenshot 2025-11-30 at 16.36.34.png||height="27" width="26"]] as shown in Fig. 5.4.
181
Lana 41.2 182 [[image:Screenshot 2025-11-30 at 16.37.01.png]]
183
184 Fig. 5.4 – Creating a Formula Template
185
186 [[image:Screenshot 2025-11-30 at 16.37.47.png]]
187
188 Figure 5.5. Creating custom formula
Lana 43.2 189
190 As shown in Fig. 5.5, the custom formula creation window requires input of the formula name, an optional identifier code, and the formula expression. An example demonstrating the calculation of losses in cable lines is provided in Fig. 5.6.
191
192 [[image:Screenshot 2025-11-30 at 16.38.43.png]]
193
194 Figure 5.6. Calculation formula
195
196 [[image:Screenshot 2025-11-30 at 16.39.09.png]]
197
198 Figure 5.7. Using calculation formula
199
Lana 43.3 200 Fig. 5.7 shows the application of the calculation formula:
201 3*IM{Object identifier IM}.r_ohm_per_km*pow(agg("mean","{line current}","{Interval}"),2)*0.001, where:
202
203 * **IM{Identifier of the IM object}. r_ohm_per_km **– reference to the value of the attribute with the code **" r_ohm_per_km " "** of the information model object
204 * **Pow **– exponentiation
205 * **Agg **is an aggregation function
206 * **Mean **– average value for the time interval
207 * **{line current} **– a link to the tag ID
208 * **{Interval} **– data interval.
209
210 The braces **{ }** contain the arguments that need to be entered in the data entry fields as in Fig. 5.7.
211
212 === 5.4. Downloading/Uploading calculated channels ===
213
214 The** Downloading/Uploading configuration files** page (Settings > Configuration files) provides functionality for importing and exporting calculation metering channels using Excel files.
215
Lana 44.2 216 [[image:Screenshot 2025-11-30 at 16.40.46.png]]
217
218 Figure 5.8. Excel file
219
220 Fig. 5.8 shows an example of an Excel file with calculated metering channels, which allows adding new channels, as well as adjusting existing ones. All the necessary functions for entering formulas are available in formula reference interface, as well as in Table 5.1.
221
222 Table 5.1. Functions used in formulas.
223
224 |Function|Description|Example
225 |diff|Calculating increments from accrual (readings) by channel|diff([dev-2-214]) - calculation of increments from the cumulative total (readings) on channel 214 of device 2
226 |mean|Average Time Interval|mean by the ID10001 tag for a 1-hour time interval
227 |integral|Integral of Values|Integral by tag ID40011100 in a 1-hour time interval
228 |first|Indication at the beginning of the interval|first([ti50206_type5], 3600, 0, 0) – calculation of readings based on the ID50206 tag at the beginning of the interval, calculated every hour
Lana 44.3 229
Lana 45.2 230 == 6. RECEIPT OF ACCOUNTING DATA ==
Lana 44.3 231
Lana 45.2 232 The** Analysis of the receipt of data** page is the same for all types of metering. It is described in details in the "User manual"
Lana 44.3 233
Lana 45.2 234 === 6.1. Manual polling ===
235
236 If it is necessary to re-acquire data from metering devices, a manual poll should be performed. To do this, navigate to the **Receipt of metering data** page (Analysis > Receipt of metering data). This action opens the **Analysis of the receipt of data** interface (see Fig. 6.1)
237
238 [[image:Screenshot 2025-11-30 at 16.44.01.png]]
239
240 Figure 6.1. Analysis of the receipt of data
241
242 In the device tree, select the required metering point, find the missing data profiles and click on the button
243
Lana 44.3 244