14Fnc20 (Add): Addition, Fnc21 (Sub): Subtraction - Mitsubishi FX2N-10GM Hardware / Programming Manual

Melsec-f
Hide thumbs Also See for FX2N-10GM:
Table of Contents

Advertisement

FX Series Positioning Controllers
5.10.14 FNC20 (ADD): Addition, FNC21 (SUB): Subtraction
FNC 20
ADD
FNC 21
SUB
Word
devices
Applicable
devices
and basic
format
X30
FNC 20
ADD
FNC 20
[D] ADD
X31
FNC 21
SUB
FNC 21
[D] SUB
Flag operations
As shown in the table above, selection of the special auxiliary relays used as flags varies
depending on program type (for the X axis, for simultaneous 2-axis, for the Y axis and for sub-
tasks).
Addition/Subtraction
16-bit operation
ADD
7 steps
SUB
S1· S2·
K,H
KnX
KnY
Drive
input
FNC
S1·
20ADD
Augend
Drive
input
FNC 21
S1·
SUB
Minuend
D 10
D 12
D 14
D 20
D 22
D 24
D 30
D 32
D 34
D 40
D 42
D 44
32-bit operation
11 steps
S1· S2·
Flags: Described below.
KnM
D
V,Z
Zero
Borrow
Carry
S2·
S1·
Addend Result
A negative value is treated as two's complement.
S2·
S1·
A negative value is treated as two's complement.
Subtrahend Result
(D10) + (D12) → (D14)
16-bit operation
(D21, D20) + (D23, D22) → (D25, D24)
32-bit operation
(D30) - (D32) → (D34)
16-bit operation
(D41, D40) - (D43, D42) → (D45, D44)
32-bit operation
Program format 5
Applicable models
Series name
[S]ADD
FX
2N
[D]SUB
FX
2N
X axis,
Y axis
simultaneous
(Not 10GM)
2-axis
M9061
M9093
M9094
M9062
M9063
M9095
S2·
+
=
S2·
-
=
Remarks
-10GM
-20GM
Subtask
M9133
M9134
M9135
5-56

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx2n-20gm

Table of Contents