# Storing a REAL in a data module

**URL:** <https://community.br-automation.com/t/storing-a-real-in-a-data-module/4178>\
**Category:** Programming\
**Tags:** automation-studio\
**Created:** [August 26, 2024, 2:38pm UTC](https://community.br-automation.com/t/storing-a-real-in-a-data-module/4178 "2024-08-26T14:38:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmontreal](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kmontreal](https://community.br-automation.com/u/kmontreal)\
**Post date:** [August 26, 2024, 2:38pm UTC](https://community.br-automation.com/t/storing-a-real-in-a-data-module/4178/1 "2024-08-26T14:38:38Z")

</div>

Hello All,

I’m running into a strange issue with a data module in my project, I’m attempting to store 4 REAL values for a PID loop and the values that are loaded from the data module are way off.

What exactly am I doing wrong? I followed the formatting from the help, and this is the result.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/42fa564371903487fd71cb671f17689452cd9b81.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/7bff4091340cc53d3a9ba6f63b9715e59b6565f4.png)

![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/0/036c181fa855c76183a590b439eadaefebd87aac.png)

---

<div class="post-metadata">

**Author:** ![austin.carpenter](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/austin.carpenter/32/1196_2.png) [@austin.carpenter](https://community.br-automation.com/u/austin.carpenter)\
**Post date:** [August 26, 2024, 4:08pm UTC](https://community.br-automation.com/t/storing-a-real-in-a-data-module/4178/2 "2024-08-26T16:08:19Z")

</div>

Hello Kyle,

It looks like you are byte-shifted off by 2-bytes. Data objects are byte aligned, so make sure you don’t have any leading bytes which are throwing off your offsets.

Ex: 0.2

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/8/84492872757e248cd02d85dc8584ebda09b8b192.png)

2.234791E-41

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/e/e1da2b4174a77002e739ee194bd3ab421cf1f9ca.png)

Link to website used: [IEEE-754 Floating Point Converter](https://www.h-schmidt.net/FloatConverter/IEEE754.html)

---

<div class="post-metadata">

**Author:** ![kmontreal](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kmontreal](https://community.br-automation.com/u/kmontreal)\
**Post date:** [August 26, 2024, 4:19pm UTC](https://community.br-automation.com/t/storing-a-real-in-a-data-module/4178/3 "2024-08-26T16:19:27Z")

</div>

Austin,

Thank you for your answer!

Everything else in the data module is a UINT value, so adding one additional UINT before my REAL values shifted everything by the 2 bytes that I needed. All My values are now loading correctly.

![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/6/6f9d07620b2007f1fd741fffcdbdbf501735eb02.png)
