Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Disconnect Control
gxdn
Profile picture for user Administrator
By Administrator , 23 January, 2018
Disconnect control object is used to manage an internal or external disconnect unit.

Properties

  • 1. Logical Name
    Logical name of the object.
  • 2. Output state
    Actual physical state.
  • 3. Control state
    Internal state.
  • 4. Control mode
    Defines how disconnect can be used. (local, remote,both or neighter).

Actions

  • 1. Remote disconnect
    Remote disconnect.
  • 2. Remote reconnect
    Remote reconnect.

This example forces the disconnect control object into 'disconnected' state if remote disconnection is enabled.

  • Java
  • C#
  • Delphi
  • ANSI C++
  • ANSI C
  • Python
GXReplyData reply = new GXReplyData();
GXDLMSDisconnectControl dc = new GXDLMSDisconnectControl();
readDataBlock(dc.remoteDisconnect(client), reply);
GXReplyData reply = new GXReplyData();
GXDLMSDisconnectControl dc = new GXDLMSDisconnectControl();
ReadDataBlock(dc.RemoteDisconnect(client), reply);
reply := TGXReplyData.Create();
dc = TGXDLMSDisconnectControl.Create();
ReadDataBlock(dc.RemoteDisconnect(client), reply);
CGXReplyData reply;
CGXDLMSDisconnectControl dc;
ReadDataBlock(dc.RemoteDisconnect(client), reply);
int ret;
message messages;
gxReplyData reply;
gxDisconnectControl dc;
dlmsVARIANT params;
const unsigned char ln[6] = { 0,0,96,3,10,255 };
GX_INT8(params, 0);
if ((ret = INIT_OBJECT(dc, DLMS_OBJECT_TYPE_DISCONNECT_CONTROL, ln)) == 0)
{
    mes_init(&messages);
    reply_init(&reply);
    //Remote disconnect
    if ((ret = cl_method(&connection->settings, BASE(dc), 1, &params, &messages)) != 0 ||
        (ret = com_readDataBlock(connection, &messages, &reply)) != 0)
    {
        printf("Method failed %s\r\n", hlp_getErrorMessage(ret));
    }
    mes_clear(&messages);
    reply_clear(&reply);
    //Remote reconnect
    if ((ret = cl_method(&connection->settings, BASE(dc), 2, &params, &messages)) != 0 ||
        (ret = com_readDataBlock(connection, &messages, &reply)) != 0)
    {
        printf("Method failed %s\r\n", hlp_getErrorMessage(ret));
    }
    var_clear(&params);
    mes_clear(&messages);
    reply_clear(&reply);
}
reply = GXReplyData()
dc = GXDLMSDisconnectControl()
self.readDataBlock(dc.remoteDisconnect(client), reply)

Frank G

4 years 4 months ago

Disconnect Control /Control Mode in Python

Hi Mikko,
is there an example how to read and write the control mode using python?
Many Thanks
Frank

Profile picture for user Kurumi

Kurumi

4 years 4 months ago

Disconnect Control /Control Mode in Python

Hi,

You can read it in the normal way. Create Disconnect Control object and read attribute index #4.

BR,
Mikko

Frank G

4 years 4 months ago

Hi Mikko,

Hi Mikko,
reading is working, thank you!.
I am having problems with writing. I dont know where to put the value to be written.
My code:
rele = GXDLMSDisconnectControl ("0.0.96.3.10.255");
#####Read#####
lector.read(rele, 4)
print(rele.controlMode)
#####Write######
lector.write(rele, 4)

Many Thnaks
Frank

Profile picture for user Kurumi

Kurumi

4 years 4 months ago

Hi,

Hi,

You need to update value for the Disconnect control object.
rele.controlMode = YOUR_VALUE
lector.write(rele, 4)

Make sure that you have enough access rights to write the objects.

BR,
Mikko

alnardn

2 years 8 months ago

In reply to Hi, by Kurumi

Hello! I also need to change…

Hello! I also need to change disconnect control mode, but i don't understand what is lector? What is this?

Frank G

4 years 4 months ago

it is working now

it is working now
Many Thanks
Frank

Kumaresh

10 months 1 week ago

Change Control Mode

Hi Kurmi ji,
below is my code and i want to update the Control Mode to Mode6 how can I. pls guide me!!!

def Re_Connect(self):
dc=GXDLMSDisconnectControl("0.0.96.3.10.255")
data=dc.remoteDisconnect(self.client)
print("Load Relay Reconnect")
reply = GXReplyData()
self.readDLMSPacket(data, reply)
time.sleep(10)
dc.getValues()
time.sleep(10)
dc.setValue()
time.sleep(10)
data=dc.remoteDisconnect(self.client)
print("Load Relay Reconnect")
reply = GXReplyData()
self.readDLMSPacket(data, reply)
time.sleep(10)
dc.getValues()
time.sleep(10)
data=dc.remoteReconnect(self.client)
print("Load Relay Reconnect")
reply = GXReplyData()
self.readDLMSPacket(data, reply)
dc.getValues()
self.writeTrace(dc)
print(dc)

Book traversal links for Disconnect control

  • ‹ Demand register
  • Up
  • Extended register ›
  • Log in or register to post comments
  • Create new account
  • Reset your password

Book navigation

  • Activity calendar
  • Association Logical Name
  • Auto Connect
  • Auto answer
  • Clock
  • Compact data
  • Data
  • Demand register
  • Disconnect control
  • Extended register
  • GPRS modem setup
  • GSM diagnostic
  • IEC HDLC setup
  • IEC local port setup
  • IPv4 setup
  • IPv6 setup
  • Image transfer
  • Limiter
  • M-Bus Client
  • M-Bus master port setup
  • M-Bus slave port setup
  • MAC address setup
  • Modem configuration
  • PPP setup
  • Profile generic
  • Push Setup
  • Register
  • Register Monitor
  • Register activation
  • Register table
  • SAP assignment
  • Script table
  • Security setup
  • Single action schedule
  • Special days table
  • Status mapping
  • Tcp Udp Setup
  • Utility tables
  • Manufacturer custom objects

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin