6 - 18 6 - 18
6 IEC FUNCTIONS
6.1.16 Character string type (STRING) double precision integer type (DINT) conversion STR_TO_DINT
STR_TO_DINT_E
Character string type (STRING) data is converted into double precision integer type (DINT) data.
Function definition
DINT STR_TO_DINT ( STRING(12) S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data to be converted (character string data)
Return value
Return Value
Description
DINT
Conversion result (BIN 32-bit data)
Remarks: This function cannot be used with the Basic model QCPU.
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
STRING w_DWord1:=
STR_TO_DINT("123");
LD SM400
DDABIN "123"
w_DWord1
LD,DDABIN
Function definition
BOOL STR_TO_DINT _E( BOOL EN, STRING(12) S1, DINT D1 );
Argument
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)
D1
OUT
Conversion result (BIN 32-bit data)
Return value
Return Value
Description
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 ) ;
*)
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......