Fnc 20 - Add / Addition - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
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-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
1
S
2
D
: This function is supported only in FX
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 is added algebraically.
5 + (−8) = −3
• When a constant (K) is specified in
2. 32-bit operation (DADD and DADDP)
The contents of [
transferred to [
Command
input
FNC 20
DADD
• The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is added algebraically.
5500 + (−8540) = −3040
• When a constant (K) is specified in [
format.
270
→ 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
/FX
3U
S
are added to
S
2
1
S
S
1
2
S
1
S
+1,
S
] are added to [
2
2
D
+1,
D
].
1
1
S
S
1
2
S
1
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
PLCs.
3UC
in binary format, and the addition result is transferred to
D
S
S
+
1
2
or
S
, it is automatically converted into binary format.
2
S
+1,
S
1
1
D
S
S
[
1
+1,
1
] + [
+1,
S
] or [
S
+1,
1
2
10.1 FNC 20 – ADD / Addition
Mnemonic
32-bit Instruction
DADD
13 steps
DADDP
Con-
Real
Index
stant
Number
V
Z Modify K H
E
D
] in binary format, and the addition result is
S
S
] → [
D
2
+1,
2
S
], it is automatically converted into binary
2
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data type
16- or 32-bit binary
16- or 32-bit binary
16- or 32-bit binary
Others
Charac-
Pointer
ter String
" "
P
D
.
+1,
D
]

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents