Logic Machine Forum
Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric (/showthread.php?tid=4352)



Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - JanJJ - 06.11.2022

Hello everyone,

Have a small issue with reading Modbus addresses on the Eastron SDM72DM-V2 electricity meter.

It is an error that repeats itself at several addresses, but an example could be when reading volts on phases 1, 2 and 3.
Has exactly the same setup for reading on all three phases.
"manufacturer": "Eastron SDM72DM-V2",
  "description": "Three Phase Four Wire Energy Meter",
  "read_swap": "n",
  "mapping": [
    { "name": "Phase 1 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 1, "datatype": "float32", "units": "V " },
    { "name": "Phase 2 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 3, "datatype": "float32", "units": "V " },
    { "name": "Phase 3 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 5, "datatype": "float32", "units": "V " }
]
}
Phase 1 answer: 234,760
Phase 2 answer: 234,020
Which is correct.
Phase 3 answer: 9,959
Which is not correct.

If I use the LM Read test at address 5, I get the same incorrect reading.

If I put a USB-Modbus reader in my PC and read at address 5, I get 233,331 back. Which is correct.
Have also tried with a KNX/Modbus-Gateway and here I also get the correct answer back.

So what am I doing wrong in my LM Modbus setup.?  Huh



Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/93/17/d7/SDM72DM-V2.pdf


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - CristianAgata - 06.11.2022

(06.11.2022, 08:46)JanJJ Wrote: Hello everyone,

Have a small issue with reading Modbus addresses on the Eastron SDM72DM-V2 electricity meter.

It is an error that repeats itself at several addresses, but an example could be when reading volts on phases 1, 2 and 3.
Has exactly the same setup for reading on all three phases.
"manufacturer": "Eastron SDM72DM-V2",
  "description": "Three Phase Four Wire Energy Meter",
  "read_swap": "n",
  "mapping": [
    { "name": "Phase 1 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 1, "datatype": "float32", "units": "V " },
    { "name": "Phase 2 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 3, "datatype": "float32", "units": "V " },
    { "name": "Phase 3 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 5, "datatype": "float32", "units": "V " }
]
}
Phase 1 answer: 234,760
Phase 2 answer: 234,020
Which is correct.
Phase 3 answer: 9,959
Which is not correct.

If I use the LM Read test at address 5, I get the same incorrect reading.

If I put a USB-Modbus reader in my PC and read at address 5, I get 233,331 back. Which is correct.
Have also tried with a KNX/Modbus-Gateway and here I also get the correct answer back.

So what am I doing wrong in my LM Modbus setup.?  Huh



Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/93/17/d7/SDM72DM-V2.pdf

Hi, I got a similar problem, and I solved reding registers starting from 0 (if my memory doesn't joke me).
    { "name": "Phase 1 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 0, "datatype": "float32", "units": "V " },
    { "name": "Phase 2 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 2, "datatype": "float32", "units": "V " },
    { "name": "Phase 3 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 4, "datatype": "float32", "units": "V " }
best regards Cristian


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - JanJJ - 06.11.2022

(06.11.2022, 11:00)CristianAgata Wrote:
(06.11.2022, 08:46)JanJJ Wrote: Hello everyone,

Have a small issue with reading Modbus addresses on the Eastron SDM72DM-V2 electricity meter.

It is an error that repeats itself at several addresses, but an example could be when reading volts on phases 1, 2 and 3.
Has exactly the same setup for reading on all three phases.
"manufacturer": "Eastron SDM72DM-V2",
  "description": "Three Phase Four Wire Energy Meter",
  "read_swap": "n",
  "mapping": [
    { "name": "Phase 1 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 1, "datatype": "float32", "units": "V " },
    { "name": "Phase 2 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 3, "datatype": "float32", "units": "V " },
    { "name": "Phase 3 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 5, "datatype": "float32", "units": "V " }
]
}
Phase 1 answer: 234,760
Phase 2 answer: 234,020
Which is correct.
Phase 3 answer: 9,959
Which is not correct.

If I use the LM Read test at address 5, I get the same incorrect reading.

If I put a USB-Modbus reader in my PC and read at address 5, I get 233,331 back. Which is correct.
Have also tried with a KNX/Modbus-Gateway and here I also get the correct answer back.

So what am I doing wrong in my LM Modbus setup.?  Huh



Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/93/17/d7/SDM72DM-V2.pdf

Hi, I got a similar problem, and I solved reding registers starting from 0 (if my memory doesn't joke me).
    { "name": "Phase 1 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 0, "datatype": "float32", "units": "V " },
    { "name": "Phase 2 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 2, "datatype": "float32", "units": "V " },
    { "name": "Phase 3 line to neutral volts", "bus_datatype": "float32", "type": "input register", "address": 4, "datatype": "float32", "units": "V " }
best regards Cristian


Hi, Thanks for the feedback.  Smile

Doesn't work for me, unfortunately. Sad
also tried:

    { "name": "Phase 1 line to neutral voltsJ", "bus_datatype": "float32", "type": "input register", "address": 0, "read_offset": 1, "datatype": "float32", "units": "V" },
    { "name": "Phase 2 line to neutral voltsJ", "bus_datatype": "float32", "type": "input register", "address": 2, "read_offset": 1, "datatype": "float32", "units": "V" },
    { "name": "Phase 3 line to neutral voltsJ", "bus_datatype": "float32", "type": "input register", "address": 4, "read_offset": 1, "datatype": "float32", "units": "V" },
    { "name": "Phase 1 line to neutral voltsL", "bus_datatype": "float32", "type": "input register", "address": 0, "read_offset": 1, "datatype": "float32", "units": "V" },
    { "name": "Phase 2 line to neutral voltsL", "bus_datatype": "float32", "type": "input register", "address": 0, "read_offset": 3, "datatype": "float32", "units": "V" },
    { "name": "Phase 3 line to neutral voltsL", "bus_datatype": "float32", "type": "input register", "address": 0, "read_offset": 5, "datatype": "float32", "units": "V" },


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - JanJJ - 06.11.2022

Hello again,

Looks like it's actually not phase 3 I can't read.
Is phase 1 there is unreadable.
Which means that phase 3 I read with address 3. there is 2 less than 5.
(Yes that is correct here I prove I am able to subtract 2 from 5  Rolleyes )

But that means I have to read phase 1 with address 0 minus 1. So address -1... hmmm What is wrong in my LM Modbus setup.?

Pretty sure it's a setup issue. since I can read all phases from other Modbus master devices


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - admin - 07.11.2022

Do not use read_offset, set the address directly. The real address is in the "Modbus Protocol Start Address Hex" column which is address - 30001 for input registers. Note that there's no space in "inputregister". You might need to use a different read_swap mode to get correct results. Use Read test to confirm the correct settings before making a profile.


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - JanJJ - 07.11.2022

(07.11.2022, 09:01)admin Wrote: Do not use read_offset, set the address directly. The real address is in the "Modbus Protocol Start Address Hex" column which is address - 30001 for input registers. Note that there's no space in "inputregister". You might need to use a different read_swap mode to get correct results. Use Read test to confirm the correct settings before making a profile.

Hi, Thanks for the feedback.

Yes, I noticed that read_offset doesn't help much.
I think it's auto-correction that gets the text "input registers" split up.
Is correct in the profile "inputregisters".

Regarding read_swap
Have tested all options in Read test and only None (ABCD) / "read_swap": "n" returns a correct number/answer.

I found out it is the first address I can not read.
According to the Modbus register for the electricity meter. is the first address (30001) / address 1. Phase 1 measurement. Address 30003 and 30005 have phase 2 and 3.

If I read at address 1, I get phase 2 measurement and at address 3 I get phase 3 measurement.
This also happens again at many of the other addresses, e.g. should you get the reading for Hz at address 71, but get it at 69.

If I read with another Modbus master unit, I get the correct values/responses to the addresses given in the instructions.

So it must be an LM Modbus setup I have wrong.?
Then it's just something I'm missing in my LM Modbus profile.


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - admin - 07.11.2022

Many devices document Modbus addressing starting from 1 but in reality it starts from 0. LM uses 0-based addressing.

When reading from address 1 you are actually reading one register from phase 1 and another from phase 2. Together they form a value that looks valid but it is not. This is why phase 3 reading is not working.

Use read test, set datatype to float32 and address to 0. Find the correct swap mode that produces a valid result.


RE: Error on some of the addresses when reading Modbus on the Eastron SDM72DM-V2 electric - JanJJ - 07.11.2022

(07.11.2022, 11:18)admin Wrote: Many devices document Modbus addressing starting from 1 but in reality it starts from 0. LM uses 0-based addressing.

When reading from address 1 you are actually reading one register from phase 1 and another from phase 2. Together they form a value that looks valid but it is not. This is why phase 3 reading is not working.

Use read test, set datatype to float32 and address to 0. Find the correct swap mode that produces a valid result.

Hi, Thanks again for the feedback.

Hold on, I've tried a lot. So when you wrote I should try with address 0 I was about to write that I had tried it. And I thought I would just write what value I got back via address 0.
Then read from address 0 and got. -5.91478243391053e+34 in response.
And thought Yes, see what I said it didn't work either.. Dodgy
But... Then I thought I'd just try reading with Word (CDAB) instead of None (ABCD).

And... I had made a mistake.. You were right..  Rolleyes 
Now getting the correct values back.. My setup should be Word (CDAB) and not None (ABCD).

I bow and thank you from here and crawl back into my hole..
Thank you very much for your help and have a nice day..  Smile Blush
Sincerely. Jan