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
Memory blocks use values from previous executions in their calculations. Their initial condition parameters define the starting values for those calculations. Consult the individual block reference for the meaning of each parameter.
Unit Delay
The discrete delay: outputs the input value from the previous step.
Unit Delay reference covers execution, initial conditions, ports, and an example.
| 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 callback. Each declares a signal name and data type; in simulation they are the attachment points for scenario profiles and measurement, 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 callback. See Model Hierarchy.
Create a Container, step by step →
Conditional
Runs the first branch whose condition is true, with an ELSE fallback. Each branch contains its own diagram. Branch inputs sit on the left boundary; same-named branch outputs share one output on the right.
Create a Conditional, step by step →
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.
Callback
An executable diagram with periodic or event activation. Tasks group callbacks in the build configuration. See the Callback reference and Model Execution.
Quick index
| Block | Category | 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 input value |
| Integral | Memory | Discrete integration |
| Derivative | Memory | Discrete differentiation |
| Comparator | Routing | Boolean output |
| If-Then-Else | Routing | Signal selection |
| Model Input / Output | Interface | Model boundary |
| Virtual Input / Output | Interface | Container boundary |
| Container | Composite | Structure only |
| Conditional | Composite | IF / ELIF / ELSE execution |
| State Chart | Composite | Finite state machine |
| Callback | Composite | Periodic or event activation |