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

---

# Description

KNX Group Object DPT5 is defined for transmitting unsigned values from 0 up to 255.

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Field | Unsigned Value |

# DPT Dimensions

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| DPT Dimensions | Name | Range | Unit | Resolution |
| 5.001 | percentage (0..100%) | 0 ÷ 100 | % | ≈ 0,4 % |
| 5.003 | angle (degrees) | 0 ÷ 360 | ° (degree) | ≈ 1,4° |
| 5.004 | percentage (0..255%) | 0 ÷ 255 | % | 1 % |
| 5.005 | ratio (0..255) | 0 ÷ 255 | ratio | 1 |
| 5.006 | tariff (0..255) | 0 ÷ 255 |  | 1 |
| 5.010 | counter pulses (0..255) | 0 ÷ 255 | counter pulses | 1 counter pulse |

# WriteValue

This function transmits the KNX telegram including the newvalue in range 0 ÷ 255 to the group address defined in the driver property. 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 WriteValue(
  newvalue As Byte,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

newvalue

Byte It is the new value sent to the KNX bus in range 0 ÷ 255. The resolution is 1.

highpriority

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.

# WritePercentage

This function transmits the KNX telegram including data converted from parameter percentage to the group address defined in the driver property. Programmer friendly parameter percentage in range 0 ÷ 100 is used in this function. This format is suitable for DPT Dimension 5.001. 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>, <u>[10005](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004)</u>.

#### Syntax

```visualbasic
Function WritePercentage(
  percentage As Double,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

percentage

Double It is the new value sent to the KNX bus in the range 0 ÷ 100. Resolution is ≈ 0,4 %.

highpriority

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.

# WriteAngle

This function transmits the KNX telegram including data converted from parameter angle to the group address defined in the driver property. Programmer friendly parameter angle in range 0 ÷ 360 is used in this function. This format is suitable for DPT Dimension 5.003. 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>, <u>[10005](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004)</u>.

#### Syntax

```visualbasic
Function WriteAngle(
  angle As Double,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

angle

Double It is the new value sent to the KNX bus in range 0 ÷ 360. Resolution is ≈ 1,4 %.

highpriority

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.

# GetValue

This function returns the last value of the group object with the given address received from the KNX bus in the range 0 ÷ 255.

#### Syntax

```visualbasic
Function GetValue() As Byte
```

#### Return value

Byte It is the last received value of the group object. Value is in the range 0 ÷ 255.

# GetPercentage

This function returns the last value of the group object with the given address received from the KNX bus in the range 0 ÷ 100. This function is suitable for DPT Dimension 5.001.

#### Syntax

```visualbasic
Function GetPercentage() As Double
```

#### Return value

Double It is the last received value of the group object. Value is in the range 0 ÷ 100.

# GetAngle

This function returns the last value of the group object with the given address received from the KNX bus in the range 0 ÷ 360. This function is suitable for DPT Dimension 5.003.

#### Syntax

```visualbasic
Function GetAngle() As Double
```

#### Return value

Double It is the last received value of the group object. Value is in the range 0 ÷ 360.

# OnUpdate

This event is raised when the KNX telegram with the appropriate group address is received. It returns all possible formats of data received from the KNX telegram.

#### Syntax

```visualbasic
Event OnUpdate As Process(
  newvalue As Byte,
  percentage As Double,
  angle As Double)
```

#### Parameters

newvalue

Byte It is the new value received from the KNX bus in the range 0 ÷ 255.

percentage

Double It is the new value received from the KNX bus in the range 0 ÷ 100. This value is suitable for DPT Dimension 5.001.

angle

Double It is the new value received from the KNX bus in the range 0 ÷ 360. This value is suitable for DPT Dimension 5.003