The Calculated Analog Data Point Tag
maps a floating point value to the result of a calculation.
The calculation can run:
The Calculated Analog Data Point Tag supports the configuration properties of the Analog Data Point Tag plus these properties:
Property | Type | Version | Description |
---|---|---|---|
UpdateInterval | TIME | 1.0 | The interval between each calculation. A value of zero (T#0s) disables periodic calculation. See Interval and Offset for information on how timed activities are scheduled. |
UpdateOffset | TIME | 1.0 | The offset added to the UpdateInterval to get the actual update time. See Interval and Offset for information on how timed activities are scheduled. |
InstructionLimit | UDINT | 1.0 | The maximum number of instructions to execute. |
The value of the Calculated Analog tag is the result of an IEC 61131-3 Expression.
The expression should return a value of type LREAL.
The expression is evaluated:
Setting UpdateInterval to T#0s disables periodic evaluation.
To edit the calculation:
The calculation is edited using a Program Code Editor.
The Calculated Analog Data Point Tag supports the data properties of the Analog Data Point Tag plus these additional properties:
Property | Type | Description |
---|---|---|
ExecErrorCode | DINT | The result of the execution. A value of zero shows success. A non-zero value shows an error occurred. |
ExecErrorLocation | DWORD | The address of the instruction that caused the error. Zero if there was no error. |
ExecInstructionCount | UDINT | The number of instructions processed by the program during the latest execution. |
ErrorMessage | STRING[120] | The execution error message. An empty string shows no error. |
UpdateTimer | TimerStatus | The status of the calculation update timer. |
The Calculated Analog Data Point Tag supports tag commands of the Analog Data Point Tag plus these tag commands:
Tag Command | Version | Description |
---|---|---|
Run | 1.0 | Evaluates the expression and writes the resulting value to the tag. |
Example configuration
Property | Value |
---|---|
UpdateInterval | 1s |
UpdateOffset | 0s |
Calculation | %"Main.Voltage.Value" * %"Main.Current.Value" |
The Calculated Analog Data Point Tag builds on the features of these tag types:
To learn how activities are scheduled using Interval and Offset.
To learn about the expressions that can used in the Calculation property.
To learn about properties common to all analog tags.
To learn about the Core Driver.
For the meaning of terms used in Fernhill SCADA.