Add widgets and bindings at runtime

Hi,

is it possible to add widgets and corresponding bindings at runtime based on conditions?

I’m working on a project with a series of parameters (1000 parameters), each parameter is connected to a input box on HMI. Based on the machine configuration I show on the HMI a subset of these parameters box but the visualization is very slow. I would like to create, during the startup, the HMI page with static content rather than execute every time the condition to hide/show the parameters boxes.

Thank you for your help! :slight_smile:

@c524853 Gianluca,

is the machine configuration completely random and parameters can be chosen 0-1000 or could you group certain parameter into a subset that always go with a certain machine configuration?

For example:

  • Machine config 1 always uses parameters 1-200 plus some optional parameters from 900-1000.
  • Machine config 2 always uses parameters 201-400 plus some optional parameters from 900-1000.

There might be some clever grouping we can do to reduce the number of active bindings but adding widgets and bindings during runtime is unlikely.

Hi @marcel.voigt ,

thank you for the reply.

I will try to describe better my application: I have a project with several installation parameters. I have more or less 20 installation parameters used to define the machine configuration such as redundancy, filters, sensors, etc… During the startup is possible to select the desired setup of the machine and based on this setup the hardware configuration will be adjusted, some modules will be added and other removed. Of course also the behavior of the machine will be different. The main problem is the management of the parameters. I have like 200/500 parameters to hide and show based on the selected configuration and this slow down the performance of the HMI. I split the parameters in different pages but it takes a very long time and I would like to find a best approach for the next applications. My idea is to add a new category attribute to each parameter, add all the parameter widget to every parameter page and filter based on the category. This approach allow me to skip the design of the parameters pages but will slow down again the application because every time the bindings must be evaluated. To solve this, I’m wondering if exist the possibility to create “static” set of widget during the startup.

1 Like

This answer to my post can maybe help you.

For my side it’s a game changer about performance PoV

1 Like