MATH.CalcRootLin (FB)

 

(CAA_Mathematics.library)

By use of this function block the root of a linear function math_image062.png (with math_image064.png), if there is one, will be calculated.

Input:

lrParam1

LREAL

gradient of straight line (corresponds to math_image008.png)

lrParam0

LREAL

height at which line cuts the vertical y-axis (corresponds to math_image010.png)

Output:

byRoots

BYTE

number of roots (0, if line is parallel, but not identical to horizontal x-axis, 255, if line is identical to x-axis, 1 else)

lrRoot

LREAL

root (initialized with 0)