For my application, I am bringing a significant amount of information into ignition through a get request (system.util.netClient). I've written a function definition to create a list of dictionaries, with each dictionary containing the data for up to 25 devices. My original plan was to store that information in a global list "robots" which was initialized in a script in the Gateway Scripting Project. My thought was that I would be able to access that data from perspective or any other location within ignition because it was present on the gateway. I've run into an issue where this variable updates for references within a tag event script, but not in the script console or in perspective references.
Some Documentation:
Relevant code in the script library:
Call from a memory tag script:
Ignition Log:
RefreshRobotData prints the data when the global variable is updated from a tag event script.
TestTag indicates that the memory tag event script called the function getrobot3, the data matches the updated data in RefreshRobotData.
When getrobot3 is not followed by a log from the Test Tag, the definition is called from perspective and returns old data from when the script was last saved.
Tag event scripts are running on the gateway, would the perspective bindings be on a separate client scope which causes them to read old data from when the project script was last saved?