5 - 26 5 - 26
5 MELSEC FUNCTIONS
5.6.7 BIN floating-point conversion FLT_M
The specified BIN 16-bit data is converted into real number data.
Function definition BOOL FLT_M (BOOL EN, ANY16 S1, REAL D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Data to be converted (BIN 16-bit data)
D
OUT
Conversion result (real number data)
Return Value
Description
BOOL Execution
condition
Example of use
(*When execution condition X0 turns ON, the BIN 16-bit data in D100 is
*)
(* converted into real number data, and the result is stored into Result.
*)
FLT_M (X0, D100, Result);
Corresponding MELSEC command
FLT (Conversion from BIN 16-bit data to floating decimal point (Single precision))
5.6.8 32-bit BIN floating-point conversion DFLT_M
The specified BIN 32-bit data is converted into real number data.
Function definition
BOOL DFLT_M (BOOL EN, ANY32 S1, REAL D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Data to be converted (BIN 32-bit data)
D OUT
Conversion result (real number data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the BIN 32-bit data in dwData1 is
*)
(* converted into real number data, and the result is stored into Result.
*)
DFLT_M (X0, dwData1, RealResult);
Corresponding MELSEC command
DFLT (Conversion from BIN 32-bit data to floating decimal point (Single precision))
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......