User manual › Building a diagram — blocks, links, subsystems, saving
kind: manual#manual#canvas#blocks#links#subsystems#projects

Building a diagram#

A model is blocks on a canvas joined by links. This page covers putting them there, connecting them, organising them into levels, and saving the result.

Placing a block#

Find the block in the library navigator — it is arranged by family, and Block catalog — every library block is the same catalogue in page form — and drag it onto the canvas. Dropping it gives it a default size and a name taken from its type; both can be changed afterwards.

Every block carries its own description, visible when you hover it in the navigator and again in the information panel of its configuration dialog. That description is the authority on what the block computes, what its ports are and what its parameters mean.

Configuring a block#

Open a block's configuration dialog from the canvas. The parameters are the ones named in its description; the dialog shows the block's information panel beside them so you can read what a parameter does while setting it.

One parameter is on nearly every block: Sampling Time (s). In the blocks' own words, zero or less inherits the solver's rate; a positive value runs the block at that period. Left at the usual -1, then, the block runs at the rate of the level it sits on — the model's global sampling time at Home, or the subsystem's own rate where that subsystem sets one. It is inherited downwards from the enclosing level, not from whichever block happens to feed it.

Giving it a positive number pins that block to its own period, which is how a part of a model is deliberately run slower than the rest.

Wiring#

A link carries a signal from one output port to one input port. Drag from a source port to a destination port to create one.

Two rules are worth knowing before you draw:

  • An input takes one link; an output can feed many. To send one signal to several places you do not draw several links from the output — you branch an existing one.
  • A branch starts on a link, not on a port. Dragging from a point on an existing link taps that signal and carries it somewhere else.

Levels and subsystems#

The top level of a model is called Home. A subsystem block holds a canvas of its own; opening it takes you a level down, and the subsystem navigation panel moves you back up. Blocks inside a subsystem are positioned relative to that level only — a subsystem is a real boundary, not a drawing convenience.

Group work into subsystems when a diagram stops fitting on one screen, and when you want to reuse it: a level you have built can be saved as a template of your own and inserted into another model.

What a diagram actually is#

The application can print any level back to you as a script that would rebuild it. This is the clearest description of what your drawing consists of, and it is worth reading once even if you never write one by hand. From the closed-loop example that ships with the application:

$ ICoreBlocks --console "generateRecipe"
Step = block(Control_Systems/Sources/Step);
Step.move(40, 295);
Step.setConfig(Step Time (sec), 1);
Step.setConfig(Final Value, 1);
Subtract = block(Control_Systems/Base_Blocks/Subtract);
Subtract_p = Subtract.addPort(in, ICoreDouble);
Subtract_p.setDescription("+");
Subtract_p_2 = Subtract.addPort(in, ICoreDouble);
Subtract_p_2.setDescription("-");
Gain = block(Control_Systems/Base_Blocks/Gain);
Gain.setConfig(Gain Value, 4);
…
l_2 = connect(Subtract<0>, Gain<0>);
l_3 = connect(Gain<0>, Transfer_Function<0>);
l_4 = connect(Transfer_Function<0>, Scope<0>);
l_5 = connect(l_4, Subtract<1>);

Three things in that output are the rules above, stated by the model itself:

  • connect(Gain<0>, Transfer_Function<0>) — a link names a port by number on each end, counting from zero.
  • connect(l_4, Subtract<1>) — the feedback path connects to a link, l_4, not to the Transfer Function's port. That is a branch.
  • Subtract.addPort(in, ICoreDouble) with descriptions "+" and "-" — a block's ports can be added and labelled, and on a Subtract the labels are what tell you which input is subtracted.

Saving and loading#

A model is a project — a folder, created when you save, holding the diagram and its settings. Opening a template copies it into a project of its own, so the shipped examples are never edited in place:

$ ICoreBlocks --console "openTemplate examples/Closed_Loop_Speed_Control"
opened 'Closed-Loop Speed Control' as a new project:
  …/Documents/ICore Blocks/Closed-Loop Speed Control

Projects live under Documents/ICore Blocks unless you save them elsewhere.

Once the diagram is drawn, Running a simulation — solver settings, sampling, starting and stopping covers making it run.

Real runs#

Every transcript on this page is a real run rather than an illustration. Binary cmake-build-debug/ICoreBlocks.app, built 2026-08-17 01:28 (source at approximately commit c2a229c6); one process per line, HOME=<scratch> QT_QPA_PLATFORM=offscreen ICoreBlocks --console "<line>", with the toolkit's startup noise removed and paths under that scratch home shortened to . Re-run any line above to check this page against the program.