Posts: 5
Threads: 1
Joined: Dec 2020
Reputation:
0
06.11.2022, 08:46
(This post was last modified: 06.11.2022, 10:27 by JanJJ.)
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.?
Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/...2DM-V2.pdf
Posts: 306
Threads: 59
Joined: Dec 2019
Reputation:
13
(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.?
Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/...2DM-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
Posts: 5
Threads: 1
Joined: Dec 2020
Reputation:
0
(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.?
Link to Eastron SDM72DM-V2 electricity meter manual/modbus:
https://xn--stromzhler-v5a.eu/media/pdf/...2DM-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.
Doesn't work for me, unfortunately.
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" },
Posts: 5
Threads: 1
Joined: Dec 2020
Reputation:
0
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 )
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
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
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.
Posts: 5
Threads: 1
Joined: Dec 2020
Reputation:
0
(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.
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
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.
Posts: 5
Threads: 1
Joined: Dec 2020
Reputation:
0
(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..
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..
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..
Sincerely. Jan
|