Hit Crossing
Detection of the signal transition through a preset value.
blockType: HitCross
Path in the library: 
 | 
Description
Block Hit Crossing determines when the input signal reaches the parameter value Hit crossing offset in the direction specified by the parameter Hit crossing direction.
The output port on the block icon is displayed if the check box is selected. Show output port. If the output port display is disabled, then the block works as Terminator.
Ports
Input
#
 IN_1
—
Input signal
scalar | vector | the matrix
Details
The input signal for which the unit detects the achievement of a given value in a given direction.
| Data types | 
 
  | 
| Complex numbers support | 
 Yes  | 
Output
#
 OUT_1
—
Output signal
scalar | vector
Details
An output indicating whether the input signal has crossed the set value.
Dependencies
To use this port, check the box next to the option Show output port.
| Data types | 
 
  | 
| Complex numbers support | 
 Yes  | 
Parameters
Main
#
Hit crossing offset —
the value whose intersection needs to be detected
Scalar / array of real numbers
Details
The value whose intersection is in the direction specified by Hit crossing direction, detects the block.
| Default value | 
 
  | 
| Program usage name | 
 
  | 
| Tunable | 
 Yes  | 
| Evaluatable | 
 Yes  | 
#
Hit crossing direction —
the direction of intersection of the input signal of the set value
rising | either | falling
Details
The direction from which the input signal approaches the setpoint for detecting the intersection.
If the value is set to either, a block behaves like a block of _example equals _ (nonexistent), which can be useful to circumvent the limitations of finite mathematics and computational precision. In such cases, the use of the block Hit Crossing it may be more convenient than adding additional logic to the model.
If for the parameter Hit crossing direction the value is set either and the model uses a constant-step solver, the block behaves as follows. If the output signal is 1, the unit sets the output signal to 0 at the next time step, unless the input signal is equal to the set value.
| Values | 
 
  | 
| Default value | 
 
  | 
| Program usage name | 
 
  | 
| Tunable | 
 No  | 
| Evaluatable | 
 No  | 
#
Show output port —
show the output port
Logical
Details
Select this option to enable the output port of the block.
| Default value | 
 
  | 
| Program usage name | 
 
  | 
| Tunable | 
 No  | 
| Evaluatable | 
 No  |