Square Root - 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.2.2 Square root

The square root of the specified data is operated.
Function definition
Function definition
6 - 22
SQRT
SQRT_E
REAL SQRT ( REAL S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
REAL
Square root operation result (real number data)
Remarks:
Example of use
Argument Type
REAL
r_data1 := SQRT( r_data2 );
BOOL SQRT_E( BOOL EN, REAL 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 square root of the data stored in
(*
rData is found, and the result is stored into Result.
M0 := SQRT_E( X0, rData, Result ) ;
Data whose square root will be found
ST Program
Conversion Result
LD
SQR
Execution condition (Function is executed only when the result is TRUE)
Data whose square root will be found (real number data)
Square root operation result (real number data)
Description
Description
Used Instruction
SM400
LD,SQR
r_data2
r_data1
Description
Description
*)
*)
6 - 22

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents