Hello,
I am trying to read out en EMH Meter LZQJ-XC via an optical read head (OP-204).
From the manufacturer website the meter should be DLMS compatible https://emh-metering.com/en/products/special-meters/lzqj-xc/ .
So far I managed to get the HDLC handshake info in the logs but the SNRM request runs into a timeout.
The logs show that with the change to mode E yields a response but after reopening the Serial Port the SNRM requests don't get a response.
What I noticed is that the Serial Port is opened again with different Data Bits (8 instead of 7) Parity (none instead of even) compared to the initial serial settings.
I can read the meter (although via iec62056_21) with a different python script. In that one I keep the serial settings when switching interface speeds. However I am aware that DLMS is not the same as iec62056_21 so that is why I want to ask if the serial settings are expected to be always the same for it (8 data bits, no parity, one stop bit) or if this is why I don't get a response afterwards?
Here the logs (I also tried to limit the baud to 300 but no change):
GXDLMSDirector 9.0.2308.1601
Log created 09:48:18
09:48:23 Initializing serial connection.
09:48:23 09:48:23.816 Info Opening
09:48:23 09:48:23.816 Info Serial Port Settings: Port Name: COM8 Baud Rate: 300 Data Bits: 7 Parity: Even Stop Bits: One Flow Control: None Eop: None
09:48:23 09:48:23.874 Info Open
09:48:24 IEC Sending:/?11316029!<CR><LF>
09:48:24 09:48:24.886 Sent 2F 3F 31 31 33 31 36 30 32 39 21 0D 0A
09:48:26 09:48:26.084 Received 2F
09:48:26 09:48:26.118 Received 2F
09:48:26 09:48:26.154 Received 45
09:48:26 09:48:26.184 Received 4D
09:48:26 09:48:26.214 Received 48
09:48:26 09:48:26.246 Received 34
09:48:26 09:48:26.279 Received 5C
09:48:26 09:48:26.314 Received 40
09:48:26 09:48:26.344 Received 30
09:48:26 09:48:26.378 Received 31
09:48:26 09:48:26.408 Received 4C
09:48:26 09:48:26.442 Received 5A
09:48:26 09:48:26.487 Received 51
09:48:26 09:48:26.515 Received 4A
09:48:26 09:48:26.547 Received 4C
09:48:26 09:48:26.584 Received 30
09:48:26 09:48:26.618 Received 30
09:48:26 09:48:26.648 Received 31
09:48:26 09:48:26.679 Received 33
09:48:26 09:48:26.712 Received 45
09:48:26 09:48:26.744 Received 0D
09:48:26 HDLC received: /EMH4\@01LZQJL0013E<CR><LF>
09:48:26 Maximum BaudRate is set to : 4800
09:48:26 BaudRate is : 4800
09:48:26 Moving to mode E.
06 32 35 32 0D 0A
09:48:26 09:48:26.747 Sent 06 32 35 32 0D 0A
09:48:28 09:48:28.757 Info Closing
09:48:28 09:48:28.868 Info Closed
09:48:28 09:48:28.868 Info Opening
09:48:28 09:48:28.868 Info Serial Port Settings: Port Name: COM8 Baud Rate: 4800 Data Bits: 8 Parity: None Stop Bits: One Flow Control: None Eop: None
09:48:28 09:48:28.924 Info Open
09:48:29 Send SNRM request.
7E A0 0A 00 00 62 1B 01 93 5D A4 7E
09:48:29 09:48:29.939 Sent 7E A0 0A 00 00 62 1B 01 93 5D A4 7E
09:48:34 Data send failed. Try to resend 1/3
09:48:34 09:48:34.942 Sent 7E A0 0A 00 00 62 1B 01 93 5D A4 7E
09:48:39 Data send failed. Try to resend 2/3
09:48:39 09:48:39.944 Sent 7E A0 0A 00 00 62 1B 01 93 5D A4 7E
09:48:44 Failed to receive reply from the device in given time.
09:48:44 Disconnect request
09:48:44 Send Disconnect request.
7E A0 0A 00 00 62 1B 01 53 51 62 7E
09:48:44 09:48:44.955 Sent 7E A0 0A 00 00 62 1B 01 53 51 62 7E
09:48:49 Data send failed. Try to resend 1/3
09:48:49 09:48:49.965 Sent 7E A0 0A 00 00 62 1B 01 53 51 62 7E
09:48:54 Data send failed. Try to resend 2/3
09:48:54 09:48:54.969 Sent 7E A0 0A 00 00 62 1B 01 53 51 62 7E
09:48:59 Failed to receive reply from the device in given time.
09:48:59 09:48:59.978 Sent 01 42 30 03 0D 0A
09:49:04 09:49:04.986 Info Closing
09:49:05 09:49:05.098 Info Closed
System.TimeoutException: Failed to receive reply from the device in given time.
at GXDLMSDirector.GXDLMSCommunicator.ReadDLMSPacket(Byte[] data, Int32 tryCount, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.ReadDataBlock(Byte[] data, String text, Int32 multiplier, Int32 tryCount, GXReplyData reply)
at GXDLMSDirector.GXDLMSCommunicator.InitializeConnection(Boolean force)
at GXDLMSDirector.GXDLMSDevice.InitializeConnection()
at GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
Kind regards
Anton
Hi, The data bits and parity…
Hi,
The data bits and parity are changed when moving from IEC to DLMS. The meter tells that the used baud rate is 4800 and for me it looks that IEC part is correct.
The problems are in your DLMS settings.
The client address is zero and that is wrong. It should be 10 for if you want to connect without authentication.
BR,
Mikko
Hello Mikko, thank you very…
Hello Mikko,
thank you very much for your input, I'm gonna try that in the coming weeks and post an update once I was able to try it out.
Kind regards
Anton