Porovnávané verzie

Kľúč

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

...

Optimization of processing of old values of primary archives coming from communication (automatically or as a result of the GETOLDVAL command sent to the D2000 KOM process) or values of remote tags (as a result of TELL command GETOLDVAL sent to the D2000 Gateway Client process).
If the checkbox is checked, during the processing of the old value, the cache or archive database is queried whether the same value is already present there. If it exists, the value is discarded (and recalcs of statistical or calculated archived values that 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 the IEC62056-21:2002 File I/O protocol. Its communication files contain several historical values (which the D2000 KOM process  process sends as old values) and one new value for every I/O tag.

...

Definition of a D2000 system object, values of which are to be archived. The object may be defined either by typing its name into the input edit field or selecting from the list of objectobjects. To open the list of object objects, click the button right from the input field.

Object to archive or value source may be:

  1. An object, the value of which is a simple type (Integer, Boolean, Real,...) - just one value is archived, therefore such archived object is called simple historical value.
  2. An item of an object of Structured variable type - there is also just one value archived, therefore such archived object is called simple historical value, too.
  3. A column of an object of Structured variable type (e.g. SV.Strct[0]^ColName) - there are archived all values of the column. Such an archived object is called one-column historical value.
  4. An entire object of Structured variable type (e.g. SV.Struct) - there are archived all values of the object. Such an archived object is called structured historical value.

Note: The above-described fact implies, that the object to archive directly specifies the type of historical value - simple, one-column, or structured historical one. So all changes in the configuration of the historical value has directly have a direct effect on its functionality, mainly if the object is used in other historical values.

...

  • Periodical  - writing values into the archive is periodical. The archiving process in defined time moments stores the archive object value into the archive in defined time moments. Timestamp (the time of value time) is not given determined by the occurrence time timestamp of the archive archived object value (e.g. an I/O tag), but by the time of when the value storing is periodically written into the archive.

    Reading the values stored periodically by means of the D2000 system (ESL: GETARCHARR, GETARCHVAL, GETARCHROWGETARCHCOLGETARCHSTRUCTD2000 ObjApi: GetArchivData, D2000 VBApi: VBApiGetArchData, D2000 WorkBook) follows the rule that the archive object's value out of time moments given by the period, is unknown (invalid). The result of the data reading is therefore given by the oversampling resampling and the begin (BT) and end (ET) time as follows:
    • oversampling resampling (step) = 0
      The reading results are all the values, time of which belong into the interval <BT, ET>.
    • oversampling resampling (step) <> 0
      The reading result is the value an array of values with timestamps continuouslycontiguously:
      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 (ET). The array value without value of the array item is invalid if a record with the same timestamps does not exist in the archive is invalid. The value with database. If such a record is filled according to itexists, it is returned as a value of the array item. The above facts imply , that when reading periodical data, it is necessary (advisable):
      • to adjust BT exactly for to some of the object archiving moments, given by the period and time offset of the archiving.
      • oversampling resampling 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 periodicallyas far as reading is concerned, behaves as a periodical archive.
  • Kotva
    sa_filter1
    sa_filter1
    On value change
    - just all the value changes of the archive object undetected , which are not filtered out by the value filter, are stored into in the archive.

    Reading of values stored by using a filter by means of D2000 system (ESL: GETARCHARR, GETARCHVAL, D2000 ObjApi GETARCHROWGETARCHCOLGETARCHSTRUCTD2000 ObjApi: GetArchivData, D2000 VBApi: VBApiGetArchData, D2000 WorkBook) follows the rule that the archive object's value at any time (t) is given by (equalequals to) by the last historical value at or before the given time (t). The data reading result is therefore given by the oversampling the resampling and the begin (BT) and end (ET) time as follows:
    • oversampling  resampling (step) = 0
      The reading result results are all the values, time of which belongs to the interval <BT, ET> and 1 one value before BT time, in case there is no value with a time exactly equal with BT  to BT time in the archive.
    • oversampling resampling (step) <> 0
      The reading result is a an 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 If a record with the same timestamps does not exist in the archive with the same timestamp will be given by database, the value of the array item will be equal to the last value before the time requiredspecific required (however, the timestamp will be set accordingly).

Publish values

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

  • For a simple historical value - the object of the Historical value type gets the last value.
  • When archiving an a one-column historical value - the last archived values of individual items are filled into the relevant items of the column of a Structured variable type object defined by the the Target object parameter Target object.
  • When archiving a structured historical value - the last archived values of individual items are filled into the relevant items of a Structured variable type object defined by the the Target object parameter Target object.

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

...

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

...

Definition of an object of Historical value type, values ofwhich are to be calculated. It can be:

  • simple HVhistorical value - simple historical value, item of one-column historical value (e.g. H.ColArchiv[2]) or item of structured historical value (e.g. H.Struct[2]^ColName),
  • one-column HVhistorical value - one-column historical value (e.g. H.ColArchiv) or column* of structured historical value (e.g. H.Struct[0]^ColName),
  • structured HVhistorical value - structured historical value.

* The list of columns is given by the respective structure definition, that which defines the structure of the historical value (e.g. H.Struct[2]^ColName).

Publish values

If the option the Publish values option 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 HVhistorical value - the object of the Historical value type you are configuring gets the last value (if unless the parameter Historical value is not defined).
  • When archiving an a one-column HV column historical value - the last archived values of individual items are filled into published in the relevant items of the column of a Structured variable type object defined by the the Target object parameter Target object.
  • When archiving a structured HVhistorical value - the last archived values of individual items are filled into published in the relevant items of a Structured variable type object defined by the parameter the Target object parameter.

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

Target object

The input field is enabled if the option Publish values option is checked. It allows you to define an object, that will contains values of the historical value. When archiving a simple HVhistorical value, the target object may must not be defined. However, but it must be defined for one-column HVhistorical value and for structured HV historical value (see the parameter the Historical value parameter) - the size of the 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 defining a mathematic expression among containing objects of Historical value type (the tab the Statement tab). The expression can not contain the references to any current values of other 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 If you need to archive the sum of both the flows. You , 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 archive it.
  2. Create an object of Historical value type with the expression of „H.Flow1 + H.Flow2“.

Both the methods gives give the same result. A problem may occur , when you need to modify e.g. the value of the object H.Flow1 already , which is already archived. If you have 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.

Calculation methods

Definition of a methods to calculate given expression - periodically or on value change. If the option On value change is selected, the expression will be recalculated when a value of at least one objects defined in the expression is changed.

...