245
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+
,
−
,
×
,
÷
) – FNC 20 to FNC 29
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
10. Arithmetic and Logical Operation (
+
,
−
,
×
,
÷
) –
FNC 20 to FNC 29
FNC 20 to FNC 29 provide instructions for arithmetic operations and logical operations of numeric data.
Floating point operation instructions
FX
3U
and FX
3UC
PLCs offer not only arithmetic operation instructions in the binary format but also arithmetic
operation instructions in the floating point format.
For the details, refer to the explanation of each instruction.
→
For the floating point operation, refer to Chapter 18.
FNC No.
Mnemonic
Symbol
Function
Reference
20
ADD
Addition
Section
10.1
21
SUB
Subtraction
Section
10.2
22
MUL
Multiplication
Section
10.3
23
DIV
Division
Section
10.4
24
INC
Increment
Section
10.5
25
DEC
Decrement
Section
10.6
26
WAND
Logical Word AND
Section
10.7
27
WOR
Logical Word OR
Section
10.8
28
WXOR
Logical Exclusive OR
Section
10.9
29
NEG
Negation
Section
10.10
FNC No.
Instruction mnemonic
Contents of processing
120
[D]EADD
Addition of binary floating point
121
[D]ESUB
Subtraction of binary floating point
122
[D]EMUL
Multiplication of binary floating point
123
[D]EDIV
Division of binary floating point
ADD
S2 D
S1
SUB
S2 D
S1
MUL
S2 D
S1
DIV
S2 D
S1
D
INC
D
DEC
D
WAND
S2
S1
D
WOR
S2
S1
D
WXOR
S2
S1
D
NEG