7. APPLICATION INSTRUCTIONS
7
−
26
MELSEC-A
Program Examples ROL
Program which rotates the contents of A0 three bits to the left when XC turns on.
RCL
Program which rotates the contents of A0 three bits to the left when XC turns on.
Contents of B15
before execution
Contents of B15
when n
=
1
Contents of B15
when n
=
2
Carry flag
(M9012)
To B0
To B0
To B0
(n
=
1)
(n
=
2)
(n
=
3)
Before execution
Progress
After execution
* Before execution, carry flag is either 1 or 0.
X00C
P
K
ROL
3
0
•
Coding
0 LD
X0
1 ROLP K3
4 END
X00C
P
K
RCL 3
0
•
Coding
0 LD
X00C
1 RCLP
K3
4 END
Carry flag
(M9012)
* Before execution, carry flag is either 1 or 0.
To carry flag
To carry flag
To carry flag
(n
=
1)
(n
=
2)
(n
=
3)
After execution
Progress
Before execution
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......