# Numeric Text Field - Seperate Read & Write Tags

**URL:** <https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409>\
**Category:** Ignition\
**Created:** [May 8, 2013, 2:27am UTC](https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409 "2013-05-08T02:27:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfbuehler](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rfbuehler](https://forum.inductiveautomation.com/u/rfbuehler)\
**Post date:** [May 8, 2013, 2:27am UTC](https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409/1 "2013-05-08T02:27:28Z")

</div>

I have a client who has a Tag for SP and one for SP Entry.

He wants 1 Numeric Text Field. He wants to display the SP Tag in the Text Box and wants to Write the SP Entry Tag when you enter a value.

Is there a way to do this?

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [May 8, 2013, 5:06pm UTC](https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409/2 "2013-05-08T17:06:13Z")

</div>

# numeric text field Value(Integer) bound to tag ‘SP Value’

# BIDIRECTIONAL not enabled on binding

# property change event for numeric text field

if event.propertyName == “intValue”:  
# tag SP Entry  
system.tag.write(“SP Entry”,event.newValue)

# alternate approach with conditional to keep it from writing SP Entry again if SP Value is updated later with SP Entry

if event.propertyName == “intValue”:  
# current SP Entry  
currSPEntry = system.tag.read(“SP Entry”).value  
if event.newValue != currSPEntry:  
system.tag.write(“SP Entry”,event.newValue)

---

<div class="post-metadata">

**Author:** ![rfbuehler](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rfbuehler](https://forum.inductiveautomation.com/u/rfbuehler)\
**Post date:** [May 9, 2013, 1:15pm UTC](https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409/3 "2013-05-09T13:15:44Z")

</div>

Basically tried the above code before I posted this.

The problem is the PLC code writes a 9999 to the SP\_Entry one it sees an new value.

The SP is ramped up or down to the SP\_Entry at a certain rate so the SP is changing.

Since the code is based on a change of the SP value the SP\_Entry will be updated with the new SP as it has changed. So if the original SP was 0 and you entered a SP\_Entry of 100 the SP would start rising to 100. The object would see a change in Value and write the current value too the SP\_Entry and the SP would now be somewhere between 0 and 100 depending on how fast everything gets updated.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 23, 2013, 9:06pm UTC](https://forum.inductiveautomation.com/t/numeric-text-field-seperate-read-write-tags/6409/4 "2013-05-23T21:06:45Z")

</div>

Wait, so you write 100 to SP\_Entry. Then the SP starts ramping up to 100, but SP\_Entry goes to 9999?

And you want the box to continue showing 100? Where would this 100 come from? We’re not miracle workers…

I think you’re going to have to create a template for this kind of control. Some sort of display mode, and an edit button, and then once they edit it, it goes back into display mode. You could do this by using multiple components and hiding/showing them based on the mode. But I still don’t know what you expect it do display while in the PLC’s ramp-up period…
