Download Print this page

Subtracting Single-Precision Real Numbers - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Subtracting single-precision real numbers

DESUB(P)
These instructions subtract the single-precision real number in the device specified by (s2) from the single-precision real
number in the device specified by (s1), and store the result in the device specified by (d).
Ladder diagram
(s1)
FBD/LD
EN
ENO
s1
d
s2
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Minuend data or head device number where the data from
which another is subtracted is stored
(s2)
Minuend data or head device number where the data that is
subtracted another is stored
(d)
Head device number for storing the operation result
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s1)
(s2)
(d)
Processing details
• These instructions subtract the single-precision real number in the device specified by (s2) from 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
8 APPLICATION INSTRUCTION

492

8.9 Real Number Instruction
(s2)
(d)
Word
T, ST, C, D, W,
SD, SW, R
(s2)+1
(s2)
-
Single-precision real number
[ K2346 ]
-
Converted into a single-precision
real number automatically.
Structured text
ENO:=DSUB(EN,s1,s2,d);
ENO:=DSUBP(EN,s1,s2,d);
Range
-126
128
|(s1)|2
0, 2
-126
128
|(s2)|2
0, 2
Double word Indirect
U\G
Z
LC
(d)+1
Single-precision real number
(d)+1
Single-precision real number
Data type
Single-precision real number
Single-precision real number
Single-precision real number
Bit
Bit
Constant
specification
LZ
K, H
(d)
(d)
Data type (label)
ANYREAL_32
ANYREAL_32
ANYREAL_32
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading