Editing LOGO 0BA7 Weekly Timer from WinCC Flexible HMI

David Krause17 min read
HMI / SCADASiemensTutorial / 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

Problem Overview

The Siemens LOGO! 0BA7 generation (front-panel label "LOGO! 8.1", released 2014) exposes the parameters of every function block through the Variable Memory (VM) area only when the engineer enables parameter VM mapping in LOGO! Soft Comfort. The Weekly Timer block is one of the most frequently edited blocks, yet WinCC Flexible on a KTP600 Basic Panel cannot parse its VM bytes into a human-readable HH:MM string. Depending on the I/O field format chosen by the engineer, the operator sees either a raw byte (e.g. 0x14 rendered as the integer 20) or an unfiltered hex value with no obvious meaning.

This article documents two field-proven techniques to read and modify a LOGO! 0BA7 weekly timer from a WinCC Flexible HMI: a hexadecimal I/O field that accepts and displays the raw BCD-encoded bytes as "hhmm", and two symbolic I/O fields driven by text lists that give the operator a familiar hour and minute drop-down. Both rely on the same data layout, the same VM mapping, and the same S7-200 communication driver. The choice between them is a trade-off between engineering simplicity and operator friendliness.

This procedure targets LOGO! 0BA7 with the integrated Ethernet port. The same memory layout applies to the 0BA8 (LOGO! 8.2) and 0BA9 (LOGO! 8.3) generations. Older 0BA0-0BA6 generations are not addressed; they lack the Ethernet interface required by the S7-200 communication driver and use a different VM layout.

Prerequisites and Compatible Hardware

  • LOGO! 0BA7 base module with integrated Ethernet. Common order numbers: 6ED1052-1MD00-0BA7 (LOGO! 8.1 12/24 RCE, relay outputs), 6ED1052-2MD00-0BA7 (LOGO! 8.1 12/24 RCEo, with display), 6ED1052-1FB00-0BA7 (LOGO! 8.1 24 CE, transistor outputs), 6ED1052-1HB00-0BA7 (LOGO! 8.1 230 RCE, mains-powered).
  • LOGO! Soft Comfort V8.0 or later for project engineering and firmware update. V8.0 matches the 0BA7 generation; V8.1 / V8.2 / V8.3 are used for the 0BA8 and 0BA9 hardware revisions but remain backward-compatible.
  • KTP600 Basic Panel (6AV6 648-0AC11-3AX0 PN variant, or 6AV6 647-0AC11-3AX0 DP variant for MPI/Profibus). TP/Comfort panels running WinCC Comfort in TIA Portal can be substituted, with minor differences in the driver dialog.
  • WinCC Flexible 2008 SP5, or TIA Portal V13 SP1 and later with the LOGO! HMI driver option, for HMI engineering.
  • Standard Cat5/Cat6 Ethernet cable and a unique IP address per device on the same subnet. The LOGO! 0BA7 ships with IP 192.168.0.1; the KTP600 PN defaults to 192.168.0.10.

LOGO! 0BA7 Weekly Timer Data Layout

The LOGO! 0BA7 VM area spans byte addresses 0 through 849, of which the upper region is reserved for retentive flags, system diagnostics, and function-block parameter mapping. Every enabled block parameter claims a contiguous slice of this area. For a Weekly Timer block with three cams (the maximum count in the 0BA7 generation), the memory layout is:

Offset Parameter Type Encoding Valid range
+0 Cam 1 – day mask Byte Bit field, Mo = bit 0 ... Su = bit 6 0x00 – 0x7F
+1 Cam 1 – on-time hour Byte BCD 0x00 – 0x23
+2 Cam 1 – on-time minute Byte BCD 0x00 – 0x59
+3 Cam 1 – off-time hour Byte BCD 0x00 – 0x23
+4 Cam 1 – off-time minute Byte BCD 0x00 – 0x59
+5 Cam 2 – day mask Byte Bit field 0x00 – 0x7F
+6 to +9 Cam 2 – on/off times 4 × Byte BCD as above
+10 Cam 3 – day mask Byte Bit field 0x00 – 0x7F
+11 to +14 Cam 3 – on/off times 4 × Byte BCD as above

A single Weekly Timer block therefore claims 15 bytes when all three cams are enabled. A block with only one cam in use still reserves 5 bytes. The start address of this slice is assigned by LOGO! Soft Comfort at compile time and is visible in the "Tools → Parameter VM Mapping" dialog.

BCD is the critical detail. A timer value of 14:30 is stored as the byte 0x14 followed by the byte 0x30, not as the integer values 14 and 30 expressed as plain 8-bit numbers. Reading the same bytes as regular decimal numbers produces 20 (0x14) and 48 (0x30), which is what an unconfigured WinCC I/O field will display and the reason operators observe "20" instead of "14:00".

Enabling Parameter VM Mapping in LOGO! Soft Comfort

  1. Open the project in LOGO! Soft Comfort V8.x.
  2. Select Tools → Parameter VM Mapping (older builds: File → Properties → VM Mapping). The dialog lists every parameter VM area available to the project.
  3. Locate the Weekly Timer block (B001 or whichever block number the tool assigned). Tick the parameter rows for the day mask, the on-time, and the off-time of each cam you want to expose.
  4. Note the start address. A fresh project with a single Weekly Timer block placed at block number 1 typically starts at VW0 (VB0 = on-hour, VB1 = on-minute) for the first cam, then VW2 (VB2 = off-hour, VB3 = off-minute), with VB4 holding the day mask. These addresses are project-specific and must be verified in the VM Mapping dialog; do not hard-code addresses from a sample project.
  5. Click OK to confirm, then transfer the project to the LOGO! 0BA7 via Ethernet (Online → PC → LOGO!) or via SD card.
  6. After transfer, verify on the LOGO! 0BA7 built-in display that the parameter is now visible: navigate to the Weekly Timer block with the cursor keys, edit the time on the front panel, then read VW0/VW2 with WinCC Flexible once the LOGO! returns to RUN.
If the VM Mapping dialog is empty, greyed out, or reports "0 bytes available", the LOGO! 0BA7 firmware does not support parameter VM mapping for the selected block, or the project is locked against online changes. Update firmware through LOGO! Soft Comfort (Online → Firmware Update) or via SD card. The 0BA7 firmware family is V1.08.x in early releases; current shipping revisions are V1.08.04 and later.

WinCC Flexible Connection and Tag Configuration

The LOGO! 0BA7 implements an S7-200-compatible subset of the S7 communication protocol on TCP port 102. WinCC Flexible ships with a dedicated SIMATIC S7 200 driver that targets exactly this subset.

  1. Open the HMI project in WinCC Flexible 2008 SP5.
  2. In the project tree, double-click Connections and add a new connection.
  3. Set the parameters as listed below.
    Parameter Value
    Communication driver SIMATIC S7 200
    HMI device KTP600 PN (or the panel in use)
    Connection type Ethernet
    IP address (LOGO! side) 192.168.0.1 (or the configured address)
    Port 102
    Rack 0
    Slot 1
    TSAP (local) 01.01
    TSAP (partner) 01.00 (LOGO! always uses 01.00)
  4. Compile and download the connection to the KTP600.

For the equivalent configuration under TIA Portal V13 SP1 and later, select the LOGO! HMI driver instead of S7-200; the dialog options are identical except that TIA Portal exposes a slightly more verbose name "LOGO! 8". The Siemens FAQ 54997729 ("How do you create a time switch with WinCC flexible?") covers the screen-side configuration of a weekly timer that does not use a real LOGO! at all, and is a useful companion reference for understanding the time switch data layout from a different angle.

Defining Tags in WinCC Flexible

For each VM byte used by the Weekly Timer, create a tag in WinCC Flexible. The tag address must match the VM byte address in the LOGO! Soft Comfort mapping exactly. The following example assumes a Weekly Timer block that starts at VW0.

WinCC tag name Address Type Acquisition Maps to
WT1_OnHour VB 0 BYTE (unsigned) Cyclic, 1 s BCD-encoded on-time hours
WT1_OnMinute VB 1 BYTE (unsigned) Cyclic, 1 s BCD-encoded on-time minutes
WT1_OffHour VB 2 BYTE (unsigned) Cyclic, 1 s BCD-encoded off-time hours
WT1_OffMinute VB 3 BYTE (unsigned) Cyclic, 1 s BCD-encoded off-time minutes
WT1_DayMask VB 4 BYTE (unsigned) Cyclic, 1 s Bit field, Mo = bit 0 ... Su = bit 6

