CalcRootLin (FB)ΒΆ
FUNCTION_BLOCK CalcRootLin
By use of this function block the root of a linear function \(y = a \cdot x + b\) with \(a\mbox{, }b\mbox{, }x \in \mathbb{R}\), if there is one, will be calculated.
- InOut:
Scope
Name
Type
Comment
Input
lrParam1LREALgradient of straight line (corresponds to \(a\))
lrParam0LREALheight at which line cuts the vertical y-axis (corresponds to \(b\))
Output
byRootsBYTEnumber of roots0: If line is parallel, but not identical to horizontal x-axis | 255: If line is identical to x-axis1: ElselrRootLREALroot