Panasonic FP Series Programming Manual page 837

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Data transfer within the PLC
F15_XCH
The contents in the 16-bit areas specified by d1 and d2 are exchanged if the trigger EN is in the
Description
ON-state.
Bit
15
d1
0
d2
0
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.
Availability of F15_XCH (see page 1321)
PLC types
Data types
Variable
Data type
d1
ANY16
d2
The variables d1 and d2 have to be of the same data type.
Operands
For
d1, d2
In this example the function has been programmed in ladder diagram (LD) and structured text
Example
(ST).The same POU header is used for all programming languages.
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.
LD
ST
When programming with structured text, enter the following:
IF
start
THEN
F15_XCH(value_1, value_2);
END_IF;
836
16-bit data exchange
. .
12
11
.
.
8
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Function
16-bit area to be exchanged with d2
16-bit area to be exchanged with d1
Relay
-
WY
WR
WL
SV
.
.
4
3
.
.
0
0
0
1
0
0
0
1
0
0
1
1
0
0
0
T/C
Register
EV
DT
LD
FL
Constant
-

Advertisement

Table of Contents
loading

Table of Contents