b = CrossingMonitoring(u=..., threshold = 0).y;
Whenever the Real input u crosses parameter threshold from negative to positive values, output y is set to true, and whenever u crosses threshold from positive to negative values, y is set to false. The default value for the threshold = 0.
This block is demonstrated with the following example:
results in
simulation result |