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
P
K
ROR 3
0
•
Coding
0 LD
X00C
1 RORP K3
4 END
X00C
P
K
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
Progress
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
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......