EasyManua.ls Logo

Mitsubishi Electric FX3U SERIES - Page 274

Mitsubishi Electric FX3U SERIES
948 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
272
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
10 Arithmetic and Logical Operation (
+
,
,
×
,
÷
) – FNC 20 to FNC 29
10.1 FNC 20 – ADD / Addition
Program example
1. Difference between ADD instruction and INC instruction caused by a program for adding "+1"
When ADD[P] is executed, "1" is added to the contents of D0 every time X001 turns from OFF to ON.
ADD[P] instruction is similar to INCP instruction described later except the contents shown in the table below:
ADD, ADDP, DADD or DADDP
instruction
INC, INCP, DINC, DINCP instruction
Flag (zero, borrow or carry) Operates Does not operate
Operation result
16-bit
operation
+(+1)=
+327670+1+2 +32767→−32768→−32767
+(1)=
←−2←−10←−32768
32-bit
operation
+(+1)=
+2,147,483,6470+1+2 +2,147,483,647→−2,147,483,648→−2,147,483,647
+(1)=
←−2←−10←−2,147,483,648
S D
S D
S D
S D
FNC 20
ADDP
D 0 K 1 D 0
X001
(D 0) + 1
(D 0)
FNC 24
INCP
D 0
X001
(D 0) + 1
(D 0)
S
1
S
2
D

Table of Contents

Other manuals for Mitsubishi Electric FX3U SERIES

Related product manuals