File Bit Comparison (Fbc); Relay Ladder; Compare Structure - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 13
Special Instructions (FBC, DDT, DTR, PID)

File Bit Comparison (FBC)

Mnemonic
Data Type
.EN
BOOL
.DN
BOOL
.FD
BOOL
.IN
BOOL
.ER
BOOL
.LEN
DINT
.POS
DINT
494
The FBC instruction compares bits in a Source array with bits in a Reference
array.
Operands:

Relay Ladder

Operand
Source
Reference
Result
Cmp control
Length
Position
Result control
Length
Position

COMPARE Structure

Description
The enable bit indicates that the FBC instruction is enabled.
The done bit is set when the FBC instruction compares the last bit in the Source and Reference arrays.
The found bit is set each time the FBC instruction records a mismatch (one-at-a-time operation) or after
recording all mismatches (all-per-scan operation).
The inhibit bit indicates the FBC search mode.
0 = all mode
1 = one mismatch at a time mode
The error bit is set if the compare .POS < 0, the compare .LEN < 0, the result .POS < 0 or the result .LEN
< 0. The instruction stops executing until the program clears the .ER bit.
The length value identifies the number of bits to compare.
The position value identifies the current bit.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Type
Format
DINT
Array tag
DINT
Array tag
DINT
Array tag
CONTROL
Structure
DINT
Immediate
DINT
Immediate
CONTROL
Structure
DINT
Immediate
DINT
Immediate
ATTENTION: Use different tags for the compare control structure
and the result control structure. Using the same tag for both could
result in unpredictable operation, possibly causing equipment
damage and/or injury to personnel.
Description:
Array to compare to the reference
Do not use CONTROL.POS in the subscript
Array to compare to the source
Do not use CONTROL.POS in the subscript
Array to store the result
Do not use CONTROL.POS in the subscripts
Control structure for the compare
Number of bits to compare
Current position in the source
Initial value is typically 0
Control structure for the results
Number of storage locations in the result
Current position in the result
Initial value is typically 0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents