Porovnávané verzie

Kľúč

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

...

Configuration dialog box of processes consists of several parts (tabs) containing the similar parameters.

General properties
Groups
Archive
Statement
Time parameters
Conditions
Statistics
Filter

Kotva
zakladne_vlastnosti
zakladne_vlastnosti
General properties

...

Selection of a value type of the historical value. The possible types are shown in the following table.

LabelValue type
Int-IntegerInteger
Re-RealReal
Bo-BooleanBoolean

Note: Value type may be defined for the archive purpose Calculate archived values by defined statement only.

...

Technological limits are effective only for historical values which are calculated by D2000 Archiv (evaluated and statistical historical values). There are 4 limits defined: VHL, HL, LL and VLL. Limit can be defined either directly – by the value entry into the input field, or its value can be determined by a system object (dynamic limit) – the button right from the input field.

VHLVery High Limit - the highest limit
HLHigh Limit
LLLow Limit
VLLVery Low Limit - the lowest limit


Values of the individual limits determine the state of the historical value according to its value. The relation value- limits gives six possible states.

LimitObject state according to relation Value - Limit
 

Above VHL (object value > VHL)
VHL
 
  


Above HL (HL < object value < VHL)
HL
 


 
Normal (LL < object value < HL)
LL
 


Bellow LL (VLL < object value < LL)
VLL
  


Bellow VLL (object value < VLL)

As the limits can be dynamic (determined by the object value), a situation when the relation VLL<LL<HL<VHL is not valid (the limits crossing) can occur. The historical value is then in Limit Problem state.

...

There are the following options:

...

Optimisation of old values processing coming from communication (automatically or as a result of TELL command GETOLDVAL) or values of remote tags (as a result of TELL command GETOLDVAL).
If the checkbox is checked, during processing of old value the archive database is queried whether the value is already present there. If it exists, the value is discarded (and recalcs of statistical or calculated archived values which use this primary archive value are not performed either).
Note: Optimisation is useful e.g. for archiving of I/O tags from communication using the protocol IEC62056-21:2002 File I/O. Its communication files contain several historical values (which KOM process sends as old values) and one new value for every I/O tag.

...

  • Periodical  - writing values into the archive is periodical. The archiving process in defined time moments stores the archive object value into the archive. Timestamp (the value time) is not given by the occurrence time of the archive object value, but by the time of the value storing into the archive.

    Reading the values stored periodically by means of D2000 system (ESL: GETARCHARR, GETARCHVAL, D2000 ObjApi: GetArchivData, D2000 VBApi: VBApiGetArchData, D2000 WorkBook) follows the rule that the archive object value out of time moments given by the period, is unknown (invalid). The result of the data reading is therefore given by the oversampling and the begin (BT) and end (ET) time as follows:
    • oversampling (step) = 0
      The reading results are all the values, time of which belong into the interval <BT, ET>.
    • oversampling (step) <> 0
      The reading result is the value array with timestamps continuously:
      BT+0*step, BT+1*step, BT+2*step, ..., BT+N*step.
      The number of values is given by the end ET of the time interval. The array value without a record with the same timestamps in the archive is invalid. The value with such a record is filled according to it. The above facts imply, that when reading periodical data, it is necessary (advisable):
      • to adjust BT exactly for some of the object archiving moments given by the period and time offset of the archiving.
      • oversampling value (step) must be an integer multiple of the archiving period.
      • ET = BT + (N-1)*step, where N is an integer number: the number of values in the final selection.

      Note: The statistical archive, from the reading point of view, acts periodically.
  • Kotva
    sa_filter1
    sa_filter1
    On value change
    - just value changes of the archive object undetected by the value filter are stored into the archive.

    Reading of values stored by using a filter by means of D2000 system (ESL: GETARCHARR, GETARCHVAL, D2000 ObjApi: GetArchivData, D2000 VBApi: VBApiGetArchData, D2000 WorkBook) follows the rule that the archive object value at any time (t) is given (equal) by the last historical value before the given time (t). The data reading result is therefore given by the oversampling and the begin (BT) and end (ET) time as follows:
    • oversampling  (step) = 0
      The reading result are all the values, time of which belongs to the interval <BT, ET> and 1 value before BT time, in case there is no value exactly equal with BT  time in the archive.
    • oversampling (step) <> 0
      The reading result is a array of values with timestamps continuously:
      BT+0*step, BT+1*step, BT+2*step, ..., BT+N*step.
      The number of values is given by the end ET of the time interval. The array value without any record in the archive with the same timestamp will be given by the last value before the time required.

