WinCC Flexible Resolving the 16-Function Event Limit on IO Fields

David Krause12 min read
HMI / SCADASiemensTroubleshooting
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

When configuring a recipe selection screen in Siemens WinCC Flexible (2008 SP5 and earlier) engineers routinely pair a Symbolic IO field (the recipe selector) with multiple IO fields (one per recipe variable). Each IO field must display the value of the variable corresponding to the currently selected recipe. In a typical process this means 20–30 variables per recipe screen.

The naive implementation attaches 20–30 Set Value / Calculate / Set Bit functions to the Change event of the symbolic IO field so that, on recipe change, every dependent IO field is re-pointed to the correct PLC tag. This fails at compile time with the dialog:

ERROR OF EVENTS: More than 16 functions in list
(Function list of object <Symbolic_IO_field_1>, event 'Change')

WinCC Flexible 2008 SP5 and WinCC Flexible 2007 enforce a hard limit of 16 configured functions per single object event. The limit applies to each event independently (Change, Activate, Deactivate, Press, Release, etc.), not to the object as a whole. Splitting the work between the Change event and the Activate event does not help when both are saturated by the same logic.

Confirmed limit: 16 functions per object event in WinCC Flexible 2005, 2007, 2008, and 2008 SP5. This restriction was carried into early TIA Portal WinCC projects for compatibility and is not present in the TIA Portal "Unified" scripting model.

Affected Products and Firmware

Product Family Catalog (MLFB) Minimum Image / Firmware Notes
SIMATIC TP 177 micro 6AV6 640-0BA11-0AX0 Image 1.1.x Limited tag count (250), but 16-fn rule still applies
SIMATIC TP 177A / TP 177B 6AV6 642-0AA10-0AX0 / 0BC10-0AX0 Image 2.x Recipe object available
SIMATIC OP 77B 6AV6 641-0BA11-0AX0 Image 1.x Monochrome, 16-fn rule applies
SIMATIC TP 270 / TP 277 Image 4.x Standard PN panels
SIMATIC MP 177 / MP 277 / MP 377 6AV6 642-0EA01-0AX0 series Image 4.x Multitouch "Multi Panel" family
SIMATIC Mobile Panel 277 6AV6 645-0EB01-0AX0 Image 4.x WLAN option, same 16-fn rule
Comfort Panels (TP700–TP2200) 6AV2 124-1xxxxx-xxxx WinCC Comfort V14+ 16-fn rule lifted in TIA Portal scripting

The 16-function cap is implemented in the WinCC Flexible configuration compiler and is not configurable. It exists to bound the compiled C-arrays that drive the runtime scheduler on the panel; the panel CPU has no headroom for more state transitions on a single event.

Root Cause Analysis

WinCC Flexible compiles each configured event into a fixed-size action table. The table is statically allocated so the HMI runtime can dispatch it without dynamic memory. When you add the 17th function, the editor throws the "ERROR OF EVENTS: More than 16 functions in list" message and refuses to save until you reduce the count.

There are three underlying causes, listed by frequency in field support tickets:

  1. Function per IO-field approach – the engineer added a Set Value or Calculate function for every one of the 20+ IO fields inside the symbolic IO field's Change event. This is the case in the original report.
  2. Bit-clearing boilerplate – a recipe selection also clears the visibility/animation bits of unused fields, doubling the function count.
  3. Animation + direct event combo – animations are not counted in the 16-fn limit, but engineers often attach direct tag-binding functions on top of the animations.
Why duplicating the symbolic IO field does not work: only one symbolic IO field owns the recipe index tag. A second copy of the same control binds to the same HMI internal variable but cannot host the cascaded Change event – WinCC Flexible will silently merge the events of duplicated objects.

Solution 1: Tag Multiplexing (Recommended)

Tag multiplexing is the canonical Siemens pattern for this scenario. The index tag of a multiplex tag is a normal HMI tag (typically INT, 0..n) that the symbolic IO field writes when the user changes the recipe. The multiplex tag itself contains n sub-elements (one per recipe) and is referenced from the dependent IO field as if it were a normal tag. The runtime selects the correct sub-element based on the index.

Step 1 – Define the multiplex tag

  1. Open Project > Communication > Tags and create a new tag, e.g. Recipe_Ingredient_01 with datatype INT.
  2. In the property dialog, switch the Acquisition type to Multiplex. A secondary dialog opens to declare the index tag.
  3. Create / select the index tag, e.g. Recipe_SelectIndex (INT, range 0–7 for eight recipes).
  4. Add one sub-element per recipe. Each sub-element is a discrete tag that maps to the actual PLC address, e.g.:
    Recipe_Ingredient_01[0] -> DB120.DBW 0   (Recipe 1, ingredient 1)
    Recipe_Ingredient_01[1] -> DB121.DBW 0   (Recipe 2, ingredient 1)
    Recipe_Ingredient_01[2] -> DB122.DBW 0   (Recipe 3, ingredient 1)
    ...
    Recipe_Ingredient_01[7] -> DB127.DBW 0   (Recipe 8, ingredient 1)
    
  5. Repeat for Recipe_Ingredient_02Recipe_Ingredient_23, or use the multiplex array form which scales with a single declaration.

Step 2 – Bind the IO fields to multiplex tags

  1. For each of the 23 IO fields, set the Process value property to the corresponding multiplex tag (e.g. Recipe_Ingredient_01). The IO field now automatically displays the value of the currently indexed recipe.
  2. No Change-event function is required. The runtime reads the index tag, looks up the sub-element, and refreshes the value on its own polling cycle (default 1 s, configurable under Screen > Cycle).

Step 3 – Wire the symbolic IO field to the index tag

  1. Create the symbolic IO field with entries 0..7, each labeled with the recipe name.
  2. In the Properties > General > Process value field, point the symbolic IO field directly at the index tag Recipe_SelectIndex. The dropdown's Selection index writes back the chosen index.

Result: a single binding per IO field, zero functions in the Change event, and the 16-function limit is no longer exercised.

Solution 2: Cyclic Screen Event (Scheduler)

When the recipe set is too dynamic to pre-declare all multiplex entries, or when calculations must occur on a fixed cycle regardless of user input, use a Scheduled Task attached at the screen level.

  1. In the project tree, expand Screens > <Recipe_Screen> > Events.
  2. Right-click Events and choose Add Function List…. Name it e.g. Recipe_Rebuild.
  3. Add the "Set Bit" / "Calculate" / "Set Value" functions needed to refresh the IO fields – these no longer count against the symbolic IO field's 16-fn limit because they live on a screen event, not an object event.
  4. Right-click the screen and choose Properties > Events > Cyclic. Set the cycle time (typical 500 ms–2 s depending on HMI panel class).
  5. Attach the Recipe_Rebuild function list to the cyclic event.
Cycle time vs. panel class: TP 177 micro / OP 77B use a 1 s minimum tick. MP 277 / TP 277 and Comfort Panels support 250 ms ticks. Setting a sub-second cycle on a TP 177 micro will cause "Cyclic overflow" runtime alarms.

Solution 3: Global Script for the Index Calculation

If the index depends on more than a single selector (e.g. recipe + batch + product variant), the formula cannot live in a single Calculate function. Move the math to a VBScript global script and call it from the IO field's Change event.

  1. Open Project > Scripts > Global Scripts and add a new Sub Recipe_ComputeIndex().
    ' WinCC Flexible VBScript
    Sub Recipe_ComputeIndex()
        Dim selRecipe, selBatch, idx
        selRecipe = SmartTags("Recipe_SelectIndex")
        selBatch  = SmartTags("Batch_Number")
        idx = (selBatch * 8) + selRecipe
        If idx > 63 Then idx = 0   ' clamp
        SmartTags("Recipe_SelectIndex") = idx
    End Sub
    
  2. In the symbolic IO field's Change event, add a single function: Execute Script > Recipe_ComputeIndex. The 17+ logical operations now occupy 1 slot in the event table.
  3. All dependent IO fields bind to the multiplex tag Recipe_Data[idx] – no per-field functions required.

Solution 4: Multiple Symbolic IO Fields with Staggered Indices

As a last resort, distribute the work across two recipe-selector symbolic IO fields, each writing a different index variable that maps to half the IO fields. This works around the 16-fn limit at the cost of screen real estate and should be reserved for legacy hardware that cannot host VBScript (e.g. OP 77B, TP 177A with firmware < 2.0).

  1. Selector A: Recipe_Index_A (range 0–3), controls multiplex tags 1–12.
  2. Selector B: Recipe_Index_B (range 0–3), controls multiplex tags 13–23.
  3. Each selector Change event has ≤ 12 functions – under the 16-fn cap.

Parameter Reference

Property Location Recommended Value
Multiplex index tag type Tags > [multiplex] > Index INT, range matches recipe count
Multiplex sub-element count Tags > [multiplex] > Sub-elements Number of recipes (1–1024 typical)
Polling cycle Screen > Cycle 1 s (default), min 250 ms (Comfort/MP 277)
Symbolic IO field selection mode Properties > General > Mode Output (writes index), Input/Output, or Input
Event limit per object Compiler fixed 16 (hard)
Functions per screen event Compiler fixed 50 (TP 177B / 2008 SP5), 200 on MP 277 / Comfort
Global script limit Project setting 256 procedures on MP 377, 64 on TP 177 micro

Verification Procedure

  1. Compile the project (Project > Compiler > All). The "ERROR OF EVENTS" dialog must no longer appear.
  2. Transfer the compiled runtime to the panel. On the panel, watch the transfer log for warnings like Function list truncated; if any appear, return to the editor and re-balance.
  3. Online test – open the recipe screen, change the symbolic IO field selection, and confirm each of the 23 IO fields updates within one polling cycle.
  4. Write-back test – edit a value in IO field 1, change the recipe, edit the same logical field, transfer to PLC via the recipe object, and verify both writes land in the correct DB area (use STEP 7 Monitor/Modify on the S7-300/400 or TIA Portal Watch Table on S7-1200/1500).
  5. Cycle test – on a Comfort Panel, the OS log should not contain Cyclic overflow entries. If it does, increase the cycle time to 1 s and re-test.

