Download Print this page

Converting Single-Precision Real Number To 32-Bit Signed Binary Data - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

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

Advertisement

Converting single-precision real number to 32-bit signed binary
data
FLT2DINT(P)
These instructions convert the single-precision real number in the device specified by (s) to 32-bit signed binary data, and
store the converted data in the device specified by (d). After conversion, the digits after the decimal point of the single-
precision real number, specified with (s), are truncated.
Ladder diagram
(s)
FBD/LD
EN
ENO
s
d
*1 Supported by engineering tool version "1.035M" and later.
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Data before conversion
(d)
Data after conversion
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions convert the single-precision real number in the device specified by (s) to 32-bit signed binary data, and
store the converted data in the device specified by (d). After conversion, the digits after the decimal point of the single-
precision real number, specified with (s), are truncated.
SM402
M0
Operation error
Error code
Description
(SD0/SD8067)
3401H
The single-precision real number in the device specified by (s) is out of the valid range (-2147483648 to +2147483647).
3402H
When the contents of the specified device are outside the following range:
0, 2
The specified device value is -0, denormalized number, NaN (not a number), or .
7 BASIC INSTRUCTIONS
292
7.5 Data Conversion Instructions
(d)
Word
T, ST, C, D, W,
SD, SW, R
EMOVP E-123456.7
(s)
FLT2DINT
D0
-126
|specified value (stored value)|<2
Structured text
ENO:=FLT2DINT(EN,s,d);
ENO:=FLT2DINTP(EN,s,d);
Range
-2147483648 to +2147483647
Double word Indirect
U\G
Z
LC
D0
(s)
b31
∙∙∙
b16
(d)
D1, D0
C7F1H
D100
(-123456.7)
128
*1
Data type
Single-precision real
number
32-bit signed binary
Bit
Bit
Constant
specification
LZ
K, H
(d)
b15
∙∙∙
b0
205AH
D101, D100
Data type (label)
ANYREAL_32
ANY32_S
BOOL
BOOL
Others
E
$
b31
∙∙∙
b16
b15
∙∙∙
b0
FFFEH
1DC0H
(-123456)

Hide quick links:

Advertisement

loading