1. Overview: Sending Process Messages from LOGO! to a Basic HMI
Siemens LOGO! logic modules (8-series, order code suffix 0BA8 and later) expose a fixed image of internal flags (M markers, shift register bits, function block outputs) over Ethernet. A Siemens Basic HMI panel such as the KTP400 Basic or KTP700 Basic (the "K300 Basic" nomenclature in legacy documentation refers to the SIMATIC HMI KTP Basic line) can poll that image and render discrete alarm messages, status lamps, and F-key actions driven directly from the LOGO! memory.
The critical design rule: a discrete alarm in WinCC / TIA Portal is triggered by a single bit inside a 16-bit INT word. You must therefore pack all individual "motor running", "fault", "manual", "auto" states into the bits of one or more LOGO! marker words, expose those words as HMI tags, and let the HMI project decide which bit number means which text.
This article walks through the full chain: hardware prerequisites, IP configuration, LOGO!Soft Comfort program structure, WinCC discrete alarm configuration, F-key wiring, root-screen vs. sub-screen message elements, and field verification. All examples target the LOGO! 8.3 (6ED1052-xxx08-0BA1 / 0BA2) firmware and TIA Portal V17 with WinCC Basic V17.
2. Prerequisites
| Item | Specification |
|---|---|
| LOGO! logic module | LOGO! 8 (6ED1052-1xx08-0BAx) with Ethernet port on the left side |
| LOGO!Soft Comfort | V8.4 or later (compatible with 0BA8 firmware); ES2/V8 license not required for the demo project |
| HMI panel | KTP400 Basic, KTP700 Basic, KTP700 Basic DP, or KTP1200 Basic (mono or color) |
| Configuration software | TIA Portal V16/V17 with WinCC Basic / Comfort (Basic is sufficient for the KTP Basic line) |
| Network | Direct Ethernet crossover or a small switch; both devices on the same subnet (e.g., 192.168.0.0/24) |
| Cable | RJ45 Cat5e or better, max 100 m |
Confirm firmware on the LOGO! before you start. The 0BA8 standard variant supports up to 24 digital inputs, 16 digital outputs, 8 analog inputs, 2 analog outputs, and 250 digital/analog flags when expanded. A later "Standard" or "Pure" variant is functionally identical for this exercise.
3. Network Configuration
LOGO! 8 acts as a Modbus TCP / S7-communication server on TCP port 102 (S7) and 502 (Modbus). The Basic HMI uses the native SIMATIC S7 200/300/400 driver — it does not require an OPC gateway. The HMS Networks KB article Communicating to a Siemens Logo! Basic Module via Ethernet documents the same driver path and confirms the area mapping the HMI will read.
- On the LOGO!, navigate to Options → Network → IP Address on the onboard display, or push
ESC > Settings > Network. Set:
- IP address:192.168.0.10
- Subnet mask:255.255.255.0
- Router / Gateway: leave0.0.0.0unless you cross a router - In the LOGO! project (LOGO!Soft Comfort), open Tools → Ethernet Connections and add the same IP. Enable Allow S7 Communication and Allow Web Access (web access is useful for remote diagnostics).
- On the HMI Configuration in TIA Portal, set the panel IP to
192.168.0.20with the same subnet mask. - Verify the link: from the panel's Control Panel → Network, use Ping or open a command window on a PC connected to the same switch and run
ping 192.168.0.10. You must see a reply before configuring tags.
4. LOGO! Tag Planning — Build a 16-Bit Message Word
WinCC discrete alarms require a 16-bit trigger word. The cleanest pattern is to dedicate a single LOGO! marker word (e.g., MW100 is shown symbolically; LOGO! flags are bit-addressed M1, M2 ... M64 and word-addressed as VW0 through VW15 in the S7 mapping) to hold up to 16 individual "running", "faulted", "manual", "auto", "ready" events.
Bit-to-event mapping example (one bit per discrete alarm):
| Bit | Trigger condition | Alarm text | Severity |
|---|---|---|---|
| 0 (V0.0) | Motor running (output Q1 high) | "Motor running" | Information |
| 1 (V0.1) | Motor fault (input I2 from overload contact) | "Motor overload tripped" | Error |
| 2 (V0.2) | Auto mode selected (input I3) | "Mode: Automatic" | Information |
| 3 (V0.3) | Manual mode selected (input I4) | "Mode: Manual" | Information |
| 4 (V0.4) | Door open (input I5, safety) | "Guard door open" | Warning |
| 5 (V0.5) | High level (input I6) | "Tank high level" | Warning |
| 6 (V0.6) | Spare | "" | — |
| 7 (V0.7) | Spare | "" | — |
| 8–15 | Reserved for a second message word | — | — |
5. LOGO!Soft Comfort Program
- Open LOGO!Soft Comfort and create a new project for a LOGO! 8 0BA8 Standard.
- Drag a Digital Input block onto the diagram for I1 (the external trigger the user wants to display).
- Drag a Set/Reset (RS) flip-flop or a simple AND/OR to derive the run state, and route its output to a free Flag M (e.g., M8 — this becomes bit 0 of the message word).
- Repeat for each alarm trigger. Each event drives a unique flag bit. Use M1 through M16 to keep the bit number predictable for the HMI side.
- Wire the actual control outputs (Q1, Q2) in parallel — the flags only mirror the state for HMI, they are not the only path to the coil.
- Save and transfer via Ethernet: Tools → Transfer → PC ↔ LOGO!. Select "Ethernet" and enter the LOGO! IP.
LOGO!Soft Comfort ladder snippet (textual equivalent for the archive):
Network 1 — Motor run state
| I1 (start request) ----[ ]---+----[ RS ]---- M8 (Run flag, V0.0) --+--- Q1
| I2 (overload NC) --[/]-----+
6. HMI Tag Configuration in TIA Portal
- Open the TIA Portal project that contains both the LOGO! device and the HMI panel. If you imported a third-party LOGO! device, add it as SIMATIC S7-200 SMART or use the generic S7-300 driver against the LOGO! IP.
- In the HMI project tree, expand HMI Tags and double-click Default tag table.
- Create a new tag:
- Name:
LOGO_MessageWord - Data type:
Int(16-bit) - Connection: the S7-200/300/400 connection pointing to LOGO! 192.168.0.10
- Address:
VW0(this is the LOGO! flag word the driver maps to the first available user area; verify the exact word offset with the HMS Networks table if you use a non-default address model) - Acquisition cycle:
500 ms(do not poll faster than the LOGO! scan — 500 ms is safe and bandwidth-friendly)
- Name:
- Optionally create individual
Booltags for the F-key feedback (see Section 8) — for exampleLOGO_F1_ackasV0.0if you want a one-bit read-back, but for alarms the single INT word is enough.
VW0 on a 0BA8. Confirm by toggling a single M bit in LOGO!Soft Comfort online test, then watching the HMI tag value change in TIA Portal Online → HMI Tags.7. Discrete Alarm Configuration in WinCC
- In the HMI project tree, open HMI Alarms → Discrete Alarms.
- Add a new alarm. For each bit of
LOGO_MessageWord:- Alarm text: the human-readable string, e.g.,
Motor running - Trigger tag:
LOGO_MessageWord(the 16-bit INT) - Trigger bit:
0for the first alarm,1for the second, etc. The Trigger bit column lets you pick which bit of the trigger tag raises this alarm. - Trigger mode: Raised on signal edge (rising edge) is usually the right choice — the alarm appears when the bit transitions 0→1.
- Acknowledgement: No acknowledgement for information, Acknowledgement required for errors such as the overload.
- Class: Warnings (yellow) or Errors (red). The class also routes the alarm to the appropriate alarm banner on the panel.
- Alarm text: the human-readable string, e.g.,
- Save and compile the HMI project. Compile must report zero errors before you download.
8. Function Keys F1–F4 (and F5–F8 on color Basic)
The original symptom — "F1 sets a bit, F2 resets it, mode select via F1/F2" — is implemented on the HMI side as a Function Key event, not as a discrete alarm. The HMI writes a Bool to the LOGO! over the same S7 connection. On the LOGO! side you can map that Bool to a Network Input (NI) bit on 0BA8 or, on older 0BA7, to a real digital input wired back to a flag.
- Create an HMI tag
LOGO_F1_Setof typeBool, addressV100.0(a writable V memory location). - On the HMI screen, drop a Button. Configure it as a function key or regular button; on the Events tab, add Press → SetBit on
LOGO_F1_Set. - Add a second button (Press) → ResetBit on the same tag.
- In LOGO!Soft Comfort, place a Network Input block (NI1) and connect it to the function-block input that drives M8 (your "Run" flag). On a 0BA8 the LOGO! reads back the value you wrote to V100.0 within one scan.
For a momentary (pulse) action, configure the button event as SetBitWhileKeyPressed (Tia Portal V15+) or use the panel's "Press"/"Release" event pair to set on press and reset on release.
9. Root Screen vs. Sub-Screen Message Elements
A common pitfall: a discrete alarm configured but not visible. The alarm exists in the alarm buffer regardless of which screen is open, but the operator only sees a pop-up banner if the active screen contains the Alarm Window or Alarm View element from the toolbox.
- Open the Root Screen (the screen the panel shows at startup). Drag an Alarm View from Toolbox → Controls onto the screen.
- Property Alarm Class: enable Warnings and Errors (uncheck the others so the view does not overflow with system messages).
- Property Sort Order: Chronological descending so the newest event is on top.
- Property Display Mode: Active alarms for a single-row banner, or Alarm buffer for a history list.
On sub-screens you only need a smaller Alarm Indicator (the small triangle icon) so the operator knows an alarm is active even when the root screen is not on top.
10. Compile, Download, and Verify
- Compile the LOGO! project; transfer via Ethernet.
- Compile the TIA Portal HMI project (no errors allowed).
- Download the HMI image to the panel (menu on the panel: Control Panel → Transfer). The TIA Portal transfer dialog handles the protocol.
- After reboot, navigate the LOGO! to Options → Diagnostics → Connection to confirm the S7 connection is "OK".
- Force I1 high on the LOGO! (use a jumper or the simulator). Within 500 ms + scan time, the alarm "Motor running" should appear on the panel.
- Open TIA Portal online → HMI Tags. Read the value of
LOGO_MessageWord. Bit 0 should be 1, all other bits 0. - Press F1 on the panel; confirm via online that
LOGO_F1_Setgoes 1 and that the LOGO! flag M8 follows (use LOGO!Soft Comfort online monitoring).
11. Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
| Alarm never appears | Trigger tag points to the wrong V address | Use TIA Portal online HMI tag view to read the word value; verify a bit is set when the input is forced |
| Alarm appears on screen 2 but not on root screen | Alarm View element not placed on the root screen | Add the Alarm View to the root template, not only to sub-screens |
| Alarm is always on | Trigger mode is "Level" instead of "Edge"; OR the LOGO! never resets the flag (latched) | Switch trigger to rising edge; or add a reset path in the LOGO! program |
| F1 button has no effect on LOGO! | Tag is marked read-only, or the connection is "S7-200" but address is in a non-writable area | Check the connection direction in TIA Portal; ensure the address is in the V area, not the M area (M is read-only on Basic HMI drivers) |
| Communication timeouts in the alarm log | IP conflict or switch port speed mismatch | Force the switch port to 10 Mbps full-duplex if the LOGO! auto-negotiates poorly; verify the panel and LOGO! share a /24 subnet |
| Bit number does not match | LOGO! stores M flags in big-endian byte order inside VW0 | Use LOGO!Soft Comfort's online flag view to confirm which M bit lights up which bit of the VW0 word as seen by the HMI driver |
| Alarms flood in on startup | All flags are 1 at first power-up | Initialize the message word to 0 in the LOGO! startup block, or use trigger mode "Edge with re-trigger only after ack" |
12. Field-Proven Tips
- Reserve bit 15 of the message word for a "LOGO! Heartbeat" — a 1-second square wave driven by a clock generator block. If the heartbeat disappears, the HMI can raise a single "PLC communication lost" alarm that is much easier to interpret than a flood of stale state bits.
- For long cables or electrically noisy panels, add a 1 s debounce on every digital input feeding a flag. Discrete alarms are timestamped on the panel but only when the trigger bit actually toggles; chatter causes the alarm to flap.
- Document the bit-to-text mapping inside the TIA Portal project as a project note attached to the HMI tag. The next engineer who opens the project needs to see "V0.0 = Motor running" without spending an hour reverse-engineering the LOGO! program.
- If you must use older LOGO!Soft Comfort (V7.x) with a 0BA6/0BA7 device, the driver path is different — these units do not expose V memory, only M flags. In that case configure the HMI driver for "S7-200" with a flag area; the bit mapping is preserved.
13. Sample Project Checklist
- [ ] LOGO! 0BA8 firmware ≥ 1.82.x (current as of the 0BA8 product life)
- [ ] LOGO!Soft Comfort ≥ V8.4 project compiles with zero errors
- [ ] TIA Portal V17 project compiles with zero errors
- [ ] Panel ping to LOGO! IP succeeds
- [ ] Single forced input raises the expected alarm text within 1 s
- [ ] F1 button sets a writable V bit; LOGO! flag M8 follows
- [ ] Alarm View visible on root screen and at least one sub-screen
- [ ] Alarm buffer configured (active + history count) for the application size
- [ ] Heartbeat bit 15 toggling every 1 s in online HMI tag view
FAQ
What LOGO! firmware version supports V-memory writes from the HMI?
LOGO! 8 with firmware suffix 0BA8 (1.82.x and later) exposes a writable Variable Memory (V) area accessible over S7 communication. Earlier 0BA6/0BA7 units expose flags (M) only, so HMI writes are limited to inputs or flags you can re-mirror.
Why does a discrete alarm need a 16-bit tag, not a single Bool?
WinCC's discrete-alarm model uses a single 16-bit trigger word and a per-alarm "Trigger bit" index (0–15). This is the only way to fit many alarms into one polled tag. Configure the LOGO! to pack each event into a unique bit of one marker word, then index into that word on the HMI side.
Why does my alarm appear on the buffer but never on the screen?
An alarm becomes visible only if the active screen contains an Alarm View (or Alarm Indicator) that has its Alarm Class set to include the alarm's class. Add the Alarm View to the root screen template, not only to sub-screens, and verify the class filter includes Warnings and Errors.
Can I write a Bool from the HMI to the LOGO! to start the motor?
Yes. Map a Bool HMI tag to a writable V-memory bit (e.g., V100.0) and read that bit in the LOGO! via a Network Input block. The signal round-trips in roughly one LOGO! scan (typically 10–50 ms depending on program size).
How do I confirm the LOGO! is reachable from the engineering PC?
Open a Windows command prompt and run ping 192.168.0.10 (use the LOGO!'s actual IP). A reply confirms the link. For deeper validation, use LOGO!Soft Comfort's Tools → Ethernet Connections → Online Status to read the S7 connection state and the onboard display menu Options → Diagnostics → Connection to see the active S7 partner.