Is it possible to persist variables / objects across scripts?
E.g. I have a gateway or client event script and I would like to access a variable each time that script runs. A simple example is a state machine where I need to ‘remember’ the state. Obviously I can write the state to a memory tag and read it on each script execution, but this has its drawbacks.
What I would really like to do is instantiate a Python class in the gateway scope to handle more complex functionality, but I need a way to access the class instance.
This is similar to the ‘chart’ scope in the SFC module, except the SFC module does not work for my use case.