# Linear Scale OPC Value DINT to Float

**URL:** <https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 23, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832 "2024-05-23T20:53:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 23, 2024, 8:53pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/1 "2024-05-23T20:53:03Z")

</div>

I have an OPC tag that uses linear scaling.

The PLC tag is a DINT, the Ignition OPC tag is a Float. The DINT is in 1/10ths, so 22 = 2.2, 1 = 0.1.

My linear scaling is set up like so.

```python
rawLow = 0.0
rawHigh = 1.0
scaledLow = 0.0
scaledHigh = 0.1

```

For the moment I'm using @pturmel 's Eth/IP Host device as a tag host. It connects to the OPC tag, but if I change the value of the tag in the Ignition tag browser to 4.5 it rounds up to 5. And if I enter 4.4 it rounds down to 4. Why is it behaving as an integer?

Am I missing something, or is this just odd behavior because I'm trying to write to a tag that would normally only be read?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 23, 2024, 8:55pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/2 "2024-05-23T20:55:35Z")

</div>

Is your format string set up to only display integers? Might try setting it to something like #,##0.0

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 23, 2024, 8:56pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/3 "2024-05-23T20:56:17Z")

</div>

I'm looking at the tag value in the tag browser. Format string is still default "#,##0.##"

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 23, 2024, 8:58pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/4 "2024-05-23T20:58:09Z")

</div>

When you click the value to change it, does it show the decimal after clicking on it, or is it rounding the value? Might try using the script console to read the value and print it just to see what value it's seeing. Or look at tag diagnostics to see what value it shows in there.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [May 23, 2024, 8:59pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/5 "2024-05-23T20:59:48Z")

</div>

It shows the value with a decimal, but it has rounded.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/061a5f7429db7ee2d2e0445b861c8c62ad42396c.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/758a4ab92cf5af52c927a3505d9bc4a5a2710082.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/5/b5bd8b5df54a031647d1146edf563392870fd51e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8ecf4d775a8d2f6e75054f72b7ceb53dd24f99b8.png)

Of course now it works... wth

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 23, 2024, 9:03pm UTC](https://forum.inductiveautomation.com/t/linear-scale-opc-value-dint-to-float/90832/6 "2024-05-23T21:03:05Z")

</div>

Isn't that the way it works. I recently had an issue and was able to replicate it reliably. Contacted support, opened a ticket, did a bunch of troubleshooting and they couldn't replicate it. 8.1.40 was released, so I decided to upgrade just to see if it had the issue, and it seems to be fixed, but wasn't a part of any fixes, so I wonder if I just had some corruption or something and a fresh install fixed it.
