EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-Q/L

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 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
Page #338 background imageLoading...
Page #338 background image
336
DROR, DRORP, DRCR, DRCRP
DRCR
(1) Rotates 32-bit data, including carry flag, at device designated by n bits to the right.
The carry flag goes ON or OFF depending on its status prior to the execution of the DRCR instruction.
(2) When a bit device is designated for , a rotation is performed within the device range specified by digit specification.
The number of bits by which a rotation is executed is the remainder of n /(specified number of bits).
For example, when n 31 and (specified number of bits) 24 bits, the remainder of 31/24 1 is "7", and the data is
rotated 7 bits.
(3) Specify any of 0 to 31 as n. If the value specified as n is 32 or greater, the remainder of n / 32 is used for rotation. For
example, when n 34, the contents are rotated two bits to the right since the remainder of 34 / 32 1 is "2".
Operation Error
(1) There is no operation error in the DROR(P) or DRCR(P) instruction.
Program Example
(1) The following program rotates the contents of D0 and D1, not including the carry flag, 4 bits to the right when XC is ON.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program rotates the contents of D0 and D1, including the carry flag, 4 bits to the right when XC is ON.
[Ladder Mode] [List Mode]
[Operation]
D
b2b16b31 b17b30b29 b28b27 b18 b15b14
b5
b4 b3
Carry flag
(SM700)
b1 b0
D D
n-bit rotation
+1
D
Step Instruction Device
0
D0, D1
0001111000011110000111100001111
1
D0, D1
1110000111100001111000011110000
b31 b16 b0b15b28 b27 b24b23 b20b19 b12 b11 b8 b7 b4 b3
Contents of b3 to b0
before execution
b31 b16 b0b15b28 b27 b24 b23 b20 b19 b12 b11 b8 b7 b4 b3
Contents of b31 to b4
before execution
0
1
Carry flag
(SM700)
Carry flag
(SM700)
Content of b3
before execution
Step Instruction Device
0
D0, D1
0
*
*
0 0
111
1000011110000111100001111
1
D0, D1
1
1
000
0
111
1
000
0
111
1
000
0
111
1
000
0
b31 b16
b0
b15b28b27 b24b23 b20b19 b12b11
b8b7 b4b3
Before execution
1
Carry flag
(SM700)
Carry flag
(SM700)
Content of b3
before execution
Content of carry flag
SM700 before execution
Contents of b2 to b0
before execution
b31 b16
b0
b15b28b27 b24b23 b20b19 b12b11
b8b7 b4b3
* : ON/OFF status of the carry flag depends on its status before the execution of DRCR.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals