OPC write-back settings available for Expression Tags is missing

Sorry I know this question has probably been asked before but I can’t think of a simple way for my situation. I need to write a static number to the PLC. Theres 28 of them per UDT and I have 100 of them. The number very between 1 - 7 depending on the tag I know the tag ahead of time but I dont want to write a script for each tag because that would take forever. In 7.9 I used to just use the expression tag and put the static number in there and then just use the OPC write-back setting to write that to the PLC. Thats missing now is there a new way of doing that?

That feature was dropped. Scripting is the alternative.

How could I script this without having to do it 100 times?

Script in UDT (if applicable), or use system.tag.configure.

Do you have an example of how to do this? Legacy value change isnt available in my scripting

Value Changed should do what you’re looking for. I don’t have an example of using system.tag.configure to set event scripts on tags, but it’s what I’d look at if I needed to set a bunch of them at once (and putting the script in UDT definition(s) wasn’t the solution). Using system.tag.getConfiguration on a tag with an event script like you want would probably give you a good starting point on how to get this done with system.tag.configure.

Ok. Only problem is the value doesn’t change itll happen when I create the tag and thats it. The problem is we dont want to change the values in the plc but rather have Ignition make the changes in the PLC. But ok let me give that a look and see what I can come up with thanks for the help

Yes, I think it’ll work on initialChange.

Ok yes that works exactly how I need. Thank you for the information. Never noticed it was so easy!

1 Like