# Reading Modbus TCP Holding registers

**URL:** <https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538>\
**Category:** General Discussion\
**Created:** [October 16, 2023, 4:41pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538 "2023-10-16T16:41:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralph\_Brayall](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Ralph\_Brayall](https://forum.inductiveautomation.com/u/Ralph_Brayall)\
**Post date:** [October 16, 2023, 4:41pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/1 "2023-10-16T16:41:20Z")

</div>

I have a PH controller that is set up for Modbus TCP port 502 Standard format. I am trying to read the value in Ignition. I am not getting what I am expecting for data, and it is varying wildly. I have verified with the manufacturer that the registers being used are correct. The controller is reading 13.06 mA, I have ignition set up for linear scaling 4 - 20 mA and I am and getting data anywhere from -3,500 to -4,000. I tried reverse word order and it didn't help. Anyone have a clue where I should look next?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 16, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/2 "2023-10-16T16:42:55Z")

</div>

Are you sure you're not off by one on the registers being read? Ignition uses one-based addressing by default, some documentation uses zero-based addressing.

What address are you reading, using what syntax? Reverse Word Order only matters with multi-register datatypes.

---

<div class="post-metadata">

**Author:** ![smcfarlane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/smcfarlane/32/42150_2.png) [@smcfarlane](https://forum.inductiveautomation.com/u/smcfarlane)\
**Post date:** [October 16, 2023, 4:45pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/3 "2023-10-16T16:45:57Z")

</div>

Make sure your data type is correct for multi register reads.

I also like to use a modbus peak and poke tool to verify that the data looks approximately what I expect in UINT form before trying to read it in to Ignition. Schnieders modbus tester is decent.

---

<div class="post-metadata">

**Author:** ![Ralph\_Brayall](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Ralph\_Brayall](https://forum.inductiveautomation.com/u/Ralph_Brayall)\
**Post date:** [October 16, 2023, 4:46pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/4 "2023-10-16T16:46:17Z")

</div>

It is multi-register and I have step turned on to read two consecutive registers.

 ![PH Device](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8abfddc36e2467dfeb71111fd44a0c9bc29d577.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 16, 2023, 4:47pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/5 "2023-10-16T16:47:08Z")

</div>

Applying scaling to things you're reading as floating point to begin with is unusual.

Are you sure you shouldn't just be reading those as 32-bit integers?

---

<div class="post-metadata">

**Author:** ![smcfarlane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/smcfarlane/32/42150_2.png) [@smcfarlane](https://forum.inductiveautomation.com/u/smcfarlane)\
**Post date:** [October 16, 2023, 4:48pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/6 "2023-10-16T16:48:16Z")

</div>

I'd advise against using the address mapping tool. It really doesn't save that much time.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 16, 2023, 4:49pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/7 "2023-10-16T16:49:18Z")

</div>

> [@smcfarlane](#):
>
> I'd advise against using the address mapping tool.

Agree.

It's also incredibly confusing to troubleshoot because it introduces a layer of indirection that makes your NodeIds (OPC Item Paths) completely meaningless and provides no indication of what the actual address/type being read are.

---

<div class="post-metadata">

**Author:** ![Ralph\_Brayall](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Ralph\_Brayall](https://forum.inductiveautomation.com/u/Ralph_Brayall)\
**Post date:** [October 16, 2023, 5:04pm UTC](https://forum.inductiveautomation.com/t/reading-modbus-tcp-holding-registers/80538/8 "2023-10-16T17:04:19Z")

</div>

I got rid of the scaling, and set the engineering limits to 0 -100. I kept the addressing but set all the unit ID's to 0. I am now getting expected values in Ignition. Thanks for your help.
