Container

Organize a diagram behind named ports. Define the interface in Properties, wire the blocks inside, and connect the Container to its parent.

A Container puts related blocks inside a named sub-diagram. The parent canvas shows only its inputs and outputs; double-click the block to work inside it. Use one to make a growing diagram easier to read.

Build a magnitude function

Create a Container named Magnitude: it receives signal, calculates its absolute value, and returns magnitude. An input of -3 produces 3.

STEP 1 / 4Drag Container from the block library onto the canvas. Select it and name it Magnitude in Properties.
Parent canvas
MagnitudeDefine its inputs and outputs in PropertiesDouble-click to enterOne named block on the parent canvas
All steps in text
  1. Drag Container from the block library onto the canvas. Select it and set its name to Magnitude in the property panel.
  2. Expand Interface. Choose + Add input and name it signal. Choose + Add output and name it magnitude, then choose Apply interface. Modeloop creates the corresponding Virtual Input and Virtual Output inside the Container.
  3. Double-click the Container to enter it. Add an Abs block, then connect Virtual Input signal → Abs → Virtual Output magnitude. The interface blocks are already there; do not add a second pair.
  4. Use the breadcrumb to return to the parent canvas. Connect your source to signal on the left and connect magnitude on the right to the next block. Try negative, zero, and positive inputs: -3 → 3, 0 → 0, 3 → 3.

Follow a signal through the boundary

On the parent canvasInside the ContainerWhat to connect
Input signal on the leftVirtual Input signalIts output feeds the inner calculation
Output magnitude on the rightVirtual Output magnitudeFeed it the result of the inner calculation

Each parent port and its inner interface block represent the same signal. The input and output of the Container can have different names: signal enters; magnitude leaves.

Adding an output name creates its Virtual Output block, not the calculation or its wires. Connect a result to that block before using the output on the parent canvas. Use Virtual Input / Output at this boundary; Model Input / Output belong to the model interface.

Change the interface in one place

Select the Container on the parent canvas and edit Interface in Properties.

Your changeWhat happens after Apply interface
Add an input or outputA parent port and its matching inner Virtual Input or Output are created
Rename an existing portBoth names update; existing connections stay attached
Remove a portIts inner interface block and attached connections are removed

Edits to Virtual Input / Output blocks inside the Container also synchronize back to its parent ports. To rename, edit the existing row rather than removing it and adding another. Undo restores an applied interface edit; Cancel discards unapplied changes.

Use letters, digits, and underscores for port names. Keep input names unique within Inputs and output names unique within Outputs. Clear names such as measured_speed make connections easier to follow.

Group blocks you already have

Select the related blocks and choose Group in the toolbar, or press ⌘G on macOS / Ctrl+G on Windows and Linux. Modeloop moves the selection into a Container and creates Virtual Inputs and Outputs for connections that cross its boundary. Rename the Container and its ports to describe their purpose.

What changes when you use a Container?

The layout becomes hierarchical; execution still follows the surrounding diagram. A Container adds no delay, condition, or separate schedule. Memory blocks inside it keep their own behavior.

For branches that run under different conditions, use a Conditional. For a separate period or event trigger, use a Task.