Table of Contents

Logic Module

Each logic scheme consists of a sheet containing different functional blocks, called nodes. Each node corresponds to a specific function executed by the Thinknx server.

The behavior of a node is determined by its connectors, which represent its inputs and outputs. Nodes can be linked together through connections: each connection starts from an output connector and ends at an input connector of another node.

Logic Module editor

This page describes the general operation of the Logic Module. For the configuration and behavior of an individual node, select the corresponding link in the following sections.

Quick access

Scheme management

The logic scheme can be managed using the following buttons in the toolbar:

The import operation completely overwrites the current logic scheme.

The export operation does not save the scheme inside the Configurator. It only generates the corresponding XML file.

Simulation management

The simulation feature allows the behavior of the block diagram to be tested and analyzed before or during its execution on the Thinknx server.

Two types of simulation are available in the Logic Module:

Offline Simulation can be used to test the behavior of the scheme, but it does not communicate with the KNX bus or with the real system objects. Input values must be simulated manually.

Online Simulation works only when the computer running the Configurator is connected to the same local network as the server.

The address used for the connection corresponds to the Local IP address configured in the System object.

During a simulation, the value display can be configured by selecting Sim. Settings in the toolbar.

Simulation settings

The following options are available:

Nodes, connectors and connections

Creating a node

To create a node:

  1. Open the Node Types Library.
  2. Locate the required node type.
  3. Drag the node into the logic scheme sheet.
  4. Select the node to configure its properties.

Creating a node

Editing a node

When a node is selected, its properties are displayed in the property grid.

Changing these parameters modifies the behavior of the node.

Selecting and editing a node

Each connector also has its own properties. To edit them, select the connector directly: the corresponding parameters will be displayed in the property grid.

Multiple nodes can be selected by holding down the Shift key.

Deleting a node

To delete a node:

Deleting a node

When a node is deleted, all associated connections are automatically removed.

Creating a connection

To create a connection between two nodes:

  1. Select an output connector.
  2. Hold down the mouse button.
  3. Drag the connection to the input connector of the destination node.
  4. Release the button when the green confirmation symbol appears.

Creating a valid connection

Connections can be created only between:

An output connector can be linked to multiple input connectors. An input connector can receive only one connection.

Data compatibility

A connection is not prevented when the output data type differs from the type expected by the input. The received value is automatically converted according to the following rules:

Conversion Rule Example
Bit → Number Logic 0 (False) is converted to the number 0, while logic 1 (True) is converted to the number 1. True → 1
Number → Bit The number 0 is converted to 0 (False). Any other numeric value is converted to 1 (True). 25 → True
String → Bit The string is converted to 1 (True) only if it contains 1 or true. In all other cases, it is converted to 0 (False). “true” → True
String → Number The string content is converted to a numeric value if it uses a valid format. “25.5” → 25.5

Gate connector

Except for input and output nodes, nodes can be enabled or disabled through the Gate connector.

To display this connector, enable the Gate property of the node.

Gate connector

When a node is disabled:

The following properties can be configured by selecting the Gate connector:

When the Gate property is enabled but its connector is not connected, the node is disabled by default.

The node also remains disabled when the Gate connector is connected but has not yet received a value from its source.

Gate connector behavior

Await all inputs

The Await all inputs property is available for individual blocks in the logic scheme.

When set to True, the node waits until all its inputs have received at least one value before performing the calculation and producing a result.

This property prevents the node from being processed using incomplete data or inputs that have not yet been initialized.

Input nodes

Input nodes allow the scheme to acquire values from the installation, System objects, or constants defined directly in the scheme.

Output connector

Input nodes have a single output connector through which the acquired value is transmitted.

The Output sending behavior property determines when the value is forwarded to the connected nodes:

During an offline simulation, input updates can be simulated by manually entering values in the corresponding toolbar panel.

Output nodes

Output nodes represent the final action performed using the values processed by the scheme, such as sending a KNX telegram or executing a command.

Input connectors

The input connectors of output nodes include the Trigger property.

When this property is enabled, receiving a new value on the connector starts the action configured in the output node.

Analog nodes

Analog nodes process numeric values, perform regulation, apply filters, and check whether configured thresholds have been reached.

Counter nodes

Counter nodes receive a numeric or logic value, perform a counting operation, and provide the result through their output connectors.

Output connectors

The output connectors of counter nodes include specific properties that determine when calculated values are sent.

The Output sending behavior property provides the following options:

The associated properties are:

Logic nodes

Logic nodes process binary values.

Except for nodes with a fixed structure, the number of inputs can be changed using the Number of inputs property.

Input connectors

The input connectors of logic nodes include the following properties:

Output connectors

The output connectors of logic nodes include the following properties:

Timer nodes

Timer nodes perform time-based operations, apply delays, and generate pulses or timed sequences.

Math nodes

Math nodes perform arithmetic operations on the values received at their inputs.

Scripting node

The Scripting Node allows users with basic programming knowledge to freely create operational logic using the integrated IDE.

The script code defines the algorithm to be executed, its input parameters, and any output values.

For the method syntax, parameter definition, and usage examples, refer to the Scripting Node page.

Reusable logic sheets

The Sheet Input, Sheet Output, and Logic Module Sheet nodes can be used to create generic logic blocks, export them in XML format, and reuse them in other projects.

This feature makes it possible to standardize recurring logic and divide a complex scheme into multiple functional blocks.

For the complete procedure, refer to Sheet Input, Sheet Output and Logic Module Sheet.

Comments

The Comment node can be used to add text annotations to the sheet, making the logic scheme easier to document and understand.

Comments do not participate in logic processing and do not have connectors.

Scheme verification

Before saving the scheme and transferring the project to the server:

  1. Verify that all required inputs receive a value.
  2. Check the Trigger properties of the connectors.
  3. Verify the configuration of any Gate connectors.
  4. Check whether nodes requiring multiple inputs should use the Await all inputs property.
  5. Use Offline Simulation to verify the results produced by the scheme.
  6. Verify that there are no unintended circular connections.
  7. Check that the data types and automatic conversions produce the expected results.
  8. Save the scheme using the Save button.
  9. Transfer the project to the server and, if necessary, use Online Simulation to verify its actual behavior.

Pay particular attention when the input and output of a logic scheme use the same source, for example the same KNX group address. An incorrect Trigger configuration may generate a continuous update loop.

Logic examples

Temperature regulator

Example 1: Temperature Regulator

Example 1: Temperature Regulator

Using the Math Expression node and the Regulator function, it is possible to implement a regulation based on a setpoint and the actual temperature value.

The two additional expression inputs represent:

In this example:

For more information about configuring expressions, refer to the Math Expression page.