Mitsubishi Electric MELSEC FX3U Programming Manual page 289

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
Related devices
1. Relationship between the flag operation and the sign (positive or negative) of a numeric
value
Device
M8020
M8021
M8022
Zero flag
−2, −1,
0,
Borrow flag
Zero flag
−2,
−1,
0,
Borrow flag
Cautions
1. When using a 32-bit operation instruction (DSUB or DSUBP)
When specifying word devices, a 16-bit word device on the low-order side is specified first, and then a word
device with the subsequent device number is automatically set for the high-order 16 bits.
For preventing number overlap, it is recommended to always specify an even number, for example.
2. When specifying the same device in the source and destination
The same device number can be specified for both the source and the destination.
In this case, note that the addition result changes in every operation cycle if a continuous operation type
instruction (SUB or DSUB) is used.
X001
FNC 21
SUB
Name
ON : When the operation result is 0
Zero
OFF: When the operation result is other than 0
ON : When the operation result is less than −32768 (in 16-bit operation) or
−2,147,483,648 (in 32-bit operation)
Borrow
OFF: When the operation result is not less than −32768 (in 16-bit operation) or
−2,147,483,648 (in 32-bit operation)
ON : When the operation result is more than 32767 (in 16-bit operation) or
2,147,483,647 (in 32-bit operation)
Carry
OFF: When the operation result is not more than 32767 (in 16-bit operation) or
2,147,483,647 (in 32-bit operation)
−32768
The most
significant bit of
data becomes
"1".
−2,147,483,648
D 0
K 25
D 0
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
→ For the flag operations, refer to Subsection 6.5.2.
Description
Zero flag
−1,
0,
1
The most
significant bit
of data
becomes "0".
−1,
0,
1
2,147,483,647,
Zero flag
(D 0) − 25→(D 0)
10.2 FNC 21 – SUB / Subtraction
Zero flag
32767,
0,
1,
2
Carry flag
Zero flag
0,
1,
2
Carry flag
287
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