Boolean Exclusive OR (BXOR)

This information applies to the CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers.
The BXOR instruction performs an exclusive OR on two Boolean inputs.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram.
Function Block Diagram
Function Block Diagram supports these elements:
FBD Block
BXOR_FBD_avail_v31
FBD Function
TIP:
FBD Function is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
BXOR_FBD func
Structured Text
This instruction is not available in structured text.
Operands
Function Block Diagram
FBD Block
Operand
Data Type
Format
Description
BXOR tag
FBD_BOOLEAN_XOR
Structure
BXOR structure
FBD_BOOLEAN_XOR Structure
Input Members
Data Type
Description
EnableIn
BOOL
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
In1
BOOL
First Boolean input.
Default is cleared.
In2
BOOL
Second Boolean input.
Default is cleared.
Output Members
Data Type
Description
EnableOut
BOOL
Indicates if instruction is enabled.
Out
BOOL
The output of the instruction.
FBD Function
TIP:
FBD Function is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
Input Operands (Left Pins)
Data Type
CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers
Description
In1
BOOL
First Boolean input.
In2
BOOL
Second Boolean input.
Output Operands (Right Pin)
Data Type
CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers
Description
Out
BOOL
The output of the instruction.
SeeFBD FunctionsFBD Functions.
Operation
The BXOR instruction performs an exclusive OR on two Boolean inputs.
Out = In1 XOR In2
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction.
Execution
Function Block Diagram
FBD Block
Condition/State
Action Taken
Prescan
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true
EnableIn and EnableOut bits are set to true.
The instruction executes as described in the Operation section.
Instruction first run
N/A
Instruction first scan
N/A
Postscan
EnableIn and EnableOut bits are cleared to false.
FBD Function
TIP:
FBD Function is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
Condition/State
Action Taken
Prescan
N/A
Normal Scan
Out = In1 XOR In2
Instruction first run
N/A
Instruction first scan
N/A
Postscan
N/A
Example
Function Block Diagram
In this example, bool_in1 is copied into BXOR_02.In1, bool_in2 is copied into BXOR_02.In2, the result of performing an exclusive OR on BXOR_02.In1 and BXOR_02.In2 is placed into BXOR_02.Out, and BXOR_02.Out is then copied into value_result_xor.
If bool_in1 is:
If bool_in2 is:
Then value_result_xor is:
0
0
0
0
1
1
1
0
1
1
1
0
FBD Block
This example illustrates performing an exclusive OR on bool_in1 and bool_in2 and places the result in value_result_xor.
BXOR_FBD_ex_v31
FBD Function
BXOR_FBD func_e
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.