Main Content

Goto Tag Visibility

Define scope of Goto block tag

  • Library:
  • Simulink / Signal Routing

  • Goto Tag Visibility block


The Goto Tag Visibility block defines the accessibility of Goto block tags that have scoped visibility. The value you specify for the Goto tag block parameter is accessible by From blocks in the same subsystem that contains the Goto Tag Visibility block and in subsystems below it in the model hierarchy.

A Goto Tag Visibility block is required for Goto blocks whose Tag Visibility parameter value is scoped. No Goto Tag Visibility block is needed if the tag visibility is either local or global. The block shows the tag name enclosed in braces ({}).


A scoped Goto block in a masked system is visible only in that subsystem and in the nonvirtual subsystems it contains. Simulink® generates an error if you run or update a diagram that has a Goto Tag Visibility block at a lower level in the block diagram than the corresponding scoped Goto block in the masked subsystem.

In the Simulink Editor, select the Goto Tag Visibility block to highlight the corresponding Goto and From blocks. When a corresponding From or Goto block is not in the current diagram, the Subsystem block that contains the block is highlighted.

To show a corresponding block in an open diagram or new tab, select the Goto Tag Visibility block and pause on the ellipsis. Then, select Related Blocks Related Blocks button from the action bar. When multiple blocks correspond to the selected block, a list of related blocks opens. You can filter the list of related blocks by entering a search term in the text box. After you select a related block from the list, window focus goes to the open diagram or new tab that shows the related block.


expand all

The Goto block tag whose visibility is defined by the location of this block. From and Goto blocks using the specified tag must be in the same subsystem or at any level in the model hierarchy below the Goto Tag Visibility block that does not entail crossing a nonvirtual subsystem boundary, in other words, the boundary of an atomic, conditionally executed, or function-call subsystem or a model reference. A scoped tag name is enclosed in braces ({}).


If you use multiple From and Goto Tag Visibility blocks to refer to the same Goto tag, you can simultaneously rename the tag in all of the blocks. Use the Rename All button in the Goto block dialog box. Alternatively, when you change the tag on the Goto block icon, propagate the new name to all corresponding From and Goto Tag Visibility blocks by pressing Shift+Enter.

Block Characteristics

Data Types

Boolean | bus | double | enumerated | fixed point | integer | single

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced before R2006a