Hit Crossing
Purpose
Detect when signal reaches or crosses given value
Library
Control / Discontinuous
Description
The Hit Crossing block detects when the input signal reaches or crosses a value in
the specified direction. If a variable-step solver is used, a simulation step is forced at
the time when the crossing occurs. The output signal is 1 for one simulation time
step when a crossing occurs, 0 otherwise.
Parameters
-
Hit crossing offset
- The offset that the input signal has to reach or cross.
-
Hit crossing direction
- The value rising causes hit crossings only when the input
signal is rising. If falling is chosen, only hit crossings for a falling input signal
are detected. The setting either causes hit crossing for rising and falling signals
to be detected.
-
Threshold
- The threshold value used for the switch criteria.
-
Show output port
- The output terminal of the Hit Crossing block will be hidden
if the parameter is set to off. This setting only makes sense to force a simulation
step while using a variable-step solver.
Probe Signals
-
Input
- The block input signal.
-
Crossing signal
- Outputs 1 for one simulation time step when a crossing occurs,
0 otherwise. This probe signal is identical to the output signal.