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