Elements for image navigation
We have already learned about the most important elements for screen navigation:
- Screens - images, have an index and can be created and edited via the project tree
- Window - pop-up windows, have an index and can be created and edited via the project tree
- Jump Screen - a button that can be used to select a screen
- Window call - an invisible event that calls up a pop-up window at a defined position
- Window Button - a button that calls up a pop-up window at a defined location
- Function Field - with which, among other things, screen changes can be linked to a trigger event
Creating a navigation
We now want to apply what we have learned and set up a small navigation. First, we rename our first screen to Main Screen by double-clicking in the project tree. Now we create two new screens by right-clicking on Screen: Parameter and Trend. In the main screen, we add a time and date at the top and any heading as text. Now we add a screen jump button to screen 1 at the bottom and call this the main screen. We change the width to 180, copy paste this button, configure the second button so that it opens Screen 2 and call it Parameter. We place it next to the main screen button. Now we do the same for a third button Trend for Screen 3.
We then use Shift and mouse to select all elements on the screen and make them "public objects". The button for setting the Public property is the first symbol in the Operate menu, a circle with symbols. Our navigation is ready. It is now available on all screens.
Creating a valve control mask as a pop-up window
We will now create a simple valve control screen with indirect addressing. To do this, we use internal variables for testing. We first create a valve that we connect to PSB1001 and a second one that we connect to PSB1002 and position them on the right-hand side. We then right-click on Window in the project tree to create a new pop-up window, which we call Valve. We give it a heading using text and name it Valve. Now we add a Lamp button, which we reference to PSB1000 with indirect pointer PSW1000. Now we add a digital display on PSW1000 next to our text valve so that we know which valve we are controlling. Finally, we add a Window button, which we call Close and which closes Window 1.
Now we just have to implement the call from the main screen. To do this, we add a Function button there, which we describe as Valve 1. We add the following actions to this button: with Set Data we write 1 to PSW 1000. With Open Window we open Window 1. Note: under Position we specify the position at which the window appears. The X position is the position for the left edge of the window (0 is not on the far left, but as far as possible for windows) and Attention Y is the position of the window center. You should also select Lock here, as otherwise this value will be changed each time the button is moved. For both actions, you use the Pressing button event (an edge on the button, the Pressed event would execute the action permanently as long as the button is pressed, the same for Releasing and Released as a negative edge or opener). Our simple valve control with indirect addressing is ready.
Opening images and pop-up windows by event
Navigation and pop-up windows can be opened and closed automatically using a function field with any trigger and the actions Screen Jump, Window Open and Window Close. Another tip: in the Open Window menu, you can select whether the pop-up windows appear as Show (visible) or Hide (invisible). With Hide you can create invisible windows that can still be operated. This is probably not very useful as an overlay. Tip: If you want an event to work on all screens, you can simply declare it as "Public".
Superordinate navigation via the panel settings
Navigation can also be implemented in the panel settings in the "File" "Setting" menu in the "Alternation" tab. Change Screen Control can be used to trigger a screen change via a tab in the PLC. The number of the current screen can also be reported to the PLC via Current Screen ID.
In the next chapter, we will look at trends and tables.