Troubleshooting Matrix

Symptom Likely Cause Corrective Action
Compile error: "More than 16 functions in list" Per-object event saturated Switch to multiplex tags or cyclic event
IO field does not update on recipe change Index tag not bound to symbolic IO field Check Process value property of the symbolic IO field
IO field always shows 0 Multiplex sub-element address missing or wrong Re-open the multiplex tag and verify each sub-element's PLC address
Runtime: "Cyclic overflow" Cyclic tick too short for panel class Increase cycle to 1 s (TP 177 micro / OP 77B) or 500 ms (MP 277 / Comfort)
Recipe writes wrong DB area Index off-by-one (recipe 1 uses index 0 internally) Subtract 1 in the Calculate function or in the VBScript
Cannot save symbolic IO field entries Listbox bit-count mismatch Number of entries must equal the number of sub-elements declared in the multiplex tag
Recipe transfer dialog fails Recipe object not synchronized with multiplex tag Open Recipes > Recipe_01, point Variable to multiplex tag Recipe_Ingredient_xx

Field-Proven Cautions

  • Multiplex tag index is 0-based; the symbolic IO field's first entry is index 0. Most user-facing recipe numbers are 1-based – apply a Calculate function (or a one-line VBScript) that adds 1 on read and subtracts 1 on write.
  • Multiplex tags cannot themselves be multiplexed. A cascade of "multiplex of multiplex" is not supported by the runtime; restructure as a single multiplex with enough sub-elements.
  • Recipe object vs. multiplex tag: the Recipe editor in WinCC Flexible expects a flat tag list, not a multiplex tag. Use the multiplex tag for IO field display only, and bind the Recipe object's variables to the sub-element directly when transferring.
  • Cross-project reuse: when copying a screen that contains a multiplex tag to another project, also export the tag from Project > Tag Export/Import (CSV). Symbolic tag names do not resolve across projects without explicit import.
  • Firmware check: TP 177B panels below Image 2.0 do not support the symbolic IO field's Selection index output – use the Selection value property and map it to the index tag via a Calculate function.

Cross-Reference to TIA Portal

If the same project is later migrated to TIA Portal WinCC (V14 or later, e.g. for a Comfort Panel TP 900 / TP 1200), the 16-function object event limit does not apply. Multiplex tags become Array DBs with index tags in the PLC, and the symbolic IO field is replaced by a Combo Box with a process value bound to the index. The patterns above translate directly:

  • WinCC Flexible multiplex tag → TIA Portal "PLC tag array" with index pointer
  • WinCC Flexible Change-event functions → TIA Portal "Value changed" event of the HMI tag
  • WinCC Flexible Scheduled Task → TIA Portal "Scheduled task" under HMI device

Refer to the SIMATIC WinCC Engineering V18 - Programming and Operating Manual for the unified scripting model.

Summary

The "More than 16 functions in list" error is a fixed compiler constraint in WinCC Flexible 2005/2007/2008. Resolving it does not require splitting the symbolic IO field – the canonical fix is tag multiplexing, which routes a single index tag to multiple sub-elements and lets the runtime do the dispatch. For dynamic recipes or complex index calculations, combine the multiplex tag with a Scheduled Task or a Global VBScript to keep the per-event function count at 1. Verify by compiling, transferring, and cycling through all recipes in online mode while monitoring the PLC with STEP 7 or TIA Portal.

FAQ

What is the exact function limit per object event in WinCC Flexible?

16 functions per object event. The limit is hard-coded in the WinCC Flexible 2005/2007/2008 compiler and applies independently to each event (Change, Activate, Press, Release, etc.). It is not lifted by splitting the logic across events on the same object.

Can I use a multiplex tag with the WinCC Flexible Recipe object?

The Recipe object itself expects a flat tag list, not a multiplex tag. Use the multiplex tag to drive the IO fields on the recipe screen for display, and bind the Recipe object's variables to the individual sub-element tags for the transfer to the PLC. Both bindings must be kept consistent or writes will land in the wrong recipe.

Which Siemens panels are affected by the 16-function limit?

All panels configured with WinCC Flexible 2005 through 2008 SP5 are affected: OP 73, OP 77A/B, TP 170, TP 177 micro, TP 177A/B, TP 270, TP 277, MP 177, MP 270, MP 277, MP 370, MP 377, and Mobile Panel 170/177/277. Comfort Panels (TP 700–TP 2200) configured in TIA Portal WinCC are not affected.

How do I trigger a recipe refresh cyclically, not on a user event?

Add a function list at the screen level and attach it to the screen's Cyclic event under Properties > Events. Set a cycle time of 1 s for TP 177 micro / OP 77B or 500 ms for MP 277 / Comfort Panels. Shorter cycles cause a runtime "Cyclic overflow" alarm.

Why is my symbolic IO field always writing index 0 even when I select another entry?

The symbolic IO field's Process value property must be bound to the multiplex tag's index tag, not to the multiplex tag itself. If it is bound to the multiplex tag, the field will display the value of index 0 and writing to it will not change the index. Open Properties > General and re-bind to the standalone index tag.

Back to blog