Changes for page 2. Setup Manual

Last modified by Iaroslav Platonov on 2026/06/08 09:28

From version 94.1
edited by Lana
on 2025/11/10 00:49
Change comment: Uploaded new attachment "1762753769568-573.png", version {1}
To version 101.1
edited by Lana
on 2025/11/10 00:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -302,3 +302,115 @@
302 302  The value of the calculated tag is determined by the formula entered in the "Value Processing Formula" field (see Fig. 2.11) or by the Custom Formula (see Fig. 2.12). Examples of formulas are given under the Value Processing Formula field. The available features are also listed in Table 2.1 of this manual.
303 303  
304 304  For calculation tags, setpoints can be configured in the same way as tags with protocols.
305 +
306 +After filling in the required fields, you should save the changes by clicking the button  [[image:1762753769568-573.png||height="23" width="60"]]. Then, to apply the changes, you need to click the "Update Configuration" button in the drop-down menu in the upper right corner of the page.
307 +
308 +Adding calculation tags to CENTO, as well as other configuration elements, is possible through the above-described web interface and using Excel files. Loading the CENTO configuration via Excel files is described in Section 3 of this guide.
309 +
310 +==== 2.3.3. Setting up calculation formulas ====
311 +
312 +For calculated tags (see section 2.3.2), different processing formulas are used. If you use the same type of formulas for a number of tags, you should make a description of these formulas so that you can use them to process any required tag.
313 +
314 +You can add new formulas and adjust existing formulas on the Tag Polling Description page (Settings – Devices, Tags, Channels, Tags, Channels tab).
315 +
316 +[[image:Screenshot 2025-11-09 at 21.51.34.png||height="251" width="253"]]
317 +
318 +Fig. 2.12 – Editing Formula Templates
319 +
320 +To adjust the existing formula, you should:
321 +
322 +* click on the "Template" field to open the list of available formula templates and use the mouse wheel to find the desired formula (see Fig. 2.12)
323 +* hover over it until the "edit" and "delete" symbols appear [[image:1762753922390-602.png||height="21" width="168"]]
324 +* if the template needs to be deleted, click on the "Delete" icon
325 +* if the template needs to be corrected, click on the "Edit" icon
326 +* The Edit Formula window opens (see Figure 2.13), where you can change the name of the formula in the Name field, and you can change the formula itself in the Formula field. There is also a hint with examples in the window
327 +* To save the changes, click the button  [[image:1762753922390-303.png||height="21" width="55"]]
328 +
329 +[[image:Screenshot 2025-11-09 at 21.53.06.png||height="607" width="397"]]
330 +
331 +Fig. 2.13– Edit Formulas Page
332 +
333 +To add a new formula, on the Tag Polling Description page, click the button [[image:1762754032495-106.png||height="25" width="27"]]
334 +
335 +[[image:Screenshot 2025-11-09 at 21.54.20.png||height="600" width="402"]]
336 +
337 +Fig. 2.14– Formula Creation Page
338 +
339 +On the "Formula Creation" page that opens (see Fig. 2.14), you need to enter the name of the new formula and the formula itself in the "Formula" field.
340 +
341 +In the expression of the formula, arithmetic operations, conditions, calls of mathematical and special functions, etc., are allowed.
342 +
343 +The functions used in the formulas are described in Table 2.2.
344 +
345 +Table 2.2 – Functions used in formulas.
346 +
347 +|Function|Description|Use|Result
348 +|Bit|Returns the value of a single specified bit|Bit(4,2)|1
349 +|Bits|Returns the value of multiple specified bits|Bits(12,2,2)|3
350 +|if|Returns a value based on whether or not a specified condition is met.|if(3-2 = 1, 'value is true', 'value is false')|'value is true'
351 +|(% rowspan="2" %)Pow|(% rowspan="2" %)Returns a value raised to the specified power.|Pow(3, 2)|9
352 +|Pow([dev-101-ea_imp],2)|(((
353 +Dev-101-ea_imp=6
354 +
355 +36
356 +)))
357 +|(% rowspan="2" %)Round|(% rowspan="2" %)Rounding a value to the nearest integer or a certain number of decimal places.|Round(3.222, 2)|3.22
358 +|Round([dev-101-ea_imp],1)|(((
359 +Dev-101-ea_imp=6.66
360 +
361 +6.6
362 +)))
363 +|agg|Aggregates all tag values per interval by function. The result publishes to the timestamp of the end of the interval|agg(mean, ti42, 3m) - average of tag 42 over 3 minutes|35
364 +|Abs|Returns the modulus //of a number//.|ABS(-1,234)|1,234
365 +|sign|Returns the sign of a //number// in the form 1~|0 ~|-1.|sign(-1,234)|-1
366 +|Sqrt|Returns the square root of a given number|Sqrt(4)|2
367 +|rndfloat|Returns a random real number from the range [0.0,1.0]|rndfloat()|0.123
368 +|rndintn|Returns a random integer from the range [0,n]|rndintn(5)|3
369 +|split|Splits a //row// by a given //separator// and returns a substring by //index//|split("02-01-2006 15:04",' ',1)|"15:04"
370 +|parsetime|Returns the number of seconds since the beginning of the Unix epoch according to //the format// from //the string//|parsetime('yyyy-mm-dd hh:mi:ss', "2017-05-26 15:58:30")|1495814310
371 +|Time|Returns the current time in the specified format|time('dd.MM.yyyy HH:mi:ss')|16.04.2020 01:41:07
372 +|Unixepochformat|Converts the date from //seconds// since the beginning of the Unix era to a given //format//|Unixepochformat(1495814310, 'yyyy-mm-dd hh:mi:ss')|2017-05-26 15:58:30
373 +|acos|Returns the arccosine of the //number//.|acos(0)|90
374 +|asin|Returns the arc sine of //the number//.|asin(1)|90
375 +|atan|Returns the arctangent of the //number//.|atan(1)|45
376 +|atan2|Returns the arctangent for the specified //x// and //y coordinates//.|atan2(1, 0)|90
377 +|cos|Calculates the cosine of a //number//.|COS(60)|0.5
378 +|pi|Returns the value of Pi.|pi()|3.141592653589793
379 +|sin|Calculates the sine of a //number//.|sin(30)|0.5
380 +|tan|Calculates the tangent of the //number//.|tan(45)|1
381 +|First_1h, First_1d, First_1mon|Returns the value of the tag increment at the beginning of the current hour, day, and month|First_1h(ti10101)|32.26
382 +|(% rowspan="4" %)ticker(<spacing>, <expression1>, <expression2(optional)>)|(% rowspan="4" %)(((
383 +Executes expression1 when the interval is triggered, or expression2 otherwise. Expression2 may be missing. In this case, the calculation will be made only at the moment of triggering the interval.
384 +
385 +The interval can be set as a number - periodicity in seconds, or as a string in quotation marks - cron rule.
386 +
387 +**If the formula contains prev, then you need to run the ticker using manual input and then reset it**.
388 +)))|ticker(3, if(ti2==1, prev5+3, prev5)) - ti2 set counter to 1, which is updated every 3 seconds|60 sec
389 +|ticker("0 0 8 * * *", 0, prev5+ti2-prev2) - accumulate tag changes with id 2 with a reset to 0 every day at 8 am|(((
390 +at 7:59 – ticker = 100 sec.
391 +
392 +at 8:00 – ticker = 0 sec.
393 +)))
394 +|(((
395 +ticker("0 0 0 * * *", ti2, prev1) - the accumulation of tag changes from id 2 at the beginning of the day.
396 +
397 +In this formula, you can specify //a specific time, as well as the day, month, and days of the week.//
398 +)))|(((
399 +If at 00:00:00 ti2=120 minutes, then the ticker during this day will be equal to 120 minutes.
400 +
401 +
402 +)))
403 +|(((
404 +ticker("0 0 0 1 * *", ti2, prev1) - accumulation of tag changes from id 2 at the beginning of the month.
405 +
406 +
407 +)))|(((
408 +If on the 1st day of the month at 00:00:00 ti2=200 minutes, then the ticker during this month will be 200 minutes.
409 +
410 +
411 +)))
412 +
413 +
414 +
415 +
416 +
1762753922390-303.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +942 bytes
Content
1762753922390-602.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +1.6 KB
Content
1762754032495-106.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +764 bytes
Content
Screenshot 2025-11-09 at 21.51.34.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +33.7 KB
Content
Screenshot 2025-11-09 at 21.53.06.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +50.5 KB
Content
Screenshot 2025-11-09 at 21.54.20.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Lana
Size
... ... @@ -1,0 +1,1 @@
1 +43.0 KB
Content