node-modbus-serial icon indicating copy to clipboard operation
node-modbus-serial copied to clipboard

Help needed with register addresses.

Open MIJAS86 opened this issue 2 years ago • 1 comments

Hi,

I'm quite new to Modbus RTU protocol and I'm bit confused about the register addresses. This is the data I read from Easton SDM72DM power meter with readInputRegisters(1,100) : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50108, 52674, 50059, 1730, 17030, 23989, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50195, 7819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17903, 45703, 17826, 26757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] And here is a list of input registers for that power meter: https://xn--stromzhler-v5a.eu/media/pdf/93/17/d7/SDM72DM-V2.pdf image

So my confusion is how the data I read relates to the addresses in the power meter ? If I would like to read one register, let's say 30013 - Phase 1 active power, what parameters I should pass to readInputRegisters?

Thanks in advance for any help!

MIJAS86 avatar Aug 27 '23 08:08 MIJAS86

I believe that for your example of reading 1 floating point value (not 1 register !), i.e. read "30013 - Phase 1 active power" the following parameters should be used readInputRegisters(12, 2).

In other words you should use the Modbus 'start' address (last two columns in your table) and required number of registers (keeping in mind that one floating point value occupies 2 Modbus RTU registers).

sigma-design avatar Sep 19 '23 05:09 sigma-design