Structure binding to compound widget, create individuals bindings to each properties during build time

Hi everyone !

In a way of optimising an existing MappView HMI, I created multiple compound widgets and use Structure bindings. I was thinking that using Structure binding will create only 1 binding on OpcUa variable.
I think that it’s not true, I checked in compiled files and build create all bindings for us.
I’m here to know if I had missed something in this usage.

Here is an example :

I have a compund widget with 10 mappings in a StructureBindableProperty

Here is the binding in AS associated to this widget

And the file generated by the builder find in folder
(\Temp\Objects{YOUR_CONFIGURATION_NAME}\5APC3100_KBU1_000.mappView\data\server): (1.1 KB)

Builder seems to generate all bindings for me, but in a way of optimisation for mappView Server & Client and Opcua server, it’s the same thing, there is the same amount of bindings loaded.

Is someone know if there is a possibility of using only 1 binding and all the structure is passed to the widget and not creating all bindings 1 per 1 ?

Florent Boissadier

Hi @florent.boissadier

I wish that would be the case but I would say the help gives an indication that this not how it works. There is a note in the help that I believe explains what you are seeing.

B&R Help - Compound widgets

Hi @marcel.voigt

Yeah I saw this too but I was thinking that it was for the rendering in browser not about the internal process of the widget :sweat_smile:

I remember there were some discussions internally also including devs. The current approach has pros and cons.

If you have a big struct but only use very few of the members, this approach might be even more performant. Also the current approach makes it possible to set different sampling times for each struct member.

Additionally, the current approach can use values of differing struct types, as long as the required members are present. So it is not a strict requirement on a specific type, but rather a type trait which relies only on the presence of some struct members.


Thanks for this answer, the actual problem I have is that I have really much bindings in some page of my HMI due to usage of multiples compound widgets, so performance on the HMI isn’t good (around 1600 bindings loaded on a page).
I don’t know exactly if it’s PLC side (mvMain & OpcUa) or Client side (a lot of Idle time in devtools profiler) performance

Do you work with setting widgets visible / invisible a lot?

If so, bindings of invisible widgets are still operating and updated in the background. To avoid this it can be helpful to use multiple contents and place them in the ContentControl widget. The ContentControl widget has a property deactivate which fully deactivates the contained content when not visible.

Using a ContentControl within a TabControl or just show / hide contents with the visible property of the ContentControl can bring a big performance boost.

Of course this approach does not fit well for all use cases, but maybe you can structure your UI in a way to at least partially use it.

1 Like

Hi @patrick.tanner

Yes exactly, I used visible / invisible property of my compound widget inside a groupbox in mode children relative.

This part of the HMI is used to modify value and configuration of each parameter of the recipe of the machine, per parameter there is 2 compound widgets one for the edition of the value and a second one for the configuration and the Audit of all changes of the parameter where PermissionOperate and PermissionView is assign to some roles.
Here is an image of the integration for an Axis point in my HMI:

I already works with ContentControl widget, for example this content is loaded in a ContentControl.

If I had well understand, for optimise this HMI, I should use ContentControl per CompoundWidget and Load or Unload them if then need to be display at the screen ?

Does Visiblity parameter of the ContentControl widget also deactivate the content loaded inside ?
Update: I check the help, answer is yes if the parameter deactivate is set to true

I will do some testing on a fresh HMI and update this post !

I implemented it, that’s a lot of content to create so I used a script to generate everything.
There is a really BIG performance boost !

Thanks a lot for theses informations @patrick.tanner !

1 Like