# Kepware Long type

**URL:** <https://forum.inductiveautomation.com/t/kepware-long-type/87498>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 18, 2024, 4:00pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498 "2024-03-18T16:00:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [March 18, 2024, 4:00pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/1 "2024-03-18T16:00:24Z")

</div>

Siemens 1500 TIA19 FW 3.1 ---\> Kepware 6.14 OPC ---\> Ignition 8.1.33

Dint in siemens --\> Long in Kepware (auto tag generation) --\> Integer in Ignition

using tag browse in ignition to select the write OPC path.

Read works fine for any value.  
I can change the value in Kepware OPC client to any value and it works correctly and reflected on PLC and Ignition. Changing at PLC shows the correct value everywhere.

Changing value to a value \>32,767 causes the values in client and PLC to change

for example if I change the value in ignition to 34,000 the value will change to -31,536 setting value to 32,000 the value will go to 32,000 on all 3.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3d9f62ace7f5ee6bc40ca8ff985f61afe0d9be3.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:** [March 18, 2024, 4:05pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/2 "2024-03-18T16:05:24Z")

</div>

It might be interesting to connect UaExpert to Kepware and then browse to that Node and see what value Kepware is indicating for the OPC UA DataType attribute.

---

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [March 18, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/3 "2024-03-18T16:40:18Z")

</div>

> [@Kevin.Herron](#):
>
> UaExpert

interesting

It calls it an INT16, so looks like kepware issue with its datatype assignment

Strange

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da5cf0a328bc043ea1bacc110e216da224fb9605.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:** [March 18, 2024, 4:42pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/4 "2024-03-18T16:42:04Z")

</div>

Yep, if Kepware tells us it's Int16 we're going to cast it to Int16 before writing it, and that's where the rollover is happening.

---

<div class="post-metadata">

**Author:** ![crees](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@crees](https://forum.inductiveautomation.com/u/crees)\
**Post date:** [March 18, 2024, 4:53pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/5 "2024-03-18T16:53:59Z")

</div>

I've hit this issue with Kepware before and how it auto-assigns data types. You may have to manually change the datatype to get it to behave.

Try changing it to DWord instead of Long. Long is a signed Int, DWord is unsigned.

---

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [March 18, 2024, 5:19pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/6 "2024-03-18T17:19:17Z")

</div>

Siemens DINT is signed 32 bit. So the Long data type in Kepware is correct

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/07fb9b87c891655d7b152ec53460486b837b7e5c.png)

Kepware has it configured as a Long

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/e/ee176d21870388e1c77cb660a311033046db7344.png)

Kepware client shows it as Long

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/9/9986323516a7758e1813b68ed2b7845e99ddbcbd.png)

and now after I shut everything down and restarted and rescanned / generated everything UaExpert is showing it as a Int32

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b6f593cf2fb35cc299e29ace001537981219f88.png)

so bottom line turn it all off and back on again

---

<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, 2024, 5:28pm UTC](https://forum.inductiveautomation.com/t/kepware-long-type/87498/7 "2024-03-18T17:28:12Z")

</div>

> [@rfolkes](#):
>
> so bottom line turn it all off and back on again

Yes.

Also, one other thing - don't trust Kepware's client when troubleshooting anything OPC UA related. AFAIK their client is still a Classic/COM/DA client and nothing it tells you is relevant to the KSE UA server interface. Always use UaExpert or some other client.
