Modbus addressing is different type of address


hi, we added a power meter device which support modbus but their addressing looks different. can anyone help me how i can add this in modbus addressing?

1 Like

Function code 0x03 is for reading holding registers, while 0x04 is for reading Input Registers. You should try both (maybe it supports both identically).

OPC Item Paths in Ignition would look like this:

n.HRI0
n.HRI2
n.HRI4
n.HRUI6
n.HRUI8
n.HRI10
...

Where n is the device's node address. You can leave out the n. if zero.

Note that the list of addresses starts at offset zero, so you must use Zero-based addressing in the Ignition device settings (advanced).

Most of those values are shown with divisors. You would use the linear scaling feature in each Ignition tag to convert those to floating point values.

2 Likes



let say i want to show the value of the address 0008H unsigned Long how to do that i did this way which is in image but still bad value. can you help?

Have you tried changing the device/unit/slave id from its default of 0 to e.g. 1?

Try something like: [ION]1.HRUI8

yes i did. no luck

Check the Ignition logs for errors.

See if any other Modbus client software can read the registers. If so, compare settings or Wireshark captures.

Looks like the first address in the manual is 0. I suspect you need to enable zero-based addressing in your modbus device connection. If this configuration is wrong, you could be reading registers without data (or a register that's just plain invalid).

Also, it looks like you might be trying to use Modbus Address Mapping. I recommend you stay away from that - it'll only add complexity and confusion. Just do direct addressing in each tag.

i am not using mapping. i am using OPC tags

it works now thanks guys for your help. need final help values from 0000H to 00008H coming perfectly once i start with 0040, 0042, 0044...,004A, 000A or any after 8H is showing wrong values some are very very big numbers, may be i am putting wrong number in Hax? the OPC Path is "[ION]1.HRUI42" wring value. but "[ION]1.HRUI8" correct.
do i need to change hax to dec number?

Yes, you'll definitely need to convert those hex addresses to decimal. e.g. 000A becomes HRI10, 0040 becomes HRUI64.
Glad you got them reading!

no luck, when i am converting them to dec its coming as bad

You might need to turn the "Span Gaps" setting to False.

Try disabling all [ION] tags with bad quality. The modbus driver groups multiple read/write registers together for efficiency - you may have an error in a single tag that causes multiple tags to fail. This might also be addressed by the Span Gaps setting Kevin mentioned.

From there, enable/create one tag at a time and see what works and what doesn't. You may also need to check the logs or run wireshark to get more detailed information about what exactly is failing, and why.

yes you are right, i did one by one tags i have added 3 tags which are good and able to read values as soon as i am adding another tags which are after 0008H getting bad and thn other 3 tags which are goods showing error .


when i am converting 42H to 66 dec it showing bad.
with 42H showing some value which is absolutely wrong

I see you've got L1V defined and working - that should be looking at HRUI64, correct? Is it working as intended and reading a reasonable value (scaled by x10)?

Any other points further down you can test? Sometimes modbus devices can simply behave in unexpected ways due to how they're programmed. I've seen power meters return NaN for registers when there's no line side voltage, I've seen them max out registers when the meter is unconfigured (all registers 32767), etc. If it's only affecting L2, it could simply be something with the meter itself or the physical configuration.