Item type: Function item
This Item is a calculated value based on existing items in Hive. The calculation is formula based on inputs from external Items.
This item has two different calculators (algorithm syntax), C# and Legacy (proprietary), see:
The Function item_ item type has the following properties:
Name | Description | ID | Flags |
---|---|---|---|
Expression | An expression used to calculate the value of this item | 5110 | Persisted |
Expressions | Definitions of array inputs to the calculator (applicable for C# only) | 5111 | Persisted |
Calculator | Specifies which calculator to use, C# or legacy | 19101 | Persisted |
DataChangeTrigger | The DataChangeTrigger is an enumeration that specifies the conditions for when the Function item should be reported as updated inside APIS after a calculation. Quality: Report as updated only if the Qualtiy associated with the value changes. QualityValue: Report as updated if either the Qualtiy or the Value change. QualityValueTimestamp: Report as updated if either Quality, Value or the Timestamp change (default). | 19102 | Persisted, Enumerated |
External Items | The external items that are inputs to the formula given by the Expression property | 20000 ... 20000+N | Persisted |
MonotonicTimestamps | When 'true', monotonic timestamps are enforced on this item (i.e. to always increase), even if the timestamp of a calculation/input-timestamps go backwards in time. If 'false', the resulting, calculated timestamps of this item may go backwards in time. (default is 'true'). | 19103 | Persisted |
Quality | Item quality | 3 | NormalPage |
Rights | Item access rights | 5 | ReadOnly |
Time | Item timestamp | 4 | NormalPage |
Type | Item canonical datatype | 1 | ReadOnly |
Value | Item value | 2 | NormalPage |
Valuetype | Item canonical datatype. | 19100 | Persisted, Enumerated |
MonotonicTimestamps explained
The MonotonicTimestamps
property is used to enforce monotonic timestamps on the item.
When 'true', the timestamps of the item will always increase, even if the timestamp of a calculation or input timestamps go backwards in time.
This is useful when the item is used in a system where the timestamps must always increase, for example in a historian system such as APIS Honeystore.
Item timestamps are increased with a small increment (100 nano seconds) to ensure that successive timestamps are newer than its predecessor.
If you look at this in i.e. APIS Management Studio, you might see that the timestamps seems to be equal, but that is simply because the printed
resolution are to small to visualize the 100 ns steps, as shown in the picture below:
See also Predefined Item Properties and OPC DA Properties