Boolean OR (BOR)
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. Controller differences are noted where applicable.The BOR instruction logically ORs up to eight Boolean inputs. To perform a bitwise OR, refer to
Bitwise Or (OR)
.Available Languages
Ladder Diagram
This instruction is not available in ladder diagram.
Function Block Diagram
Function Block Diagram supports these elements:
FBD Block
FBD Function
TIP:
FBD Function supports only two inputs and is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
Structured Text
This instruction is not available in structured text.
Operands
Function Block Diagram
FBD Block
Operand | Data Type | Format | Description |
---|---|---|---|
BOR tag | FBD_BOOLEAN_OR | structure | BOR structure |
FBD_BOOLEAN_OR Structure
Input Members | Data Type | Description |
---|---|---|
EnableIn | BOOL | Enable input. If cleared, the instruction does not execute and outputs are not updated.
Set to 0 on first download. |
In1 | BOOL | First Boolean input.
Set to 0 on first download. |
In2 | BOOL | Second Boolean input.
Set to 0 on first download. |
In3 | BOOL | Third Boolean input.
Set to 0 on first download. |
In4 | BOOL | Forth Boolean input.
Set to 0 on first download. |
In5 | BOOL | Fifth Boolean input.
Set to 0 on first download. |
In6 | BOOL | Sixth Boolean input.
Set to 0 on first download. |
In7 | BOOL | Seventh Boolean input.
Set to 0 on first download. |
In8 | BOOL | Eighth Boolean input.
Set to 0 on first download. |
Output Members | Data Type | Description |
---|---|---|
EnableOut | BOOL | Indicates if instruction is enabled. |
Out | BOOL | The output of the instruction. |
FBD Function
TIP:
FBD Function supports only two inputs and 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 Operand (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. |
See FBD Functions.
Operation
FBD Block
The BOR instruction ORs up to eight Boolean inputs. If an input is not used, it defaults to cleared (0).
Out = In1 OR In2 OR In3 OR In4 OR In5 OR In6 OR In7 OR In8
IMPORTANT:
When removing an input wire from the BOR instruction during an edit, make sure the input is cleared (0).
FBD Function
TIP:
FBD Function supports only two inputs and is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
The FBD Function ORs two Boolean inputs.
Out = In1 OR 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 OR In2 |
Instruction first run | N/A |
Instruction first scan | N/A |
Postscan | N/A |
Example
Function Block Diagram
FBD Block
In this example, bool_in1 is copied into BOR_02.In1, bool_in2 is copied into BOR_02.In2, the result of performing OR of all BOR_02 inputs is placed into BOR_02.Out, and BOR_02.Out is then copied into value_result_or.
If bool_in1 is: | If bool_in2 is: | Then value_result_or is: |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
FBD Function
Provide Feedback