Main Content

Check usage of While Iterator blocks

Check ID: mathworks.hism.hisl_0006


This check inspects the usage of While Iterator blocks.

Available with Simulink® Check™.

Results and Recommended Actions

ConditionRecommended Action
The model or subsystem contains a While Iterator block that has unlimited iterations. This condition can lead to infinite loops in the generated code.

For the identified While Iterator blocks:

  • Set the Maximum number of iterations (-1 for unlimited) parameter to a positive integer value.

  • Consider selecting the Show iteration number port check box and observe the iteration value during simulation.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to all.

  • Allows exclusions of blocks and charts.

See Also