Important details to verify at this stage:

  • The data type must be unsigned BYTE. A signed BYTE interprets 0x80 – 0xFF as negative numbers and will display the day mask incorrectly whenever bit 7 is set.
  • The tag must be external (pointing at the LOGO! connection), not internal to the panel. Internal tags live in the panel's own memory and are never written to the LOGO!.
  • For editing, enable Write back to PLC on every tag. Without this flag, the panel accepts the value on the screen but discards it as soon as the operator navigates away.
  • Set the update cycle to 1 s for monitoring. Faster cycles (100 ms) are supported but do not add value because the LOGO! 0BA7 itself only refreshes the parameter VM area once per program scan.
A common pitfall is to define the tag as a 16-bit WORD at VW0. This collapses the two time bytes into a single 16-bit register, which works for display but blocks separate entry of hour and minute. Use BYTE tags for the two-byte time fields so the operator can change hour and minute independently.

Reading the Timer — Display Strategies

There are three useful ways to read the on-time byte from a screen.

1. Hexadecimal I/O field. Bind an Output I/O field to WT1_OnHour and set the display format to Hexadecimal with 2 digits. The field renders the raw byte as a two-character hex value. For 14:00 the field reads "14"; for 23:30 the field reads "23" and a second field bound to WT1_OnMinute reads "30".

2. Decimal I/O field with the BCD caveat. Bind an Output I/O field to WT1_OnHour and accept the default decimal display. For 14:00 the field reads "20" (decimal interpretation of 0x14). This is rarely useful in production but is invaluable as a sanity check during commissioning: if the field shows "20" where you expect 14, you have confirmed that the tag is reading the correct byte and the only issue is the display format.

3. Concatenated "hhmm" string. Bind a 4-character hexadecimal I/O field to VW0 (16-bit) and the field reads "1430" for 14:30. This is the most compact representation and the easiest for an engineer to recognise at a glance, but it is not editable from the HMI without further scripting.

Choose the strategy that best fits the operator's workflow. For read-only monitoring, the concatenated "hhmm" approach is the most readable. For combined read and write, use two single-byte hexadecimal I/O fields (one for hour, one for minute).

Writing the Timer — Hexadecimal I/O Field Method

  1. On the screen, place an I/O field with mode = Input/Output.
  2. Bind it to the WT1_OnHour tag.
  3. Open the field's Properties dialog. Under Representation → Display format, choose Hexadecimal with 2 digits.
  4. Repeat for WT1_OnMinute, WT1_OffHour, and WT1_OffMinute.
  5. Compile and download the HMI project.

From the HMI the operator can now tap each field and enter a value such as 14 for 14 hours, or 30 for 30 minutes. The panel writes the BCD byte 0x14 / 0x30 directly into VM, and the LOGO! 0BA7 (or LOGO! Soft Comfort in online view) displays the time as 14:30.

The hexadecimal I/O field has a useful side effect: it accepts only characters 0–9 and A–F. This means a value of 0x2A is rejected as invalid input, but a value of 0x2F (which is not a valid BCD hour) would still be accepted because hex does not know about BCD constraints. Always validate the entered value by reading the LOGO! display after a write.

On LOGO! 0BA7 firmware revisions earlier than V1.08.01, parameter changes written through VM mapping are not always picked up by the function block until the LOGO! is power-cycled or transitioned through STOP/RUN. If the operator reports that the value reverts to the previous time, perform a power cycle of the LOGO! to force a parameter refresh.

Writing the Timer — Text List Drop-Down Method

Hexadecimal entry is fast for an engineer but unfriendly for an operator who expects a 24-hour clock. A second technique uses two text lists in WinCC Flexible: one for hours (entries "00" through "23") and one for minutes (entries "00" through "59"). Each text-list entry stores the value the LOGO! expects at the VM byte — that is, the BCD byte interpreted as an unsigned integer (e.g. the text "14" maps to value 20, the text "23" maps to value 35).

Concretely, for the hour text list:

Display text Assigned value (decimal) Raw byte written to VM Interpreted by LOGO! as
"00" 0 0x00 00 hours
"09" 9 0x09 09 hours
"10" 16 0x10 10 hours
"14" 20 0x14 14 hours
"19" 25 0x19 19 hours
"20" 32 0x20 20 hours
"23" 35 0x23 23 hours

The minute text list follows the same pattern. The entries for 0–9 are values 0–9; entries for 10–19 are values 16–25; entries for 20–29 are values 32–41; entries for 30–39 are values 48–57; entries for 40–49 are values 64–73; entries for 50–59 are values 80–89. Building the 60-entry list by hand is tedious; the fastest approach is to export an empty text list from WinCC Flexible, fill the cells in a spreadsheet, and re-import.

Steps to build the hour text list in WinCC Flexible:

  1. In the project tree, right-click Text Lists and choose Add new.
  2. Name the list Hours_BCD and set the list type to Decimal (WinCC accepts BCD values as decimals in this case, because the underlying byte interpretation is identical).
  3. For each entry "00" through "23", add a row with the display text in the Text column and the assigned decimal value (0, 1, 2, ..., 9, 16, 17, ..., 35) in the Value column.
  4. On the screen, insert a Symbolic I/O field bound to WT1_OnHour. Set the Selection list property to Hours_BCD. The field will render as a drop-down.
  5. Build a parallel Minutes_BCD text list and bind it to WT1_OnMinute.

The two symbolic I/O fields now look like two drop-downs. Selecting "14" writes 20 to VB0, which LOGO! reads as BCD hour 14. The on-time is now editable by an operator who has never heard the term "hexadecimal".

Editing via the text list is a one-way "select and write" pattern. There is no live verification that the LOGO! has accepted the new value, only a confirmation that the panel sent the byte. Always validate the operator-entered value by reading the time back from the LOGO! display, or overlay a hexadecimal I/O field for engineering use during commissioning.

Day-Mask Editing and Cam Pair Considerations

The day mask byte is a 7-bit field. The bit assignment in the LOGO! 0BA7 is:

Bit Day Hex value if alone
0 Monday 0x01
1 Tuesday 0x02
2 Wednesday 0x04
3 Thursday 0x08
4 Friday 0x10
5 Saturday 0x20
6 Sunday 0x40
0 – 6 all set Every day 0x7F

Bind a hexadecimal I/O field to WT1_DayMask (or to whichever byte holds the cam's day mask in your project). The operator types values such as 5 for Monday + Wednesday (bits 0 and 2 set) or 7F for every day of the week. For projects with multiple Weekly Timer blocks, repeat the whole procedure for each block. The VM mapping dialog shows the start address of each block's slice; address the WT2_* tags to the slice that LOGO! Soft Comfort has assigned to the second block. Do not assume that block 2 follows block 1 contiguously in VM; LOGO! Soft Comfort is free to insert padding for alignment or to skip reserved regions.

Verification, Diagnostics, and TIA Portal Migration

After completing the procedure, run the following checks.

  1. Read-back check. With the LOGO! 0BA7 in RUN, place the LOGO! Soft Comfort online monitor next to the HMI screen. The on-time value displayed on the LOGO! should match the value displayed on the HMI byte-for-byte.
  2. Round-trip check. Edit the on-time from the HMI, then read the LOGO! display and confirm the change. If the LOGO! does not reflect the change, perform a power cycle of the LOGO! to force a parameter refresh (a known limitation on 0BA7 firmware earlier than V1.08.01).
  3. Network check. From the engineering station, ping the LOGO! IP address. If the ping fails, the panel will not be able to read or write either.
  4. Parameter VM mapping check. In LOGO! Soft Comfort, choose Tools → Parameter VM Mapping → View active mapping. If the Weekly Timer block does not appear, the VM area is not exposed and the panel writes will silently fail.

For a sanity check that is independent of the Siemens documentation, the Snap7 LOGO! 0BA7 / 0BA8 reference documents the S7-200-compatible memory layout of the LOGO!, the supported cam counts, and the byte offsets for every function block. Treat Snap7 contents as a third-party cross-check rather than an authoritative Siemens source.

Troubleshooting matrix for the most common field issues:

Symptom Likely cause Resolution
HMI shows decimal 20 instead of 14:00 Tag is configured as Decimal display Change I/O field to Hexadecimal display, or switch to the text list method
Operator enters a value but the LOGO! display does not update VM mapping not enabled in LOGO! Soft Comfort Re-enable VM mapping for the Weekly Timer block, re-transfer the project, and cycle power on the LOGO!
WinCC shows "—" for all time tags Communication error or S7-200 driver mismatch Verify cable, IP addresses, and rack/slot. Set the PG/PC interface to S7ONLINE → TCP/IP and ping the LOGO!
Value updates briefly then reverts to the previous time LOGO! 0BA7 firmware refreshes parameter on STOP/RUN only Cycle power or STOP/RUN after a parameter write; for sustained persistence, write to SD card or use the LOGO! 0BA7 retentive parameter set
Day mask field always reads 0 Day mask is read as signed BYTE in WinCC Set the tag data type to unsigned BYTE (USINT)
Cannot find S7-200 driver in WinCC Flexible Installation missing SIMATIC S7 200 option Reinstall WinCC Flexible with "S7-200" option enabled. On TIA Portal V13+, the LOGO! HMI driver replaces the S7-200 option
Text list value does not produce the expected time on the LOGO! Decimal value entered is the raw byte, not the BCD interpretation Confirm the value: for hour 14, the assigned value must be 20 (0x14), not 14. For minute 30, the assigned value must be 48 (0x30), not 30
Two weekly timer blocks overlap in VM VM mapping manually edited to non-contiguous addresses Recompile the project in LOGO! Soft Comfort and accept the auto-assigned addresses

Engineers migrating a project from WinCC Flexible 2008 to TIA Portal V13 SP1 or later will find that the same VM byte addresses and the same data types apply. The only changes are: the driver name (LOGO! 8 instead of SIMATIC S7 200), the project tree layout, and the HMI runtime image (Comfort panels instead of Basic panels). The two techniques documented above transfer to TIA Portal with only minor renames in the property dialogs.

Frequently Asked Questions

Why does my LOGO! 0BA7 weekly timer not update when I change the time from the HMI?

VM mapping is probably not enabled for the Weekly Timer block in LOGO! Soft Comfort. Open the project, choose Tools → Parameter VM Mapping, tick the on-time, off-time, and day-mask parameters, note the start address, re-transfer the project, and cycle power on the LOGO! 0BA7. The byte will then be writable from WinCC Flexible.

Why does the HMI show "20" when the time is 14:00?

LOGO! stores the hour as a BCD byte (0x14 for 14:00). When the WinCC I/O field is set to Decimal display, it reads 0x14 as the regular integer 20. Switch the I/O field to Hexadecimal display, or use the text list workaround, and the field will read "14".

Can the operator enter a time in HH:MM format directly on the panel?

WinCC Flexible has no native HH:MM input field. The two workarounds are a hex I/O field where the operator types "1430" (BCD-encoded as 0x14 0x30) for the combined on-time, or two text-list-driven symbolic I/O fields that act as drop-down selectors for hours and minutes.

How many bytes does a single Weekly Timer block occupy in VM?

A single-cam Weekly Timer block occupies 5 bytes: 1 day mask, 2 on-time (hour, minute), 2 off-time (hour, minute). A full 3-cam block (the maximum on LOGO! 0BA7) occupies 15 bytes. Verify the exact start address and stride in the LOGO! Soft Comfort VM Mapping dialog before wiring tags in WinCC Flexible.

Does the same procedure work for LOGO! 0BA8 and 0BA9?

Yes. The 0BA8 (LOGO! 8.2) and 0BA9 (LOGO! 8.3) generations use the same VM layout for weekly timers. The S7-200 communication driver is still the only WinCC Flexible option. TIA Portal users on V13 SP1 and later can use the dedicated LOGO! HMI driver instead, with the same VM address layout and the same data types.

Back to blog