5 - 35
Operation Practice
(1) When X0 is turned on, the data in X30 to 3F and X20 to 2F are added, and the
result is output to Y40 to Y53.
(2) When X1 is turned on, the data in X30 to 3F is subtracted from the data in X20
to 2F, and the result is output to Y40 to Y53. When the result is a negative value,
Y70 is turned on and Y40 to Y53 are cleared to 0.
X0
0
26
Y70K0D1
K0 K5Y40D1DBCD
END
X1
<
> = D1
400
400
34
20
10
D0K4X30BINP
D1K4X20BINP
D1D0+P
D0K4X30BINP
D1K4X20BINP
D1
D0
-P
K5Y40K0DMOV
300
400
400
300
400
400
300
300
400
+
D0
D1
= D1+D0 D1
100+30 400
Related Exercise
---- Exercise 9