Displaying Visualizations in a Visualization¶
You can display visualizations within a main visualization by adding either the element Frame or the element Tab control. They serve as the window area element for the referenced visualizations and define the display area. In addition, they specify which visualizations are referenced. They appear under the property References.
In the case of the element Frame, the visualizations can be displayed in succession in the window area and can be toggled. The variables of the property control which visualization is displayed and when. For this you program the variables in the application or in the user input configuration. However, you can only reference one visualization.
In the case of the element Tab control you assign several visualizations to the property References. One of the referenced visualizations is in the foreground, while the others are hidden “behind it”. The user can navigate between them using the automatically available tabs.
Referencing a visualization in a frame
Select the application in the device tree and add a further visualization with the name
visFrame
.- ⇒
The visualization editor opens.
Search for
visEllipse
in the view ToolBox and drag the element into the editor.- ⇒
A frame appears under whose property References the visualization
visEllipse
is listed.
Configure the property Show frame with Frame.
You can add further elements.
- ⇒
Select
for your device and start the application.- ⇒
The visualization opens and displays the referenced visualization.
See also
Referencing visualizations in a frame and toggling them
Select the application in the device tree and add a further visualization with the name
visMain
.- ⇒
The visualization editor opens.
Select the element Frame from the view ToolBox and drag it into the editor.
- ⇒
The dialog Frame Configuration opens.
Double-click on one of the visualizations listed under Available Visualizations. Example:
visEllipse
.- ⇒
The visualization appears under Selected Visualizations.
Select further visualizations:
visRectangle
andvisRoundedRectangle
.- ⇒
The visualizations also appear under Selected Visualizations. The visualizations are automatically numerically indexed via the order in the list.
Exit the dialog with OK.
- ⇒
The visualization contains a new element of the type Frame. The 3 selected visualizations appear under its property References.
In the editor the frame is displayed as a frame in which the visualization is displayed with the index
0
.
Declare a switch frame variable in the application code:
PROGRAM PLC_PRG
VAR
uiSwitch : UINT;
END_VAR
Select the frame and assign the variables in its property Switch frame variable:
PLC_PRG.uiSwitch
Drag an element Button into the editor and enter a label in its property Text:
Next visualization
Click on Configure under the property Input Configuration, OnMouseDown.
Select Execute ST-Code and click on
.
Enter the following code:
PLC_PRG.uiSwitch := (PLC_PRG.uiSwitch + 1) MOD 3;
- ⇒
The switch frame variable of the frame is incremented on the click event.
Select the menu command
.Select
for your device and start the application.- ⇒
The visualization starts. It contains a frame in which one of the referenced visualizations is running. On clicking on the button, the visualization toggles the content in the frame to the next referenced visualization.
See also
Displaying visualizations in a tab control
Select the application in the device tree and add a further visualization with the name
visTab
.- ⇒
The visualization editor opens.
Select the element Tab controlfrom the view ToolBox and drag it into the editor.
- ⇒
The dialog Frame Configuration opens.
Double-click on one of the visualizations listed under Available Visualizations. Example:
visEllipse
.- ⇒
The visualization appears under Selected Visualizations.
Select further visualizations:
visRectangle
andvisRoundedRectangle
.- ⇒
The visualizations also appear under Selected Visualizations. The visualizations are automatically numerically indexed via the order in the list.
Exit the dialog with OK.
- ⇒
The visualization contains a new element of the type Tab control. The 3 selected visualizations appear under its property References.
In the property
, enter a suitable one:1
,2
and3
- ⇒
The heading appears in the editor and on the tabs of the tab control.
Select the menu command
.Select
for your device and start the application.- ⇒
The visualization starts. It contains a tab for each referenced visualization. Clicking on the tab causes the visualization to display the next referenced visualization.
See also