---
title: "KNX"
canonical: "https://docs.cuesystem.com/space/CVCHELP/520617985/KNX"
format: markdown
---
> Macro (toc)

---

KNX channel is dedicated to connecting [https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/522387495](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/522387495). KNX channel can be implemented as: 

- Internal channel KNX TP in the controller controlCUE-knx-d
- KNXnet/IP Routing driver.

![image](media://1325fb23-9a53-4280-a2de-937d186c946b)

> ℹ️ The use of [https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/522387495](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/522387495) is mandatory. These drivers configure group addresses used by the KNX channel.

# Properties

KNX channel has the following property:

**IndividualAddress** of the KNX controller (or device driver). An individual address must be unique within a KNX installation. The individual address has no significance during normal operation of the KNX installation.

Individual address has the following format: Area.Line.BusDevice. Area and Line can be in the range 0 ÷ 15, Bus device can be in the range 0 ÷ 255. The property contains the text value of the individual address of the device, for example 15.15.255.

If the individual address is not valid, an error message will appear in the CVC Debug Window. For example: "ERROR: Individual address 23.128.305 is not valid, default address 15.15.255 is used instead". To display these error messages, the project should be run in the debug mode (simulation or hardware) with checked Display Debug Messages.

This property you will find in group KNX of the given controller (or device driver) in the Configuration window.

# Read

This function sends a request to the KNX bus to read the value from the group object with a given group address. Then group object sends the requested value to the KNX bus, this value is received by the group object device driver, the value is stored in the group object device driver memory and the event OnUpdate is raised. Use functions of appropriate group object device driver in your code. This function returns True if the function success, else it returns False. A function GetLastError returns the error number that occurred while executing the command. The errors that can happen: [<u>10000</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10000), [<u>10002</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10002), [<u>10003</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10003), [<u>10004</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004), [<u>10010</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10010).

#### Syntax

```visualbasic
Function Read(
  groupaddress As Long, 
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

groupaddress

          Long It is group address as free group address structure in range 0 – 65535

highpriprity

Boolean Optional, defaults to False. If it is False, then the command is applied with standard priority on the KNX bus. If it is True, then the command is applied with a high priority on the KNX bus.

#### Return value

Boolean This function returns True on success or False if an error occurs. A function GetLastError returns the error number.

# WriteData

The function sends data to the given group object on the KNX bus. It returns True on success else it returns False. This function is dedicated only to experienced programmers because the data to send must be formatted according to KNX standard. This function returns True if the function success, else it returns False. A function GetLastError returns the error number that occurred while executing the command. The errors that can happen: [<u>10000</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10000), [<u>10002</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10002), [<u>10003</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10003), [<u>10004</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004), [<u>10010</u>](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10010).

#### Syntax

```visualbasic
Function WriteData (
  groupaddress As Long, 
  data As ByteString, 
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

groupaddress

          Long It is group address as free group address structure in range 0 – 65535

data

ByteString It is the data to be sent. Data must be formatted according to KNX standard for the appropriate Data Point Type of a given KNX group object. Also, the length of data bytestring must match several octets of the required Data Point Type.

#### Return value

Boolean This function returns True on success or False if an error occurs. A function GetLastError returns the error number.