Editing of all objects in the D2000 CNF process is performed in the configuration dialog box, a specific part of which is common for all editable objects and another part depends on the type of edited object.
The configuration dialog box of processes consists of several parts (tabs) containing related parameters.
General properties
Groups
Archive
Statement
Time parameters
Conditions
Statistics
Filter
A text string describing the historical value. Maximum: 128 characters.
Possibility to use the Dictionary (to open click the CTRL+L).
Defines a status text of historical value. The status text allows for redefining individual values' identification for the historical value.
Selection of an index to transformation palette. See the topic Transformation palette.
Selection of a value type of the historical value. The possible types are shown in the following table.
Label | Value type |
Int-Integer | Integer |
Re-Real | Real |
Bo-Boolean | Boolean |
Note: Value type may be defined for the purpose of a historical value of "Calculate archived values by defined statement" type only.
Technical units of historical value. Maximum: 12 symbols. Possibility to use the Dictionary (to open click the CTRL+L).
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. The limit can be defined either directly – by the value entered into the input field, or its value can be determined by a system object (dynamic limit) – the button right from the input field.
VHL | Very High Limit - the highest limit |
HL | High Limit |
LL | Low Limit |
VLL | Very 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 give six possible states.
Limit | Object 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 the Limit Problem state.
Note: Changing the value of the dynamic limit will not cause a new evaluation of limits and possibly a new value with a changed Limits attribute. The new value of the dynamic limit is taken into account only when archiving a new value.
There are the following options:
The part of the configuration dialog box contains the following options:
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 IEC62056-21:2002 File I/O protocol. Its communication files contain several historical values (which the D2000 KOM 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 by selecting it from the list of objects. To open the list of objects, click the button right from the input field.
Object to archive or value source may be:
Note: The above-described fact implies, that the object to archive directly specifies the type of historical value - simple, one-column, or structured historical ones. So all changes in the configuration of the historical value have a direct effect on its functionality, mainly if the object is used in other historical values.
When archiving the object values into the primary archive, it is possible to use the following method of archiving:
If the Publish values option is checked, then the historical value publishes its last archived value in a way, that depends on the object to archive, as follows:
Note: To ensure correct functionality of the Publish values feature for 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 Target object parameter 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 Publish values option is checked. It allows you to define an object, that will contains values of historical value. When archiving a simple historical value, the target object must not be defined. However, 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 of which are to be calculated. It can be:
* The list of columns is given by the respective structure definition, which defines the structure of the historical value (e.g. H.Struct[2]^ColName).
If the Publish values option is checked, then the historical value publishes its last archived value in a way, that depends on the object defined by the parameter Historical value as follows:
Note: To ensure the correct functionality of the Publish values feature for a one-column historical value (structured HV) the number of rows (columns) of the structured variable defined in the Target object parameter must be the same as the number of rows (columns) of the object defined by the Historical value parameter.
Target object
The input field is enabled if the Publish values option is checked. It allows you to define an object, that will contains values of historical value. When archiving a simple historical value, the target object must not be defined. However, it must be defined for one-column historical value and for structured historical value (see 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.
The option allows defining a mathematic expression containing objects of Historical 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 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:
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.
Calculation methods
Definition of a method to calculate a given expression - periodically or on value change. If the On value change option is selected, the expression will be recalculated when a value of at least one of the objects defined in the expression is changed.
An object of Historical value type defined in this way can be either simple or one-column historical value. If the object is a one-column historical value, the expression may also contain references to other structured or one-column historical values with a row index of 0. During the calculation, the index is dynamically replaced by the current row number of the one-column historical value to recalculate. That allows defining the same expression for all column items.
Example of a structured expression: H.SourceColumn[0] + H.SourceStruct[0]^ColA
If the option Publish values is checked, then the historical value will publish its last value:
Archive size
Definition of archive size - see the Publish values parameter. The parameter will be visible only if the Publish values parameter is not checked.
Target column
Definition of an object, that will contain values of the historical value - see the Publish values parameter. The parameter will be visible only if the Publish values option is checked.
An object of Historical value type filled from a script can be used as a storage of values that are not generated by archiving the values of other D2000 system objects, statistical calculations, or by other expression calculations. Values can be only filled from an ESL script or manually from the D2000 HI process.
Value storage can be simple, one-column, or structured. This is defined by the parameter Archive structure or Target structure (it depends on the parameter Publish values)
Inserted values are periodical
If the option is checked, you must define a period and offset (the Time parameters tab).
Checking the option Publish values "renames" the parameter Archive structure to Target structure. The functionality of the parameter to define the structure of the archive is not changed, however, it is not possible to define an object of Historical value type.
If the Publish values option is checked, the parameter Target structure defines whether the historical value is a simple or structured one. If the Target structure is not defined, the historical value is a simple one and gets the last value. If it is defined, the historical value is a structured one and will publish the last value into the respective item of a defined structured variable.
The parameter is enabled when the parameters Inserted values are periodical and Publish values are checked. If it is checked, the historical value will not publish its last value but the value that is valid according to the current time. (This feature supports storing data with future timestamps in an object of Historical value type - e.g. from an ESL script - and then the object "plays" these values in real-time).
The parameter appears when the Publish values parameter is not checked.
The parameter will appears if 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.
The button allows selecting an object of the D2000 system. The selected object is to be inserted into the expression on the current cursor position.
Note: Expression can contain objects of Historical value type only.
The button allows selecting a constant. Clicking it opens the dialog box containing the list of predefined constants. The selected constant will be inserted into the expression on the current cursor position.
The button allows selecting a function. Clicking it opens the "List of functions" dialog box. The selected function is to be inserted into the expression on the current cursor position.
Attributes
The button allows selecting an attribute. Clicking it opens the dialog box containing the list of attributes. The selected attribute is to be inserted into the expression on the current cursor position.
If checked, all invalid values of the objects defined in the expression will be replaced with the value of 0. The feature can be used to prevent the expression from getting invalid values. Only the values of input objects are replaced, and invalid values of intermediate data are not replaced. Values of input objects are converted as follows:
Other value types are not converted.
The parameter can be defined for the archive method Filter. It allows restricting the number of evaluations of a given expression so that the expression will be evaluated once within a defined time to reduce CPU and disk I/O usage. It is used especially in cases when the values of the objects defined in the expression are often changed, and calculating the expression is not required immediately.
Method of the statement calculation:
The parameters define the period (Hours: Minutes: Seconds) and the time offset within the period for the periodical primary and statistical archiving method (Hours: Minutes: Seconds).
Archiving time (Months: Days: Hours). The parameter determines the archiving time depth. It is the minimal time period, during which the data will be stored in the online archive. The older data are being erased from the archive.
The maximum history depth is 800 months (approximately 66 years).
For periodical data archiving, it defines what time data with the value for the given period will be stored in the archive. The time data can present either the beginning time - the "Period begin" option or the end time of the interval (period) - the "Period end" option.
Note 1: For archives filled from the script, this setting does not directly affect anything - the data has a timestamp 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.
Note 2: when displaying data in graphs, the parameter "Stored time" is taken into account:
Defining the conditions for the start and interruption of the archiving provides the mechanism of dynamical control of the object archiving, depending on the values or states of other objects in the system. Both conditions need not have to be defined. If not defined, the archiving will be started immediately after the start and initialization of the process Archive.
Definition of the condition causing the start archiving of the given historical value.
The object representing the archiving start condition may be defined in several ways:
Also, it is necessary to define, for what state of the given object the condition is valid. In the list under the object entry field, the possible object value states are displayed. This list is different for specific types of objects. The archiving start condition will be valid if the object is in the selected state. If the option Inverse function is enabled, the condition is valid, if the object is in a status other than the chosen state.
Defining the condition that causes stopping the archiving of the given historical value.
The object representing the archiving stop condition may be defined in several ways:
Also, it is necessary to define, for what state of the given object the condition is valid. In the list under the object entry field, the possible object value states are displayed. This list is different for specific types of objects. The archiving start condition will be valid if the object is in the selected state. If the option Inverse function is enabled, the condition is valid, if the object is in a status other than the chosen state.
When archiving into the statistical archive, it is possible to use these implemented functions.
Function | Meaning |
---|---|
None | No function. |
Average * | Arithmetical average of all archive object values. |
W-Average * | Weighted arithmetical average of all archive object values. |
Integral | Time is integral to historical values. |
Sum | Sum of archive object values. |
Maximum | Maximum of archive object values. |
Minimum | Minimum of archive object values. |
Count | The number of archive object values. |
Filter | Applying a filter for value storing in the statistical archive. |
Increment | 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 overflow and start from zero again). |
Delta | Delta between values. Parameter (Compare value) – the weight of impulse. The result will be the impulse multiplied by its weight. A weight of 1 will ensure standard behavior. |
EcoAvg | Average of the object values within the elapsed time period (Period parameter in Time parameters tab) according to the methodology based on flags of individual values entering the statistic. The same purpose is fulfilled by the function %EcoAveR, which 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 than 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 the time interval | Obsolete - do not use! |
Minimum in the time interval | Obsolete - do not use! |
Number of local maximums | The number of local maximums in a given time interval. |
Number of local minimums | The number of local minimums in a given time interval. |
Sum of positive values | Sum of positive values of the historical value. |
Sum of negative values | Sum of negative values of the historical value. |
Average of positive values | Arithmetical average of positive values of the historical value. |
Average of negative values | Arithmetical average of negative values of the historical value. |
Sum of increments | Sum of increments for a given time interval. If the new value is less than the old value, the increment is 0. Parameter (Compare value) – the weight of impulse. The result will be the impulse multiplied by its weight. A weight of 1 will ensure standard behavior. |
Time slice** | Object value in given time moments. |
Sample standard deviation | The function calculates the sample standard deviation of all values of the archive object. |
* For non-periodical values we recommend using the W-Average (weighted average) function, for periodical values the Average function is appropriate.
** The function allows recalculation of the historical value if historical values archived primarily have been changed. In addition, the time of the end of the interval is always stored (this 'statistics' basically only resamples the source archive with the selected period).
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
In the third case
Statistics calculation method:
The value of the parameter Validation criteria defines the value percentage in the primary archive (used for the calculation of values stored in the statistical archive) that has to be valid, in order to acquire a valid result. If there were fewer valid values than stated in the Validity criteria, the result will be Weak_Value.
Statistical time period defines the time interval, the set of historical values, that will be processed by the particular statistical function. By default, the interval is equal to the archiving period. If it is necessary to enter a different period, check the option Time interval different from archiving period and enter the required period into the parameter Interval. The time period must be greater than 0 [s].
A parameter for the functions GT Time (>), GE Time (>=), LT Time (<), LE Time (<=).
A parameter for the function INTEGRAL:
This parameter (available from D2000 version 22) determines whether a value with an interval start/end time enters the calculation. The parameter is configurable for functions:
It cannot be configured for other functions:
The system allows archiving of significant changes in the values of the archived object. This method of archiving represents the definition of three sensitivity bands in which it is possible to enter different values of a significant change.
Values of filtering: