Mitsubishi Electric MELSEC FX3U Programming Manual page 287

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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 ON from OFF.
ADD[P] instruction is similar to INCP instruction described later except the contents shown in the table below:
Flag (zero, borrow or carry)
S
16-bit
operation
S
S
32-bit
operation
S
X001
FNC 20
ADDP
X001
FNC 24
INCP
ADD, ADDP, DADD or
DADDP instruction
Operates
+32767→0→+1→+2→
+(+1)=
D
←−2←−1←0←−32768
+(−1)=
D
+2,147,483,647→0→+1→+2→ +2,147,483,647→−2,147,483,648→−2,147,483,647
+(+1)=
D
←−2←−1←0←−2,147,483,648
+(−1)=
D
S
S
D
1
2
D 0
K 1
D 0
D 0
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
INC, INCP, DINC, DINCP instruction
+32767→−32768→−32767
(D 0) + 1→(D 0)
(D 0) + 1→(D 0)
10.1 FNC 20 – ADD / Addition
Does not operate
285
1
2
3
4
5
6
7
8
9
10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents