276
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
11 Rotation and Shift Operation – FNC 30 to FNC 39
11.4 FNC 33 – RCL / Rotation Left with Carry
2. 32-bit operation (DRCL and DRCLP)
"n" bits out of 32 bits of [
+1,
] and 1 bit (carry flag M8022) are rotated leftward.
Related device
→
For the carry flag use method, refer to Subsection 6.5.2.
Cautions
1. In the case of continuous operation type instructions (RCL and DRCL)
Note that shift and rotation are executed in every scan time (operation cycle).
2. When a device with digit specification is specified as
Only K4 (16-bit instruction) or K8 (32-bit instruction) is valid (examples: K4Y010 or K8M0).
Device
Name
Description
M8022
Carry
Turns ON when the bit shifted last from the highest position is "1".
D
D
Command
input
FNC 33
DRCLP
n
D
Carry flag
When M8022
is ON
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
0
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
After the
instruction is
executed once
High order
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16
Before shift b27 to b0
High order
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
Low order
1
Leftward
rotation
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1
0
1 1 1 1 0 0 0 0 0 0 0 0
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16
Before shift
b31 to b29
b31 to b29 (32
−
n+1) and the head
bit indicating the carry flag ON/OFF
status are moved.
The status
of the final
bit b28 (bit
"32
−
n") is
stored.
"n" bits (in the case of K4)
b31 to b28
(b32
−
n)
are
moved.
Before shift
Carry flag M8022
Carry flag M8022
Before shift b28
Before
execution
After
execution
D