Bitwise Boolean instructions
512
Part III FP Instructions
F5_BTM
Bit data move
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
The operand n specifies the bit number as follows:
n: 16#
2
1
Bit position of source
Bit position of destination
Bit No. Description
0–3 source bit No. (16#0 to 16#F)
4–7 FP2/2SH and 10SH: number of bits to be transferred (16#0 to 16#F)
FP3: invalid
8–11 destination bit No. (16#0 to 16#F)
12–15 invalid
For example, reading from the right, n = 16#C01 would move from bit position one, one bit to bit
position 12 (16#C).
PLC types
Availability of F5_BTM (see page 1325)
Variable Data type Function
s source 16-bit area
n specifies source and destination bit positions
d
ANY16
destination 16-bit area
The variables s and d have to be of the same data type.
Description
1 bit of the 16-bit data or constant value specified by s is copied to a bit of the 16-bit area specified
by d according to the content specified by n if the trigger EN is in the ON-state. When the 16-bit
equivalent constant is specified by s, the bit data move operation is performed internally converting
it to 16-bit binary expression.
Data types