Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
6 - 139
6 MOTION PROGRAMS FOR POSITIONING CONTROL
6.16.6 Real number to BIN value conversion (INT)
Code INT
Function
Floating-point type real
number processing
instruction
Real number to BIN value
A floating-point type real number is converted into a 32-bit integer (BIN
value) including four decimal places.
Format
N
Indirect setting only
I[]nT
Real number to 32-bit integer
(BIN value) conversion command
;
[Explanation]
(1) A floating-point type real number is converted into a 32-bit integer (BIN value)
including four decimal places.
(2) A floating-point type real number is processed as single precision (32-bit) in the
binary floating-point format of the IEEE Standard.
Sign part ...................... 1 bit
Exponent part .............. 8 bits
Significant digit part...... 23 bits
Bits 0 to 22 : Significant digit part
31 22 15 Bit 0
Bits 31 : Sign part
Bits 23 to 30 : Exponent part
(3) The following values can be handled as floating-point type real numbers.
-1.0
2
128
< value -1.0 2
-126
, 0, 1.0 2
–126
value < 1.0 2
128
[Program Example]
#2002 : L = 10000 ;
#2004 : L = FLT [#2002 : L] ; #2004 : L = (461C4000)
16
(D2004, D2005 = (461C4000) 16)
#2006 : L = INT [#2004 : L] ; #2006 : L = 10000