Mitsubishi MELSEC Q Series Programming Manual page 411

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

Operation Error
(1) There are no operation errors associated with the ROR(P) or RCR(P) instructions.
Program Example
(1) The following program rotates the contents of D0, not including the carry flag, 3 bits to the
right when XC is turned ON.
[Ladder Mode]
[Operation]
b15
b14 b13 b12 b11b10 b9
D0
0
0
0
b15
b14 b13b12 b11b10 b9
D0
1
1
1
Contents of b2 to b0
before execution
(2) The following program rotates the contents of D0, including the carry flag, 3 bits to the right
when XC is turned ON.
[Ladder Mode]
[Operation]
b15
D0
b15
D0
Contents of b1 and b0
before execution
* ON/OFF status of the carry flag depends on its status before the execution of ROR.
b8
b7
b6 b5 b4 b3 b2 b1
0
0
0
0
0
0
0
0
b8
b7
b6 b5 b4 b3 b2 b1
0
0
0
0
0
0
0
0
Contents of b15 to b4
before execution
b14 b13 b12 b11b10 b9
b8
b7
0
0
0
0
0
0
0
0
b14 b13 b12 b11b10 b9
b8
b7
1
1
0
0
0
0
0
*
Contents of b15 to b4
before execution
Content of carry
flag SM700
[List Mode]
Step
Instruction
Carry flag
b0
0
1
1
1
1
Carry flag
b0
0
0
0
0
1
Content of b3
before execution
[List Mode]
Step
Instruction
b6 b5 b4 b3 b2 b1
b0
0
0
0
0
1
1
1
1
b6 b5 b4 b3 b2 b1
b0
0
0
0
0
0
0
0
1
Content of b3
before execution
ROR(P),RCR(P)
Device
(SM700)
0
(SM700)
1
Content of b2
before execution
Device
Carry flag
(SM700)
*
Carry flag
(SM700)
1
Content of b2
before execution
7-37
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents