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.
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, ¶ms, &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, ¶ms, &messages)) != 0 || (ret = com_readDataBlock(connection, &messages, &reply)) != 0) { printf("Method failed %s\r\n", hlp_getErrorMessage(ret)); } var_clear(¶ms); mes_clear(&messages); reply_clear(&reply); }
reply = GXReplyData() dc = GXDLMSDisconnectControl() self.readDataBlock(dc.remoteDisconnect(client), reply)
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
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
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
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
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?
it is working now
it is working now
Many Thanks
Frank