Outport - Create output port for subsystem or external output

Library

Ports & Subsystems, Sinks

Description

Outport blocks are the links from a system to a destination outside the system.

Simulink® software assigns Outport block port numbers according to these rules:

Outport Blocks in a Subsystem

Outport blocks in a subsystem represent outputs from the subsystem. A signal arriving at an Outport block in a subsystem flows out of the associated output port on that Subsystem block. The Outport block associated with an output port on a Subsystem block is the block whose Port number parameter matches the relative position of the output port on the Subsystem block. For example, the Outport block whose Port number parameter is 1 sends its signal to the block connected to the topmost output port on the Subsystem block.

If you renumber the Port number of an Outport block, the block becomes connected to a different output port, although the block continues to send the signal to the same block outside the subsystem.

When you create a subsystem by selecting existing blocks, if more than one Outport block is included in the grouped blocks, Simulink software automatically renumbers the ports on the blocks.

The Outport block name appears in the Subsystem icon as a port label. To suppress display of the label, select the Outport block and choose Hide Name from the Format menu.

Outport Blocks in a Conditionally Executed Subsystem

When an Outport block is in an enabled subsystem, you can specify what happens to its output when the subsystem is disabled: it can be reset to an initial value or held at its most recent value. The Output when disabled pop-up menu provides these options. The Initial output parameter is the value of the output before the subsystem executes and, if the reset option is chosen, while the subsystem is disabled.

Outport Blocks in a Top-Level System

Outport blocks in a top-level system have two uses: to supply external outputs to the workspace, which you can do by using either the Configuration Parameters dialog box or the sim command, and to provide a means for analysis functions to obtain output from the system.

Data Type Support

The Outport block accepts complex or real signals of any data type supported by Simulink software. An Outport block can also accept fixed-point data types if it is not a root-level output port. The complexity and data type of the block's output are the same as those of its input. For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink® in the Simulink documentation.

The elements of a signal array connected to an Outport block can be of differing complexity and data types except in the following circumstance: If the output port is in a conditionally executed subsystem and the initial output is specified, all elements of an input array must be of the same complexity and data types.

Typical Simulink data type conversion rules apply to an output port's Initial output parameter. If the initial output value is in the range of the block's output data type, Simulink software converts the initial output to the output data type. If the specified initial output is out of the range of the output data type, Simulink software halts the simulation and signals an error.

Parameters and Dialog Box

The Main pane of the Outport block dialog appears as follows:

Port number

Specify the port number of the Outport block.

Icon Display

Specify the information to be displayed on the icon of this Outport block. The options are:

Port number

Displays port number of this Outport block.

Signal name

Displays the name of the signal connected to this Outport block (or signals if a bus is connected to this block).

Port name and signal name

Displays both the port number and the name or names of the signals connected to this Outport block.

Output when disabled

This option is enabled only if the Outport resides in an Enabled Subsystem. It specifies what happens to the block output when the system is disabled.

Initial output

For conditionally executed subsystems, specify the block output before the subsystem executes and while it is disabled. You can specify [] if your model does not depend on the initial output of the conditionally executed subsystem. Simulink software does not allow the initial output of this block to be inf or NaN.

The Signal Attributes pane of the Output block dialog appears as follows:

Specify properties via bus object

Select this option to use a bus object (see Working with Data Objects and Simulink.Bus class in the online documentation) to define the properties of a bus connected to this Outport block.

Bus object for validating input bus

Specifies the name of the bus object that defines the structure that a bus must have to be connected to this Outport block. At the beginning of a simulation or when you update the model's diagram, Simulink software checks whether the bus connected to this block has the specified structure. If not, Simulink software displays an error message.

Output as nonvirtual bus in parent model

Select this option if you want code generated from this model to use a C structure to define the structure of the bus signal output by this block.

Port dimensions (-1 for inherited)

Specifies the dimensions that a signal must have in order to be connected to this Outport block. Valid values are:

-1

A signal of any dimensions can be connected to this port.

N

The signal connected to this port must be a vector of size N.

[R C]

The signal connected to this port must be a matrix having R rows and C columns.

Sample time (-1 for inherited)

Specify the sample time of this Outport block. See Specifying Sample Time in the online documentation for information on specifying sample times. The output of this block changes at the specified rate to reflect the value of its input.

Minimum

Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:

Maximum

Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:

Data type

Specify the output data type. You can set it to:

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Data type parameter.

See Specifying Block Output Data Types for more information.

Signal type

Specifies the numeric type of the signal output by this block. The options are:

real

This Outport block outputs a real-valued signal. The signal connected to this block must be real. If it is not, Simulink software displays an error if you try to update the diagram or simulate the model that contains this block.

complex

This Outport block outputs a complex signal. The signal connected to this block must be complex. If it is not, Simulink software displays an error if you try to update the diagram or simulate the model that contains this block.

auto

This block outputs the numeric type of the signal that is connected to its input.

Sampling mode

Specify the sampling mode (Sample based or Frame based) that the input signal must match. To accept any sampling mode, set this parameter to auto. This parameter is intended to support signal processing applications based on Simulink models. See the documentation for the buffer function provided by Signal Processing Toolbox™ software or Frame-Based Signals in the Signal Processing Blockset™ documentation for information about frame-based signals.

Characteristics

Sample Time

Inherited from driving block

Dimensionalized

Yes

Multidimensionalized

Yes

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS