# Unsigned 32bit int not work fine?!

**URL:** <https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519>\
**Category:** Ignition\
**Created:** [November 29, 2021, 10:33am UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519 "2021-11-29T10:33:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [November 29, 2021, 10:33am UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519/1 "2021-11-29T10:33:09Z")

</div>

I have:

- Siemens s7-1500
- OPC-UA (in siemens cpu)
- a UDInt plc tag  
when I try to write a number with a 32nd bit to 1 (more than 2147483647) I have this error:

“Invalid data type, unable to convert value ‘Int4’ to data type class java.lang.Long”

For me is a mystery.

---

<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 29, 2021, 12:50pm UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519/2 "2021-11-29T12:50:42Z")

</div>

Java 32-bit integers are signed. So to provide a value to an unsigned 32-bit integer, you must provide the next larger type: 64-bit. Show your code so a more precise suggestion can be offered.

---

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [November 29, 2021, 1:28pm UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519/3 "2021-11-29T13:28:41Z")

</div>

Perfect … your idea works fine in version 8.12.

Thanks for a fast replay. A couple of 🍻 for you

---

<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 29, 2021, 1:30pm UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519/4 "2021-11-29T13:30:49Z")

</div>

> [@stra](#):
>
> A couple of 🍻 for you

Heh. Next time you come through Atlanta. Or an in-person ICC (crosses fingers).

---

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [November 29, 2021, 1:42pm UTC](https://forum.inductiveautomation.com/t/unsigned-32bit-int-not-work-fine/53519/5 "2021-11-29T13:42:46Z")

</div>

Quite hard to get bosses to pay for a ride to the ICC. If I can, I’ll be in Atlanta in late January
