Adding Single-Precision Real Numbers - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Adding single-precision real numbers

DEADD(P)
These instructions add the single-precision real number in the device specified by (s2) to the single-precision real number in
the device specified by (s1), and store the result in the device specified by (d).
Ladder diagram
(s1)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Augend data or head device number where the data to
which another is added is stored
(s2)
Addend data or head device number where the data that is
added to another is stored
(d)
Head device number for storing the operation result
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s1)
(s2)
(d)
Processing details
• These instructions add the single-precision real number in the device specified by (s2) to the single-precision real number
in the device specified by (s1), and store the result in the device specified by (d).
(s1)+1
(s1)
Single-precision real number
• When the constant (K or H) is specified in (s1) and (s2), these instructions convert values into single-precision real number
automatically.
(s1)+1
(s1)
Single-precision real number
• The table below shows the related devices.
Device
Name
SM700
Carry
SM8020
Zero
SM8021
Borrow
SM8022
Carry
7 APPLICATION INSTRUCTION
414
7.7 Real Number Instruction
(s2)
(d)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
(s2)+1
(s2)
+
Single-precision real number
[ K2346 ]
+
Converted into a single-precision
real number automatically.
Description
Condition
The absolute value of the operation result
The operation result is true "0".
(The mantissa part is "0").
The absolute value of the operation result < 2
The absolute value of the operation result
Structured text
ENO:=DEADD(EN,s1,s2,d);
ENO:=DEADDP(EN,s1,s2,d);
Range
Data type
-126
128
|(s1)|2
0, 2
Single-precision real number
-126
|(s2)|2
128
0, 2
Single-precision real number
Single-precision real number
Double word Indirect
U\G
Z
LC
LZ
(d)+1
(d)
Single-precision real number
(d)+1
(d)
Single-precision real number
Operation
128
2
The value of (d) is the maximum value (2
numbers and the carry flag SM700 turns on.
The zero flag SM8020 turns on.
-126
The value of (d) is the minimum value (2
numbers and the borrow flag SM8021 turns on.
128
2
The value of (d) is the maximum value (2
numbers and the carry flag SM8022 turns on.
Data type (label)
Single-precision real number
Single-precision real number
Single-precision real number
Constant
specification
K, H
E
$
128
) of 32-bit real
-126
) of 32-bit real
128
) of 32-bit real
Others

Advertisement

Table of Contents
loading

Table of Contents