Boolean OR (BOR)
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

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
Input Operands (Left Pins) | Data Type | Description |
|---|---|---|
In1 | BOOL | First Boolean input. |
In2 | BOOL | Second Boolean input. |
Output Operand (Right Pin) | Data Type | 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
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
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