IMDTouchKnowledge BaseShop main store

Explainer

How a WinCC Basic button changes screens in TIA Portal

HMI and touchscreens Published 7 min read By IMDTouch engineering team

Short answer

A WinCC Basic panel button changes screens by running a built-in screen-change system function such as ActivateScreen on a button event. The destination is a screen name in the HMI project, so no PLC tag or controller logic is involved. Add a tag only when the controller itself must request or track the screen.

On this page
  1. Events and functions: how the button does its job
  2. Where the PLC tag belongs instead
  3. Worked example: Home to Screen_1 on a 7-inch Basic panel in TIA Portal V13
  4. When a button changes nothing or the wrong screen
  5. The decision
  6. Questions asked

A button on a WinCC Basic panel changes screens by itself: select the button, open its event list, attach the built-in screen-change function — on Basic panels and Comfort panels that function is ActivateScreen — and set the destination to a screen name in the same HMI project. The PLC runs nothing for this. Screen navigation is an HMI action executed by the panel runtime, so no tag, output bit or controller logic is needed to go from Home to another screen.

That is the boundary that matters here. An HMI action is an operation the panel performs in response to an event, such as the operator touching a button. A PLC tag is data exchanged with the controller. Writing a machine command needs a tag; changing which screen is displayed does not. The rest of this article explains how the event-and-function mechanism works, where the PLC tag does become relevant, and what to check when a configured button does nothing at runtime.

Events and functions: how the button does its job #

Every HMI button carries a list of events, and each event can hold one or more system functions. On a touch panel one physical interaction produces several distinct events: the touch going down is the Press event, the touch lifting is the Release event, and a completed press-and-release counts as a Click. The screen change runs when the event you chose fires, so the whole navigation is defined by exactly two settings: which event, and which function with which destination.

The panel offers explicit and relative navigation. ActivateScreen opens the screen you name, regardless of how the operator arrived at the current screen. The panel libraries also offer functions that move to the next or previous screen in the project's screen order; those are history- and order-dependent. For a button that must always lead to one defined screen — Home to Screen_1, any screen back to Home — use the explicit form. A previous-screen function is not a Home command and should not be treated as one.

One warning worth keeping in mind from the event structure above: a single touch fires press, release and click in sequence. If you attach the same navigation function to two of those events on one button, one touch requests the same transition twice. Put the function on one event per button, and keep unrelated controller writes off that same event so the button's behavior stays diagnosable.

Where the PLC tag belongs instead #

A local button needs no tag, but the requirement sometimes runs the other way: the controller must tell the panel which screen to show, for instance when the machine's own sequence forces the operator to a diagnostic view. That is a different design, and there Siemens documents two accepted methods for WinCC in TIA Portal: create an Int screen-number tag in the controller, map it as an HMI tag, and run a screen-change function on that tag's change event; or use the job mailbox mechanism. Both live entirely on the HMI configuration side reacting to controller data, which is the mirror image of the button in this article.

So the decision rule is simple. Operator-driven navigation: button event plus ActivateScreen, no tag. Controller-driven navigation: screen-number tag with a change event, or a job mailbox. Mixed requirements get both mechanisms, each for the direction it serves. If you instead wire a PLC bit that the button sets and controller logic echoes back just to open a screen, you have added scan time, data exchange and a failure point for nothing. The same separation applies across tools — for the PLC-side variant in other software, the WinCC Flexible screen change from the PLC article shows what the controller-driven direction looks like when it is genuinely required.

One more consequence of the boundary: changing the button's caption text does not change its destination. Copying a button and editing its label leaves the original function and target intact, which is the classic cause of a button that promises one screen and opens another. After any copy, open the event list and confirm the configured target matches the caption.

Worked example: Home to Screen_1 on a 7-inch Basic panel in TIA Portal V13 #

The case is the common one: a 7-inch Basic panel connected to an S7-1200, engineered in TIA Portal V13, with an operator button on the Home screen that must open Screen_1. The inputs are the two project screens — Home and Screen_1, both created under that HMI device in the screens editor — and the button object already placed on Home. The screen names follow the naming style Siemens uses in its own ActivateScreen documentation, where a button click activates a screen named Screen_2; nothing else about the project matters for the mechanism.

The rule: attach ActivateScreen to one event of the Home button and set the destination to Screen_1. The steps in TIA Portal V13 are:

  1. Open the HMI device's screens editor and confirm Home and Screen_1 both exist under that panel, with distinguishable names.
  2. On the Home screen, select the actual button object — not a nearby text or graphic field — so the properties pane belongs to it.
  3. In the button's event configuration, the same pane where the library buttons expose their assignable actions, choose the Press event.
  4. Add the screen-change system function to that event and set its destination parameter to the project screen Screen_1. The destination is picked from the project's screen list; it is not typed free text and not a tag.
  5. Leave the Release and Click events empty for navigation, so one touch produces exactly one transition.
  6. Compile the HMI device, resolve any errors, then transfer the project to the panel in the normal way.

