7. APPLICATION INSTRUCTIONS
7
−
28
MELSEC-A
Program Examples DROR
Program which rotates the contents of A0 and 1 three bits to the right when XC turns
on.
DRCR
Program which rotates the contents of A0 and 1 three bits to the right when XC turns
on.
P
K
DMOV 1
A0
X00A
X00C
P
K
DROR 3
0
8
•
Coding
0 LD
X00A
1 DMOVP K1
A0
8 LD
X00C
9 DRORP K3
12
END
P
K
DMOV 1
A0
X00A
X00C
P
K
DRCR 3
0
8
•
Coding
0 LD
X00A
1 DMOVP K1
A0
8 LD
X00C
9 DRCRP K3
12
END
Contents of B0
before execution
(n
=
1)
Contents of B0
when n
=
1
(n
=
2)
Contents of B0
when n
=
2
(n
=
3)
Before execution
After execution
Progress
To carry flag
To carry flag
To carry flag
* Before execution, carry flag is either 1 or 0.
Carry flag
(M9012)
Before execution
Progress
Contents of B0
before execution
(n
=
1)
Contents of B0
when n
=
1
(n
=
2)
Contents of B0
when n
=
2
(n
=
3)
To B31
To B31
To B31
Carry flag
(M9012)
After 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: ......