Skip to Main Content Skip to Search
Product Documentation

Example: Using the 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.

  6. To verify the signal value, double-click the Scope block.

  7. To disable the Check Static Lower Bound block from asserting its limit, clear the Enable assertion check box.

    The block is crossed out in the model, as shown.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS