Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 307
Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT) Chapter 7
Description: When enabled, the BTD instruction copies a group of bits from the Source to the
Destination. The group of bits is identified by the Source bit (lowest bit number of the
group) and the Length (number of bits to copy). The Destination bit identifies the lowest
bit number bit to start with in the Destination. The Source remains unchanged.
If the length of the bit field extends beyond the Destination, the instruction does not save
the extra bits. Any extra bits do not wrap to the next word.
Arithmetic Status Flags: Arithmetic status flags are affected
Fault Conditions: None
Execution:
Example:
1. The controller copies Target into Dest.
2. The SourceBit and the Length specify which bits in Source to copy into
Dest, starting at DestBit. Source and Target remain unchanged.
Condition Function Block Action Structured Text Action
Prescan No action taken. No action taken.
Instruction first scan No action taken. No action taken.
Instruction first run No action taken. No action taken.
EnableIn is cleared EnableOut is cleared, the instruction does nothing, and the
outputs are not updated.
N/A
EnableIn is set The instruction executes.
EnableOut is set.
EnableIn is always set.
The instruction executes.
Postscan No action taken. No action taken.
Target11111111111111111111100000000000
Dest11111111111111111111100000000000
Source11111111111111111111100000000000
Dest1111111111111111
0 0 0 0 0 00000000000
SourceBit
DestBit