Problem Summary
A Siemens MP277 10" Touch HMI displays the correct Boolean state in a Text I/O field bound to a SIMATIC S7-300 tag (e.g. M0.0), but the configured background color animation on a graphic object never updates when the bit toggles. Communication and tag acquisition are confirmed working because the value reaches the panel; only the visual state change fails. This is a known configuration pitfall in WinCC Flexible 2008 SP5 (and earlier SPs) where the Appearance animation engine does not evaluate a Boolean tag for discrete value ranges.
- Text I/O field shows "0" / "1" correctly when bound to
M0.0. - Color (Appearance) animation on the picture/graphic does not change.
- No compiler warnings, no HMI runtime alarms, no connection errors.
- Behavior persists after deleting and re-creating the animation.
Affected Hardware and Software
| Component | Order Number (MLFB) | Role |
|---|---|---|
| SIMATIC S7-300 CPU 313C | 6ES7313-5BE00-0AB0 | PLC, 24 DI / 16 DO / 5 AI / 2 AO onboard, bit memory area M0.0
|
| SM 331 AI 8 x TC | 6ES7331-7PF11-0AB0 | Analog input module (8 thermocouple channels) – peripheral I/O, not the source of the HMI tag in this case |
| SIMATIC MP 277 10" Touch | 6AV6 643-0CD01-1AX1 | HMI panel running WinCC Flexible 2008 SP5 RT |
| Engineering software | WinCC Flexible 2008 SP5 | Configuration tool (ES) |
| STEP 7 | V5.5 + SP4 (or later SP for the hardware catalog) | PLC programming – M0.0 source |
The failure mode is independent of the I/O module (the SM331-7PF11 thermocouple card is incidental in this configuration; the tag in question is from the CPU's Merker / bit-memory area).
Root Cause Analysis
WinCC Flexible animations on graphical object properties (Color, Visibility, Position, etc.) require a numeric tag of type INT, WORD, or DWORD as the trigger source. When the tag is configured as Bool (Bit) in the HMI tag table, the animation's "Discrete value ranges" dialog cannot resolve the value into the configured 0/1 buckets because the internal data width is 1 bit and the dialog expects an integer index.
The text I/O field works because the Text I/O output formatter natively supports Boolean and renders "0" / "1" or a configured text list. The Appearance animation does not share that formatter – it walks the configured value-range table and matches the integer representation of the tag. With a 1-bit tag, the comparison tag == 0 and tag == 1 can be made to function only when the HMI tag type is set to Binary / Bit and the discrete-value range dialog is opened against an integer tag in the PLC (typically by toggling the tag's acquisition to INT and using a 0 / 1 PLC value).
Two configuration defects typically exist together in this scenario:
-
Tag type mismatch – the HMI tag is created as
Boolwhen it must beINT(orWORD) for the animation. - Value range misconfiguration – the discrete value ranges do not include 0 and 1 as the bucket boundaries (e.g. user defined 0–100 = grey, 101–200 = green, but the PLC only outputs 0 or 1, so the lookup never enters the green bucket).
Diagnostic Procedure
- Open the WinCC Flexible project in the engineering station.
- In the project tree, expand Tags → HMI Tags and locate the tag driving the color animation (e.g.
test). - Open the tag properties and note the Data type field. If it reads
Bool, this is the root cause. - Open the picture containing the affected graphic, right-click the object → Properties → Animations → Appearance.
- Inspect the Discrete value ranges table. Note the lower / upper bounds and the color assignments.
- Cross-check the value actually written by the PLC. Use a temporary Text I/O field bound to the same tag; observe the runtime value when the bit is set / cleared.
Solution 1 – Convert the HMI Tag to Integer
- In the HMI tag table, change the Data type of the tag from
BooltoInt(signed 16-bit). - Adjust the Length if necessary (default 2 bytes is correct for INT).
- Recompile and download to the MP277.
- Ensure the PLC writes either
0(reset) or1(set) into the source area – e.g.L 1; T MW 0;for a set bit atM0.0, or use a contact coil to write to a marker word. - Re-open the Appearance animation. In the Discrete value ranges table, define two rows:
- Value 0 → Grey (default color)
- Value 1 → Green (or any project color)
If you want to keep the source as a Boolean contact, mirror it into a marker word in the PLC:
// STL, S7-300
A M 0.0 // source bit
= M 10.0 // mirrored bit
L MW 10 // load mirrored word for HMI tag
T MW 12 // write to HMI-consumed word
Bind the HMI tag to MW12 as Int. The bit state now propagates as 0 or 1 to the HMI, satisfying the animation's value-range lookup.
Solution 2 – Use the Binary / Bit Trigger Mode
WinCC Flexible 2008 SP3+ supports a binary trigger for Appearance animations when the bound tag is a Boolean. The mode must be selected explicitly in the animation dialog:
- Select the graphic object → Properties → Animations.
- Add an Appearance animation.
- In the Trigger section, change the trigger type from "Tag (discrete value ranges)" to "Bit (0 / 1)" or "Binary tag".
- Assign
Color [0] = Greyfor value 0 andColor [1] = Greenfor value 1.
Solution 3 – Re-Bind to a Word, Avoid Range Ambiguity
A common secondary failure is that the discrete ranges are defined for values that the PLC never produces. For example, configuring 0 – 100 = grey and 101 – 200 = green while the tag is 0 or 1 will leave the picture permanently grey. Correct this by aligning the lower / upper bounds to the actual integer values present in the runtime:
| Range | Color | Notes |
|---|---|---|
| 0 – 0 | Grey (default) | Single-point bucket for the OFF state |
| 1 – 1 | Green | Single-point bucket for the ON state |
| 2 – 32767 | Red (alarm) | Optional catch-all for invalid values |
Using single-point buckets guarantees that an exact match is required and that stray analog noise (a common scenario on thermocouple channels from the SM331-7PF11) does not accidentally trigger a color change.
Solution 4 – Migrate the Animation to WinCC Unified (Long-Term)
The MP277 platform is end-of-life. Newer COMOS-based panels (MTP/ Unified Comfort) use WinCC Unified V17 / V18 / V19 / V20 and a different animation model. If a panel replacement is planned, the migration steps are:
- Export the WinCC Flexible project via the migration tool (TIA Portal → Migrate project → WinCC Flexible → WinCC Unified).
- Open the migrated project in TIA Portal V17 or later.
- Locate the graphic object. Under Properties → Appearance → Background color, bind to an HMI tag of type
BoolorInt. - In the dynamic binding dialog, use a Multiplex or Script expression. WinCC Unified natively supports Boolean triggers for the Background color property.
- Use the Central Color Management palette to define project-wide color names. See the official procedure for Changing the object color (RT Unified) in the TIA Portal help.
Verification Procedure
- Compile the project (Project → Compiler → All) and confirm 0 errors / 0 warnings.
- Download to the MP277 (transfer mode or Ethernet route).
- Start Runtime on the panel.
- Force
M0.0 = TRUEfrom STEP 7 (VAT or program). The picture should change to the configured "ON" color within one update cycle (default 1 s; minimum 100 ms in the connection settings). - Clear
M0.0. The picture must return to the default color. - Cycle the bit at least 10 times to confirm no hysteresis or missed updates.
- Power-cycle the panel and verify the animation re-evaluates the tag on startup (the initial state must reflect the current PLC value, not a stale cached value).
Color Palette and Project Color Setup
To keep the design consistent across screens, always select colors from the WinCC Flexible Project Colors palette rather than arbitrary RGB values. Project colors are stored in the project file and are identical between the ES and the RT – they are required for delta downloads to work correctly on a remote MP277.
| Palette entry | Typical use | RGB |
|---|---|---|
| Color_Off | Bit cleared / safe state | #C0C0C0 (light grey) |
| Color_On | Bit set / run state | #00C800 (green) |
| Color_Warning | Threshold exceeded | #FFA000 (amber) |
| Color_Alarm | Fault / interlock | #C00000 (red) |
When the User-defined colors picker is used, the resulting color is stored as a one-off RGB triple inside the screen object. Modifying it later requires a full project recompile and a complete download – an operational risk on running plants. The Siemens TIA Portal help recommends the Central Color Management approach for both WinCC Flexible and WinCC Unified projects, as documented at Changing the object color (RT Unified).
Common Pitfalls
- Bool tag bound to a discrete value range – the animation silently never fires. Always promote the tag to INT or use the binary trigger mode.
- Tag acquisition mode "On demand" with no other tag triggering the update – the color can stay stale for the entire screen lifetime. Use "Cyclic continuous" with an update time of 250 ms to 1 s for status animations.
-
Mixed endianness – if the tag is a WORD and the PLC writes bit 0 of
MW0, the panel sees the integer1. Do not assume the panel sees the bit value directly; it sees the 16-bit word. - Overlapping value ranges – if 0 – 200 is grey and 100 – 300 is green, both ranges match value 150. WinCC Flexible takes the first match; always keep ranges non-overlapping.
- Layered objects – the animation is on the background of the wrong object in a stacking group. Click through the layers in the editor to confirm the property is on the visible rectangle, not on an invisible parent.
- Compiler optimization – in some SP levels the compiler removes animations whose tag is never read elsewhere. Add a hidden Text I/O field bound to the same tag to keep the tag alive in the RT symbol table.
Troubleshooting Matrix
| Observed | Likely cause | Fix |
|---|---|---|
| Color never changes, Text I/O field shows 0 / 1 | Tag type = Bool | Convert to Int (Solution 1) |
| Color never changes, Text I/O field shows only 0 | PLC writes bit to MB0 but HMI tag points to MW0 with wrong offset |
Verify tag address and length |
| Color changes randomly | Overlapping value ranges | Make ranges non-overlapping, use single-point buckets |
| Color lags by several seconds | Update time too long | Lower the connection's update time to 250 ms – 1 s |
| Color change lost after power cycle | Tag is "On demand" and not refreshed at startup | Switch to "Cyclic continuous" |
| Color works in ES simulation, not on panel | Project colors not transferred | Recompile with "All" and perform a complete download |
Related Configuration Checks
- Connection settings: Project → Connections → MPI / PROFIBUS / Ethernet. Update time should be ≤ 1 s for status animations. Lower bound is 100 ms in WinCC Flexible 2008 SP3+.
- HMI device settings: Device → Properties → Cycle. Verify the screen cycle is short enough (1 s default is acceptable).
- Area pointer for date/time: if the panel uses a date/time area pointer, confirm it is configured; otherwise the screen refresh may be deferred.
- Screen caching: the MP277 RT caches screen bitmaps. Animations using Appearance re-render the affected region. If the cache is corrupted, perform a one-time full download with format option "Reset to factory settings".
FAQ
Why does my color animation work in the WinCC Flexible simulation but not on the MP277 panel?
The RT simulation on the engineering PC evaluates animations against local variables and often bypasses the strict tag-type check applied by the panel runtime. On the MP277, an HMI tag of type Bool cannot drive a discrete-value-range animation. Convert the tag to Int and define value ranges 0 and 1.
Can I bind a Boolean tag directly to a color animation in WinCC Flexible 2008?
Yes, in SP3 or later you can use the "Bit (0 / 1)" trigger mode in the Appearance animation dialog. If your SP level does not expose that option, mirror the Boolean into a marker word and bind an Int tag – the underlying mechanism is identical.
The value reaches the panel but the picture never changes color – is it a hardware fault?
No. The hardware path is correct because a Text I/O field on the same tag updates. The issue is in the engineering configuration of the Appearance animation (tag type or value range), not in the CPU 313C, the SM 331, or the MP 277.
How do I keep the source as a single bit in the PLC?
Use a marker word (MW10 for example) and load the bit into it with L MW10 after setting or clearing the bit, then bind the HMI Int tag to that word. The PLC programmer writes to a word instead of a bit, but the rest of the logic can keep using M0.0.
What is the recommended minimum update time for a color animation on the MP277?
Use 250 ms for typical status indication and 1 s for slow-changing process values. The WinCC Flexible 2008 minimum is 100 ms; going below that stresses the MPI/PROFIBUS bus on S7-300 systems and can cause retries on the connection.