Fnc 30 - Ror / Rotation Right - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
11.1
FNC 30 – ROR / Rotation Right
Outline
This instruction shifts and rotates the bit information rightward by the specified number of bits without the carry flag.
1. Instruction format
FNC 30
D
ROR
P
2. Set data
Operand Type
D
n
*1.
Do not set a negative value to the number of bits to be rotated.
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T
D
n
1: In 16-bit operations, K4Y
In 32-bit operations, K8Y
2: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (ROR and RORP)
"n" bits out of 16 bits of
Command
input
FNC 30
RORP
• The final bit is stored in the carry flag (M8022).
• In a device with digit specification, K4 (16-bit instruction) is valid.
Before
execution
After
execution
Series
Mnemonic
16-bit Instruction
ROR
5 steps
RORP
Word device number storing data to be rotated rightward
Number of bits to be rotated
[n ≤ 16 (16-bit instruction), n ≤ 32 (32-bit instruction)]
Digit Specification
1
1
, K4M
, K8M
/FX
3U
3UC
are rotated rightward.
D
D
n
High order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1 1 1 1 0 0 0 0
After the
instruction
is executed
once
Rightward
"n" bits
rotation
High order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0
0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
Before shift
Before shift
b3 to b0
b15 to b4
11 Rotation and Shift Operation – FNC 30 to FNC 39
Operation Condition
32-bit Instruction
Continuous
9 steps
Operation
Pulse (Single)
Operation
Description
*1
Word Devices
Special
System User
Unit
C D R U \G
V
1
2
and K4S
are valid.
and K8S
are valid.
PLCs.
"n" bits (in the case of K4)
Low order
Carry flag
M8022
0
0 0 0
"n−1" bits
b0 to b3 (n−1) are moved.
The status of the bit "n−1" is
copied.
Low order
0
Carry flag
M8022
The contents of
b3 are stored.
11.1 FNC 30 – ROR / Rotation Right
Mnemonic
Operation Condition
Continuous
DROR
Operation
Pulse (Single)
DRORP
Operation
Data Type
16- or 32-bit binary
16- or 32-bit binary
Others
Con-
Real
Charac-
Index
stant
Number
ter String
Z Modify K H
E
" "
11
12
13
14
Pointer
15
P
16
17
18
19
20
287

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents