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

---

# Description

KNX Group Object DPT6 is defined for transmitting signed values from -128 up to +127. Negative numbers are represented as two’s complement. To do so, the binary representation of the positive number is inverted and 1 is added. There is also special DPT Dimension 6.020 (status with mode), where data does not represent a number.

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

DPT Dimension 6.020 (status with mode)

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Field | a | b | c | f | e | Active Mode |

# DPT Dimensions

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| DPT Dimensions | Name | Range | Unit | Resolution |
| 6.001 | percentage (-128..127%) | -128 ÷ 127 | % | 1 % |
| 6.010 | counter pulses (-128..127) | -128 ÷ 127 | counter pulses | 1 counter pulse |

|  |  |  |
| --- | --- | --- |
| DPT Dimensions | Name | Encoding |
| 6.020 | status with mode | a, b, c, d, e:<br>0 = set<br>1 = clear<br>mode<br>001b = mode 0 is active<br>010b = mode 1 is active<br>100b = mode 2 is active |

# WriteValue

This function transmits the KNX telegram including the newvalue in range -128 ÷ 127 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>, <u>[10005](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#10004)</u>.

#### Syntax

```visualbasic
Function WriteValue (
  newvalue As Long,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

newvalue

Long It is the new value sent to KNX bus in range -128 ÷ 127.

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.

# WriteStatusWithMode

This function transmits the KNX telegram including data converted from parameters to the group address defined in the driver property. Programmer friendly parameters suitable for DPT Dimension 6.020 are used in this function. The function returns True if the function succeeds, 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 WriteStatusWithMode(
  a As Boolean,
  b As Boolean,
  c As Boolean,
  d As Boolean,
  e As Boolean,
  activemode As Byte,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

a, b, c, d, e

Boolean These are new values sent to the KNX bus. False = set, True = clear.

activemode

Byte It is the active mode sent to the KNX bus in range 0 ÷ 2.

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 range -128 ÷ 127.

#### Syntax

```visualbasic
Function GetValue() As Long
```

#### Return value

Long It is the last received value of the group object. Value is in the range -128 ÷ 127.

# GetStatusWithMode

This function returns the last values of the group object with the given address received from the KNX bus. The function uses programmer friendly parameters suitable for DPT Dimension 6.020.

#### Syntax

```visualbasic
Function GetValue(
  ByRef a As Boolean,
  ByRef b As Boolean,
  ByRef c As Boolean,
  ByRef d As Boolean,
  ByRef e As Boolean,
  ByRef activemode As Byte)
```

#### Parameters

a, b, c, d, e

Boolean This ByRef parameters are set to the last received a, b, c, d, e values of the group object. False = set, True = clear.

activemode

Byte This ByRef parameter is set to the last activemode received from the KNX bus. The range is 0 ÷ 2. If activemode is invalid, it is set to -1.

# 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 Long,
  a As Boolean,
  b As Boolean,
  c As Boolean,
  d As Boolean,
  e As Boolean,
  activemode As Byte)
```

#### Parameters

newvalue

Byte It is the new value received from the KNX bus in the range -128 ÷ 127.

a, b, c, d, e

Boolean These are new values received from the KNX bus. False = set, True = clear. These parameters are suitable for DPT Dimension 6.020.

activemode

Byte It is the active mode received from the KNX bus in range 0 ÷ 2. If activemode is invalid, the value is -1. This parameter is suitable for DPT Dimension 6.020.