Program example
Program to add the D2 data and D0 data when M0 turns ON and to turn the carry flag (SM12) ON if
the results exceed 32767. If the results are 32767 or less, the carry flag is turned OFF.
M0
10
15
>
D2
>
D0
M1
22
M1
24
8. Function Commands
S.STC, S.CLC
+
D2
D0
D1
M1
D1
D1
S.STC
S.CLC
- 293 -
Get other manuals https://www.bkmanuals.com
Add the D2 and D0 data, and store the results in D1.
(D2 + D0 -> D1)
Turn M1 ON when added data (D0) exceeds the
results (D1) or the data to be added to exceeds the
results
Turn carry flag ON when M1 turns ON.
Turn carry flag OFF when M1 turns OFF.
Coding
No. of
Com-
steps
mand
10
LD
11
+
15
LD>
18
OR>
21
OUT
22
LD
23
S.STC
24
LDI
25
S.CLC
26
Device
M0
D2
D0
D1
D2
D1
D0
D1
M1
M1
M1