Mitsubishi Electric melsec-k Programming Manual page 38

Hide thumbs Also See for melsec-k:
Table of Contents

Advertisement

-
K
D i
+
D i - K
+ D i
-
cvv
-
D i
U j
- +
D j - D i + D j
rv-ccv
-
In the same way as for addition, execute subtraction instructions for subtraction data after con-
version to binary numbers.
As only positive integral numbers are handled for subtraction, take care that the Operation result
does not become negative.
If the subtruction result becomes negative, execute the comparison
>
or
<
between S and
D.
When S
>
D, execute the S
-
D operation in the same way, and M stores the negative result in
memory.
M O V I
D1
I
D2
P5
<
Operating D2
-
D1 M 4 1
The possible operation combinations are the same as for
"
+ ".
Change the input
to pulse form
D1
>
D2, Mqo
=
negative
D1
<
D2, M 4 1
=
positive
D2
-
D1
D2
-34-

Advertisement

Table of Contents
loading

Table of Contents