Bitwise Inclusive Or (OR)
The OR instruction performs a bitwise OR operation using the bits in Source A and Source B and places the result in Dest.
When enabled, the instruction evaluates the bitwise OR operation:
Dest = Source A OR Source B
And the bit in
Source B is: | The bit in
Dest is: | |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Available Languages
Ladder Diagram
FactoryTalk Design Studio
DSL - Ladder DiagramOperands
IMPORTANT:
Unexpected operation may occur if:
- Output tag operands are overwritten
- Members of a structure operand are overwritten
- Except when specified, structure operands are shared by multiple instructions.
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Ladder Diagram
Operand | Data Type | Format | Description |
---|---|---|---|
Source A | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to OR with Source B. //Float includes REAL and LREAL data types. Tip: Float inputs are converted to integer which may cause an overflow. |
Source B | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | immediate tag | Value to OR with Source A. Tip: Float inputs are converted to integer which may cause an overflow. |
Dest | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | tag | Tag to store result of the instruction. Tip: If the destination type is Float, the resultant value will be converted to Float. |
TIP:
When integer promotion is required for the inp
Affects Math Status Flags
Conditional. See Math status flags.
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | N/A |
Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in |
Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in Dest is set as described in the Description section. |
Postscan | N/A |
Examples
Ladder Diagram
Provide Feedback