Environment Controller

Create branches of block diagram that apply only to simulation or only to code generation

Library

Signal Routing

Description

This block outputs the signal at its Sim port only if the model that contains it is being simulated. It outputs the signal at its RTW port only if code is being generated from the model. This allows you to create branches of a model's block diagram that apply only to simulation or only to code generation. The table below describes various scenarios where either the Sim or RTW port applies.

ScenarioOutput
Normal mode simulationSim
Accelerator mode simulationSim
Rapid Accelerator mode simulationRTW
Simulation of a referenced modelSim
External mode simulationRTW
Standard code generationRTW
Code generation of a referenced modelRTW
Processor-in-the-loop target code generationSim

Real-Time Workshop® does not generate code for blocks connected to the Sim port. If you enable block reduction optimization (see Block reduction in the online Simulink® documentation), Simulink software eliminates blocks in the branch connected to the block's RTW port when compiling the model for simulation.

Data Type Support

The Environment Controller block accepts signals of any numeric or data type. It outputs the type at its input.

Parameters and Dialog Box

Characteristics

Multidimensionalized

Yes

  


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