Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
6  BASIC INSTRUCTIONS
6.3  Data Conversion Instructions
277
6
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)
*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).
 • 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 90 
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).
 • 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 90 
• Basic model QCPU: The serial number (first five digits) is "04122" or later.
(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 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
E
Others
Bit
Word
Bit
Word
(S)
(D)
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
P
Command
Command
S
D
S
D
INT, DINT
INTP, DINTP
indicates an instruction symbol of 
INT/DINT.
BIN16-bit
32-bit floating-point  
real number
+1
S
S
D
BIN 32 bits
Lower 16 bits
Upper 16 bits
32-bit floating-point  
real number
+1
S
+1
D
S
D