Installation manual

Publication 1747-RM001G-EN-P - November 2008
Application Specific Instructions 7-21
Use Status Bits
To use the FBC or DDT instruction correctly, examine the control bits in both
the comparison and result control elements. You address these bits by
mnemonic.
The instruction control bits are reset when the rung’s input conditions go false.
The instruction control elements reset on a false-to-true rung transition under
the following conditions.
Compare position equals compare length (clears compare position and
result position)
Result position equals result length (clears result position)
Table 7.8 FBC and DDT Status Bits
Bit Function
Comparison
Control Bits
Enable EN (bit 15) Starts operation on a false-to-true rung transition. If the IN bit is set for one
bit-at-a-time operation, the ladder program must toggle the EN bit after the
instruction compares each bit.
Done DN (bit 13) Is set when the processor reaches the end of the source and reference files.
Error ER (bit 11) Is set when the processor detects an error and stops operation of the
instruction. For example, an error occurs if the length (LEN) is less than or
equal to zero or if the position (POS) is less than zero. The ladder program
must reset the ER bit if the instruction detects an error.
Inhibit IN (bit 09) Determines the mode of operation. When this bit is reset, the processor
detects all mismatches in one scan. When this bit is set, the processor stops
the search at each bit and waits for the ladder program to re-enable the
instruction before continuing the search.
Found FD (bit 08) Is set each time the processor records a mismatch bit number in the result file
(one bit-at-a-time operation) or after recording all mismatches (all per scan).
Result Control
Bits
Done DN (bit 13) Is set when the result file fills. The instruction stops and requires another
false-to-true rung transition to reset the result DN bit and then continue. If the
instruction finds another mismatch, it wraps the new position number around
to the beginning of the file, writing over previous position numbers.
EN
DN
FD
IN
ER
DDT
Diagnostic Detect
Source #B3:0
Reference #B3:10
Result #N7:0
Control R6:0
Length 48<
Position 0<
Control R6:1
Length 10<
Position 0<
DDT
EXAMPLE
The DDT instruction below compares the bits in the
source file (B3:0) with the bits in the reference file
(B3:10), recording the mismatched bit positions in
the result file (N7:0).