Changes for page 2. Setup Manual
Last modified by Iaroslav Platonov on 2026/06/08 09:28
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -295,7 +295,7 @@ 295 295 296 296 The rules and specifics for setting up tags for different protocols and devices are described in separate configuration guides. 297 297 298 -==== 2.3.2. Add a calculation tag ==== 298 +==== 2.3.2. Add a calculation tag ==== 299 299 300 300 If you select the "No log" item in the "Tag Polling Description" window (see Fig. 2.11) in the "Log" field, a calculated tag will be created, the value of which can be formed based on the transformation of other tags. 301 301 ... ... @@ -307,137 +307,4 @@ 307 307 308 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 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 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 -Permissible variable designations in formulas are given in Table 2.3. 414 - 415 -Table 2.3 – Designation of variables in formulas. 416 - 417 -|Variable|Description 418 -|[val]|Current value of the telemeter from BDRV 419 -|[x1], [x2], ...|The binding of these variables is determined when describing the calculated parameters in the "Parameters" column. 420 -|((( 421 -[tiN], 422 - 423 -where N is the serial number of the TI 424 -)))|The meaning of telemetering from the BDRV 425 -|((( 426 -[devstatusN], 427 - 428 -where N is the device number (ID) 429 -)))|Device status (0 – disabled in the configuration; 1 – normal; 2 – at least one TUE has abnormal quality (out of bounds or error in the formula); 3 – device polling error (device is not available); 4 – manual input is present in the tags or channels of the device, 9 – no status). 430 -|((( 431 -[devprevstatusN] or [prevdevstatusN] 432 - 433 -where N is the device number (ID) 434 -)))|Previous device status (0 – disabled in the configuration; 1 – normal; 2 – at least one TUE has abnormal quality (out of bounds or error in the formula); 3 – device polling error (device not available); 4 – manual input is present in the tags or channels of the device, 9 – no status). 435 -|((( 436 -[prevN], 437 - 438 -where N is the serial number of the TI 439 -)))|Previous Value of Telemeter from BDRV 440 - 441 -2.3.4. Configuring calculation channel 442 - 443 -