Documentation

Argument Inport

Argument input port for Simulink Function block

Description

This block is an input argument port for a function that you define in the Simulink Function block.

Data Type Support

The Argument Inport block accepts complex or real signals of any data type that Simulink® supports, including fixed-point and enumerated data types. The Argument Inport block also accepts a bus object as a data type.

The numeric and data types of the block output are the same as those of its input. You can specify the signal type and data type of an input argument to an Argument Inport block using the Signal type and Data type parameters. For more information, see Data Types Supported by Simulink.

Parameters

Port number

Specify the port number of the block.

Settings

Default: 1

This parameter controls the order in which the port that corresponds to the block appears in the parent subsystem or model block.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Argument Name

Settings

Default: u

This parameter provides the name of the input argument in the function prototype of the Simulink Function block.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Minimum

Specify the minimum value for the block to output.

Settings

Default: [] (unspecified)

This number must be a finite real double scalar value.

Note

If you specify a bus object as the data type for this block, do not set the minimum value for bus data on the block. Simulink ignores this setting. Instead, set the minimum values for bus elements of the bus object specified as the data type. For information on the Minimum property of a bus element, see Simulink.BusElement.

Simulink software uses this value to perform:

  • Simulation range checking (see Signal Ranges)

  • Automatic scaling of fixed-point data types.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Maximum

Specify the maximum value for the block to output.

Settings

Default: [] (unspecified)

This number must be a finite real double scalar value.

Note

If you specify a bus object as the data type for this block, do not set the maximum value for bus data on the block. Simulink ignores this setting. Instead, set the maximum values for bus elements of the bus object specified as the data type. For information on the Maximum property of a bus element, see Simulink.BusElement.

Simulink software uses this value to perform:

  • Simulation range checking (see Signal Ranges)

  • Automatic scaling of fixed-point data types

Command-Line Information

See Block-Specific Parameters for the command-line information.

Data type

Specify the output data type of the argument input.

Settings

Default: double

double

Data type is double.

single

Data type is single.

int8

Data type is int8.

uint8

Data type is uint8.

int16

Data type is int16.

uint16

Data type is uint16.

int32

Data type is int32.

uint32

Data type is uint32.

boolean

Data type is boolean.

fixdt(1,16,0)

Data type is fixed point fixdt(1,16,0).

fixdt(1,16,2^0,0)

Data type is fixed point fixdt(1,16,2^0,0).

Enum: <class name>

Data type is enumerated, for example, Enum: Basic Colors.

Bus: <object name>

Data type is a bus object.

<data type expression>

The name of a data type object, for example Simulink.NumericType

Do not specify a bus object as the expression.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Show data type assistant

Display the Data Type Assistant.

Settings

The Data Type Assistant helps you set the Output data type parameter.

For more information, see Control Signal Data Types.

Mode

Select the category of data to specify.

Settings

Default: Built in

Built in

Built-in data types. Selecting Built in enables a second text box to the right. Select one of the following:

  • double (default)

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean

Fixed point

Fixed-point data types.

Enumerated

Enumerated data types. Selecting Enumerated enables a second menu/text box to the right, where you can enter the class name.

Bus object

Bus object. Selecting Bus enables a Bus object parameter to the right, where you enter the name of a bus object that you want to use to define the structure of the bus. If you need to create or change a bus object, click Edit to the right of the Bus object field to open the Simulink Bus Editor. For details, see Create Bus Objects with the Bus Editor.

Expression

Expressions that evaluate to data types. Selecting Expression enables a second menu/text box to the right, where you can enter the expression.

Do not specify a bus object as the expression.

Dependency

Clicking the Show data type assistant button enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

For more information, see Specify Data Types Using Data Type Assistant.

Data type override

Specify data type override mode for this signal.

Settings

Default: Inherit

Inherit

Inherits the data type override setting from its context, that is, from the block, Simulink.Signal object or Stateflow® chart in Simulink that is using the signal.

Off

Ignores the data type override setting of its context and uses the fixed-point data type specified for the signal.

Tip

The ability to turn off data type override for an individual data type provides greater control over the data types in your model when you apply data type override. For example, you can use this option to ensure that data types meet the requirements of downstream blocks regardless of the data type override setting.

Dependency

This parameter appears only when the Mode is Built in or Fixed point.

Signedness

Specify whether you want the fixed-point data as signed or unsigned.

Settings

Default: Signed

Signed

Specify the fixed-point data as signed.

Unsigned

Specify the fixed-point data as unsigned.

Dependencies

Selecting Mode > Fixed point enables this parameter.

See Also

For more information, see Specifying a Fixed-Point Data Type.

Word length

Specify the bit size of the word that holds the quantized integer.

Settings

Default: 16

Minimum: 0

Maximum: 32

Dependencies

Selecting Mode > Fixed point enables this parameter.

See Also

For more information, see Specifying a Fixed-Point Data Type.

Scaling

Specify the method for scaling your fixed-point data to avoid overflow conditions and minimize quantization errors.

Settings

Default: Best precision

Binary point

Specify binary point location.

Slope and bias

Enter slope and bias.

Best precision

Specify best-precision values.

Dependencies

Selecting Mode > Fixed point enables this parameter.

Selecting Binary point enables:

  • Fraction length

  • Calculate Best-Precision Scaling

Selecting Slope and bias enables:

  • Slope

  • Bias

  • Calculate Best-Precision Scaling

See Also

For more information, see Specifying a Fixed-Point Data Type.

Fraction length

Specify fraction length for fixed-point data type.

Settings

Default: 0

Binary points can be positive or negative integers.

Dependencies

Selecting Scaling > Binary point enables this parameter.

See Also

For more information, see Specifying a Fixed-Point Data Type.

Slope

Specify slope for the fixed-point data type.

Settings

Default: 2^0

Specify any positive real number.

Dependencies

Selecting Scaling > Slope and bias enables this parameter.

See Also

For more information, see Specifying a Fixed-Point Data Type.

Bias

Specify bias for the fixed-point data type.

Settings

Default: 0

Specify any real number.

Dependencies

Selecting Scaling > Slope and bias enables this parameter.

See Also

For more information, see Specifying a Fixed-Point Data Type.

Output as nonvirtual bus

Output a nonvirtual bus.

Settings

Default: Off

On

Output a nonvirtual bus.

Off

Output a virtual bus.

Tips

  • 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.

  • All signals in a nonvirtual bus must have the same sample time, even if the elements of the associated bus object specify inherited sample times. Any bus operation that would result in a nonvirtual bus that violates this requirement generates an error. Therefore, if you select this option all signals in the bus must have the same sample time. You can use a Rate Transition block to change the sample time of an individual signal, or of all signals in a bus, to allow the signal or bus to be included in a nonvirtual bus.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Lock data type settings against changes by the fixed-point tools

Select to lock data type settings of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor.

Settings

Default: Off

On

Locks all data type settings for this block.

Off

Allows the Fixed-Point Tool and the Fixed-Point Advisor to change data type settings for this block.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Port dimensions

Specify the dimensions of the input signal to the block.

Settings

Default: 1

Valid values are:

n

Vector signal of width n accepted

[m n]

Matrix signal having m rows and n columns accepted

Signal type

Specify the numeric type of the argument input.

Settings

Default: real

real

Specify the numeric type as a real number.

complex

Specify the numeric type as a complex number.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Characteristics

Dimensionalized

Yes

Multidimensionalized

Yes

Zero-Crossing Detection

No

Introduced in R2014b

Was this topic helpful?