5 - 50
5 OPERATION CONTROL PROGRAMS
F/FS G
5.7.7 Floating-point value conversion 32-bit into 64-bit : DFLT
Ver.!
Format DFLT (S) Number of basic steps 2
[Usable data]
Setting
data
Usable Data
Bit device
Word device Constant
Calculation
expression
Bit
conditional
expression
Comparison
conditional
expression
16-bit
integer
type
32-bit
integer
type (L)
64-bit
floating
point
type (F)
Coasting
timer
16-bit
integer
type (K/H)
32-bit
integer type
(K/H, L)
64-bit
floating
point
type (K)
(S) — —
(Note-1)
— — — — — — — —
: Usable
(Note-1) : The data is handled as the 32-bit integer type on the program, but store the 32-bit floating-point data in the device.
[Setting data]
Setting data Description Data type of result
(S)
Data which will be converted into 64-bit
floating-point value
64-bit floating-point type
[Functions]
(1) The 32-bit floating-point (single precision real number) value stored in the device
specified with (S) is converted into the 64-bit floating-point (double precision real
number) value.
Convertible data ranges are shown below.
-3.40
10
38
to -1.18 10
-38
, 0.0, 1.18 10
-38
to 3.40 10
38
(single precision real number)
(2) The 64-bit floating-point type is used as the data of floating-point type in the
Motion SFC program. Use this instruction to input the data of 32-bit floating-point
type from the external devices.
[Errors]
(1) An operation error will occur if:
• The (S) data is not a valid 32-bit floating-point type.
[Program examples]
(1) Program which converts the 32-bit floating-point value data of D2000L into 64-bit
floating-point value data and substitutes the result to #0F
#0F = DFLT(D2000L)
#0F
#3 #2
K-1.0
#1
#0 D2001
K-1.0
D2000
D2000L
Ver.!
: Refer to Section 1.3 for the software version that supports this function.