# Modbus TCP device word/byte order

**URL:** <https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984>\
**Category:** Ignition\
**Created:** [November 2, 2022, 9:49am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984 "2022-11-02T09:49:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [November 2, 2022, 9:49am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/1 "2022-11-02T09:49:54Z")

</div>

Hi, I have a modbus TCP to RTU device I'm able to communicate with using a modbus poll tool.  
But I am struggling getting the same results in ignition.

I have two registers that makes a float value. To get the right formatting I had to set the value to DCBA.  
My tag is set up like this: [T25\_M01]1.HRF62  
I believe the reverse word order setting gives me CDAB instead of ABCD.  
I have also tried Reverse String Byte Order and zero based addressing without luck.

Any ideas how I can format from ABCD to DCBA?  
Is it best to use a 3rd party tool for this, like kepware?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/255a73a8dafa5bcd2b78dc30a908d7a5c3049b6c.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:** [November 2, 2022, 12:06pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/2 "2022-11-02T12:06:24Z")

</div>

You've probably got 3 options:

1. use an additional expression tag to rearrange bytes in Ignition
2. use a 3rd party driver like @pturmel's Modbus driver, which I think supports this
3. use a 3rd party OPC server like Kepware, which I think supports this

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 2, 2022, 12:48pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/3 "2022-11-02T12:48:32Z")

</div>

> [@Kevin.Herron](#):
>
> use a 3rd party driver like @pturmel's Modbus driver, which I think supports this

I don't, actually. I suppose I could, but not soon.

---

<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:** [November 2, 2022, 12:51pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/4 "2022-11-02T12:51:21Z")

</div>

> [@pturmel](#):
>
> I suppose I could, but not soon.

Ha, ditto. If/when our Modbus driver gets attention I'll support it the same way the FINS driver supports specifying byte/word orders. But not likely "soon" by any definition.

---

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [November 2, 2022, 2:06pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/5 "2022-11-02T14:06:14Z")

</div>

Thanks!

I don't want to go down the rabbit-hole of rearranging bytes in ignition.  
Guess we will go with the kepware solution, we just need a extra license. Did some testing and I think we can make it work.

---

<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:** [November 2, 2022, 2:07pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/6 "2022-11-02T14:07:16Z")

</div>

I suppose the 4th and ideal option would be if your device could be reconfigured to use a sane byte order 😛

---

<div class="post-metadata">

**Author:** ![Sean\_Heilferty](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Sean\_Heilferty](https://forum.inductiveautomation.com/u/Sean_Heilferty)\
**Post date:** [March 26, 2025, 7:19pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/7 "2025-03-26T19:19:26Z")

</div>

Has there been any update to allow swapping of bytes? I have a Input Register that is reading 0x3100 hex and the real data is supposed to be read as 0031hex or 49 decimal.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 26, 2025, 8:07pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-device-word-byte-order/65984/8 "2025-03-26T20:07:43Z")

</div>

Shifts and masks on a derived tag are your best option. I decided to not support this, since the byte order within 16-bit values is one of the few things the Modbus specification clearly calls out. Any device that does otherwise is broken, and they are really rare.
