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
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: ......