dkvanrhijn Posted May 19, 2018 Report Share Posted May 19, 2018 UniLogic System Developers I appear to have come across a "bug" in exporting modules, followed by renaming those variables in the original program, to re-importing the module. The import takes on the changed variable names upon import. What I was intending, was to duplicate the module for 2 different "modules" of hardware. When the import was taking on the same variable reference as what I just modified in the module that remained in the original program it makes life entertaining. I normally approach the change from the Global variable editor when changing variable names. The work around I used was to import the module into a 3rd program and export again to another name, followed by importing to the original program. Something in the references to the backup file perhaps? Kind Regards DvR 519 577 3160 Quote Link to comment Share on other sites More sharing options...
Saragani Posted May 20, 2018 Report Share Posted May 20, 2018 Hi, This is not a bug. Each tag and UDT have a unique ID (in this case, a GUID). Upon import, we look for tags with the same ID and see if both match in definition (and if so, we don't create a new tag, but use the existing one). I think (I don't remember, and I must look the code for confirming) that if a matching tag with the same ID is not found, then we look for a tag with the same name and then check if it matches. The same logic is being used when you copy paste something (like HMI element or a rung etc). Lets say you've copied a Binary Image element, deleted the original element, and then changed the linked bit to an Int16. You would want to preserve the working state of the copied element on paste, but on the other hand, not create a new Bit tag on every paste. The copied element can be either pasted on the same program, or on a different one. This is why we do it on both copy and paste. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.