I have a project that displays about 250 parameters of a production machine in labels and text fields.
Each label or text field is linked to several properties of a opc tag; like value, limits, units, decimal format etc.
When my customer ordered the same project for 8 more machines I created data types and data type instances from the existing tags.
My problem is now that I have to click on every single label and text field and change all properties from tag binding to indirect tag binding.
Is there a faster, better way to do this?
You can get an XML representation of all the stuff on a screen by doing a select all -> copy -> paste into text editor. You’ll prob have to do a test to see what to find and what to replace it with to switch to the indirect binding. Notepad++ has a “replace all in all open files” feature to get a bunch of stuff done at once. Then you’d have to come back here and report the results…
Not sure if quicker, but definitely slicker…
Thanks for the reply.
I picked one of my numeric text fields with direct tag binding and copy/pasted it into a text file.
Then I used the designer to change the same field to indirect tag binding and copy/pasted it into another text file.
The differences between the two files are huge. Direct binding is 121 lines of code, indirect binding 331 lines.
I compared the 2 txt files with WinMerge and I can’t see a way to use search and replace to change from direct to indirect binding.
The file comparison is attached.
Heh… that’s why I wasn’t sure if it would be quicker. You could use regular expressions and some sort of text reference file + sed, but you know what they say about regexes…
“Bob had a problem. He decided to use regular expressions to solve his problem. Now Bob has two problems.”
If this was something that you were going to do repeatedly, I would say some sort of python script or something, but you’re probably best off just doing it the hard way…
Only do it the hard way once, make indirect tags the first time! Haha seriously though, changing from a direct tag binding to an indirect all over your project would take some work in the Ignition designer. You can’t use our find/replace for that. Good idea using NPP though!