Mitsubishi Electric MELSEC iQ-F Series Training Manual page 109

Fx5u
Hide thumbs Also See for MELSEC iQ-F Series:
Table of Contents

Advertisement

5.4
5.4.1
[+(P)] (Addition of 16-bit binary data)
[-(P)] (Subtraction of 16-bit binary data)
• This section describes addition or subtraction.
• This section describes the differences between the instructions with P and the one without P.
1.
Every time the input condition turns on, the value in the device specified in (s) is added to the value in the device
specified in (d), and the result is stored in the device specified in (d).
2.
When the input condition turns on, the value in the device specified in (s1) is added to the value in the device specified in
(s2), and the result is stored in the device specified in (d).
ON
Precautions
• Always use
or
as the addition or subtraction instructions.
+P
-P
• When + or - is used, an addition or subtraction operation is executed at every scan. To use + or -, convert operands into
pulse in advance.
X102
0
X103
5
+P
D100
10
(d)
5
10
The value in D100 changes.
(s1)
D100
+
The value in D100 is not changed by the addition.
X102
+P
K5 D100
(s)
(d)
1.
+P
K5
D100
(d)
2.
K100
D101
END
(s)
+
(5)
D100
+
5
+
5
+
5
(s2)
(100)
D101
100
X102
PLS
M0
M0
+
K5
D100
5 BASIC INSTRUCTIONS -PART 2-
5.4 Arithmetic Operation Instructions
(d)
5
10
15
(d)
115
5
5 - 27

Advertisement

Table of Contents
loading

Table of Contents