FX Series Positioning Controllers
Program format 5
5-56
5.10.14 FNC20 (ADD): Addition, FNC21 (SUB): Subtraction
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).
FNC 20
ADD
Applicable models
Series name
Remarks
K,H
KnX
KnY
KnM
D
V,Z
Applicable
devices
and basic
format
Word
devices
FNC
20ADD
FX
2N
-10GM
FX
2N
-20GM
ADD
Addition/Subtraction
Augend
D·
Drive
input
D·
D·
[S]ADD
S1· S2·
S1· S2·
FNC 21
SUB
SUB
[D]SUB
S1·
S2·
Addend Result
+ =
A negative value is treated as two's complement.
S1·
S2·
FNC 21
SUB
Minuend
D·
Drive
input
D·
S1·
S2·
Subtrahend Result
- =
A negative value is treated as two's complement.
S1·
S2·
Zero
Borrow
Carry
X axis,
simultaneous
2-axis
Y axis
(Not 10GM)
Subtask
M9061
M9133
M9062
M9063
M9093
M9094
M9095
M9134
M9135
Flags: Described below.
16-bit operation
7 steps
32-bit operation
11 steps
•
•
X30
FNC 20
ADD
D 10
D 12
D 14
FNC 20
[D] ADD
D 20
D 22
D 24
X31
FNC 21
SUB
D 30
D 32
D 34
FNC 21
[D] SUB
D 40
D 42
D 44
(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
Zero flag
Borrow flag
Carry flag
The most
significant bit
becomes "1"
The most
significant bit
becomes "0"
Zero flag
Borrow flag
Zero flag
Zero flag
Zero flag
Carry flag
Zero flag
-2, -1, 0, -32,768
-1, 0, 1
32,767, 0, 1, 2
-2, -1, 0 , -2,147,483,648
-1, 0, 1
2,147,483,647, 0, 1, 2
Содержание FX2N-10GM
Страница 1: ...HARDWARE PROGRAMMING MANUAL FX2N 10GM FX2N 20GM ...
Страница 4: ...FX Series Positioning Controllers ii ...
Страница 6: ...FX Series Positioning Controllers iv ...
Страница 46: ...FX Series Positioning Controllers Introduction 1 1 34 MEMO ...
Страница 76: ...FX Series Positioning Controllers Wiring 3 3 24 MEMO ...
Страница 222: ...FX Series Positioning Controllers Operation Maintenance and Inspection 8 8 18 MEMO ...
Страница 256: ...FX Series Positioning Controllers Program Examples 9 9 34 MEMO ...