Main Content

Check scope of From and Goto blocks

Check ID: mathworks.jmaab_v6.na_0011

Guideline: na_0011: Scope of Goto and From blocks

Description

Checks the scope of From and Goto blocks.

You can use global scope for controlling flow. However, From and Goto blocks must use local scope for signal flows.

This check requires a Simulink® Check™ license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs specified in the MAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — a

  • JMAAB — a, b, c

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
na_0011_a: Check for scope of Goto blockFrom and Goto blocks are not configured with local scope.
  • Make sure that the ports are connected.

  • Change the scope of the specified blocks to local.

na_0011_b: Check Inports connected to Goto blockThe output signal of the Inport block is connected only to the Goto block.Connect at least one branched signal line from the Inport block to a block other than the Goto block.
na_0011_c: Check Outports connected to From blockThe output signal of the From block is connected directly to the Outport block.Do not connect the From block directly to the Outport block.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in all masked subsystems.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.

See Also