Block Reference

The complete reference of Modeloop blocks: ports, parameters, and behavior for every block, organized by category.

This page is the per-block reference. For the conceptual model — ports, parameters, design rules — read Blocks first.

Conventions used below: n inputs means the count is configurable; all math blocks operate element-wise on vector and matrix signals.

Sources

Constant

Emits a fixed value every step.

Inputs
Outputs1
Parametersvalue (literal or $reference), data type

The value can be a scalar, vector, or matrix, and can carry any supported type including user-defined enums (DriveMode.SPORT).

Curve

One-dimensional lookup table with interpolation between breakpoints.

Inputs1 (the lookup abscissa)
Outputs1
Parametersbreakpoint vector, value vector

Use for calibration maps, sensor linearization, and any empirical characteristic. Inputs outside the breakpoint range are clamped to the table’s end values.

Arithmetic

Sum

Adds its inputs, each with a configurable sign.

Inputsn (each + or )
Outputs1
Parametersnumber of inputs, per-input sign

Subtraction is a Sum with a negated input; there is no separate subtract block.

Multiply

Multiplies its inputs, each optionally inverted.

Inputsn (each × or ÷)
Outputs1
Parametersnumber of inputs, per-input operation

Division is a Multiply with an inverted input.

Abs, Sqrt, Exp, Log

Unary math functions: one input, one output, no parameters.

Power

Raises the input to a configurable exponent.

Inputs1
Outputs1
Parametersexponent

Trigonometry

Sin, Cos, Tan, Asin, Acos, Atan

Unary trigonometric functions (radians): one input, one output.

Atan2

Two-argument arctangent — the full-quadrant angle of the vector (x, y).

Inputs2 (y, x)
Outputs1 (angle in radians)

Memory

All memory blocks are stateful: their output at step k depends on values from steps before k. They are the only blocks allowed to close a feedback loop, and each declares an initial condition used on the first step.

Unit Delay

The discrete delay: outputs the input value from the previous step.

Inputs1
Outputs1
Parametersinitial condition

Integral

Discrete-time integration of the input over simulated time.

Inputs1
Outputs1
Parametersinitial condition

Derivative

Discrete-time differentiation of the input.

Inputs1
Outputs1
Parametersinitial condition

Numerical caution: differentiation amplifies noise. Prefer restructuring the model to avoid raw derivatives of measured signals, or filter before differentiating. See Modeling Guidelines.

Routing & logic

Comparator

Compares two inputs with a configurable relation and outputs a boolean.

Inputs2
Outputs1 (bool)
Parametersrelation (>, >=, <, <=, ==, !=)

If-Then-Else

Selects one of two data inputs based on a boolean condition.

Inputs3 (condition, then, else)
Outputs1

This is signal selection, not control flow: both value inputs are computed every step; the block chooses which one to pass through. The then and else inputs must have compatible types.

Interface

Interface blocks carry no computation — they define where signals cross a boundary. See Signals.

Model Input / Model Output

The public interface of a model or task. Each declares a signal name and data type; in simulation they are the attachment points for scenario profiles and logging, and in generated code they become the model’s inputs and outputs.

Virtual Input / Virtual Output

The interface between a container’s inner diagram and its parent level. Created automatically when you group blocks into a container.

Composite

Container

A named sub-diagram, connected to the parent through virtual ports. Purely structural — no runtime or timing effect. Can be converted into a task. See Model Hierarchy.

State Chart

A finite state machine with states, transitions, guards, and actions in place of a data-flow diagram. Covered in depth in State Charts.

Task

The schedulable unit: a container bound to an activation — periodic (with a configurable period) or event (with a boolean control port). See Model Hierarchy and The Solver.

Quick index

BlockCategoryStateNotes
ConstantSourceLiteral or $reference value
CurveSource1-D lookup table
SumArithmeticn inputs, per-input sign
MultiplyArithmeticn inputs, per-input invert
Abs, Sqrt, Exp, LogArithmeticUnary
PowerArithmeticConfigurable exponent
Sin, Cos, TanTrigonometryRadians
Asin, Acos, Atan, Atan2TrigonometryRadians
Unit DelayMemoryPrevious-step value, breaks loops
IntegralMemoryDiscrete integration
DerivativeMemoryDiscrete differentiation
ComparatorRoutingBoolean output
If-Then-ElseRoutingSignal selection
Model Input / OutputInterfaceComponent boundary
Virtual Input / OutputInterfaceContainer boundary
ContainerCompositeStructure only
State ChartCompositeFinite state machine
TaskCompositePeriodic or event activation