Conversion From Floating-Point Data To Bin 16-Bit Data (Single Precision), Conversion From Floating-Point Data To Bin 32-Bit Data (Single 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 (single
precision), conversion from floating-point data to BIN 32-bit data
(single precision)
INT(P), DINT(P)
Ver.
High
Basic
Process
Redundant Universal
performance
• Basic model QCPU: The serial number (first five digits) is "04122" or later.
INT, DINT
INTP, DINTP
(S): 32-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)
*1 Applicable for the Universal model QCPU, LCPU.
Processing details
■INT
• Converts the 32-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
+1
S
32-bit floating-point
real number
• The range of 32-bit floating decimal point type real numbers that can be designated at (S)+1 or (S) is from -32768 to 32767.
• Stores integer values stored at (D) as BIN 16-bit values.
• After conversion, the first digit after the decimal point of the real number is rounded off.
• When an input value is set using a programming tool, a rounding error may occur. For precautions, refer to Page 89
Precautions.
■DINT
• Converts 32-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
+1
S
32-bit floating-point
real number
• The range of 32-bit floating decimal point type real numbers that can be designated at (S)+1 or (S) is from -2147483648 to
2147483647.
• The integer value stored at (D)+1 and (D) is stored as BIN 32 bits.
• After conversion, the first digit after the decimal point of the real number is rounded off.
• When an input value is set using a programming tool, a rounding error may occur. For precautions, refer to Page 89
Precautions.
LCPU
Command
Command
R, ZR
J\
Bit
D
BIN16-bit
D
+1
D
Upper 16 bits
Lower 16 bits
BIN 32 bits
indicates an instruction symbol of
S
P
S
U\G
Zn
Word
*1
6.3 Data Conversion Instructions
INT/DINT.
D
D
Constant
Others
E
6 BASIC INSTRUCTIONS
277
6

Advertisement

Table of Contents
loading

Table of Contents