6 - 22 6 - 22
6 IEC FUNCTIONS
6.2.2 Square root SQRT
SQRT_E
The square root of the specified data is operated.
Function definition
REAL SQRT ( REAL S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data whose square root will be found
Return value
Return Value
Description
REAL
Square root operation result (real number data)
Remarks:
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
REAL
r_data1 := SQRT( r_data2 );
LD
SM400
SQR r_data2
r_data1
LD,SQR
Function definition
BOOL SQRT_E( BOOL EN, REAL S1, REAL D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Data whose square root will be found (real number data)
D1
OUT
Square root operation result (real number data)
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
When execution condition X0 turns ON, the square root of the data stored in
rData is found, and the result is stored into Result.
M0 := SQRT_E( X0, rData, Result ) ;
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......