blockCheckEquality

Check equality between inputs up to a threshold

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

Block that outputs 0 if the difference |u1-u2| < threShold, or else it outputs u2-u1.

Parameters

TypeNameDefaultDescription
RealthreShold1e-2Threshold for equality comparison

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputu1Value to check
Modelica.Blocks.Interfaces.RealInputu2Value to check
Modelica.Blocks.Interfaces.RealOutputyError

Revisions

  • January 13, 2017, by Michael Wetter:
    Revised implementation to output difference rather than the absolute value of the difference.
  • January 12, 2017, by Thiery S. Nouidui:
    First implementation.