1. Problem Statement
An S7-1200 CPU is programmed in TIA Portal (WinCC Basic, V11 SP2 or later) and downloaded successfully. A KTP 400 Basic mono panel is connected to the PLC over PROFINET, the HMI configuration is downloaded, and tags/connections appear valid. The fault pattern is asymmetric:
- PLC → HMI direction works: when an output or memory bit is set in the PLC (either by a wired input, by a forced value, or by the online monitor), the value displays correctly on the HMI screen (e.g., a lamp/indicator graphic turns on).
- HMI → PLC direction fails: pressing a button or toggle switch on the panel produces no reaction in the PLC. No bit is set, no output changes, and no value is written back to the tag.
The user has already verified IP address, MAC address, subnet mask, and the symbolic tag names. The fault is therefore not in the connection layer but in the configuration of the HMI control or in the tag access direction inside TIA Portal.
2. Affected Components
| Item | Value / Part | Notes |
|---|---|---|
| PLC | SIMATIC S7-1200 (any CPU 12xx) | Firmware V2.x, V3.x, V4.x behave identically for this fault |
| HMI | KTP 400 Basic mono (6AV2 123-2DB03-0AX0 family) | WinCC Basic, Basic Panels 2nd generation |
| Engineering | TIA Portal STEP 7 / WinCC Basic V11 SP2 or later (V13, V15, V15.1, V16, V17, V18, V19) | Procedure identical; menus re-organized but concepts unchanged |
| Connection | PROFINET / S7 connection (one HMI connection, "HMI_1" default) | Must have full read/write access |
| Tag type used | PLC tag (sourced directly from S7-1200), single BOOL | Most common: "Start", "Stop", "Motor_On"
|
3. Root Cause Matrix
From the symptom "HMI sees PLC state but PLC does not see HMI state", nine causes account for essentially every field case. Work the matrix from top (most likely) to bottom.
| # | Likely Cause | How to Confirm | Fix Location in TIA Portal |
|---|---|---|---|
| 1 | HMI button/switch has no Event configured (most common) | Open the screen, click the button, look in Properties → Events. The list is empty. | Add a Press or Change event with a Set/Reset/InvertBit function |
| 2 | Wrong event type selected (e.g., "Stop" on a latching switch) | Event exists but uses Activate/Deactivate for a screen instead of SetBit for a tag |
Replace the function with SetBit <tag> / ResetBit <tag>
|
| 3 | Tag is read-only on the HMI side (acquisition mode set to "Read only" or "Cyclic read") | PLC tag in HMI tag table → Properties → column "Access" shows "read only" | Change to "<-->" (read/write) in HMI tag properties |
| 4 | Tag is an HMI tag instead of a PLC tag, and no PLC link exists | HMI tag table → "Connection" column is empty | Either delete the HMI tag and use the PLC tag directly, or set the connection to the S7-1200 |
| 5 | PLC tag is declared with optimized/block-protected access and the HMI connection has no access right | PLC tag → Properties → "Accessible from HMI/OPC UA" unchecked | Enable "Accessible from HMI" in the PLC tag properties (S7-1200 V4.x and later) |
| 6 | The HMI project was not recompiled and reloaded after PLC changes | Right-click HMI device → "Compile and download" not run after PLC download | Compile all → Download to HMI |
| 7 | Area pointer "Coordination" is not enabled; HMI and PLC lost handshake after restart | HMI device → Connections → Area pointers → Coordination unset | Enable Coordination pointer at byte 0 (default) |
| 8 | Wrong tag binding on the control (e.g., button is bound to an internal HMI tag, not the PLC tag) | Click the button → Properties → General → Process value / Variable | Re-link the process value to the correct PLC tag (not an internal HMI tag) |
| 9 | PROFINET device is in a different subnet / VLAN, or PG/PC routing intercepts packets | Online → Accessible nodes shows PLC, but TIA diagnostics shows write errors | Set PG/PC interface to the correct NIC; check subnet of both devices |
4. Diagnostic Procedure
Use this ordered flow on every panel that exhibits the asymmetric read/write symptom. Do not skip steps; the cheapest check (cause #1) fixes roughly 70% of field cases.
4.1 Confirm the Directional Fault
- Open TIA Portal, project view, and connect online to the S7-1200 (Online → Go online).
- Open the HMI tag table; right-click a suspect tag → Monitor. The value updates as the PLC program runs.
- In the PLC monitor (Watch table), force the same tag's underlying memory bit. Confirm the HMI updates. → Read direction works.
- From the HMI's runtime (or the simulator), tap the button. In the watch table, observe the tag. It does not change. → Write direction fails.
4.2 Inspect the HMI Control
- In the project tree, expand HMI_1 → Screens → [your screen] and double-click the screen.
- Click once on the button (do not double-click, which would open events depending on version).
- Open the Inspector window (View → Properties).
- Go to Properties → Events.
- Confirm that the
Click,Press, orChangeevent row is present and contains a function.
Click, Press, Release, and Change. In V13 and later, the same rows exist under "Events" inside the Properties pane.5. Fix #1 — Configure the HMI Button Event (Most Common Cause)
A button on an HMI screen is a graphical object only until an Event is associated with it. If no event is defined, the button looks active in WinCC but does nothing in runtime. This is the dominant cause when "HMI displays PLC state but cannot change it".
5.1 For a Momentary Push-Button (Press → Set, Release → Reset)
- Click the button on the screen.
- Open Properties → Events.
- On the
Pressevent row, click the <Add function> field. - Select Edit bits → SetBit.
- In the tag selector, pick the PLC tag (e.g.,
"Start"or"%DB1.DBX0.0"). When the variable is sourced from the S7-1200 directly, select it from PLC tags rather than from HMI tags. - On the
Releaseevent row, add Edit bits → ResetBit with the same tag.
5.2 For a Toggle Switch (Sticky Latching Behavior)
The Basic Panels support a dedicated "Switch" element, which is the correct object when you want a toggle that latches in the same position as the PLC bit.
- Drag a Switch element onto the screen (Toolbox → Elements → Switch).
- Click the switch, open Properties → General → Process value.
- Bind it to the PLC BOOL tag (e.g.,
"Motor_On"). - Open Properties → Events → Change.
- Add the function Edit bits → InvertBit with the same tag.
Change event, and that event is the only place you should write back. InvertBit copies the visual state of the switch into the tag, so the PLC always reflects the operator's last touch. If you wire Press → SetBit on a Switch, the bit gets forced to 1 on every touch and can never be cleared from the panel.5.3 For an Output Lamp / Indicator
An output element (circle, lamp, text field color animation) only needs a Process value; no Event is required because the value is read continuously.
- Drag a Circle onto the screen.
- Open Properties → Appearance → Animations → Add new animation → Appearance.
- Bind the variable to the PLC BOOL.
- Configure two states: value = 0 → gray; value = 1 → green.
6. Fix #2 — Verify HMI Tag Access Mode
When the HMI tag (or PLC tag referenced from the HMI) is set to read-only, every write from the panel is silently rejected by WinCC. The HMI still reads the value, so the directional fault persists.
- Project tree → HMI_1 → HMI tags.
- Open the tag table.
- Click the tag used by the button (e.g.,
Start). - Open Properties → General.
- Check the Access column. It must be
<-->(read/write), not<--(read only). - If access is read-only, set it to read/write and recompile.
| Symbol in tag table | Meaning | Allowed operations |
|---|---|---|
<--> |
Read/write | HMI can read and write; required for buttons that change PLC values |
<-- |
Read only | HMI can only read; suitable for status displays, outputs, measured values |
--> |
Write only | Unusual; used for setpoints the operator issues but never reads back |
7. Fix #3 — Bind to the PLC Tag, not the HMI Tag
A frequent beginner mistake is to create two tags with the same name — one in PLC tags and one in HMI tags — and to bind the button to the HMI one. The HMI tag is a local mirror and has no write path back to the S7-1200 unless its Connection property is set.
- Click the button → Properties → General → Process value (or Variable in newer versions).
- In the tag picker, expand PLC tags → [PLC name] → [tag group] and select the PLC tag directly.
- Avoid selecting from HMI tags unless the HMI tag is explicitly configured with the S7-1200 connection.
8. Fix #4 — Enable HMI Accessibility of PLC Tags (S7-1200 V4.x and later)
From firmware V4.0 onward, every PLC tag has an explicit accessibility flag. If the flag is off, the HMI cannot see the tag at all — though TIA will silently bind to a default address, producing the same fault.
- Project tree → PLC_1 → PLC tags → [tag group].
- Click the tag (e.g.,
Start). - Inspector → Properties → Attributes.
- Tick Accessible from HMI/OPC UA.
- Tick Writable from HMI/OPC UA (only if the HMI must write the value).
- Compile the PLC project, download to the S7-1200, and then recompile + download the HMI.
9. Fix #5 — Verify the HMI Connection and Area Pointers
- Project tree → HMI_1 → Connections.
- Open the existing S7-1200 connection.
- Confirm the IP of the PLC matches the actual CPU (e.g.,
192.168.0.1). Mismatched subnets silently break write direction even when reads appear to work because the panel can still poll the PLC. - Open the Area pointers tab.
- Ensure the Coordination area pointer is enabled. It is required for life-sign handshake between HMI and PLC. Default DB number and byte offset can be left at the auto-assigned values.
10. Compile, Download, and Verify
- Right-click PLC_1 → Compile → Software (rebuild all).
- Download to the S7-1200.
- Right-click HMI_1 → Compile → Software (rebuild all). TIA will surface any unresolved tag references; fix them.
- Right-click HMI_1 → Download to device → Software (all).
- When the transfer dialog opens, tick Overwrite all on the HMI to ensure the new project replaces the old one. The KTP400 Basic will restart automatically.
- Run the project on the panel.
10.1 On-Panel Verification
| Test | Expected Result | Pass Criterion |
|---|---|---|
| Touch the start button | The bound PLC bit goes to 1 in the online watch table | Bit = TRUE while button is held (momentary) or until second touch (toggle) |
| Force a bit in the PLC | The HMI indicator updates within the configured acquisition cycle | Default cycle 1 s; can be tightened to 100 ms if needed |
| Cycle power on the HMI | The start screen appears, and live values display | No "Connection interrupted" yellow bar in the status line |
| Cycle power on the PLC | The HMI recovers without manual intervention | Coordination pointer handshake completes within ~10 s |
11. Diagnostic Flowchart
12. Common Field Pitfalls
| Pitfall | Symptom | Resolution |
|---|---|---|
| Modifying the PLC project but not recompiling the HMI project | Old tag references still bound; new tag never written | Always right-click HMI_1 → Compile (rebuild all) after PLC edits |
| Using a Button on a tag that needs toggle behavior (or vice versa) | Bit latches, can never be reset, or never latches | Match the element type to the logic: Button for momentary, Switch for latching |
| Optimized block access (S7-1200 V4.x) with default symbolic-only access | Absolute address from older project no longer points to the tag | Re-bind by symbolic name; the address is computed and not editable |
| PG/PC interface set to a wireless NIC while the panel is on a wired network | Online from TIA works to PLC, but compiled HMI image goes to the wrong subnet | Set PG/PC interface to the wired NIC before download |
| Toggle switch with Press→SetBit instead of Change→InvertBit | Bit cannot be reset from the panel; only PLC program can clear it | Replace the function with InvertBit on the Change event |
| HMI tag "Acquisition cycle" too long | Update lag in the indicator, but no fault on write | Reduce to 100 ms or 1 s; matches the operator's expected response time |
13. Working Sample — Minimal "Start/Stop with Indicator" Project
The following describes a complete, test-ready TIA Portal setup that demonstrates correct HMI-to-PLC control. After loading, touching Start on the KTP400 must turn on the indicator light in the HMI; touching Stop must turn it off.
13.1 PLC Tags (S7-1200)
| Name | Type | Address (default) | Accessible from HMI | Writable from HMI |
|---|---|---|---|---|
| Start | BOOL | %M0.0 | Yes | Yes |
| Stop | BOOL | %M0.1 | Yes | Yes |
| Motor_On | BOOL | %M0.2 | Yes | No |
13.2 PLC Program (Ladder, FB/OB1)
Network 1: Start Stop Motor_On Motor_On
─┤ ├──────┬─────────┤ ├───────────┤ ├───( )─
│
│
└──┤/├──── Stop (N/C contact)
This is a standard seal-in (latching) circuit. Start and Stop are operator inputs from the HMI; Motor_On is the held output. The HMI's Start button momentarily sets Start = TRUE, the seal-in contact holds Motor_On = TRUE, and the Stop button breaks the seal.
13.3 HMI Screen Configuration
| Element | Type | Process Value / Tag | Event | Function |
|---|---|---|---|---|
| Start push-button | Button |
Start (process value = visual feedback optional) |
Press | SetBit → Start
|
| Start push-button | Button | (same) | Release | ResetBit → Start
|
| Stop push-button | Button | Stop |
Press | SetBit → Stop
|
| Stop push-button | Button | (same) | Release | ResetBit → Stop
|
| Indicator lamp | Circle | Motor_On |
(none required) | Appearance animation: 0 = gray, 1 = green |
Start and Stop as toggle switches (latching) instead of momentary push-buttons, the seal-in circuit above will not behave correctly. For toggle-style control, replace the seal-in with a single latch on the HMI bit itself, and use one Switch element to write the value with Change → InvertBit.14. Versions and Compatibility
The procedure is identical across the following engineering versions, with menu/label drift only:
| TIA Portal Version | Inspector Label for Events | Button Element | Switch Element |
|---|---|---|---|
| V11 SP2 (referenced in the field report) | "Events" | Toolbox → Elements → Button | Toolbox → Elements → Switch |
| V13 / V13 SP1 | "Events" | Same | Same |
| V14 / V15 / V15.1 | "Events" | Same | Same |
| V16 / V17 / V18 / V19 | "Events" | Same | Same |
15. Related Settings Worth Verifying Once
- PG/PC interface: must be set to the NIC connected to the S7-1200 / KTP400 subnet, not Wi-Fi or a virtual adapter.
- Subnet in the HMI connection: must match the S7-1200's PROFINET subnet. Different subnets cause intermittent read with failed write.
- Time synchronization: the "Date/Time PLC" area pointer should be enabled if the HMI displays the PLC time; this is unrelated to button control but is a frequent audit finding.
- User administration: if a button is grayed out at runtime, check Runtime security → Users → Authorizations. The button may be assigned to an authorization level the current user does not have.
16. Quick Diagnostic Checklist
- Button has at least one Event configured (Press, Click, or Change).
- Event function targets a SetBit/ResetBit/InvertBit on the correct tag.
- Tag is the PLC tag, not a local HMI tag.
- HMI tag access is
<-->read/write. - PLC tag "Accessible from HMI" is enabled.
- PLC tag "Writable from HMI" is enabled (if the HMI must change it).
- HMI connection has correct IP and subnet of the S7-1200.
- Coordination area pointer is enabled.
- HMI project was compiled (rebuild all) and downloaded to the panel after the last PLC change.
- PG/PC interface is set to the wired NIC.
Working through the checklist above resolves the asymmetric HMI-to-PLC control symptom in nearly every case. The remaining unrecoverable cases usually point to a corrupted HMI image — reflash the panel via ProSave or by formatting the panel's storage card and retransferring the compiled HMI runtime.
Why does my KTP400 Basic show PLC values but pressing buttons does nothing?
The HMI tag or PLC tag is configured read-only, the HMI button has no Event attached, or the button is bound to a local HMI tag instead of the PLC tag. Open Properties → Events on the button and add a Press → SetBit (or Change → InvertBit for a toggle) that references the PLC BOOL tag, then set the HMI tag access to read/write and recompile both projects.
What is the difference between a Button and a Switch on a KTP400 Basic?
A Button is momentary: Press fires while the operator holds it, Release fires when they lift off. Wire Press → SetBit and Release → ResetBit for typical Start/Stop. A Switch is latching: it visually mirrors the tag value and fires one Change event per touch. Wire Change → InvertBit so the operator's touch flips the bit in the PLC.
Do I need to enable "Accessible from HMI" on every S7-1200 tag?
On S7-1200 firmware V4.0 and later, yes. The flag is on the PLC tag's Properties → Attributes. If it is off, the HMI cannot see the tag, even if the HMI tag table points to the same symbolic name. Enable both "Accessible from HMI/OPC UA" and "Writable from HMI/OPC UA" for any tag the panel must read or write.
My HMI tag table shows the access column as <-- — is that the problem?
Yes. <-- means read-only, so any write from the panel is rejected. Open the HMI tag's Properties → General and set the Access column to <--> (read/write). Recompile the HMI and redownload to the panel.
Do I still need a Coordination area pointer in TIA Portal V18 / V19?
Yes. The Coordination pointer handles the life-sign handshake between the HMI and PLC. If it is disabled, the connection can appear to work for reads while failing silently on writes, and the HMI will not recover cleanly after a PLC restart. Enable it under HMI device → Connections → Area pointers → Coordination.
After changing the PLC program, do I need to redownload the HMI?
Yes. Whenever a PLC tag name, address, or accessibility flag changes, you must right-click HMI_1 → Compile (rebuild all) and then download the rebuilt runtime to the panel. Skipping this step leaves the HMI bound to the old tag references, which causes silent write failures.