Panasonic FP Series Programming Manual page 593

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Bit-shift instructions
F123_RCL
Rotates n bits of the 16-bit data specified by d including the data of carry-flag to the left if the
Description
trigger EN is in the ON-state.
This example rotates one bit to the left:
Bit position
D
Bit position
D
Special internal relay
R9009 (carry flag)
When n bits with carry-flag data are rotated to the left,
the data in bit position 16-n (nth bit starting from bit position 15) is transferred to special internal
relay R9009 (carry-flag).
n bits starting from bit position 15 are shifted out to the left and carry-flag data and n-1 bits starting
from bit position 15 are shifted into lower bit positions of the 16-bit data specified by d.
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 F123_RCL (see page 1320)
PLC types
Data types
Variable
Data type
ANY16
d
INT
n
Operands
For
d
n
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.
592
16-bit data left rotate with carry-flag data
15
12 11
8 7
4 3
· ·
· ·
· ·
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
15
12 11
8 7
4 3
· ·
· ·
· ·
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0
Function
16-bit area
number of bits to be rotated
Relay
-
WY
WR
WL
SV
WX
WY
WR
WL
SV
0
· ·
0
· ·
0
Carry flag data "0"
T/C
Register
EV
DT
LD
FL
EV
DT
LD
FL
Constant
-
dec. or hex.

Advertisement

Table of Contents
loading

Table of Contents