Error detection and handling, Corrective actions for commreq errors – GE GFK-2193A User Manual

Page 22

Advertising
background image

GFK-2193A

Chapter 4 Status and Diagnostics

4-5

4

COMMREQ Programming Requirements and Recommendations

COMMREQ instructions should be enabled by a contact from a transition coil.

If using more than one COMMREQ in a ladder program, verify that a previous
COMMREQ executed successfully before executing another one. This can be done
by checking the Status Word and the FT (Fault) output.

The FT output is held False if the Enable Input is not active. This means that if the
COMMREQ is enabled by a transitional (one-shot) contact and a fault occurs, the FT
output is High for only one PLC scan. To capture the fact that a fault occurred, you
can program the fault output as a Set coil, which would not be automatically reset at
the end of a scan. Additional logic would then be needed to reset the fault output coil
after the fault is acknowledged and before the next execution of the COMMREQ.

Programming a device, such as a Set Coil, on the FT output of the COMMREQ is
optional; this output may be left open if desired.

It is necessary to initialize the data in the Command Block before executing the
COMMREQ instruction. Since the normal PLC sweep order is from top to bottom,
initializing the Command Block in an earlier rung (or rungs) than the rung that contains
the COMMREQ will satisfy this requirement.

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, described on page 4-4, goes high for certain faults and
can be used for fault detection also. 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 would correspond to appropriate error messages that would display 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 executed
successfully, and that the 1 was not just left over from a previous execution.

When multiple COMMREQs are used, it is recommended that each 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 possible additional information when troubleshooting Status Word
errors.

Advertising