# Reading DINT in Soft Logix wrong? Binary difference

**URL:** <https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640>\
**Category:** Ignition\
**Created:** [September 14, 2020, 7:24am UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640 "2020-09-14T07:24:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [September 14, 2020, 7:24am UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/1 "2020-09-14T07:24:26Z")

</div>

I know SL isn’t supported.

I have a DINT tag in PLC that is being read wrong and I want to understand what is going on.

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

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

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/14cf957217eb89a58543c657f8b4011a0d87a7e8.png)

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

============================================================

This is another machine with the same code. Good results.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0ab4fa5a94cb205cf4708a31144710d008fb23ce.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0c2074be2577be7f2ff23430494c824a1ac7cca5.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/02aab78179df02cf448a4141658b611a1a60357b.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d1515ae6a2201c36d406dcb2d0f121a5e064a08.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/756ea9317a8d32e792acd9a15120f8f6f8fb83e9.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:** [September 14, 2020, 1:33pm UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/2 "2020-09-14T13:33:17Z")

</div>

Is it also the wrong value if you leave the datatype in Ignition as Int32 instead of making it an array? Which driver is this?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [September 14, 2020, 2:01pm UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/3 "2020-09-14T14:01:03Z")

</div>

Have you tried using a SWPB instruction to see if the driver is swapping the bytes? This won’t solve your issue but might give a better idea what’s happening with the driver (and it’s quite simple to test).

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [September 15, 2020, 3:15am UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/4 "2020-09-15T03:15:31Z")

</div>

Is Int32 Long data type if so. Then value stays the same.

Driver: Allen-Bradley ControlLogix (Legacy)

PLC is Soft Logix Ver 15.02.00

---

<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:** [September 15, 2020, 12:36pm UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/5 "2020-09-15T12:36:19Z")

</div>

What do you mean “stays the same”? Is it the same value that is in the PLC?

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [September 15, 2020, 7:05pm UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/6 "2020-09-15T19:05:04Z")

</div>

Oh, you mean change value in type in PLC. My bad. I will try that.

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [September 22, 2020, 6:23pm UTC](https://forum.inductiveautomation.com/t/reading-dint-in-soft-logix-wrong-binary-difference/38640/7 "2020-09-22T18:23:09Z")

</div>

It stays the same. So it seems specific to this subprogram tags inside the controller. It reads tags scoped in other programs just fine and Global scoped controller tags just fine. Weird. Wonder why? I don’t know of any reason in a PLC why this would be? Maybe someones else do

🚫 ns=1;s=[D01]HW20\_103\_SPECIALS.TURNTABLE\_INDEX\_REQ  
Type: Bool

🚫 ns=1;s=[D01]HW20\_103\_SPECIALS.TURNTABLE\_PART\_CNT.ACC

✅ ns=1;s=[D01]Global.FLT.D\_FLT\_ACT

✅ ns=1;s=[D01]STACK\_LIGHTS.AMB\_STK\_LT
