Hit Crossing
Detection of a signal crossing the set value.
Description
The Hit Crossing block determines when the input signal reaches the Hit crossing offset in the direction specified by the Hit crossing direction parameter.
The output port on the block icon is displayed if the Show output port checkbox is selected. If the output port display is disabled, the block operates as Terminator.
Ports
Parameters
Hit crossing offset - the value whose crossing is to be detected
0 (by default)
| real values
The value whose crossing in the direction specified by Hit crossing direction is detected by the block.
Block parameter |
|
Values |
|
By default |
|
Hit crossing direction - direction in which the input signal crosses a given value
either (by default)
| falling
| rising
The direction from which the input signal approaches the set value for crossing detection.
If set to `either', the block behaves as a approximately equal (non-existent) block, which can be useful for circumventing the limitations of finite mathematics and computational accuracy. In such cases, using the Hit Crossing block may be more convenient than adding additional logic to the model.
When the Hit crossing direction property is set to either
and the model uses a constant step solver, the block behaves as follows. If the output is 1
, the block sets the output to 0
at the next time step, unless the input is equal to a given value.
Block parameter |
|
Values |
|
By default |
|
Show output port - show output port
On (By default)
| Off
Select this check box to enable the block output port.
Block parameter |
|
Values |
|
By default |
|