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.

While Iterator Subsystem

Subsystem that repeats execution during a simulation time step

  • Library:
  • Simulink / Ports & Subsystems

Description

The While Iterator Subsystem block is a Subsystem block preconfigured as a starting point for creating a subsystem that repeats execution during a simulation time step while a logical condition is true.

Use While Iterator Subsystem blocks to model:

  • Block diagram equivalent of a program while or do-while loop.

  • An iterative algorithm that converges on a more accurate solution after multiple iterations.

When using simplified initialization mode, if you place a block that needs elapsed time (such as a Discrete-Time Integrator block) in a While Iterator Subsystem block, Simulink® displays an error.

If the output signal from a While Iterator Subsystem block is a function-call signal, Simulink displays an error when you simulate the model or update the diagram.

Ports

Input

expand all

Placing an Inport block in a subsystem block adds an external input port to the block. The port label matches the name of the Inport block.

Use Inport blocks to get signals from the local environment.

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

Placing a While Iterator block connected to an Input block in a Subsystem block adds this external input port to the block.

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

Output

expand all

Placing an Outport block in a subsystem block adds an output port from the block. The port label on the subsystem block is the name of the Outport block.

Use Outport blocks to send signals to the local environment.

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

Block Characteristics

Data Types

double[a] | single[a] | Boolean[a] | base integer[a] | fixed point[a] | enumerated[a] | bus[a] | string[a]

Direct Feedthrough

No

Multidimensional Signals

Yes[a]

Variable-Size Signals

Yes[a]

Zero-Crossing Detection

No

[a] 

Actual data type or capability support depends on block implementation.

Extended Capabilities

Introduced before R2006a