# Shift decimal place Numeric Text Field to PLC

**URL:** <https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060>\
**Category:** Ignition\
**Created:** [November 18, 2019, 7:22pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060 "2019-11-18T19:22:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason.scott](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jason.scott](https://forum.inductiveautomation.com/u/jason.scott)\
**Post date:** [November 18, 2019, 7:22pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/1 "2019-11-18T19:22:05Z")

</div>

Hi all, upgrading a plant from Wonderware to Igntion HMI. The PLC (Schneider Quantum) was programmed using Integers for all values, so any numbers that have decimal place(s) are off by factors from what you see on the HMI (ie. a temp reading on the HMI of 45.2 is written to the PLC as 452). If there are 2 decimal places, it will 4520 in the PLC.

The HMI numbers look ‘normal’ to the operator and numbers entered are converted to match the PLC by Wonderware formatting. I can’t find a way to duplicate this in Ignition. Well I have found a way through scripting, but it is a lot of work (a lot of tags), and hoping there is a better way using decimal formatting or something else?  
Thanks!!!

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [November 18, 2019, 7:30pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/2 "2019-11-18T19:30:50Z")

</div>

Try out the scaling feature in the tag properties.

[https://docs.inductiveautomation.com/display/DOC79/Tag+Scaling+Properties](https://docs.inductiveautomation.com/display/DOC79/Tag+Scaling+Properties)

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [November 18, 2019, 7:34pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/3 "2019-11-18T19:34:08Z")

</div>

Depending on if you know the range those values could have scaling be an option.

Another potential route could be a derived tag. You can define an expression to convert the value and have a separate write back function if that is needed.

[https://docs.inductiveautomation.com/display/DOC79/Types+of+Tags#TypesofTags-DerivedTags](https://docs.inductiveautomation.com/display/DOC79/Types+of+Tags#TypesofTags-DerivedTags)

---

<div class="post-metadata">

**Author:** ![jason.scott](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jason.scott](https://forum.inductiveautomation.com/u/jason.scott)\
**Post date:** [November 18, 2019, 8:00pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/4 "2019-11-18T20:00:35Z")

</div>

Thanks, derived tags could work, but I’d rather not make hundreds of them. I’m hoping there is something I can do with the Numeric Text field component in my template. Right now I have a script that takes the operator entered value and multiplies it (by 10, 100, or 1000) and writes that to the PLC. But I am thinking it could be problematic.

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [November 18, 2019, 8:22pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/5 "2019-11-18T20:22:07Z")

</div>

If your just offsetting the value the easiest way is in the tag using scaling like Tim mentioned. The screen shot below is from 7.9 but you can do the same in 8.0 and it would do what you described without creating extra tags.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/56a23edf9783c71c4ab55fc0a587d647bde3a80f.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 18, 2019, 8:22pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/6 "2019-11-18T20:22:53Z")

</div>

Scaling would be the right answer - you’ll never have to deal with “raw” values unless you go out of your way to do raw OPC writes instead of dealing with Ignition tags.

---

<div class="post-metadata">

**Author:** ![jason.scott](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jason.scott](https://forum.inductiveautomation.com/u/jason.scott)\
**Post date:** [November 18, 2019, 8:45pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/7 "2019-11-18T20:45:13Z")

</div>

Thanks for all the prompt responses. I’ll play around with scaling. Still have a lot of tags to change, but hopefully I can do group changes.

---

<div class="post-metadata">

**Author:** ![jason.scott](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jason.scott](https://forum.inductiveautomation.com/u/jason.scott)\
**Post date:** [November 18, 2019, 8:54pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/8 "2019-11-18T20:54:23Z")

</div>

One more question! If you choose No\_Clamp, what happens if any values are outside the highs and lows?

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [November 18, 2019, 9:25pm UTC](https://forum.inductiveautomation.com/t/shift-decimal-place-numeric-text-field-to-plc/30060/9 "2019-11-18T21:25:32Z")

</div>

It keeps scaling outside of the range typed in when None is selected for clamp mode.
