Manufacturing Automation & Intelligence

B&R Automation Studio: Create PopUp Windows on HMI Pages

Hi, I'm Otto Gottlieb. I'm an automation engineer at DMC, and I would like to talk to you today about making dynamic screens with B&R Automation Studio. 
The purpose of this video is to show how you can make an HMI page more dynamic by adding a popup to it. 

So the page that we are going to make more dynamic is the Setup Page. And the popup that we are going to add to it is coming from this Common Layers page called Message Box. It will 

ask if the user is sure that they want to open this screen. So in order to do that, you have to go to the Layers Tab of the setup screen, right click, and add Layer Reference. You 

select the message box and click Okay. Right now it's on the screen, but it's at the very back so we want to move it the front, therefore, you can right click and select move down. 

Another option is to go to the Properties and modify Z Order to be the highest number. Now the message box is at the very front of the screen. I also changed the editable column 

from frozen to normal. 

If we look at the design of the setup screen now, you will see the popup as the first thing on the screen. We want to have this popup appear as soon as you navigate to this screen 

in case the person doesn't actually want to be on the setup page. In order to do this, we need to set up the properties of the HMI so that we know what page the user is at, at all 

times in order for a logic to have an impact. So I set the Change Data Point to the Change Page Global Variable, and I set the current data point as the current page global 


Now I am going to define some variables in the display, so that I can use them in the code behind. One of the variables is called Popup Setup which is an integer that will change 

the visibility of the popup message box. And the other variable is Page Setup which is a constant with a value of 60 corresponding to the setup page index. Going back to the message 

box popup screen, we can change the status data point in run time to the variable that we just defined, which is the popup setup variable. When we set it to “0” this message box 

will be visible, when it is set to “1” the message box will not be visible. 

In the display Init code we setup popup equal to “1”, making the message box invisible and display cyclic. Whenever the current page is the setup page, we set the popup setup 

variable equal to “0” making the message box visible. Going back to the message box screen, we are going to set the properties of the Yes button so that when the user clicks it, it 

will make the message box disappear. So we will set a data point, and that data point will be Popup Setup Variable, and we will set it to “1”. For the No button we will set the 

action of its key to change the page, and it will change the page back to the main page so that if they're not sure they want to open this screen, they will simply go back to the 

main page. 

I hope you have found this tutorial helpful, and I hope you continue using B&R Automation Studio.