Square Root : Sqrt - Mitsubishi Electric Melsec Q Series Programming Manual

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

5 OPERATION CONTROL PROGRAMS

5.6.7 Square root : SQRT

Format
[Usable data]
Setting
16-bit
data
Bit device
integer
type
(S)
[Setting data]
Setting data
[Functions]
[Errors]
[Program examples]
SQRT(S)
Word device
64-bit
32-bit
floating
integer
point
type (L)
type (F)
Data on which square root operation will be
(S)
(1) The square root of the data specified with (S) is found.
(2) Only a positive number may be specified with (S). (Operation cannot be performed
with a negative number.)
(3) If (S) is an integer type, it is converted into a floating-point type before operation is
performed.
(1) An operation error will occur if:
• (S) is a negative number; or
• (S) is an indirectly specified device and its device No. is outside the range.
(1) Program which finds the square root of D0F and substitutes the result to #0F
#0F = SQRT(D0F)
#3
#2
#0F
Usable Data
Constant
16-bit
32-bit
Coasting
integer
integer type
timer
type (K/H)
(K/H, L)
Description
performed
#1
#0
3.0
5 - 33
F/FS
Number of basic steps
64-bit
Calculation
conditional
floating
expression
expression
point
type (K)
Data type of result
Floating-point type
D3
D2
D0F
9.0
G
2
Bit
Comparison
conditional
expression
: Usable
D1
D0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents