Inputs and Outputs

This section covers the configuration of data exchange between Modbus and KNX. Individual Modbus elements are created, configured with the required communication parameters and assigned to the corresponding KNX group addresses.

For each Modbus element, you can individually configure the data transfer direction, data type and additional parameters for value conversion, processing and transmission.

Content


Modbus Elements

Use this list to manage the Modbus elements through which values are read or written.

Up to 50 Modbus elements can be configured. Existing elements can be edited, copied or deleted.

Identifier

Enter a descriptive identifier to uniquely identify the Modbus element within the configuration.

For example, use names such as “PV Power”, “Battery State of Charge” or “Grid Power Import”.

Modbus

To simplify configuration, Modbus addresses can be entered in CoDeSys format. The corresponding Modbus parameters are then configured automatically based on the information provided in the address.

Alternatively, you can configure the Modbus parameters manually.

Data Transfer Direction

Specify the direction in which data is to be transferred.

Data Transfer Direction

Description

KNX → Modbus

Transfers values received via KNX to the Modbus device.

Modbus → KNX

Reads values from the Modbus device and sends them to the configured KNX group address.

Register Type

Select the register type according to the register map of the connected Modbus device.

Modbus defines four basic data types for addressing:

Register Type

Size

Access

Coil

1 bit

Read and write

Discrete Input

1 bit

Read only

Input Register

16 bits

Read only

Holding Register

16 bits

Read and write

The selected register type determines, among other things, which Modbus function codes are used to access the data.

Data Type

Select the Modbus data type according to the register map of the connected device.

The data type determines how Modbus data is interpreted when reading or writing values. This includes the data length, whether values are signed or unsigned, and whether they represent integers or floating-point numbers.

For data types spanning multiple registers, also consider the general byte and word order settings.

Bit Offset

Use this parameter to specify the bit position within the Modbus data.

This setting is particularly relevant when individual bits within a register represent specific information, such as status flags or operating states.

Register

Enter the Modbus register address to be accessed.

For data types spanning multiple registers, enter the starting address of the first register.

Note: Pay attention to the addressing convention used by the device manufacturer. Depending on the manufacturer's documentation, register addresses may be zero-based or one-based. An incorrect address offset may result in accessing an adjacent register.

Write Single Register

Use this option to specify which Modbus function code is used to write to a single holding register.

  • Enabled: Write Single Register (FC 06)

  • Disabled: Write Multiple Registers (FC 16)

This setting ensures compatibility with Modbus devices that require specific function codes for writing register values.

This option is only available when the following settings are selected:

  • Data Transfer Direction: KNX → Modbus

  • Register Type: Holding Register

  • Data Type: UNSIGNED INT (16)

Factor

Use the factor to scale values and adapt them to the required physical unit or resolution.

This is particularly useful when a Modbus device provides measurement values as integers with a predefined decimal scaling factor.

Offset

Use the offset to apply a constant adjustment during value conversion.

In combination with the factor, this setting allows Modbus values to be converted to the required value format.

Polling Interval (Seconds)

Specify the interval at which the value is read from the Modbus device.

A shorter polling interval allows value changes to be detected more quickly but increases Modbus communication traffic.

Select a polling interval that meets the required update rate while taking into account the technical requirements of the connected device.

Difference Threshold

The difference threshold defines how much a value must change before it is transferred again between Modbus and KNX.

A value is only transferred if the absolute difference between the new value and the currently stored value exceeds the configured threshold.

This function applies to both data transfer directions and helps prevent unnecessary value transmissions, reducing communication traffic and KNX bus load.

Example:

With a threshold of 10 and a currently stored value of 100, the following behaviour applies:

New Value

Absolute Difference

Transmission

105

5

No

110

10

No

111

11

Yes

89

11

Yes

Select a threshold that is appropriate for the required accuracy and the expected rate of change of the measurement or control value.

Group Address

Enter the KNX group address to be assigned to the Modbus element.

Depending on the configured data transfer direction, the group address is used as follows:

  • Modbus → KNX: The value read from the Modbus device is sent to the configured KNX group address.

  • KNX → Modbus: The value received via the configured KNX group address is transferred to the Modbus device.

Data Type

Select the KNX data type for the value to be transferred.

The data type determines the encoding, data length and representable value range of the KNX telegram. It must match the data type of the associated KNX group objects.

The following data types are available:

Data Type

Data Length

Value Range / Format

EIS 1 / 1 Bit

1 bit

0 or 1

EIS 6 / 0% … 100%

1 byte

Scaled percentage value

EIS 14 unsigned / 1 Byte unsigned

1 byte

0 … 255

EIS 14 signed / 1 Byte signed

1 byte

−128 … 127

EIS 10 unsigned / 2 Byte unsigned

2 bytes

0 … 65,535

EIS 10 signed / 2 Byte signed

2 bytes

−32,768 … 32,767

EIS 5 / 2 Byte Floating Point

2 bytes

KNX floating-point value

EIS 11 unsigned / 4 Byte unsigned

4 bytes

0 … 4,294,967,295

EIS 11 signed / 4 Byte signed

4 bytes

−2,147,483,648 … 2,147,483,647

EIS 9 / 4 Byte Floating Point

4 bytes

IEEE 754 floating-point value

Some entries in the drop-down list use different names for equivalent data formats.

When selecting a data type, consider both the value range of the Modbus data and the required KNX data type. Selecting an unsuitable data type may result in rounding errors, loss of precision or incorrect value transmission.


///