7. APPLICATION INSTRUCTIONS
7
−
30
MELSEC-A
Program Examples DROL
Program which rotates the contents of A0 and 1 three bits to the left when XC turns
on.
DRCL
Program which rotates the contents of A0 and 1 three bits to the left when XC turns
on.
P
H
DMOV 80000000
A0
X00A
X00C
P
K
DROL 3
0
8
•
Coding
0 LD
X00A
1 DMOVP H80000000
A0
8 LD
X00C
9 DROLP K3
12
END
Carry flag
(M9012)
Contents of
B31 before
execution
Contents of
B31 when
n = 1
Contents of
B31 when
n = 2
To B0
(n = 1)
(n = 2)
(n = 3)
To B0
To B0
Pr
o
g
re
ss
Before
execution
After
execution
P
H
DMOV 80000000
A0
X00A
X00C
P
K
DRCL 3
0
8
•
Coding
0 LD
X00A
1 DMOVP H80000000
A0
8 LD
X00C
9 DRCLP K3
12
END
* 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
Before execution
Pr
o
g
re
ss
Carry flag
(M9012)
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: ......