...

Note: To ensure the correct functionality of the feature Publish values for an one-column historical value (structured historical value) the number of rows (columns) of the structured variable defined in the parameter Target object must be the same as the number of rows (columns) of the object defined by the parameter Object to archive.

Target object

The input field is enabled if the option Publish values is checked. It allows you to define an object, that will contains values of the historical value. When archiving a simple historical value, target object must not be defined, but must be defined for one-column historical value and structured historical value - the size of target object must be the same as the size of the object defined by the parameter Object to archive.

Kotva
prepocet_stat_funkciou
prepocet_stat_funkciou
CALCULATE ARCHIVED VALUES BY STATISTICAL FUNCTION

...

If the option Publish values is checked, then the historical value publishes its last archived value in the way, that depends on the object defined by the parameter Historical value as follows:

  • For a simple HV - the object of Historical value type you are configuring gets the last value (if the parameter Historical value is not defined).
  • When archiving an one-column HV - last archived values of individual items are filled into the relevant items of the column of a Structured variable type object defined by the parameter Target object.
  • When archiving a structured HV - last archived values of individual items are filled into the relevant items of a Structured variable type object defined by the parameter Target object.

Note: To ensure the correct functionality of the feature Publish values for an one-column HV (structured HV) the number of rows (columns) of the structured variable defined in the parameter Target object must be the same as the number of rows (columns) of the object defined by the parameter Historical value.

Target object

The input field is enabled if the option Publish values is checked. It allows you to define an object, that will contains values of the historical value. When archiving a simple HV, target object may not be defined, but must be defined for one-column HV and structured HV (see the parameter Historical value) - the size of target object must be the same as the size of the object defined by the parameter Historical value.


Kotva
prepocet_zad_vyrazom
prepocet_zad_vyrazom
CALCULATE ARCHIVED VALUES BY DEFINED STATEMENT

The option allows to define a mathematic expression among objects of Historical value type (the tab Statement). The expression can not contain the references to any current values of D2000 system objects. Calculation of the expression provides values to be archived.

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

...

Definition of archive size - see the parameter Publish values. The parameter will appear, if the parameter Publish values is not checked.

...

Definition of an object, that will contain values of the historical value - see the parameter Publish values. The parameter will appear, if the option Publish values is checked.

...

If the option is checked, you must define a period and offset (the tab Time parameters).

Kotva
zverejni_hodnoty
zverejni_hodnoty
Publish values

...

  • Continuous - continuous (on the fly) calculation. Result values are calculated on the fly and they are automatically available (in dependence on the system load). A disadvantage of the method is a higher demand on the computing power (especially for frequent changes of primary historical values).
  • On demand - calculation is executed and result is stored to the archive on demand. The demand can be generated by the action CALCONDEMANDSTAT or the Tell command RECALC).
    Note: historical value calculated on demand should not have any depending historical values calculated continuously, because the result would be wrong.
  • On read - 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 necessity to read source data and calculate it for each read demand.
    Note: historical value calculated on read should not have any depending historical values calculated continuously or on demand, because the result could be wrong (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).

...

Note: For archives filled from script, this setting does not directly affect anything - the data has a time stamp with which it was stored from the script. It however affects the calculation of statistics and whether statistics are calculated from the value at the edge of the interval.

Kotva
podmienka
podmienka
Conditions

...

When archiving into the statistical archive it is possible to use these implemented functions.

