5 - 82 5 - 82
5 MELSEC FUNCTIONS
5.17.19 Floating-point character string conversion ESTR_M
The specified real number data is converted into a character string according to the specified display
instruction.
Function definition
BOOL ESTR_M (BOOL EN, REAL S1, ANY16 (3) S2, STRING (24) 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 (real number data)
Display specification of numeric value to be converted
S2 [0] Display format (0: decimal point format, 1: exponent
format)
S2 [1] Total number of digits (2 to 24 digits)
When the number of fraction part digits is "0"
..... Number of digits (max.: 24) 2
When the number of fraction part digits is other than "0"
..... Number of digits (max.: 24) (number of fraction part
3)
S2 IN
S2 [2] Number of fraction part digits (0 to 7 digits)
D
OUT Conversion result (character string data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the real number data specified in
*)
(* rData is converted into a character string according to the display instruction
*)
(* specified in ArrayData, and the result is stored into sData.
*)
ESTR_M (X0, rData, ArrayData, sData,);
Corresponding MELSEC command
ESTR (Floating-point data character string conversion)
5.17.20 Character string floating-point conversion EVAL_M
The specified character string is converted into real number data.
Function definition
BOOL EVAL_M (BOOL EN. STRING (24) 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 (character string data)
D
OUT Conversion result (real number data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the character string specified in
*)
(* sData is converted into real number data, and the result is stored into rData.
*)
EVAL_M (X0, sData, rData);
Corresponding MELSEC command
EVAL (Character string data _ floating-point conversion)
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: ......