Programming the Local Host
Chapter 5
535
The OFF-delay timer is useful in this application because it is continually
reset when its rung conditions go true. This means that the timed bit,
Bit 03015, remains on for a long as any fault bit is changing state during
programmed retries. This keeps the output indicator on until after the
done bit indicates command completion.
Of course, other methods can be used to monitor remote and local fault
bits. Such factors as availability of output terminals, memory space, and
type of application dictate the specifics of fault bit monitoring and
program response.
Synchronizing Fault Bits
As noted earlier, the PLC-2 DHII interface’s scan and its control of the
fault and done bits is asynchronous to the PLC processor’s scan and its
control of the start bits.
In the examples discussed so far, as in most applications, this lack of
synchronization does not present any problems. However, you may want
to use the program to count the number of times a fault bit turns on and/or
to store the error code each time a fault bit turns on. Because of the
asynchronous relationship, you may not be able to do these types of
functions accurately by examining fault bits directly.
Instead of examining the fault bits directly, use a GET/PUT rung at the
beginning of the program to copy the fault word into another word. You
can then examine the corresponding bits of the other word any time
during the program scan to determine the status of the fault bits as copied
at the beginning of the program scan. Even though the PLC-2/DHII
interface may change the state of fault bits in the middle of a program
scan, the status of the bits in the copy word will not change until the start
of the next program scan.
Timeout Preset Value
In addition to its remote/local fault bit control, you can have a timer for
both supervisory/time-critical, or a separate time for supervisory and
time-critical. The second timeout (time-critical) preset is entered after the
first (supervisory timer) by using another GET instruction in the header
rung. By this, the KP2 provides two automatic timers for monitoring
command completion. While they function automatically during
PLC-2/DHII interface operation, these timers use a preset value entered in
the ladder-diagram program. This feature enables the PLC-2/DHII