EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 390

Mitsubishi Electric MELSEC-Q/L
1084 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...
388
7 APPLICATION INSTRUCTIONS
7.2 Rotation Instructions
Operation error
There is no operation error in the DROR(P) or DRCR(P) instruction.
Program example
The following program rotates the contents of D0 and D1, not including the carry flag, 4 bits to the right when XC is ON.
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]
[Ladder Mode] [List Mode]
[Operation]
Step Instruction Device
0
D0, D1
000 1111 0000 1111 0000 1111 0000 1111
1
D0, D1
11
1 0000 1111 0000 1111 0000 1111 0000
b31b16 b0b15b28 b27 b24b23 b20b19 b12 b11 b8 b7 b4 b3
Contents of b3 to b0
before execution
b31b16 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
1 0000 1111 0000 1111 0000 1111
1
D0, D1
1
1
000
0
111
1
000
0
111
1
000
0
111
1
000
0
b31b16
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
b31b16
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

Related product manuals