EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 219

Mitsubishi Electric MELSEC FX Series
838 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 Applied Instructions
7.4 Rotation and Shift Operation
217
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Function and operation explanation
1. 16-bit operation (RCL, RCLP)
"n" bits out of 16 bits of the device specified by and 1 bit (carry flag M8022) are rotated leftward.
The carry flag is intervened in the rotation loop. If M8022 has been set to ON or OFF before the rotation
instruction, the carry flag is transferred to the destination.
2. 32-bit operation (DRCL, DRCLP)
"n" bits out of 32 bits of the device specified by and 1 bit (carry flag M8022) are rotated leftward.
Leftward rotation data
Command input
Number of bits
to be rotated
RCL
EN
n
ENO
d
b15 to b13 (16-n+1) and the
head bit indicating the
carry flag ON/OFF status
are moved.
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
0
High order Low order
Carry flag
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Before shift b15 to b13
Before shift b11 to b0
High order
1 1 1 0 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
The status
of the final
bit b12
(bit "16-n")
is stored.
"n" bits (in the case of K4)
b15 to b12
(16-n) are
moved.
"n" bits
Carry flag
M8022
Before shift
Carry flagM8022
Before shift b12
When M8022
is ON
After the instruction
is executed once.
Before
execution
After
execution
Label1
*1
*1 This defines the device that stores the data to be rotated leftward.
DRCL
EN
n
ENO
d
Command input
Number of bits
to be rotated
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
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 flagM8022
Carry flag
M8022
Before shift b28
After the instruction
is executed once.
Before
execution
After
execution

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals