Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

...

Kotva
prepocet_zad_vyrazom
prepocet_zad_vyrazom
CALCULATE ARCHIVED VALUES BY DEFINED STATEMENT

The option allows defining a mathematic allows for the definition of a mathematical expression containing objects of Historical value  value type (the Statement tab). The expression can not contain references to any other D2000 objects. Calculation of the expression provides values to be archived.

For example:
We Let's have got two measurement points - two I/O tags, which are archived as historical values H.Flow1 and H.Flow2. If you need to archive the sum of both flows, you can use two methods:

  1. Create an object of Eval tag type, that adds together the values of the I/O tags and then archives it.
  2. Create an object of Historical value type with the expression of „H.Flow1 + H.Flow2“.

Both methods give the same result. A problem may occur when you need to modify e.g. the value of the object H.Flow1, which is already archived. If you used the first method, you must also manually change the value of the historical value. The second method automatically recalculates the expression and corrects the sum. So the D2000 Archive keeps the calculated (and also statistical) archives in synchronization with their source archives.

...

Kotva
zverejnovat_hodnoty
zverejnovat_hodnoty
Publish values

If the option Publish values option is checked, then the historical value will publish its last value:

...

Target structure

The parameter will appears appear if the the Publish values parameter is checked. It allows defining an object, that will contain values of the historical value - see the Publish values parameter. If it is not defined, the historical value itself will contain the values.

...

In the top part of the tab, an input edit field is placed. It serves for entering the expression, that determines the value of the historical value. The expression can contain functions, constants, and attributes - but objects must be of Historical value type only. The expression may also contain extended syntax.

Objects

The button allows selecting the selection of an object of the D2000 system. The selected object is to will be inserted into the expression on the current cursor position.
Note: Expression can contain objects of Historical value type only.

...

  • Continuous - continuous (on the fly) calculation. Result values are calculated on the fly and they are automatically available (depending on the system load). A disadvantage of the method is a higher demand for computing power (especially for frequent changes of primary historical values that enter into the expression).
  • On demand - the calculation is executed and the result is stored in the archive on demand. The demand can be generated by the CALCONDEMANDSTAT action or by the RECALC command ).
    Note: historical values calculated "on-demand" should not have any depending on historical values calculated continuously because their results would be wrong.
  • On read - the calculation is executed as a result of a read request. An advantage of this method is that values are not stored in the database so they don't occupy any disk space. There is no possibility of re-calculation in case of writing delayed data into the archive. A disadvantage is a the necessity to read source data and calculate it for each read request. This method should be used for objects whose values are rarely needed.
    Note: historical value calculated "on-read" should not have any depending historical values calculated continuously or "on-demand", because the result could be wrong in some cases (due to delayed data) or the calculation could be ineffective (multiple calculations of a single "on-read" object if it is used by several other historical values).

...