Data transfer within the PLC
810
Part III FP Instructions
F2_MVN
16-bit data inversion and 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.
PLC types
Availability of F2_MVN (see page 1322)
Variable Data type Function
s source 16-bit area to be inverted
d
ANY16
destination 16-bit area
The variables s and d have to be of the same data type.
For Relay T/C Register Constant
s WX WY WR WL SV EV DT LD FL dec. or hex.
d - WY WR WL SV EV DT LD FL -
Explanation with example value 16#5555
15 . . 12 11 . . 8 7 . . 4 3 . . 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
15 . . 12 11 . . 8 7 . . 4 3 . . 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
bit
bit
source
dest.
Each bit is inverted, target value in this example: 16#AAAA
Description
The 16-bit data or 16-bit equivalent constant specified by s is inverted and transferred to the 16-bit
area specified by d if the trigger EN is in the ON-state.
Data types
Operands
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out.