Numeric Text Field - Seperate Read & Write Tags

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?

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)

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.

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…