---
title: "KNX Group Object DPT Device Drivers"
canonical: "https://docs.cuesystem.com/space/CVCHELP/522387495/KNX%20Group%20Object%20DPT%20Device%20Drivers"
format: markdown
---
> Macro (toc)

---

# Description

KNX Group Object DPTxxx device drivers are defined based on KNX Datapoint Types specifications. The Datapoint Types are defined as a combination of a data type and a dimension.

The Datapoint Types are identified by a 16-bit main number separated by a dot from a 16-bit subnumber, e.g. “7.002”. The coding is as follows:

- The main number (left) defines Format and Encoding (number xxx in driver name DPTxxx)
- Subnumber (right) defines Range and Unit (dimension, it is selected by property of the driver).

Datapoint Types with the same main number thus have the same format and encoding. Datapoint Types with the same main number has the same data type. A different subnumber indicates a different dimension (different range and/or different unit).

All DPT drivers have common properties and functions defined in this section. The rest of the properties and functions are defined in the appropriate data point type section.

# Properties

All DPT drivers have the following properties:

**GroupAddress** of the group object. It is the text value of the group address of a given group object. Group Address can have the following formats:

- Main Group/Middle Group/Subgroup (3-level address structure), where Main Group is a decimal number in the range 0 – 31, Middle Group is a decimal number 0 – 7 and Subgroup is a decimal number 0 – 255. Example: 5/7/254
- Main Group/Subgroup (2-level address structure), where Main Group is a decimal number in the range 0 – 31 and Subgroup is a decimal number 0 – 2047. Example: 30/2042
- Free Group address structure, it is one decimal number in the range 0 – 65535. Example: 37563

If the group address is not valid, an error message will appear in the CVC Debug Window. For example: “ERROR: Group address 35/28/381 is not valid.”. To display these error messages, the project should be run in the debug mode (simulation or hardware) with checked Display Debug Messages.

If two or more KNX Group Objects have the same group address, an error message will appear in the CVC Debug Window "ERROR: Group object with address xxx/xxx/xxx (two level format xxx/xxx, free format xxx) is already registered."

The maximum number of KNX Group Objects used on the KNX channel is 250. If you have more KNX Group Objects in your project, an error message will appear in the CVC Debug Window: “ERROR: Maximum number of group objects is 250, group object with address xxx/xxx/xxx (two level format xxx/xxx, free format xxx) can not be registered.".

**DPT Dimension **defines the selected range and unit of a given group object. DPT Dimension is an enumeration of all possible values in a given data point type. It is described in the description of particular DPT device drivers.

# GetDPT

This function returns the datatype and selected dimension of the group object device driver.

#### Syntax

```visualbasic
Function GetDPT(
  ByRef datatype As Long,
  ByRef dimension As Long)
```

#### Parameters

datatype

Long This ByRef parameter is set to Data Type value.

dimension

Long This ByRef parameter is set to Dimension value.

#### Example

```visualbasic
// Instance of Group object device driver DPT1 is named ObjectDPT1 and DPT // dimension property is set to 5.
Var MyDataType As Long
Var MyDimension As Long

ObjectDPT1.GetDPT (MyDataType, MyDimension)
// MyDataType = 1
// MyDimension = 5
```

# Read

This function sends a request to the KNX bus to read the value from a given group object. 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 driver memory and the event OnUpdate is raised. Use the value passed by this event or use the GetValue function 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](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10000)</u>, <u>[10002](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10002)</u>, <u>[10003](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10003)</u>, <u>[10004](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004)</u>.

#### Syntax

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

#### Parameters

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.

# KNX Group Objects

> Macro (children)

---