Persistence of data in global dictionary?

Hi all

I have an Ignition Edge 8.0.14 licensed with the Compute module. Thus I have Gateway Event Scripts.
In the scope of these scripts it appears that all data in the global dictionary (as retrieved by system.util.getGlobals()) are cleared every time I save my project to the gateway (at least when there are changes to the scripts). Is that how it is supposed to work? I was hoping data in that dictionary was persistent at least when the project. I believe that was how the “standard” Ignition was working…

Looking into the documentation, it seems like when the scope that the global dictionary is in has been altered, it would then be ‘refreshed’ and emptied.

Since you are using Ignition 8, I would suggest using a memory tag with a Document datatype and push your dictionary into there. Not quite as convenient as accessing the global dictionary, but it should survive any scope restarts.

1 Like

It used to not be emptied. Which breaks a great deal of the code I use to manage lifetimes for asynchronous threads. Since IA seems to be oblivious about the significance of this, I created a special module (free) just for this purpose, announced here:

1 Like

OK, thanks a lot, I’ll try that.

Hi Phil, your module doesn’t install on Ignition Edge. I get a state " Faulted: Not eligible for use with Ignition Edge, unless licensed"

Ah, yes, Edge has a whitelist of eligible modules, and mine aren’t on it. Sorry. Your sales agent at IA can help, though.