324 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 7 Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
FBD_LOGICAL Structure
Description: When enabled, the instruction evaluates the XOR operation.
If you mix integer data types, the instruction fills the upper bits of the smaller integer data
types with 0s so that they are the same size as the largest data type.
Arithmetic Status Flags Arithmetic status flags are affected.
Fault Conditions: None
Execution:
Relay Ladder
Input Parameter Data Type Description
EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
SourceA DINT Value to XOR with SourceB.
Valid = any integer
SourceB DINT Value to XOR with SourceA.
Valid = any integer
Output Parameter: Data Type Description
EnableOut BOOL The instruction produced a valid result.
Dest DINT Result of the instruction. Arithmetic status flags are set for this output.
If the bit in
Source A is
And the bit in
Source B is
The bit in the
destination is
000
011
101
110
Condition Action
Prescan The rung-condition-out is set to false.
Rung-condition-in is false The rung-condition-out is set to false.
Rung-condition-in is true The instruction performs a bitwise OR operation.
The rung-condition-out is set to true.
Postscan The rung-condition-out is set to false.