User`s manual

A-4 Series 90™-30 CPU with Embedded PROFIBUS Interface – November 2004 GFK-2334A
A
Error Detection and Handling
As shown in “COMMREQ Status Word”, a value of 1 is returned to the Status Word if
communications proceed normally, but if any error condition is detected, a value greater
than 1 is returned. If you require error detection in your ladder program, you can use a
Greater Than (GT) compare instruction to determine if the value in the Status Word is
negative (less than zero). If an error occurs, the GT instruction’s output (Q) will go high. A
coil driven by the output can be used to enable fault handling or error reporting logic.
The FT output of the COMMREQ, goes high for certain faults and can also be used for
fault detection. Additionally, the first Status Word can be monitored by error message logic
for display on an Operator Interface device, in which case, Status Word codes correspond
to the error messages that appear on the operator screen.
To dynamically check the Status Word, write a non-significant positive number (0 or 99
are typically used) into the Status Word each time before its associated COMMREQ is
executed. If the instruction executes successfully, the CPU will write the number 1 there.
This method lets you know that if the number 1 is present, the last COMMREQ definitely
executed successfully, and that the 1 was not just left over from a previous execution.
When multiple COMMREQs are used, each should be verified for successful
communications before the next is enabled. Monitoring the Status Word is one way to
accomplish this.
Corrective Actions for COMMREQ Errors
The type of corrective action to take depends upon the application. If an error occurs
during the startup or debugging stage of ladder development, you should verify the
COMMREQ parameters. The same is true if an error occurs right after a program is
modified. But, if an error occurs in a proven application that has been running
successfully, the problem is more likely to be hardware-related. The PLC fault tables
should be checked for additional information when troubleshooting Status Word errors.