Guide: Performance Optimization For The Galileo 10 Runtime System
Guide: Performance Optimization For The Galileo 10 Runtime System
Revision History
Table Of Contents
1 Introduction........................................................................................................................................3
1.1 Purpose .....................................................................................................................................3
1.2 Terms ........................................................................................................................................3
1.3 References ................................................................................................................................3
2 Overview of specific performance problems .................................................................................4
3 Issues .................................................................................................................................................4
3.1 Large initialization script ............................................................................................................4
3.2 Large background images ........................................................................................................6
3.3 Overlapping controls .................................................................................................................7
3.4 Controls with transparencies .....................................................................................................9
3.5 Inaccessible pattern “Chessboard” .........................................................................................11
3.6 Entry script execution ..............................................................................................................12
3.7 Complex calculations in loop scripts .......................................................................................12
3.8 Permanent communication takes too much performance ......................................................13
3.9 Huge recipes ...........................................................................................................................13
3.10 Unused graph blocks ..............................................................................................................14
3.11 Minimal available free memory ...............................................................................................14
3.12 Overlapping controls check .....................................................................................................15
1 Introduction
Galileo offers customers great freedom and flexibility to create their own visualization. However, some
constellations and conditions could lead to loss in performance on the Galileo Runtime System. The im-
pacts could be: Slow screen changes, slow screen refreshes after some values have changed, communi-
cation to/from PLC is delayed, and so on. This especially affects less performant device families like XV-
400 and XV-100 while XV-300 and Galileo Open/Win32 usually have enough performance so it is not
needed to optimize anything.
Often, the root cause of performance problems can be eliminated easily by following a few rules.
1.1 Purpose
This document gives an overview of some issues causing possibly performance problems and also
shows how to solve them.
Because different issues can be responsible for multiple performance problems, the document is struc-
tured as follows:
- Chapter 2 gives an overview of possible performance problems and lists the issues, which could
cause them
- Chapter 3 describes the different issues, together with possible solutions to solve them
1.2 Terms
DT (or Galileo DT)
The Galileo Design Tool: The application for creating the visualization running on the PC
GRS
Galileo Runtime System: The application running on a panel, showing the visualization
PLC
Programmable Logic Controller
1.3 References
For further information see the help documentation included in every Galileo setup.
3 Issues
Having defined it this way, GRS needs to evaluate the script content on every change to this screen.
Evaluating a script means for example, read all the tags used in the script synchronously from the PLC.
From Galileo 10.1.8 on, there’s a better way to accomplish this task. In the “Project Settings” dialog on
the “Runtime” tab you will find the setting “Startup Script”. Reference an initialization script there instead
as the “Entry Script” on a “Start Screen”:
An additional advantage of this solution is, that you no longer have to setup an “initialize once” construct
in the script in the type of:
if (isInit == FALSE)
...
isInit := TRUE;
endif
Bad Good
- Gray background image with logo on the - Background color “Gray” set on screen
bottom right corner properties
- Logo placed as single, small image at the
bottom right corner
The reasons to not use large background images, are the following:
Drawing controls on the screen (especially if they have transparencies within them) causes also a redraw-
ing of the area (and the control(s)) laying behind them. In case of a large, maybe full screen size filling
image, this can be time consuming if the image needs to be loaded again from the storage device.
Example:
A bad example:
The image area over-
laps the button. Every
“Value Displays” overlap time the button gets
each other. Changing one pressed, the image
value causes the neigh- needs to be redrawn.
bor(s) to redraw as well.
Better:
The image is placed next
to the “Button”.
“Value Displays”
placed next to each
other.
“Value Displays”
are placed outside
of the “Graph”
control.
Bad example:
“Button” with a
graphic having
rounded rectangles
as background.
“Graph” having
“Bargraph” having transparent back-
transparent back- ground and chart
ground color color
Better:
“Button” with a
graphic having no
transparencies as
background.
If this requirement is fulfilled or the possible effects are bearable, you can enable the option “Delayed
Entry Script Execution” in the dialog “Project Settings”:
Increasing the time gives the visualization more time for drawing and handling background stuff but val-
ues from the PLC will be updated less frequently.
The default value is 50ms.
To avoid this behavior, the parameter “CreateGraphBufferOnDemand” can be set in the “Advanced Set-
tings” page in the “Project Settings” dialog.
For every graph block, you can define whether its memory buffer should be created on startup (value 1)
or on demand (value 0).
The order of the graph blocks corresponds with the graph block IDs. Lowest ID represents the first entry,
second lowest the second entry and so on.
The disadvantage of setting a graph block setting to “0” is, that on first use of a graph, some extra time is
needed to reserve the memory and therefore the starting of the graph recording could be delayed.
Therefore, this check can be adjusted to three options (use the appropriate value in the configuration):
1= Full overlap check (default): every object is checked whether it is overlapped
2= Overlapped by keyboard only: Check an object whether a keyboard is opened and overlapping
(reduces checks)
3= Disable all checks