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

---

# Description

KNX Group Object DPT13 is defined for transmitting signed counter values from -2 147 483 648 to +2 147 483 647, where negative values are transmitted as 2’s complement.

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

# DPT Dimensions

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| DPT Dimensions | Name | Range | Unit | Resolution |
| 13.001 | counter pulses (signed) | -2 147 483 648 ÷<br>2 147 483 647 | counter pulses | 1 pulse |
| 13.002 | flow rate (m³/h) | -2 147 483 648 ÷<br>2 147 483 647 m³/h | m³/h | 1 m³/h |
| 13.010 | active energy (Wh) | -2 147 483 648 ÷<br>2 147 483 647 Wh | Wh | 1 Wh |
| 13.011 | apparant energy (VAh) | -2 147 483 648 ÷<br>2 147 483 647 VAh | VAh | 1 VAh |
| 13.012 | reactive energy (VARh) | -2 147 483 648 ÷<br>2 147 483 647 VARh | VARh | 1 VARh |
| 13.013 | active energy (kWh) | -2 147 483 648 ÷<br>2 147 483 647 kWh | kWh | 1 kWh |
| 13.014 | apparant energy (kVAh) | -2 147 483 648 ÷<br>2 147 483 647 kVAh | kVAh | 1 kVAh |
| 13.015 | reactive energy (kVARh) | -2 147 483 648 ÷<br>2 147 483 647 kVARh | kVARh | 1 kVARh |
| 13.100 | time lag (s) | -2 147 483 648 ÷<br>2 147 483 647 s | s | 1 s |

# WriteValue

This function transmits the KNX telegram, including the newvalue in range 2 147 483 648 ÷ 2 147 483 647  , 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 Long,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

newvalue

Long It is the new value sent to KNX bus in range

2 147 483 648 ÷ 2 147 483 647.

highpriority

Boolean Optional, defaults to False. If False, the command is applied with standard priority on the KNX bus. If it is True, 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.

# WriteTime

This function transmits the KNX telegram, including data converted from parameter newtime to the group address defined in the driver property. Programmer friendly parameter newtime is used in this function. This format is suitable for DPT Dimension 13.100, where the time scale is defined. 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 WriteTime (
  newtime As Time,
  Optional highpriority As Boolean := False) 
As Boolean
```

#### Parameters

newtime

Time It is the new value sent to KNX bus in range

(-:2147483648.0) ÷ (:2147483647.0).

highpriority

Boolean Optional, defaults to False. If False, the command is applied with standard priority on the KNX bus. If it is True, 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 2 147 483 648 ÷ 2 147 483 647.

#### Syntax

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

#### Return value

Long It is the last received value of the group object. Value is in the range

2 147 483 648 ÷ 2 147 483 647.

# GetTime

This function returns the last value of the group object with the given address received from the KNX bus in Time format. This function is suitable for DPT Dimension 13.100, where the time scale is defined. In other DPT Dimensions it returns (0:0.0).

#### Syntax

```visualbasic
Function GetTime() As Time
```

#### Return value

Time It is the last received value of the group object. Value is in the range

(-:2147483648.0) ÷ (:2147483647.0).

# OnUpdate

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

#### Syntax

```visualbasic
Event OnUpdate As Process (
  newvalue As Long,
  newtime As Time)
```

#### Parameters

newvalue

Long It is the new value received from KNX bus in range

2 147 483 648 ÷ 2 147 483 647.

newtime

Time It is the new value received from the KNX bus in time format. This function is suitable for DPT Dimension 13.100, where the time scale is defined. In other DPT Dimensions, it is set to (0:0.0). Value is in the range (-:2147483648.0) ÷ (:2147483647.0).