Floating-Point Character String Conversion; Character String Floating-Point Conversion - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS
5.17.19 Floating-point
The specified real number data is converted into a character string according to the specified display
instruction.
Function definition
5.17.20 Character string
The specified character string is converted into real number data.
Function definition
5 - 82
character string conversion
BOOL ESTR_M (BOOL EN, REAL S1, ANY16 (3) S2, STRING (24) D);
Argument Name
IN/OUT
EN
IN
S1
IN
S2
IN
D
OUT
Return Value
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
floating-point conversion
BOOL EVAL_M (BOOL EN. STRING (24) S1, REAL D);
Argument Name
IN/OUT
EN
IN
S1
IN
D
OUT
Return Value
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)
ESTR_M
Execution condition (Function is executed only when the result is
TRUE)
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)
When the number of fraction part digits is other than "0"
..... Number of digits (max.: 24)
digits + 3)
S2 [2] Number of fraction part digits (0 to 7 digits)
Conversion result (character string data)
Description
character string conversion)
EVAL_M
Execution condition (Function is executed only when the result is
TRUE)
Data to be converted (character string data)
Conversion result (real number data)
Description
For the usable data type, refer to "3.2.2 About
ANY type".
Description
2
(number of fraction part
Description
*)
*)
*)
*)
*)
5 - 82

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents