Nonvirtual and Virtual Blocks
Simulink® blocks fall into two basic categories: nonvirtual blocks and virtual blocks.
Nonvirtual blocks play an active role in the simulation of a system. If you add or remove a nonvirtual block, you change the model behavior.
Virtual blocks help organize a model graphically. While they play no active role in the simulation, they can affect the execution order of other blocks.
Some Simulink blocks are virtual in some circumstances and nonvirtual in others. Such blocks are called conditionally virtual blocks.
The table lists Simulink virtual and conditionally virtual blocks.
Block Name | Condition Under Which Block Is Virtual |
---|---|
Virtual if input bus is virtual. | |
Virtual if output bus is virtual. | |
Virtual if input bus is virtual. | |
Always virtual. | |
Virtual unless connected directly to an Outport block. | |
Always virtual. | |
Always virtual. | |
Always virtual. | |
Always virtual. | |
Virtual unless input bus is nonvirtual and contains a variable-size signal. | |
Always virtual. (since R2022a) Before R2022a: Virtual unless the block resides in a conditionally executed or atomic subsystem and has a direct connection to an Outport block. | |
Always virtual. | |
Virtual unless output bus is nonvirtual. | |
Virtual when the block resides within any subsystem (conditional or not), and does not reside in the root (top-level) Simulink window. For more information, see Ensure outport is virtual. | |
Virtual only when Number of input dimensions specifies
| |
Always virtual. | |
Virtual unless the block is conditionally executed or the Treat as atomic unit check box is selected. You can check if a
block is virtual with the | |
Always virtual. | |
Virtual when the output port is not present. |