Conversion From Floating-Point Data To Bin 16-Bit Data (Double Precision), Conversion From Floating-Point Data To Bin 32-Bit Data (Double Precision) - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Conversion from floating-point data to BIN 16-bit data (double
precision), conversion from floating-point data to BIN 32-bit data
(double precision)
INTD(P), DINTD(P)
High
Basic
Process
Redundant
performance
INTD, DINTD
INTDP, DINTDP
(S): 64-bit floating decimal point data to be converted to BIN value or head number of the devices where the floating decimal point data is stored (real number)
(D): Head number of the devices where the converted BIN value will be stored (BIN 16/32 bits)
Setting
Internal device
data
Bit
Word
(S)
(D)
Processing details
■INTD
• Converts the 64-bit floating decimal point real number designated at (S) into BIN 16-bit data and stores it at the device
number designated at (D).
S
+3
S
+2
S
+1
S
64-bit floating-point
real number
• The range of 64-bit floating decimal point type real numbers that can be designated at (S)+3, (S)+2, (S)+1 or (S) is from -
32768 to 32767.
• Stores integer values stored at (D) as BIN 16-bit values.
• The converted data is the value rounded 64-bit floating-point real number to the first digit after the decimal point.
• When an input value is set using a programming tool, a rounding error may occur. For precautions, refer to Page 89
Precautions.
■DINTD
• Converts 64-bit floating decimal point type real number designated by (S) to BIN 32-bit data, and stores the result at the
device number designated by (D).
S
S
S
S
+3
+2
+1
64-bit floating-point
real number
• The range of 64-bit floating decimal point type real numbers that can be designated at (S)+3, (S)+2, (S)+1 or (S) is from -
2147483648 to 2147483647.
• The integer value stored at (D)+1 and (D) is stored as BIN 32 bits.
• The converted data is the value rounded 64-bit floating-point real number to the first digit after the decimal point.
• When an input value is set using a programming tool, a rounding error may occur. For precautions, refer to Page 89
Precautions.
LCPU
Universal
Command
Command
R, ZR
J\
Bit
D
BIN 16 bit
D
+1
D
Upper 16 bits
Lower 16 bits
BIN 32 bit
indicates an instruction symbol of
P
U\G
Zn
Word
6.3 Data Conversion Instructions
INTD/DINTD.
S
D
S
D
Constant
Others
E
6 BASIC INSTRUCTIONS
6
279

Advertisement

Table of Contents
loading

Table of Contents