Character String Type (String) Double Precision Integer Type (Dint) Conversion - 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.16 Character string type (STRING) double precision integer type (DINT) conversion STR_TO_DINT
Character string type (STRING) data is converted into double precision integer type (DINT) data.
Function definition
Function definition
6 - 18
DINT STR_TO_DINT ( STRING(12) S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
DINT
Conversion result (BIN 32-bit data)
Remarks: This function cannot be used with the Basic model QCPU.
Example of use
Argument Type
STRING
w_DWord1:=
STR_TO_DINT("123");
BOOL STR_TO_DINT _E( BOOL EN, STRING(12) S1, DINT 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 double precision integer type (DINT) data, and the
(*
result is stored into Result.
M0 := STR_TO_DINT_E( X0, sData, Result ) ;
Data to be converted (character string data)
ST Program
Conversion Result
LD
DDABIN "123"
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (character string data)
Conversion result (BIN 32-bit data)
STR_TO_DINT_E
Description
Description
Used Instruction
SM400
LD,DDABIN
w_DWord1
Description
Description
*)
*)
*)
6 - 18

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents