You can handle errors in communication with I/O devices (for example, an I/O device does not initialize properly at startup or goes offline while Citect SCADA is running) in two ways:
If a communication error is detected (with an I/O Device) or if the data is invalid, one of the following alert messages are written to the report (instead of the value):
Error |
Meaning |
---|---|
|
|
#ASS |
The value is incorrectly associated (with a substitution string or Genie). |
#COM |
Communication with the I/O Device has been lost |
#DIV/0 |
An attempt was made to divide a number by 0 (zero) |
#ERR |
An uncommon error has occurred. (Use the IsError function to find the occurrence.) |
#MEM |
Out of memory or more than 64 kb bytes of memory requested. |
#PEND |
Data from this device is pending an initial update to display a value. |
#RANGE |
The value returned is out of range |
#STACK |
The value has caused a stack overflow |
#WAIT |
Data from this scheduled device is not available as it has not reached its scheduled interval and has no cache value. |
For example:
Report Format:
If the above report is run when the value of PV_1 is out of range (for example 101.5), SP_1 is 42.35 and OP_1 is 60.0, the output of the report is:
Report Output:
#RANGE 42.35 60.0
When reports are written to a database device, you might sometimes want to disable the alert messages and write the values to the report (even if the values are invalid). Use the ERR_FORMAT_OFF command to disable alert messages and write data as values.
For example:
Report Format:
{ERR_FORMAT_OFF}
{PV_1} {SP_1} {OP_1}
If the above report is run when the value of PV_1 is out of range (for example 101.5) , SP_1 is 42.35 and OP_1 is 60.0, the output of the report is:
Report Output:
42.35 60.0
To re-enable the alert messages, use the ERR_FORMAT_ON specifier.
Note: If an I/O Device goes offline and you have disabled communication errors, the value printed into the report is either 0 (zero) or the last value read from the I/O Device when the report was last run. In either case, the value is invalid.
You can suppress reports that are triggered from I/O Devices if a communication error is detected by using the [Report]ComBreak
parameter. For example, you might configure a report to be run every hour when a bit is on. The I/O Device associated with that bit goes offline. If the [Report]ComBreak
parameter is 0, the report does not run. If the parameter is 1, and if the latest valid value that was read from that bit was 1, the report is run.
This parameter only applies to the trigger of the report, not to the data in the report.
Published June 2018