Detect crossing point
Simulink / Discontinuities
Simulink / Messages & Events
HDL Coder / Discontinuities
SimEvents
The Hit Crossing block detects when the input reaches the Hit crossing offset parameter value in the direction specified by the Hit crossing direction property.
You can configure the block to output a 1
or 0
signal,
a SimEvents® message, or a function-call event. See Output
for more information.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
If the Hit Crossing block is configured to output a SimEvents message and the output signal:
Crosses into or out of a referenced model
Is fed to the input of a Stateflow chart
then you need to create a bus object for the message signal. In the
MATLAB Command Window, run Simulink.createHitCrossMessage
to
check for and, if needed, create a hit crossing message bus object in the base
workspace.
Set the data type of the corresponding port to Bus:
HitCrossMessage
.