Character String Type (String) Real Number Type - Mitsubishi Electric MELSEC Q Series Programming Manual

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

Advertisement

6 IEC FUNCTIONS
6.1.18 Character string type (STRING)
Character string type (STRING) data is converted into real number type (REAL) data.
Function definition
Function definition
6 - 20
real number type (REAL) conversion
REAL STR_TO_REAL ( STRING(24) S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
REAL
Conversion result (real number data)
Remarks:
Example of use
Argument Type
STRING
w_Real1:=
STR_TO_REAL(w_Str1);
BOOL STR_TO_REAL _E( BOOL EN, STRING(24) S1, REAL D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
D1
OUT
Return value
Return Value
BOOL
Execution condition
Example of use
(*
When execution condition X0 turns ON, the character string type data in
(*
sData is converted into real number type (REAL) data, and the result is stored
(*
into Result.
M0 := STR_TO_REAL_E( X0, sData, Result ) ;
Data to be converted (character string data)
ST Program
Conversion Result
LD
EVAL
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (character string data)
Conversion result (real number data)
STR_TO_REAL
STR_TO_REAL_E
Description
Description
SM400
LD,EVAL
w_Str1 w_Real1
Description
Description
Used Instruction
*)
*)
*)
6 - 20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents