Skip to main content
Home
for DLMS smart meters

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

3 years 3 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

3 years 3 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

3 years 3 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

3 years 3 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

1 year 7 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

3 years 3 months ago

it is working now

it is working now
Many Thanks
Frank

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, 05/20/2025 - 08:40
    gurux.dlms.c 9.0.2505.2001
  • Mon, 05/19/2025 - 10:19
    gurux.net.java 1.0.30
  • Mon, 05/19/2025 - 10:00
    gurux.dlms.c 9.0.2505.1901
  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401

New forum topics

  • HDLC Adress resolver configuration
  • Reading all "Data" object type parameter together
  • com_read getting failed for billing profile and instantaneous profile
  • Simulator connection closed
  • Regarding the dlms android project
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin