Change KTP600 BASIC Screen from S7-1200 PLC in TIA Portal V11

David Krause21 min read
SiemensTIA PortalTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Change KTP600 BASIC Screen from S7-1200 PLC in TIA Portal V11

Overview

Forcing an HMI screen change from the PLC is a common requirement on small automation cells where the controller must drive a wizard, a maintenance view, or a forced recalibration page. On the Siemens SIMATIC platform, this is a two-step process: the PLC holds a trigger value, and the WinCC Basic runtime on the KTP panel reads it via a configured HMI tag and reacts to the value change by calling a built-in system function that activates the new screen.

The procedure covered here targets a SIMATIC S7-1200 CPU 1212 (firmware V3.0 or V4.x) and a KTP600 BASIC Mono or Color PN panel (WinCC Basic V11.0 or higher). The technique works for all KTP400 Basic, KTP600 Basic, KTP1000 Basic, and TP1500 Basic panels under the same firmware line, so the same steps apply if the panel model changes. The same engineering pattern also carries over to TIA Portal V12, V13, V14, and V15 projects for the same hardware, with only the screen-name lookup path changing in newer releases.

This article answers three questions that come up in the field:

  1. How to make the screen change happen automatically when the S7-1200 transitions from STOP to RUN, including the case where the power was not cycled.
  2. Why writing to the default panel tag (the screen-number system variable) from the PLC does not produce a reliable screen switch and what to use instead.
  3. How to fire the screen change on the rising edge of a Boolean tag rather than on every change.
Note: KTP600 BASIC panels run WinCC Basic, not WinCC Comfort. The system function name and the area-pointer support are different. Do not copy configuration steps from Comfort panel manuals without translation.

Prerequisites and Reference Documentation

Before starting, verify that the following items are installed, configured, and tested. The S7-1200 system manual and the KTP600 Basic operating instructions are the authoritative references for hardware setup and are available on the Siemens Industry Online Support portal.

Item Requirement Notes
Engineering software TIA Portal V11.0, V11 SP1, or V11 SP2 WinCC V11 Basic must be installed with the TIA Portal setup. SP2 is recommended for the final bug fixes.
PLC SIMATIC S7-1200 CPU 1212 (e.g. 6ES7 212-1AD30-0XB0, 6ES7 212-1AE31-0XB0, 6ES7 212-1BE31-0XB0) Firmware V3.0 minimum. V4.x is the most common in 2012+ deployments.
HMI panel KTP600 BASIC Mono PN (6AV6 647-0AB11-3AX0) or KTP600 BASIC Color PN (6AV6 647-0AC11-3AX0) Target WinCC Basic V11 runtime. Image ≥ V11.0.2.0 recommended for stable event handling.
PROFINET connection S7-1200 and KTP600 connected to the same subnet Use the integrated PN port on the CPU and the PN port on the panel. A switch is optional but recommended for live diagnostics.
Configuration loaded PLC and HMI projects compiled and downloaded without errors Resolve all compile errors first. A working baseline is required before adding the trigger tag.
Engineering access Project editor and online access to both devices Use the same TIA Portal project on a single engineering station to keep tag references coherent.

Useful external references:

System Architecture and PROFINET Topology

The S7-1200 PLC is the server, and the KTP600 BASIC panel is the HMI client. Communication runs over PROFINET (S7 connection) using the integrated PN interfaces. The PLC exposes a trigger tag in a data block or in the bit memory area; the HMI project contains a matching external HMI tag pointing to that PLC tag. The HMI runtime polls the tag on a configurable update cycle and fires the "Value change" event when the value changes.

The internal data flow is:

PLC tag (DBW or MW) → S7 connection over PROFINET → HMI tag (Cyclic continuous) → Value change event → system function ActivateScreen / Change Screen → screen switch.
S7-1200 CPU 1212 192.168.0.1 Wizard_DB.WizardScreen PROFINET server KTP600 BASIC 192.168.0.10 HMI_WizardScreen WinCC Basic V11 1. Poll 2. Update 3. ActivateScreen PROFINET switch

A common mistake is to write directly to the panel's internal system tag for the current screen number (sometimes referred to as Tag_ScreenNumber in older documentation). That tag is maintained by the HMI runtime itself; the runtime overwrites it whenever the user navigates or whenever a screen change is processed, so a value written by the PLC is generally overwritten by the runtime before it is acted upon. A dedicated external HMI tag polled by the runtime is the reliable path.

Configuring the S7 Connection in TIA Portal V11

Before the trigger tag can be read by the panel, the S7 connection between the CPU and the HMI must exist in the project. KTP600 BASIC uses an S7 connection over PROFINET, not an HTTP or OPC UA connection, and the connection is configured once per project.

  1. Open the project in TIA Portal V11 and switch to "Devices & networks".
  2. Drag the S7-1200 CPU and the KTP600 HMI from the hardware catalog into the network view.
  3. Select the PROFINET port of the CPU and draw a connection to the PROFINET port of the HMI. A line is drawn between the two devices representing the PROFINET subnet.
  4. Click the connection line and assign it the type "S7 connection". The "Connection" path is added to both devices.
  5. Double-click the CPU and verify the IP address (default 192.168.0.1, mask 255.255.255.0).
  6. Double-click the HMI and assign IP 192.168.0.10, mask 255.255.255.0. The PROFINET device name of the panel must be unique in the subnet and match the device name configured on the panel under "Settings > PROFINET".
  7. Save and compile the network configuration. The connection ID is assigned automatically (typically ID 1 on the HMI side).

If the connection is missing or shows a red X, the HMI tag cannot be polled and the value change event will never fire. Always verify the connection status under "Online > Accessible devices" before debugging the tag configuration.

Step 1: Define a PLC Trigger Tag on the S7-1200

Add a tag of type INT in a global data block, or use a free word in the bit memory area. A data block is preferred because it survives a download to the S7-1200 and can be protected against accidental write from HMI using the data block access rights.

Name Type Address Initial value Comment
WizardScreen INT DB1.DBW0 1 Screen number to be forced by the PLC. 0 = no forced change.
WizardTrigger BOOL DB1.DBX2.0 FALSE Optional rising-edge trigger for the wizard sequence.
WizardDone BOOL DB1.DBX2.1 FALSE Set by the wizard screen when calibration is complete.
WizardReq BOOL DB1.DBX2.2 FALSE Operator request to enter the wizard from a button or area.

To create the data block in TIA Portal V11:

  1. Open the S7-1200 device view and switch to the project tree.
  2. Expand "Program blocks" and add a new block of type "DB" (global data block) with name "Wizard_DB". Disable optimized block access if the project was created with optimized blocks and the HMI needs symbolic access (Basic panels do not support optimized block access in V11).
  3. Double-click the data block to open the declaration table.
  4. Add the tags above with their data types and comments.
  5. Save and compile the PLC program.
Note: HMI tags in WinCC Basic V11 cannot access optimized data blocks. If the project uses symbolic-only access (optimized), the HMI tag connection to the PLC tag fails silently at compile time. Either keep the data block as standard (non-optimized) or expose the tag through a separate non-optimized block.

Step 2: Create the HMI Tag in the WinCC Project

The HMI tag is the bridge between the PLC and the runtime. It must be an external tag and the acquisition mode must be set to "Cyclic continuous" so that the runtime polls the PLC on every cycle and fires the "Value change" event when the value updates.

  1. In the project tree, expand the KTP600 HMI device and open "HMI tags".
  2. Double-click "Add new" to insert a new tag row.
  3. Configure the following parameters:
    Field Value
    Name HMI_WizardScreen
    Connection The existing S7-1200 PROFINET connection
    PLC tag Browse to Wizard_DB.WizardScreen
    Data type INT
    Acquisition mode Cyclic continuous
    Update time 1 s
  4. Save the project and recompile the HMI device.

If the connection is missing, create it first under "Devices & networks" with the HMI as the S7 client and the S7-1200 CPU as the server. Use the IP addresses of the controller and the panel as configured in the device configuration. The connection ID is assigned by the system; it does not have to be 1 in every project.

Step 3: Configure the Acquisition Mode

In WinCC Basic V11, three acquisition modes are available on every external HMI tag. The mode drives the visibility of the value change event.

Acquisition mode Behavior Use case
Cyclic continuous Runtime polls the PLC on every cycle for the lifetime of the HMI connection. Default and required for trigger tags that drive background events such as screen changes.
Cyclic in operation Runtime polls only while a screen showing the tag is active. Saves bandwidth for tags used on a single screen; not suitable for trigger tags.
On demand Runtime polls only when an active element (script, animation) accesses the tag. Use for diagnostic tags read rarely or only by a script.

For screen change events, Cyclic continuous is required. If the tag is polled only "On demand" or only when its screen is visible, the runtime misses the transition that happened in the background and the wizard screen does not appear.

The update time on a KTP600 BASIC panel is limited to 250 ms as the practical minimum. A 1 s update time is sufficient for wizard flows and matches the default value used by the panel runtime. Lower update times increase PROFINET traffic and are not required for navigation triggers. If a value below 250 ms is configured in TIA Portal V11, the runtime coerces it to 250 ms without warning.

Step 4: Bind the Value Change Event to the Screen Change Function

The "Value change" event is the trigger that executes the system function. Configure it directly on the HMI tag in the inspector window.

  1. In the HMI tag editor, select the HMI_WizardScreen tag.
  2. In the inspector window, switch to the "Events" tab.
  3. Under "Value change", click "<Add function>".
  4. From the system function list, select ActivateScreen (also labelled "Change Screen" or "Bild wechseln" depending on the localization).
  5. For the "Screen name" or "Screen number" parameter, select the HMI tag HMI_WizardScreen itself, so that the new value of the tag becomes the new screen number.
  6. Compile the HMI project.

The runtime behavior is now: when the PLC writes a new value to WizardScreen, the polled HMI tag updates, the value-change event fires, and ActivateScreen switches the panel to the screen whose number matches the new value.

Operator / System S7-1200 HMI Tag WinCC Runtime PLC: STOP -> RUN OB100 writes WizardScreen := 5 Polled update (Cyclic continuous) Value change event ActivateScreen(5) t = 0 t = 1.2 s (worst case)

Step 5: Force the Trigger on STOP → RUN Using OB100

OB100 is the startup organization block of the S7-1200. It executes on every transition into RUN, including power on, STOP → RUN, restart after download, and memory reset. This makes it the correct place to write a one-shot value into the trigger tag so that the HMI is forced into the wizard screen regardless of the prior state.

Example program for OB100 (Structured Text, TIA Portal V11):

// One-shot wizard trigger on every startup
IF "Wizard_DB".WizardScreen = 0 THEN
    "Wizard_DB".WizardScreen := 5;     // Wizard screen number
END_IF;

Ladder alternative for OB100:

|---[ WizardScreen = 0 ]---( MOVE 5 -> WizardScreen )---|

The HMI tag is polled by the runtime, the value changes from its prior state (typically 1, the start screen) to 5, the value-change event fires, and the panel switches to screen 5. The operator cannot bypass the wizard unless the PLC clears WizardScreen to 0 explicitly after the user has completed the calibration sequence.

If the wizard is also required when the operator presses a physical "Recalibrate" button on the machine, do not duplicate the OB100 logic into a regular input. Use the same data block tag and only set WizardScreen from a rising edge in OB1, so that both the startup path and the operator-button path go through the same value-change event.

Note: OB100 executes once per RUN transition. If the PLC stays in RUN continuously and the operator cycles the HMI runtime, OB100 does not re-execute. To re-trigger on HMI restart, drive the value from a tag the HMI writes to the PLC on its own startup, or include a second trigger source in the project.

Step 6: Positive Edge Detection on Boolean Tags

A common field question is: how do I change the screen on the rising edge of a Boolean (false to true) and not on the falling edge (true to false)?

In WinCC Basic, the "Value change" event fires on any change. There is no direct "rising edge" event available on HMI tags. Three workarounds are used in production:

  1. Use an INT counter, not a Boolean. Increment the counter in OB100 or in OB1 on the rising edge of the source boolean. The value change event fires on the increment; clear the counter inside the wizard screen or via a separate WizardDone tag.
  2. Use a one-shot pattern. Maintain a WizardRequest input from the operator and a WizardAck tag (set by the wizard screen when the user finishes). Only set WizardScreen when WizardRequest is true and WizardAck is false. Reset WizardAck only after the operator exits the wizard.
  3. Use a Boolean pair as a handshake. WizardReq is set by the source; the screen-change event calls a script that evaluates the previous value, written back from the HMI to the PLC. If the previous value was 0, the screen changes and the PLC clears WizardReq.

The handshake pattern is the most reliable on KTP600 BASIC because it survives HMI runtime restarts and does not require scripting:

// OB1 - rising edge detection on WizardReq
"Wizard_DB".WizardTrigger := "Wizard_DB".WizardReq AND NOT "Wizard_DB".WizardReqOld;
"Wizard_DB".WizardReqOld  := "Wizard_DB".WizardReq;

IF "Wizard_DB".WizardTrigger THEN
    IF "Wizard_DB".WizardScreen = 0 THEN
        "Wizard_DB".WizardScreen := 5;  // forced wizard screen
    END_IF;
    "Wizard_DB".WizardTrigger := FALSE;
END_IF;

The "Value change" event on the HMI tag fires when WizardScreen moves from its previous value to 5. The wizard screen sets WizardDone when the operator completes the calibration, and OB1 clears WizardScreen back to 0 on the next cycle.

Step 7: Build, Compile, Download, and Verify

  1. Right-click the S7-1200 device and select "Compile > Hardware and software (rebuild all)". Resolve every error and warning related to Wizard_DB and the S7 connection.
  2. Right-click the KTP600 device and select "Compile > Software (rebuild all)". Resolve every error and warning related to HMI_WizardScreen and the Value change event.
  3. Download the PLC project to the S7-1200. If the CPU was in RUN, accept the STOP → RUN transition to start fresh.
  4. Download the HMI project to the KTP600. Use "Ethernet" transfer with the panel IP address 192.168.0.10. The transfer protocol is HTTPS on port 443 in TIA Portal V11 with default settings.
  5. Restart the HMI runtime from the panel's Service menu or via the TIA Portal "Online > HMI Operator Panel > Restart Runtime".
  6. Run the verification sequence below.

Verification Procedure

  1. Place the panel on the start screen (screen 1).
  2. From the TIA Portal watch table, force the trigger tag to 0.
  3. Toggle the S7-1200 to STOP and back to RUN. OB100 executes and writes the wizard screen number.
  4. Within one HMI update cycle (≤ 1 s on KTP600 BASIC), the panel must switch to the wizard screen.
  5. Complete the wizard. The wizard screen sets WizardDone.
  6. OB1 sees WizardDone and resets WizardScreen to 0.
  7. Cycle the PLC again. The screen must switch back to the wizard screen, confirming that the one-shot works on every transition.

Add a permanent visibility on the HMI tag value to the start screen as a debugging aid, with a text field bound to HMI_WizardScreen and a fixed output format of "Wizard req: {0}". The text field updates in real time and confirms the value change is being received from the PLC.

Troubleshooting Matrix

Symptom Likely cause Diagnostic Resolution
Screen does not change when PLC writes the tag. HMI tag is configured "On demand" or "Cyclic in operation". Open the HMI tag, check the "Acquisition mode" column in the tag editor. Set to "Cyclic continuous".
Screen changes once and never again. Tag is linked to a Bit Memory word that is overwritten by the HMI runtime on the same cycle. Watch the tag in the PLC online monitor. Move the tag to a data block and exclude the HMI from writing it.
Screen changes for both rising and falling edges. Boolean tag is used directly with "Value change". Inspect the tag type in the HMI tag editor. Use the rising-edge handshake pattern described above.
Wizard screen not forced on STOP → RUN. OB100 is not present in the PLC program. Open "Program blocks" in the project tree. Add OB100 and write the trigger tag inside it.
Compiler reports "Tag used by system and by user". An HMI internal system tag was reused for the screen number. Check the name in the HMI tag table. Use a project-defined tag, not a reserved system tag.
Screen flickers between two values. Two HMI tags write to the same PLC word at different rates. Search the HMI project for duplicate connections. Use a single source of truth on the PLC side.
OB100 runs but the panel does not switch. Update time on the HMI tag is too long (e.g. 5 s). Inspector > Properties > Update time. Set update time to 1 s for the trigger tag.
Connection status shows red in TIA Portal. PROFINET device name mismatch. Compare the device name in TIA Portal and on the panel under "Settings > PROFINET". Set the same name on both ends and re-download.
Screen number parameter is empty in the function list. Compile error on the HMI tag prevents parameter binding. Open the inspector for the function and check the parameter field. Recompile the HMI and re-bind the parameter.

Advanced Pattern: Multi-Screen Wizard and Forced Calibration

A practical application is a multi-step calibration wizard where the PLC advances the screen number on confirmation of each step. The pattern is:

  1. The PLC holds a state variable WizardStep (INT) in the data block.
  2. The HMI tag HMI_WizardStep is bound to the PLC tag and configured with "Cyclic continuous" and a "Value change" event calling ActivateScreen.
  3. The wizard screen contains a "Next" button that sets a WizardStepNext tag in the PLC.
  4. OB1 detects the rising edge of WizardStepNext, increments WizardStep, and clears the trigger.
  5. The HMI sees the new value, the value change event fires, and the panel advances to the next screen.
Idle Step 1 Screen 5 Step 2 Screen 6 Step 3 Screen 7 Done OB100 Next Next Done

For the calibration use case, the same state machine is also valid for a "Return to start" requirement. Setting WizardStep to 1 in OB100 forces the operator to redo the wizard on every PLC restart, which is the intended safety behavior on restart of a safety-related machine.

If the operator must be allowed to navigate away from the wizard after a power cycle, do not rely on OB100. Use a WizardEnabled BOOL that the operator can clear from a privileged screen, and gate the OB100 logic on WizardEnabled. The "Value change" event still fires because the underlying tag value changes when WizardEnabled is cleared by the operator later in the session.

Performance, Polling, and Cycle Time Considerations

The update time of the trigger tag has a direct impact on the maximum delay between the PLC writing the value and the panel switching screens. With the default 1 s update time, the worst-case delay is one update period plus the runtime reaction time, which is typically below 200 ms on KTP600 BASIC. The visible response time on the operator panel is therefore ~1.2 s, which is acceptable for a wizard or recalibration page.

Lowering the update time to 250 ms reduces the worst-case delay to ~450 ms but doubles the PROFINET traffic for that single tag. On a KTP600 BASIC panel, the practical lower bound is 250 ms because the panel's internal scheduler runs the tag acquisition on a 250 ms tick. Values below 250 ms are accepted by the configuration tool but coerced to 250 ms at runtime.

If the application requires deterministic screen change within 100 ms, the solution is not to reduce the HMI update time but to use an HMI function triggered by an area pointer or by a job mailbox from the PLC. KTP600 BASIC does not support area pointers for screen changes; in that case, upgrade to a Comfort panel (KTP1200 Comfort or TP1500 Comfort) and use the screen-number pointer from the PLC.

The PROFINET cycle is independent of the HMI update time. The S7-1200 sends updates on the configured PROFINET update interval (default 1 ms on integrated PN, often set to 2 ms in field projects to leave headroom). The HMI update time is the interval at which the runtime asks the PLC for the tag value, not the cycle of the underlying fieldbus. Do not confuse the two when sizing the network.

Security, Access Control, and Audit Trail

Forcing a calibration screen on every startup implies that the operator cannot skip the procedure. To make the enforcement robust, the PLC must be the single source of truth for the screen state. The HMI should not be allowed to write back to WizardScreen; the access rights of the data block must be set to read-only for the HMI connection.

In TIA Portal V11, configure the DB access rights under the data block properties > "Access" so that the HMI is read-only. The "WizardDone" tag is the only one that the HMI is allowed to write, and it is the only tag the wizard screen uses to signal completion. This prevents an operator from using the HMI to overwrite WizardScreen and bypass the wizard.

For audit trail, log WizardScreen and WizardDone on every transition in the PLC data block using a small ring buffer in a separate data block. Basic panels do not have an integrated audit log; the PLC-side buffer is the only persistent record. A Comfort panel with WinCC Comfort/Advanced audit option can produce a fully signed audit trail, but that requires hardware and runtime upgrades beyond the scope of this article.

Migration Notes: From KTP600 BASIC to Comfort Panels

If the project is migrated from TIA Portal V11 to V13, V14, or V15 with the same hardware, the configuration transfers without changes. If the panel is replaced with a Comfort panel (KTP1200 Comfort, TP1500 Comfort, TP1900 Comfort, TP2200 Comfort), the same HMI tag and the same Value change event work, and an additional capability becomes available: a screen-number area pointer.

The screen-number area pointer is a fixed-size data area in the PLC (typically a word) that the Comfort panel polls at the configured acquisition cycle. The Comfort panel activates the screen whose number is written in the area pointer, with no need for an HMI tag and no need for the ActivateScreen system function. The response time is in the order of 100 ms with the default acquisition cycle of 500 ms.

For new projects on S7-1200 with a Comfort panel, the area-pointer approach is preferred over the HMI tag approach because it is faster, deterministic, and does not consume HMI tags. For Basic panels, the HMI tag approach described in this article is the only option in WinCC Basic V11.

Frequently Asked Questions

Why does writing to the panel's default screen-number tag not work reliably?

The default screen-number variable is an internal system tag of the HMI runtime. The runtime overwrites it on every navigation, so a value written by the PLC is generally overwritten before it is acted on. Use a project-defined HMI tag bound to a PLC tag, polled in "Cyclic continuous" mode, with a "Value change" event calling ActivateScreen.

How do I change the screen on the rising edge of a Boolean tag only?

WinCC Basic does not expose a rising-edge event on HMI tags. Detect the edge in OB1 on the PLC side using a handshake pattern (Req, ReqOld, Trigger) and write a new value to an INT trigger tag. The "Value change" event fires only on the rising edge of the source.

Which acquisition mode must the trigger HMI tag use?

Set the HMI tag to "Cyclic continuous". With "Cyclic in operation" or "On demand", the runtime only polls the PLC when the screen showing the tag is active or when another element accesses the tag, so a value change in the background is missed.

Why does the wizard not appear on STOP → RUN without cycling power?

The startup behavior is handled by OB100 on the S7-1200. OB100 executes on every transition into RUN, including STOP → RUN without a power cycle. If the wizard is not forced, verify that OB100 exists in the project, that it writes the trigger tag, and that the trigger tag is bound to the HMI tag in "Cyclic continuous" mode.

What is the fastest deterministic screen-change time on a KTP600 BASIC?

About 450 ms with the HMI tag update time at its minimum of 250 ms. For deterministic changes below 100 ms, use a Comfort panel with a screen-number area pointer, or move the screen navigation to a button event handled inside the HMI.

Can I use the same HMI tag for multiple screen changes on the same restart?

Yes. Drive the INT trigger tag from a state machine in OB1 and let each transition write the next screen number. The value change event fires on every distinct value, advancing the wizard. Always reset the trigger to 0 at the end of the sequence so the next restart can re-trigger from 0 to the first screen number.

Back to blog