User`s guide
Use Check Static Lower Bound Block to Check for Out-of-Bounds Signal
13-3
Use Check Static Lower Bound Block to Check for Out-of-Bounds
Signal
The following example uses a Check Static Lower Bound block to stop simulation when a
signal from a Sine Wave block crosses its lower bound limit.
1
Attach a Check Static Lower Bound block to the signal from a Sine Wave block.
2
Set the Simulation stop time to 2 seconds.
3
Double-click the Sine Wave block and set the following parameters:
• Set the Amplitude to 1.
• Set the Frequency to pi radians per second.
4
Double-click the Check Static Lower Bound block and set the Lower bound
parameter to -0.8.
Enable assertion is the default. This parameter enables a verification block for an
assertion. You set the Check Static Lower Bound block to detect a signal value of –
0.8 or lower. If the signal value reaches that value or falls below it, the simulation
stops.
5
Run the simulation.
The model stops simulating after 1.295 seconds, when the output is –0.8. The
software highlights the Check Static Lower Bound block.
When the simulation stops, you see the following diagnostic message.