Hi all,
We have a large number of valves on our system, around 100 each of two different types. For continuity with an old HMI package, we would like to present them as a list of 20 valves per window, in a tabular format. For reasons of continuity, we have a ‘home’ page with several buttons, that open up different projects using the system.util.retarget function.
A Memory Tag, dataset format, holds all the relevant data about each valve. The template repeater’s Template Parameters dataset property, is linked to the master memory tag dataset via a runScript expression function. I couldn’t find a cleaner way to have a dataset template pull a subset of a larger dataset.
Each window has a custom property called ‘page’ which the runScript expression uses to select the subsection of the Memory Tag’s data set - 0-19, 20-39, 40-59, and so on. Each subset currently has its own window in the project.
Once the project is open, navigating among different windows is redundant. You could simply have the button re-write the template repeater’s dataset. But the chicken/egg issue is that before the project is open, you need to know which subset is wanted.
System.util.retarget has a ‘params’ function:
PyDictionary params - A dictionary of parameters that will be passed to the new project. They will be set as global variables in the new project’s Python scripting environment. [optional]
But I have been unable to figure out how to use this global variable. If a client startup script could reference a global variable, write the template repeaters Template Parameters we’d be off to the races and could cut ourselves down from 4-5 pages to a single one. Is this possible and if so how?