I created a module for a new driver.
Each driver created from this module contains few OPC tags.
When a driver is created, I drag the OPC tags folder into the Ignition tags structure, to be able to link this tags wiht the UI.
But, if I do a change in my module (exemple: I add a new OPC tag to display a new status) and I upgrade the module, sometimes, all my tags in the Ignition tags structure turn bad and stay bad. If I delete the OPC tags folder en drag it again, the new tag is there, but all (or a part) of the others tags are still bad or are just gone. It’s impossible to get them back. If I delete the device and recreate it with the same name, the tags are still bad or gone. The only way to get them back is to delete the device and create it again with an another name or restart the gateway.
Sometimes I can do an upgrade and everything is fine, sometimes the tags stay there but they are bad, sometimes they are gone.
In my module, I add all the OPC tags in the constructor part of my main Java class:
TagString tagLastTransmittedTime = new TagString(“Diagnostics/TCP_TransmittedTime”, new DataValue(new Variant((String) “”), StatusCode.BAD_UNKNOWN));
(where TagString it’s a derived class of WritableDriverTag)
And I remove all OPC tags on the Shutdown event:
Can someone help me with this issue?