FunctionMeaning
NoneNo function.
Average *Arithmetical average of all archive object values.
W-Average *Weighted arithmetical average of all archive object values.
IntegralTime integral of historical values.
SumSum of archive object values.
MaximumMaximum of archive object values.
MinimumMinimum of archive object values.
CountNumber of archive object values.
FilterApplying a filter for value storing into the statistical archive.
Increment
Increment between values. Number

If the newer value is greater than the older one, then the difference between the values, otherwise the newer value (the function is useful to process counter values that oveflow and start from zero again).
Parameter (Compare value) – weight of impulse. The result will be the impulse multiplied by its weight. Weight of 1 will ensure standard behaviour.

DeltaDelta between values. Parameter (Compare value) – weight of impulse.
The result will be the impulse multiplied by its weight. Weight of 1 will ensure standard behaviour.
EcoAvgAverage of the object values within the elapsed time period (Period parameter in Time parameters tab) according the methodology based on flags of individual values entering the statistic. The same purpose is fulfilled by the function %EcoAveR, that is implemented for eval tags.
GT Time (>)The function calculates the time, during which the value of the historical value was greater than the entered constant (Compare value).
GE Time (>=)The function calculates the time, during which the value of the historical value was greater or equal to the entered constant (Compare value).
LT Time (<)The function calculates the time, during which the value of the historical value was lower then the entered constant (Compare value).
LE Time (<=)The function calculates the time, during which the value of the historical value was lower or equal to the entered constant (Compare value).
Maximum in time intervalObsolete - do not use!
Minimum in time intervalObsolete - do not use!
Number of local maximums
 

Number of local minimums
 

Sum of positive valuesSum of positive values of the historical value.
Sum of negative valuesSum of negative values of the historical value.
Average of positive valuesArithmetical average of positive values of the historical value.
Average of negative valuesArithmetical average of negative values of the historical value.
Sum of incrementsSum of increments for given time interval. If the new value is less than the old value, the increment is 0.
Parameter (Compare value) – weight of impulse.
The result will be the impulse multiplied by its weight. Weight of 1 will ensure standard behaviour.
Time slice**Object value in given time moments.
Sample standard deviationThe function calculates the sample standard deviation of all values of the archive object.

* For non-periodical values we recommend you to use the W-Average (weighted average) function and the Average function for periodical values.
** The function allows recalculation of the historical value if historical values archived primarily have been changed.

...

The difference among the functions INCREMENT, DELTA and SUM OF INCREMENTS is shown in the following figures.

In the first case, all three functions are equal to 5 (10-5)

In the second case

  • DELTA = 5-10 = -5
  • INCREMENT = 5 (because 5 <10)
  • ADDITIONAL AMOUNT = 0 (because 5 <10)

In the third case

  • DELTA = (10 - 5) + (2 - 10) + (10 - 2) = 5
  • INCREMENT = (10-5) + 2 (because 5 <10) + (10-2) = 15
  • ADDITIONAL AMOUNT = (10-5) + 0 (because 5 <10) + (10 - 2) = 13

Kotva
vypocet_statistika
vypocet_statistika
Calculation

...

  • Continuous - continuous (on the fly) calculation. Result values are calculated on the fly and they are automatically available (in dependence on the system load). A disadvantage of the method is a higher demand on the computing power (especially for frequent changes of primary historical values).
  • On demand - calculation is executed and result is stored to the archive on demand. The demand can be generated by the action CALCONDEMANDSTAT or the Tell command RECALC). Note: historical value calculated on demand should not have any depending historical values calculated continuously, because the result would be wrong.
  • On read - calculation is executed as a result of a read request. An advantage of the method is that values are not stored in the database so they don't occupy any disk space. There is no chance of wrong calculation in case of writing delayed data into the archive. A disadvantage is a necessity to read source data and calculate it for each read demand.
    Note: historical value calculated on read should not have any depending historical values calculated continuously or on demand, because the result could be wrong (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).

...