Overview: Why Built-in Flashing Skips Boolean Process Tags
Siemens TIA Portal WinCC (Comfort, Advanced, Professional) and the legacy WinCC Flexible 2008 SP5 runtime expose a native Flashing property on graphic objects. That property is bound to the HMI runtime's internal blink generator and to tag update cycles - it does not accept a Boolean process tag as its trigger. The result is a gap that most first-time integrators hit: the Flashing property is grayed out, the animation dialog shows no boolean trigger, and the only flashing options refer to internal HMI tags or to the configured acquisition cycle.
There are four practical ways to close that gap on Siemens Panels (Comfort TP/MTP, Mobile Panel 277/377, MP 377, KTP, and the newer Unified Comfort Panels running WinCC Unified):
- Generate the blink pattern in the PLC using a clock memory byte, then animate the graphic's Visibility against the resulting Boolean bit.
- Drive a global VBScript (or C script on legacy panels) that toggles an internal HMI tag and reads the process tag, then bind the visibility animation to the internal tag.
- Use the built-in Flashing property by mapping a process tag to an internal HMI tag of the same type through a tag prefix or pointer - only recommended on Comfort Panels where the Flashing property accepts HMI tags bound to PLC addresses.
- Use the Appearance / Global Color Change animation with a blink tag to alternate two states without hiding the object.
This article focuses on Method 1 (clock bit + visibility) and Method 2 (VBScript), because they are the two that work on every Siemens panel firmware from WinCC Flexible 2008 SP5 (used with MP 377) through TIA Portal V19 with WinCC Unified V19. Method 3 is documented only as a fallback because its behavior varies by panel generation.
Prerequisites
| Item | Specification |
|---|---|
| Engineering software | SIMATIC TIA Portal V17 / V18 / V19 with WinCC Comfort/Advanced/Professional, or WinCC Flexible 2008 SP5 for legacy MP 377 panels |
| Panel firmware | WinCC Comfort V17 or higher on TP/MTP Comfort; WinCC Flexible SP5 on MP 377; WinCC Unified V19 on Unified Comfort Panels |
| Controller | SIMATIC S7-1200 (FW 4.5+), S7-1500 (FW 2.9+), S7-300/400, or ET 200SP CPU |
| Connection | PROFINET or PROFIBUS, OPC UA (Unified only), or Modbus TCP for non-Siemens PLCs |
| Process tag | Boolean, single-bit, sourced from the PLC (e.g., %DB5.DBX0.0, %I0.0, or AlarmActive) |
| Blink frequency | 1 Hz (500 ms on / 500 ms off) is the default; 0.5 Hz and 2 Hz are also useful |
| Plc user rights | Online access to the S7 CPU to enable clock memory |
Method 1: PLC Clock Bit + Visibility Animation (Recommended)
This is the most reliable method because no scripting is involved, runtime load is minimal, and the blink continues to work even if the HMI connection is briefly lost and re-established.
Step 1 - Enable Clock Memory in the S7 CPU
In TIA Portal, open the device configuration of the S7-1200 or S7-1500 CPU, then go to Properties > System and clock memory. The default clock memory byte address is MB0. The bit periods are:
| Bit | Period (s) | Frequency (Hz) | Typical use |
|---|---|---|---|
| %MB0.0 | 10.0 | 0.1 | Slow "heartbeat" / general status |
| %MB0.1 | 5.0 | 0.2 | Watchdog |
| %MB0.2 | 2.0 | 0.5 | Slow alarm blink |
| %MB0.3 | 1.0 | 1.0 | Standard alarm blink |
| %MB0.4 | 0.5 | 2.0 | Fast fault blink |
| %MB0.5 | 0.2 | 5.0 | Critical fault (use sparingly) |
| %MB0.6 | 0.1 | 10.0 | Test only |
| %MB0.7 | 0.05 | 20.0 | Do not use - exceeds display refresh |
Reference: SIMATIC S7-1200 Programmable Controller - System Manual (2022 edition), section on clock memory bits.
Step 2 - Define the Process Tag in the HMI
Open the HMI tag table. Create a Boolean tag, for example AlarmActive, with the following properties:
- Name:
AlarmActive - Data type:
Bool - Connection:
HMI_Connection_1(or the project-defined PROFINET/OPC UA connection) - PLC address:
%DB5.DBX0.0(S7-1500),DB5.DBX0.0(S7-300), orI0.0(input) - Acquisition mode:
Cyclic continuous - Acquisition cycle:
500 msfor a 1 Hz blink, or 200 ms for a 2 Hz blink - Update on tag limit violations:
On(recommended)
Step 3 - Add a Second Boolean Tag for the Blink Pattern
Create a second HMI tag that mirrors the PLC clock bit. For a 1 Hz blink use:
- Name:
Blink1Hz - Data type:
Bool - PLC address:
%MB0.3(S7-1500/1200) orM0.3(S7-300/400) - Acquisition cycle:
200 ms(faster than the blink period to avoid stutter)
Step 4 - Configure the Graphic's Visibility Animation
Select the graphic object on the screen (lamp, status icon, alarm banner, or rectangular field). In the Properties window open the Animations tab and add a new Visibility animation. Set:
- Trigger tag:
AlarmActive(the process tag) - Operator:
AND(so a second boolean can be added for the blink) - Add condition:
Blink1Hz=1 - Range / state: when the AND expression is TRUE, the graphic becomes visible; when FALSE, the graphic is hidden
This creates a compound expression: graphic is visible only when AlarmActive AND Blink1Hz are both TRUE. Since Blink1Hz toggles every 500 ms, the graphic blinks at 1 Hz whenever AlarmActive is set. The animation re-evaluates each time the HMI reads either tag, which is bounded by the acquisition cycle (200 ms in the example).
Step 5 - Add a Static Fallback Graphic
Place a second, identical graphic (same .png, .svg, or .bmp) at the same coordinates, but bind its Visibility to AlarmActive alone. Now you have two stacked layers:
| Layer | Trigger expression | Result |
|---|---|---|
| Top (blinking layer) | AlarmActive AND Blink1Hz | Blinks while alarm is active |
| Bottom (steady layer) | AlarmActive | Visible the rest of the time, hidden when alarm is inactive |
This two-layer approach is more robust than hiding the entire object, because the steady layer confirms the alarm state even if the blink bit is mis-configured or the cycle is mis-tuned.
Method 2: VBScript Toggle (Single-Layer, No PLC Clock Bit)
Use this method when the PLC cannot expose a clock bit (third-party controller, Modbus TCP slave, OPC UA server), or when the blink frequency must be set from the HMI side. On TIA Portal WinCC Comfort/Advanced, VBScripts are configured under Events > Scheduled tasks or Events > Value change.
Step 1 - Create an Internal HMI Boolean Tag
- Name:
BlinkTgl - Data type:
Bool - Source:
Internal tag(not connected to any PLC) - Initial value:
0
Step 2 - Add a Scheduled Task
In the screen or project tree, open Scheduled tasks and create a new task. Configure it as follows:
- Trigger: Cyclic
- Cycle:
500 ms - Function: VBScript - the following body toggles the tag and the visibility is then driven by an AND with the process tag.
Step 3 - VBScript Body
Dim bCurrent
bCurrent = SmartTags("BlinkTgl")
If bCurrent = True Then
SmartTags("BlinkTgl") = False
Else
SmartTags("BlinkTgl") = True
End If
Step 4 - Bind the Visibility Animation
Select the graphic and add a Visibility animation with the compound expression AlarmActive AND BlinkTgl. Place a second identical graphic below it with the expression AlarmActive only, identical to the two-layer method above.
SmartTags object model. On legacy WinCC Flexible 2008, use C scripts and the GetTagBit/SetTagBit API instead; see Method 3.Method 3: C Script (WinCC Flexible on MP 377)
For MP 377 and other panels running WinCC Flexible 2008 SP5, VBS is unavailable and C scripts are the only scripted option. The script calls the runtime API to toggle a tag every 500 ms.
BOOL b;
b = GetTagBit("BlinkTgl");
SetTagBit("BlinkTgl", !b);
return 0;
Configure this as a Scheduled task with a 500 ms cycle in the WinCC Flexible project tree under Schedules. Tag BlinkTgl is an internal Boolean, and the Visibility animation uses the same AND pattern as Methods 1 and 2.
Method 4: Built-in Flashing with Pointer Mapped Process Tag
On Comfort Panels with TIA Portal V16 and higher, the Flashing property of a graphic object can be bound to a Boolean HMI tag whose PLC tag source is a process tag. This works only when the tag acquisition cycle is set to at least 200 ms, and the Flashing property must be configured to use Tag flashing (not Time flashing).
Steps:
- In the screen, select the graphic object.
- Open Properties > Appearance > Flashing.
- Set Flashing = On, Flashing rate = Medium (1 Hz) or Slow (0.5 Hz).
- Bind the Flashing to the same process tag, e.g.,
AlarmActive.
This is the simplest approach when it works, but its behavior on TIA Portal V17 and later is inconsistent for non-Comfort panels and is not supported on WinCC Unified Panels. Treat it as a fallback.
Color Animation as an Alternative to Visibility
If a fully-hidden blink is too distracting, use a Global color change animation that alternates two colors at the blink rate. Select the graphic, open Animations > Appearance, and configure two color states triggered by the same AND expression AlarmActive AND Blink1Hz. This approach also avoids the need for stacked layers.
Tag Configuration Reference
| Tag name | Source | Data type | PLC address | Acquisition cycle | Purpose |
|---|---|---|---|---|---|
| AlarmActive | PLC | Bool | %DB5.DBX0.0 (S7-1500) / DB5.DBX0.0 (S7-300) / I0.0 (input) | 500 ms | Drives alarm visibility |
| Blink1Hz | PLC | Bool | %MB0.3 (clock bit) | 200 ms | 1 Hz blink pattern |
| BlinkTgl | Internal | Bool | - | 500 ms scheduled task | Toggled by script in Method 2/3 |
Verification
- Compile the TIA Portal project and download it to the HMI and PLC.
- Go online with the S7 CPU. Watch
%MB0.3in the watch table - confirm the bit toggles at 1 Hz. - Force
AlarmActiveto TRUE in the watch table. - On the HMI, observe the graphic: it must blink at 1 Hz while the alarm is active and be hidden while the alarm is reset.
- Reset the alarm and confirm the graphic disappears completely (the bottom layer hides when AlarmActive is FALSE).
- Disconnect the PROFINET cable for 5 seconds, reconnect, and confirm the blink resumes without operator intervention.
- On the TIA Portal HMI diagnostics view, confirm CPU load stays below 70% and runtime memory is not climbing - the visibility animation should add less than 1% CPU load on a typical Comfort Panel.
Troubleshooting Matrix
| Symptom | Likely root cause | Fix |
|---|---|---|
| Graphic does not blink, alarm visible steadily | Clock memory byte disabled in CPU properties | Enable clock memory in PLC device configuration, set byte = MB0 (or custom), download to CPU |
| Graphic does not blink, alarm hidden | Acquisition cycle of Blink1Hz too long (e.g., 1 s for 1 Hz blink) | Set Blink1Hz acquisition cycle to 200 ms or less |
| Graphic stutters (flickers irregularly) | Update cycle of Blink1Hz not synchronised with the runtime refresh | Match Blink1Hz update cycle to the screen refresh (typically 200 ms on Comfort Panels) |
| Graphic is hidden when alarm active, shows when alarm clears | Visibility expression inverted (using OR instead of AND, or negating Blink1Hz) | Open the Visibility animation and confirm expression is AlarmActive AND Blink1Hz = 1 |
| Built-in Flashing property is grayed out | Panel does not support tag-based flashing or tag is internal only | Switch to Method 1 (clock bit + visibility) or Method 2 (VBScript) |
| Visibility animation evaluates but never shows the graphic | Process tag and blink tag use different connections or update sources | Confirm both tags use the same HMI_Connection_1 and the connection is online |
| Blink works on simulator, fails on panel | Clock memory disabled in the runtime CPU but enabled in the offline project, or PLC is in STOP | Check PLC operating mode, run CPU, force MB0.3 manually to confirm wiring |
| Alarm shows two overlapping icons | Two layers stack at the same coordinates | Offset the steady layer by 0,0 and the blinking layer by 0,0 but render order with the blinking layer on top |
Field-Proven Tips
- Do not use clock bit %MB0.7 (20 Hz). The HMI display refresh is typically 100 ms, so 20 Hz blink looks like a steady dim color and defeats the purpose.
- If the PLC program uses OB35 (cyclic interrupt), do not place user logic that modifies %MB0 - the clock bits are write-protected by the CPU firmware and writing to them produces a CPU STOP with SF LED and diagnostic buffer entry "Write access to clock memory".
- For WinCC Unified Panels, prefer Method 2 (VBScript scheduled task) over the built-in Flashing property - the Unified runtime's Flashing property in V18 has known gaps for process tags and was extended only in V19.
- Reserve dedicated clock bits for blinking by mapping them to symbolic names (e.g.,
Blink_1Hz=%MB0.3) in the PLC tag table. This makes the project portable across CPU firmware versions. - When migrating from WinCC Flexible 2008 (MP 377) to TIA Portal WinCC Comfort, the C script API maps directly:
GetTagBit/SetTagBitcontinue to work in TIA Portal's C editor. VBS is added as an additional option.
FAQ
Why is the Flashing property grayed out for a Boolean process tag in TIA Portal WinCC?
The Flashing property on most Comfort Panels is bound to internal HMI tags or the runtime's time generator, not directly to a Boolean PLC process tag. Use the Visibility animation with a clock bit (Method 1) or a VBScript toggle (Method 2) to blink a graphic driven by a process tag.
Which Siemens clock memory bit is best for a 1 Hz alarm blink?
Use %MB0.3, which is the CPU clock bit with a 1.0 s period (50% duty cycle). Enable clock memory in the CPU's device properties under System and clock memory, and set the memory byte to MB0. The same principle applies to S7-300/400: clock bit M0.3, 1 Hz.
Can I flash a graphic from a Boolean tag on a third-party PLC (Modbus TCP)?
Yes. The HMI sees a Boolean process tag regardless of its source. Use Method 2 (internal toggle tag driven by a 500 ms scheduled VBScript) and bind the Visibility animation to the AND of the Modbus tag and the toggle tag. The PLC does not need to provide a clock bit.
How do I acknowledge an alarm flash from the PLC in WinCC?
Wire the PLC's acknowledgement bit (e.g., %DB5.DBX0.1) to a second Visibility animation on the same graphic. Use an OR expression: the graphic blinks while AlarmActive is true, then transitions to a steady "acknowledged" state when Ack is set. The standard Siemens alarm control also supports PLC-side acknowledgement via the tag "Alarm_Ack_PLC" on the alarm view.
Does the VBScript blink work on WinCC Unified Panels?
Yes, WinCC Unified V18 and higher support VBScript scheduled tasks with the same SmartTags object model. On Unified V19, the built-in Flashing property was extended to accept process tags directly, so Method 1 is no longer required if you are on V19. For V18 and earlier, use the VBScript toggle approach.