Modbus TCP Addressing

Hi, I am trying to access the following tag in Ignition. Got it connected via Modbus TCP driver.

Details of the tag:-

Unit ID - 1
Register Offset - 240
Bit No. - 0
Holding Register - 40241
Format- f

I am using the following tagpath to access this. The quality of the tag is good but I am getting 0 as the output which is not the correct value.

Get rid of the “F” when accessing bits. Use [Elrest]1.HR241.0.

Or if you really want the whole floating point value spanning HR241 and HR242, use [Elrest]1.HRF241. You may have to configure word swapping if the value is scrambled.

For reference
https://docs.inductiveautomation.com/display/DOC80/Modbus+Addressing

Hi Phil,

I tried using both the options, it still returns a 0 although the line is running. I also tried reverse word order, but no change to the value of the tag.

Try reading those and nearby registers as 16-bit integers to see what the underlying activity is. That would be:

[Elrest]1.HR240
[Elrest]1.HR241
[Elrest]1.HR242
[Elrest]1.HR243

{Make temporary integer tags for those to show us the values.}

Still 0. The quality of the tag is good.

There aren’t many other possibilities:

  • The manual you have is wrong.
  • There’s some configuration required for that rate to be reported as documented.
  • The slave address (node) is wrong.
  • The IP address is pointing at something else that happens to have zeroes there.

At this point I would take Ignition out of the loop, try ModPoll etc and see what it is reporting…

I think they have given the wrong registers. Even ModPoll says 0 for these registers.