EasyManua.ls Logo

Mitsubishi MELSEC-A series - Page 226

Mitsubishi MELSEC-A series
508 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...
7. APPLICATION INSTRUCTIONS
7 24
MELSEC-A
Program Examples ROR
Program which rotates the contents of A0 three bits to the right when XC turns on.
RCR
Program which rotates the contents of A0 three bits to the right when XC turns on.
X00C
PK
ROR 3
0
Coding
0 LD X00C
1 RORP K3
4 END
X00C
PK
RCR 3
0
Coding
0 LD X00C
1 RCRP K3
4 END
* Before execution, carry flag is either 1 or 0.
Before execution
To carry flag
To carry flag
To carry flag
Carry flag
(M9012)
Contents of B0
before execution
(
n = 1
)
Contents of B0
when n = 1
(
n = 2
)
Contents of B0
When n = 2
(n = 3)
After execution
Pro
g
ress
To B15
To B15
Carry flag
(M9012)
To B15
Contents of B0
before execution
A0
(
n = 1
)
Contents of B0
when n = 1
(
n = 2
)
Contents of B0
when n = 2
(
n =
3)
Before execution
A0 after execution
Progress

Table of Contents

Other manuals for Mitsubishi MELSEC-A series

Related product manuals