How to Fix Incorrect Scaling of Objects in your Simulated HMI Runtime
Jun 16, 2023
I recently had a really interesting question from a student who was going through my HMI course.
He asked me: Why does the HMI runtime simulation (S7-PLCSIM) of the sample application display incorrectly scaled graphics and text objects. All the screens in his TIA Portal HMI application (programming environment) were correct, only the simulation was totally off.
He also send me the picture below to prove his point:
And he was off course 100% right. The scaling looks totally off (By the way, this happened after he converted the sample application from TIA V14 to TIA V17).
I told him I would get him an answer fast and (to my own surprise) I did!
What I found out was is that this scaling issue is directly related to a display setting in Windows.
In Windows under 'Display settings' (right click anywhere on your desktop to get the link), you can define under 'Scale and layout' the size of text, apps and other items.
If this parameter is set to anything else than 100%, you can have those incorrectly scaled objects in your HMI runtime simulation.
So if you're facing this problem, check the value for this Windows display setting, and revert it to 100% if it is set to anything else.
This is what the runtime simulation looked like after changing the setting back to 100%:
All objects - graphics, texts etc... - were displayed correctly. No changes in TIA Portal were needed.
I hope this information is useful to someone out there!
-Hans
Download yourĀ FREEĀ GUIDEĀ NOW!
5 Simple Steps to Drastically Improve your PLC Program Structure in TIA Portal by Hans Schrynemakers
This is one of my most popular guides, and Iām happy to share it with you for free! Inside, you'll learn about:
- The #1 Way to Eliminate Messy PLC Programming in Just 5 Easy Steps!
- The Proven Method for Building Scalable, Future-Ready PLC Applications in TIA Portal.
- Discover How Modular Design and Structured Data Can Eliminate Costly Errors and Downtime.
- Break Free from Unstructured Programming - Build Clear, Modular TIA Portal Applications with Confidence.
- Master the Techniques that Separate Amateur PLC Programmers from Professionals.