ZeroCrossing

Trigger zero crossing of input u

    ZeroCrossing

Library

Blocks/Logical

Description

The output "y" is true at the time instant when the input "u" becomes zero, provided the input "enable" is true. At all other time instants, the output "y" is false. If the input "u" is zero at a time instant when the "enable" input changes its value, then the output y is false.

Note, that in the plot window of a Modelica simulator, the output of this block is usually identically to false, because the output may only be true at an event instant, but not during continuous integration. In order to check that this component is actually working as expected, one should connect its output to, e.g., component Modelica.Blocks.Discrete.TriggeredSampler.

Parameters

ZeroCrossing_0

NameLabelDescriptionData TypeValid Values

mo_y

y

y

Structure

mo_y/fixed

fixed

Cell of scalars

true
false

mo_y/start

start

Cell of scalars

mo_u

u

u

Structure

mo_u/fixed

fixed

Cell of scalars

true
false

mo_u/start

start

Cell of scalars

mo_enable

enable

enable

Structure

mo_enable/fixed

fixed

Cell of scalars

true
false

mo_enable/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

y

implicit

Connector of Boolean output signal

output

1

u

implicit

input

1

enable

implicit

Zero input crossing is triggered if the enable input signal is true

input

2