Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
  • Gurux Club
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

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

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

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

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

Frank G

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

Hire Us!

Latest Releases

Fri, 03/24/2023 - 14:22
gurux.dlms.c 20230324.1
Thu, 03/23/2023 - 11:01
GXDLMSDirector 9.0.2303.2301
Thu, 03/23/2023 - 09:10
Gurux.DLMS.Python 1.0.142
Wed, 03/22/2023 - 13:51
Gurux.DLMS.Net 9.0.2303.2201
Wed, 03/22/2023 - 10:15
gurux.dlms.c 20230322.1

Open bugs

Gurux.DLMS.AMI4
1
Gurux.DLMS.Android
1
gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin