Mitsubishi Electric MELSEC-Q/L Programming Manual page 392

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Operation error
• There is no operation error in the DROL(P) or DRCL(P) instruction.
Program example
• The following program rotates the contents of D0 and D1, not including the carry flag, 4 bits to the left when XC is ON.
[Ladder Mode]
[Operation]
Carry flag
(SM700)
0
Carry flag
(SM700)
1
Content of b28
before execution
• The following program rotates the contents of D0 and D1, including the carry flag, 4 bits to the left when XC is ON.
[Ladder Mode]
[Operation]
Carry flag
(SM700)
*
Carry flag
(SM700)
1
Content of b28
before execution
: ON/OFF status of the carry flag depends on its status before the execution of DRCL.
*
7 APPLICATION INSTRUCTIONS
390
7.2 Rotation Instructions
b31
b28b27
b24b23
b20 b19
1
1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
b31
b28b27
b24b23
b20 b19
0
0
0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
Contents of b27 to b0
before execution
b31
b28b27
b24b23 b20 b19
1
1
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
b31
b28b27
b24b23 b20 b19
0
0
0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
Contents of b27 to b0
before execution
[List Mode]
Step
b16
b15
b12 b11
b8 b7
b4 b3
b16
b15
b12 b11
b8 b7
b4 b3
Contents of b31 to b28
before execution
[List Mode]
Step
b16
b15
b12 b11
b8 b7
b4 b3
b16
b15
b12 b11
b8 b7
b4 b3
*
Content of carry flag
SM700 before execution
Instruction
Device
b0
D0, D1
b0
D0, D1
Instruction
Device
b0
D0, D1
b0
D0, D1
1 1 1
Contents of b31 to b29
before execution

Advertisement

Table of Contents
loading

Table of Contents