Skip to content

Chapter 3 · How Programming Works

Function Blocks

  • Lesson
  • 8 min

Between an input and an output sits the logic, and in LOXONE that logic is built from function blocks. A block is a ready made piece of intelligence. Some are simple, like an AND. Some are whole systems, like the Lighting Controller with all its moods and automation built in.

Learning to work with blocks is learning to program LOXONE.

By the end of this lesson you will be able to:

  • Insert a function block into a program
  • Name a block and assign it to a room and category correctly
  • Reveal the inputs and parameters a block does not show by default

The situation

Connecting a button straight to a light works for the simplest case. But a real building needs more: a light that dims, that remembers moods, that comes on with movement.

That intelligence does not have to be built from scratch. It already exists inside function blocks, and your job is to place the right one and set it up well.

What is a function block?

A function block represents a logical part of a program. Most blocks have inputs, outputs and parameters, and many have deeper settings that open when you double click them, such as the Lighting Controller or the Schedule.

Some blocks are large and do a great deal on their own, like the Lighting Controller or Automatic Shading. Others are small logical pieces, like AND and OR, or analogue functions like a Threshold Switch.

Inserting a block

Add a block to the programming page, then set it up.

  1. Click Add Function Block on the ribbon. The arrow below it opens a menu sorted by category, where you can find the block you want. Or press F5, type the block’s name, and insert it straight from the results.
  2. Place the block on the page, and connect its inputs and outputs.
  3. If the block has more settings, double-click it. The Lighting Controller is one example.
Block name:

What the customer may see in the app

Visible inputs:

Shown by default

Expand sign :

Reveals the hidden inputs and parameters

Naming and assigning a block

How you name and assign a block matters, because blocks create what the customer sees in the app.

The naming rule is simple. If a room has only one block of a given type, the app shows the room name. If a room has two or more of the same type, for example two Lighting Controllers, the app shows the block name instead, so it needs a meaningful one. A block referenced elsewhere in your logic should always have a clear name so you can identify it.

The block type itself cannot be renamed. What you must set is the room and the category, because both decide where and how the block appears in the app.

TV Light:

Block name

Switch:

Block type

Living Room:

Room name

Lighting :

Category

Tip

Name a block for what it does, not what it is. Reading Kitchen Downlights later is far more useful than reading Lighting Controller 3, both for you and for the customer.

Showing hidden inputs and parameters

A block only shows some of its inputs and outputs by default, to keep the page tidy. The rest are still there, waiting to be revealed.

Under the small expand sign on the block, you can show the other available inputs and parameters. Parameters can even be driven by your own logic, so a value from elsewhere in the program can change how the block behaves as it runs.

Blocks build the app

A function block is not only logic. Because blocks create the visualisation in the app, a block that is well named and correctly assigned to a room and category gives the customer a clean, understandable app. A block left with a default name and no room assignment gives a messy one.

The care you take here is not just for you. It is what the customer lives with every day.

Takeaway

Function blocks are the logic between input and output, from a simple AND to a whole Lighting Controller, and about 30 of them run a family house. Insert them from the ribbon or by search, name them for what they do, and assign them to a room and category so the app stays clean. Expand a block to reach the inputs and parameters it hides by default.A named block assigned to a room, and a written note of the naming rule: when the app shows the room name, and when it shows the block name.

Apply What You've Learned

Task

In a project, real or a practice one:

  1. Insert a function block using Add Function Block, then insert another using Search on F5.
  2. Give one of them a clear, function based name.
  3. Assign it to a room and a category.
  4. Expand the block to reveal its hidden inputs and parameters, and look at what becomes available.