Stop Simulation
R2026bStop simulation when input is nonzero
Libraries:
Simulink /
Sinks
HDL Coder /
Sinks
Description
The Stop Simulation block stops the simulation when the input is nonzero. The simulation completes the current time step before terminating. If the block input is a vector, any nonzero vector element causes the simulation to stop.
When you use the Stop Simulation block in a For Iterator subsystem, the stop action occurs after execution of all iterations in the subsystem during a time step. The stop action does not interrupt execution until the start of the next time step.
You cannot use the Stop Simulation block to pause the simulation. To create a block that pauses the simulation, see Pause Simulation Using Assertion Blocks.
Examples
Extended Examples
Ports
Input
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"simulink/Sinks/Stop Simulation"
"hdlsllib/Sinks/Stop Simulation"
Example: add_block("simulink/Sinks/Stop Simulation","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced before R2006a

