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 | — |
| Outputs | 1 |
| Parameters | value (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.
| Inputs | 1 (the lookup abscissa) |
| Outputs | 1 |
| Parameters | breakpoint 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.
| Inputs | n (each + or −) |
| Outputs | 1 |
| Parameters | number 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.
| Inputs | n (each × or ÷) |
| Outputs | 1 |
| Parameters | number 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.
| Inputs | 1 |
| Outputs | 1 |
| Parameters | exponent |
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).
| Inputs | 2 (y, x) |
| Outputs | 1 (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.
| Inputs | 1 |
| Outputs | 1 |
| Parameters | initial condition |
Integral
Discrete-time integration of the input over simulated time.
| Inputs | 1 |
| Outputs | 1 |
| Parameters | initial condition |
Derivative
Discrete-time differentiation of the input.
| Inputs | 1 |
| Outputs | 1 |
| Parameters | initial 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.
| Inputs | 2 |
| Outputs | 1 (bool) |
| Parameters | relation (>, >=, <, <=, ==, !=) |
If-Then-Else
Selects one of two data inputs based on a boolean condition.
| Inputs | 3 (condition, then, else) |
| Outputs | 1 |
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
| Block | Category | State | Notes |
|---|---|---|---|
| Constant | Source | — | Literal or $reference value |
| Curve | Source | — | 1-D lookup table |
| Sum | Arithmetic | — | n inputs, per-input sign |
| Multiply | Arithmetic | — | n inputs, per-input invert |
| Abs, Sqrt, Exp, Log | Arithmetic | — | Unary |
| Power | Arithmetic | — | Configurable exponent |
| Sin, Cos, Tan | Trigonometry | — | Radians |
| Asin, Acos, Atan, Atan2 | Trigonometry | — | Radians |
| Unit Delay | Memory | ✓ | Previous-step value, breaks loops |
| Integral | Memory | ✓ | Discrete integration |
| Derivative | Memory | ✓ | Discrete differentiation |
| Comparator | Routing | — | Boolean output |
| If-Then-Else | Routing | — | Signal selection |
| Model Input / Output | Interface | — | Component boundary |
| Virtual Input / Output | Interface | — | Container boundary |
| Container | Composite | — | Structure only |
| State Chart | Composite | ✓ | Finite state machine |
| Task | Composite | — | Periodic or event activation |