# Reading a int or byte from a uint32

**URL:** <https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 18, 2020, 6:47pm UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225 "2020-03-18T18:47:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tleroy.140](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@tleroy.140](https://forum.inductiveautomation.com/u/tleroy.140)\
**Post date:** [March 18, 2020, 6:47pm UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225/1 "2020-03-18T18:47:15Z")

</div>

Hello all.  
I am using Modbus TCP with the Do-More Simulator tied to ignition. I know that we can read bits from words, but is there notation to read a byte or int out of a uint32?

---

<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:** [March 18, 2020, 6:48pm UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225/2 "2020-03-18T18:48:22Z")

</div>

Not at the driver level. You can do it in Ignition with an expression tag or scripting, though.

---

<div class="post-metadata">

**Author:** ![allnet](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@allnet](https://forum.inductiveautomation.com/u/allnet)\
**Post date:** [March 19, 2020, 12:14am UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225/3 "2020-03-19T00:14:06Z")

</div>

Not quite clear where is the uint32, but if you get it with , for example, HRUI1, then HR1 will be one byte, and HR2 the other, if you are looking just for raw values.

---

<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:** [March 19, 2020, 1:18am UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225/4 "2020-03-19T01:18:53Z")

</div>

HR1 would be a 16-bit value, same with HR2. All registers are 16-bit values and multiple registers are combined to make larger data types but there is no addressing at the driver level to just get one or the other byte from a register.

---

<div class="post-metadata">

**Author:** ![allnet](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@allnet](https://forum.inductiveautomation.com/u/allnet)\
**Post date:** [March 19, 2020, 8:31am UTC](https://forum.inductiveautomation.com/t/reading-a-int-or-byte-from-a-uint32/33225/5 "2020-03-19T08:31:24Z")

</div>

Ops. I stand corrected. I meant to say one int ( 16 ) but came out byte.

So for byte is as Kevin said, scripting or expression.
