Documentation

Goto

Pass block input to From blocks

  • Library:
  • Simulink / Signal Routing

    HDL Coder / Signal Routing

Description

TheGotoblock passes its input to its correspondingFromblocks. 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.

AGotoblock can pass its input signal to more than oneFromblock, although aFromblock can receive a signal from only oneGotoblock. The input to thatGotoblock is passed to theFromblocks associated with it as though the blocks were physically connected.Gotoblocks andFromblocks are matched by the use of Goto tags.

TheTag Visibilityparameter determines whether the location ofFromblocks that access the signal is limited:

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

  • scopedFromandGotoblocks that use the same tag must be in the same subsystem or at any level in the model hierarchy below theGoto Tag Visibilityblock 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 ({}).

  • globalFromandGotoblocks using the same tag can be anywhere in the model except in locations that span nonvirtual subsystem boundaries.

The rule thatFrom-Gotoblock connections cannot cross nonvirtual subsystem boundaries has the following exception. AGotoblock connected to a state port in one conditionally executed subsystem is visible to aFromblock inside another conditionally executed subsystem.

Note

AscopedGotoblock 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 aGoto Tag Visibilityblock at a higher level in the block diagram than the correspondingscopedGotoblock in the masked subsystem.

Use local tags when theGotoandFrom块使用相同的标记名驻留在相同的subsystem. You must use global or scoped tags when theGotoandFromblocks 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.

TheGotoblock supportssignal label propagation.

Ports

Input

expand all

Input signal to be passed to the correspondingFromblock, 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

TheGotoblock identifier. This parameter identifies theGotoblock whose scope is defined in this block.

Programmatic Use

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

The scope of theGotoblock tag, specified aslocal,scoped, orglobal. When you set this parameter toscoped, you must use aGoto Tag Visibilityblock 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 theGototag. The new name propagates to allFromandGoto Tag Visibilityblocks that are listed in theCorresponding blocksbox.

List of theFromblocks andGoto Tag Visibilityblocks connected to thisGotoblock. Click an entry in the list to display and highlight the correspondingFromorGoto Tag Visibilityblock.

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
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced before R2006a