Main Content

Simulink Function System Loop

Report on Simulink functions specified in a Stateflow loop

Description

This component loops over the Simulink® systems that implement a Stateflow® Simulink Function object, including the function’s parent system, subsystems, and optionally the systems that implement Simulink Functions nested in this function. This component must be a descendant of a State Loop component that is descendant of a Chart Loop component. This component executes when the current object in the state loop is a Simulink Function. For example, this structure creates a snapshot of each Simulink Function in a chart followed by snapshots of the systems that implement the function:

Snapshot of Simulink Function System Loop in a chart followed by System Snapshot that implements the function

Report On

Include subsystems in nested Simulink functions: Specifies whether to include subsystems in nested Simulink functions. By default, this option is enabled.

Loop Options

  • Sort Systems: Specifies how to sort systems.

    • Alphabetically by system name (default): Sorts systems alphabetically by name.

    • By number of blocks in system: Sorts systems by the number of blocks in the system. The list displays systems by decreasing number of blocks; the system with the largest number of blocks appears first in the list.

    • By system depth: Sorts systems by their depth in the model.

    • By traversal order: Sorts systems in the traversal order.

    • Alphabetically by system name (default): Sorts systems alphabetically by name.

    • By number of blocks in system: Sorts systems by number of blocks. The list shows systems by decreasing number of blocks; that is, the system with the largest number of blocks appears first in the list.

    • By system depth: Sorts systems by their depth in the model.

    • By traversal order: Sorts systems in traversal order.

  • Search for: Reports only on the Simulink blocks with the specified property name-value pairs. To enable searching, click the check box. In the first row of the property name and property value table, click inside the edit box, delete the existing text, and type the property name and value.

    To find property names for blocks, use the get_param function or select a block in the model and enter this code at the MATLAB® command line:

    get(gcbh)

Section Options

  • Create section for each object in loop: Inserts a section in the generated report for each object found in the loop.

  • Display the object type in the section title: Inserts the object type automatically into the section title in the generated report.

  • Number sections by system hierarchy: Hierarchically numbers sections in the generated report. Requires that Sort Systems be set to By traversal order.

  • Create link anchor for each object in loop: Create a link target for each Simulink Function system in the loop so that other parts of the report can link to it.

Insert Anything into Report?

Yes, inserts a section if you select Create section for each object in loop and a link target if you select Create link anchor for each object in loop.

Class

rptgen_sl.csl_sys_loop