A calculated variable allows you to generate a tag value at runtime that is the result of a Cicode expression.
Note: A calculated variable will contribute to the point count if it refers to variable tag(s) in it's cicode expression that has been configured in it's address field. If the calculated variable only refers to cicode functions, and these functions do not refer to variable tags, then it will not contribute to the point count.
To configure calculated variables, you need to perform two procedures:
Note: Projects created from a starter project in Citect SCADA 2016 (or later) will include a pre-configured Cicode I/O device.
You can use one of the following methods to create a Cicode I/O device:
The I/O devices list will display in the Grid Editor.
The Device Communications Wizard will display.
Note: The Startup Mode field should be configured appropriately if device redundancy is required for the Cicode I/O device you have created.
To create a calculated variable on a Cicode I/O device:
Note: Cicode functions used for calculated variables need to be non-blocking functions.
Note: If an error is trapped in the Cicode that has been placed in the Address field of a calculated variable (either internally via a built-in Cicode function or by calling the function ErrTrap), the variable tag will have bad quality and will raise a Cicode error when the tag is read. After reading the tag, call IsError() to get the error number and clear it.
See Also
Published June 2018