Jump to content

Exporting and Importing Modules issue...


Recommended Posts

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.