The verification: press the button once on the panel while the S7-1200 link carries process values as usual. Screen_1 opens, and the controller scan confirms that no output or memory bit moved — the transition never touched the PLC. If Screen_1 does not open at runtime even though the editor shows the assignment, compile and transfer status are the first suspects: an editor assignment proves nothing about the project running on the panel. If the wrong screen opens, the copied-button trap above is the next check. And the return path gets its own deliberate button: a button on Screen_1 whose event runs ActivateScreen targeting Home, so the operator always reaches Home regardless of the route.

When a button changes nothing or the wrong screen #

Three runtime symptoms cover nearly every case. A button that does nothing means the event carries no function, or the project on the panel predates the edit — recompile and re-transfer. A button that opens the wrong screen means a copied button kept its original destination, or the destination was never explicitly set and a relative function is doing something order-dependent. A button that opens the right screen twice in a row or flickers means the navigation function sits on more than one event of the same button.

Slow or erratic screen changes, once the configuration itself is proven correct, point at the connection rather than the button — a comms fault can stall the runtime's screen handling, and deliberately lengthening the system event display time is one way to make those faults visible at the panel, as described in the article on HMI system event display duration. For the specific case of runtime clients that change screens slowly on a working link, the causes are documented separately in the WinCC RT Professional slow screen change article; that variant applies to PC runtime rather than a Basic panel, but the diagnostic habit is the same.

The decision #

Operator presses a button to move between screens: attach ActivateScreen to a single Press event with an explicit destination screen, and do not create a PLC tag for it. Controller must drive the screen: use the screen-number tag with a change-event function or the job mailbox, and leave the buttons out of that path. Both requirements at once: both mechanisms, each in its own direction. Any copied navigation button: open its event list and confirm the destination before trusting the caption.

Questions asked

Does a screen-change button need a PLC variable on a Basic panel?

No. The screen change is executed by the panel runtime as an HMI action, so the destination screen name is stored in the HMI project and the PLC never sees it. A PLC tag enters the design only when the controller must request a screen change itself, for example through a screen-number tag on a tag-change event or through a job mailbox. For a plain operator button, adding a tag adds data exchange without any function.

Should the navigation function sit on the Press event or the Click event?

Either works for a screen change, but pick one event per button and stay consistent. The distinction matters because one physical touch generates a press, then a release, then the interpreted click; if the same navigation function is attached to more than one of these events, one touch can request the same transition twice. On a touch panel, Press is the earliest unambiguous moment and is a common choice for navigation buttons.

What is the difference between ActivateScreen and next-screen or previous-screen functions?

ActivateScreen opens the screen you name explicitly, so the result does not depend on the route the operator took to reach the current screen. Relative functions open the screen before or after the current one in the project's screen order, so the outcome depends on history. Use ActivateScreen when a button must always lead to one defined screen, such as Home; use relative navigation only where a true sequence is intended.

Keep reading

  • How-to

    Set an Idle Screen Timeout That Returns to the Main Page

    The EA9 has no screen-timeout setting: build the idle return from the panel's user-inactivity system tags. Set an Event Manager event on the inactive-minute count with the limits changed to equals and a Screen Change action to the main page, or let an on-delay timer in the PLC write the home screen number to the change-screen command word. Pick the PLC route when the period must be adjustable or bypassed at runtime.

    HMI and touchscreens

  • Troubleshooting

    HMI Function Key Does the Wrong Action: Find the Hidden Object

    When an HMI function key performs an action you never assigned, the assignment exists in the project. On the affected screen, ungroup the visible artwork, move the static bitmap aside and inspect the concealed pushbutton: it carries its own function-key number and screen-change action. The simulator is reproducing the project faithfully; remove or reassign the hidden object, then put navigation on the function bar on a non-touch panel.

    HMI and touchscreens

  • How-to

    How to Manage WinCC Runtime User Accounts and Password Changes

    Open the WinCC User Administrator at runtime by launching PassCS.exe from a button with a ProgramExecute C action, using the full installed path C:\Program Files\Siemens\WinCC\bin\PassCS.exe. Gate the button with an authorization, and keep operator login, own-password change, and account administration as three separately tested operations. Comfort and Advanced panels are administered in the engineering tool instead.

    HMI and touchscreens

Fixing a WinCC Comfort license not valid error in TIA Portal V11 SP2