Fnc 20 - Add / Addition - Mitsubishi FX3U Series Programming Manual

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
10.1
FNC 20 – ADD / Addition
Outline
This instruction executes addition by two values to obtain the result (A + B = C).
1. Instruction format
FNC 20
D
ADD
2. Set data
Operand type
S
1
S
2
D
3. Applicable devices
Bit Devices
Oper-
System User
and
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
1
S
2
D
Explanation of function and operation
1. 16-bit operation (ADD and ADDP)
The contents of
Command
input
FNC 20
ADD
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data are added
algebraically.
5 + (−8) = −3
• When a constant (K) is specified in
2. 32-bit operation (DADD and DADDP)
The contents of [
is transferred to [
Command
input
FNC 20
DADD
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data are added
algebraically.
5500 + (−8540) = −3040
• When a constant (K) is specified in [
the binary format.
246
→ For the floating point addition instruction EADD (FNC120), refer to Section 18.8.
Mnemonic
16-bit Instruction
P
7 steps ADD
ADDP
Data for addition or word device number storing data
Data for addition or word device number storing data
Word device number storing the addition result
Digit Specification
are added to
S
S
2
1
S
S
1
2
S
+1,
] are added to [
S
S
2
2
+1,
].
D
D
1
1
S
S
1
2
S
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
in the binary format, and the addition result is transferred to
D
S
S
1
+
2
or
, it is automatically converted into the binary format.
S
1
2
+1,
] in the binary format, and the addition result
S
S
1
1
D
S
S
[
1
+1,
1
] + [
+1,
] or [
+1,
S
S
1
1
2
10.1 FNC 20 – ADD / Addition
Mnemonic
32-bit Instruction
DADD
13 steps
DADDP
16- or 32-bit binary
16- or 32-bit binary
16- or 32-bit binary
Con-
Real
Index
stant
Number
V Z Modify K H
E
D
] → [
S
S
D
2
+1,
2
], it is automatically converted into
S
2
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data type
Others
Charac-
Pointer
ter String
" "
P
.
D
+1,
D
]

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents