This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Goto

Pass block input to From blocks

  • Library:
  • Simulink / Signal Routing

    HDL Coder / Signal Routing

Description

The Goto block passes its input to its corresponding From blocks. The input can be a real- or complex-valued signal or vector of any data type. From and Goto blocks allow you to pass a signal from one block to another without actually connecting them.

A Goto block can pass its input signal to more than one From block, although a From block can receive a signal from only one Goto block. The input to that Goto block is passed to the From blocks associated with it as though the blocks were physically connected. Goto blocks and From blocks are matched by the use of Goto tags.

The Tag Visibility parameter determines whether the location of From blocks that access the signal is limited:

  • local (default) — From and Goto blocks that use the same tag must be in the same subsystem. A local tag name is enclosed in brackets ([]).

  • scopedFrom and Goto blocks that use the same 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 ({}).

  • globalFrom and Goto blocks using the same tag can be anywhere in the model except in locations that span nonvirtual subsystem boundaries.

The rule that From-Goto block connections cannot cross nonvirtual subsystem boundaries has the following exception. A Goto block connected to a state port in one conditionally executed subsystem is visible to a From block inside another conditionally executed subsystem.

Note

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 higher level in the block diagram than the corresponding scoped Goto block in the masked subsystem.

Use local tags when the Goto and From blocks using the same tag name reside in the same subsystem. You must use global or scoped tags when the Goto and From blocks using the same tag name reside in different subsystems. When you define a tag as global, all uses of that tag access the same signal. A tag defined as scoped can be used in more than one place in the model.

The Goto block supports signal label propagation.

Ports

Input

expand all

Input signal to be passed to the corresponding From block, specified as a scalar, vector, matrix, or N-D array.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Parameters

expand all

The Goto block identifier. This parameter identifies the Goto block whose scope is defined in this block.

Programmatic Use

Block Parameter: GotoTag
Type: character vector
Values: 'A' | ...
Default: 'A'

The scope of the Goto block tag, specified as local, scoped, or global. When you set this parameter to scoped, you must use a Goto Tag Visibility block to define the scope of tag visibility.

Programmatic Use

Block Parameter: TagVisibility
Type: character vector
Values: 'local' | 'scoped' | 'global'
Default: 'local'

Specifies the text to display on the block icon. The options are the block tag, the name of the signal that the block represents, or both the tag and the signal name.

Programmatic Use

Block Parameter: IconDisplay
Type: character vector
Values: 'Signal name' | 'Tag' | 'Tag and signal name'
Default: 'Tag'

Rename the Goto tag. The new name propagates to all From and Goto Tag Visibility blocks that are listed in the Corresponding blocks box.

List of the From blocks and Goto Tag Visibility blocks connected to this Goto block. Click an entry in the list to display and highlight the corresponding From or Goto Tag Visibility block.

Block Characteristics

Data Types

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

Direct Feedthrough

no

Multidimensional Signals

yes

Variable-Size Signals

yes

Zero-Crossing Detection

no

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
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced before R2006a