MATH.CalcRootParable (FB)

 

(CAA_Mathematics.library)

By use of this function block the roots of a quadratic function math_image068.png (with  math_image070.png), if there are some, are calculated.

Input:

lrParam2

LREAL

multiplier of math_image072.png (corresponds to math_image008.png)

lrParam1

LREAL

multiplier of math_image024.png (corresponds to math_image010.png)

lrParam0

LREAL

multiplier of math_image076.png (corresponds to math_image012.png)

Output:

byRoots

BYTE

number of roots (0, 1, 2 or 255 (in case of infinite number of roots))

lrRoot0

LREAL

first root (initialized with 0)

lrRoot1

LREAL

second root (initialized with 0)