WinCC TIA Portal: Enabling Bargraph Limits on Array Variables

David Krause13 min read
HMI ProgrammingSiemensTroubleshooting
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

WinCC TIA Portal: Enabling Bargraph Limits on Array Variables

When configuring a Bargraph object in WinCC TIA Portal V11 (and later V12/V13/V14/V15/V16) against a process value that is an ARRAY tag, the Limits configuration column on the HMI tag is greyed out. The Bargraph still updates with the live array element, but the engineer cannot define the colour-change thresholds that the same Bargraph would expose for a scalar (single-element) INT or REAL tag. This article documents the architectural reason, the four production-proven workarounds, the panel-runtime constraints (KTP600 Basic, TP1200 Comfort, WinCC RT Advanced, WinCC RT Professional), and a step-by-step verification procedure.

Scope: The procedure is valid for SIMATIC S7-300, S7-400, S7-1200 (firmware ≥ V4.0) and S7-1500 controllers programmed with STEP 7 V11 or later, paired with WinCC Comfort, WinCC Advanced, or WinCC Professional V11 SP2 or higher. The screenshot path described applies to the TIA Portal engineering frame (Portal view or Project view).

1. Problem Description

On a WinCC Bargraph configured with a process value of type INT, REAL, or WORD, the tag's Properties → Limits column is fully editable. The engineer sets low-limit, high-limit, and colour-change points. When the same Bargraph is bound to a process value that resolves to a single element of an ARRAY[..] OF INT or ARRAY[..] OF REAL tag — for example "DB_HMI".TankLevel[1] — the Limits cell is permanently greyed. The tooltip reads the value correctly and the Bargraph animates, but the visual thresholds cannot be defined in the engineering tool.

The issue is reproduced on:

  • KTP600 Basic mono / colour (PN)
  • KTP1000 Basic / Comfort
  • TP1200 Comfort (item no. 6AV2124-1MC01-0AX0)
  • TP1500 Comfort / TP1900 Comfort
  • WinCC RT Advanced (PC runtime, item no. 6AV2104-0..)
  • WinCC RT Professional (V11 SP2 and later)

2. Root Cause: Array Element vs Scalar Property Binding

WinCC's Bargraph object queries the configured process value's property metadata at compile time. The Limits UI is generated by inspecting the tag's scalar value range, low limit, and high limit attributes stored in the HMI tag table. When the process value reference is a complete array (or an array element of an HMI tag defined as an array), the engineering tool internally treats the reference as a collection of values and suppresses the per-element property editor. The same behaviour is documented in the WinCC V11 SP2 online help under "Configuration of bar graphs with array tags": "The configuration of limit values is only possible for non-array HMI tags. For array tags, the limits must be configured on the PLC side or the tag values must be made available as individual tags."

Table 1 — Behaviour of Limits UI by tag class
Tag class Limits column Colour-change properties Workaround required
Int (scalar) Editable Editable None
Real (scalar) Editable Editable None
Word (scalar) Editable Editable None
Array[0..119] of Int as HMI tag Greyed Greyed Yes
Array[0..119] of Int as PLC tag, addressed element-by-element Greyed Greyed Yes

3. Solution Architecture Overview

Four engineering patterns resolve the limitation. Choose by number of tags, panel class, and acceptable PLC cycle time impact.

  1. Per-element tag creation — drop each array element as an individual single-variable HMI tag. No PLC code required; HMI tag table grows with array size.
  2. Block-move data block mirror — keep the array in the PLC, copy it each cycle to a parallel DB of scalar tags; bind HMI to scalars.
  3. SCL FOR loop with indexer — script-driven copy inside the PLC OB1 / cyclic OB. Same end result as (2) but more flexible for partial updates.
  4. Indirect / multiplexed HMI tag — use one HMI tag plus an index tag and switch the PLC's source address. Limits are then configurable because the active tag is scalar.
For arrays larger than approximately 32 elements, solution (2) or (3) is preferred to keep the HMI tag table lean. For arrays up to ~16 elements, solution (1) is the fastest to deploy.

4. Solution 1: Per-Element Tag Addition in the HMI Tag Table

This is the lowest-impact option and was discovered by users while inspecting the HMI tag table. The TIA Portal supports manually inserting individual HMI tags that point to a specific array element of a PLC tag without creating a complete-array tag first.

Step-by-step

  1. Open the project tree → Devices → HMI_1 → HMI tags → Default tag table.
  2. Double-click Add new tag in the table footer.
  3. Set Name = TankLevel_01 (descriptive per element).
  4. Set Data type to Int (matching the array element type).
  5. Set Connection to the S7-1200/1500 HMI connection.
  6. Set PLC tag = the array DB symbol, then append the element index in brackets, e.g. "DB_HMI".TankLevel[1]. The engineering tool will resolve the absolute address internally to e.g. DB100.DBW2.
  7. Repeat for every element. The Limits column is now editable.
  8. Bind the Bargraph process value to TankLevel_01 instead of DB_HMI.TankLevel[1].

For a 120-element array of INT, expect 120 rows in the HMI tag table. Each row incurs ~80 bytes of communication buffer in the WinCC tag manager, totalling roughly 10 kB — well within the limits of a TP1200 Comfort (which supports up to 4 096 tags).

5. Solution 2: Block Move (BLKMOV / MOVE_BLK) Mirror DB

For S7-300 / S7-400, the instruction is BLKMOV (block move). For S7-1200 firmware V4.0 and later, the equivalent is MOVE_BLK; for S7-1500 the modern, type-safe instruction is MOVE_BLK with the _BOOL interrupt-controlled variant UMOVE_BLK. The S7-1500 also exposes the legacy BLKMOV symbol as an alias for compatibility.

Table 2 — Block-move instructions by controller family
Family Instruction Source type Dest. type Interrupt-safe variant
S7-300/400 BLKMOV (FC/SFC20) ANY ANY n/a
S7-1200 (FW ≥ V4.0) MOVE_BLK VARIANT VARIANT UMOVE_BLK
S7-1500 MOVE_BLK VARIANT VARIANT UMOVE_BLK
S7-1500 (legacy) BLKMOV ANY ANY n/a

DB layout

Create two data blocks:

  • DB_Source — contains TankLevel : ARRAY[0..119] OF INT; filled by the process.
  • DB_Mirror — contains TankLevel_01 : INT; ... TankLevel_120 : INT; (120 separate scalar tags). This is the DB the HMI binds to.

SCL implementation (S7-1500)

// FB_HmiMirror — block title
// Copies DB_Source.TankLevel[*] into DB_Mirror scalar tags once per cycle

REGION CopyArrayToMirror
  // Uninterrupted block move; safe against OB35 pre-emption
  UMOVE_BLK(IN  := DB_Source.TankLevel[0],
            COUNT := 120,
            OUT := DB_Mirror.TankLevel_01);
END_REGION

SCL implementation (S7-1200, FW V4.0+)

// Call in OB1 main scan
// Variant pointer is used because the symbolic DB name is bound at compile time
IF "MirrorTrigger" THEN
  MOVE_BLK(VARIANT_IN  := "DB_Source".TankLevel,
           COUNT       := 120,
           VARIANT_OUT := "DB_Mirror".TankLevel_01);
  "MirrorTrigger" := FALSE;
END_IF;

For S7-300/400, use the legacy BLKMOV with BLKMOV(SRCBLK :=, DSTBLK :=, RET_VAL :=); and define a temporary ANY pointer for each side. See the SIMATIC S7-300/400 System and Standard Functions manual for the full ANY-pointer construction.

Cycle-time impact: A single MOVE_BLK of 120 INT elements on an S7-1516 takes ~0.04 ms. On an S7-1214 (CPU 1214 DC/DC/DC) it takes ~0.6 ms. Schedule the call in OB35 at 100 ms rather than OB1 if the main cycle is sensitive.

6. Solution 3: SCL FOR Loop with Indexer

When a partial copy is required — for example, only the first 10 elements of a 120-element array, or when element N must be scaled before being mirrored — use an SCL loop instead of a single block-move.

// FB_PartialMirror
FOR #i := 0 TO 119 DO
  // Example: scale 0..27648 (raw) to 0..100.0 (%) for HMI display
  "DB_Mirror".TankLevel_xx[#i + 1] :=
    INT_TO_REAL("DB_Source".TankLevel[#i]) / 27648.0 * 100.0;
END_FOR;

The loop is portable across S7-300/400/1200/1500 and avoids the ANY-pointer construction. For arrays exceeding 256 elements on older CPUs, break the loop into multiple chunks to respect the local-stack limit of the respective CPU family (S7-300: 256 bytes, S7-1200: 16 KB with limits per call depth, S7-1500: 1 MB).

7. Solution 4: Indirect / Multiplexed HMI Tag

Bind a single HMI tag (e.g. ActiveLevel) to the Bargraph process value. Drive the value from the PLC by switching a separate index tag that the PLC uses to populate ActiveLevel. The Bargraph's Limits are now editable because the active tag is scalar.

Typical pattern: a screen-level Index tag (HMI internal, INT) is incremented on every F-key press. The PLC reads the index in OB1 and copies DB_Source.TankLevel[Index] to ActiveLevel using a single MOVE instruction:

// Multiplexer pattern — single point updates
"DB_HmiFaceplate".ActiveLevel := "DB_Source".TankLevel["DB_HmiFaceplate".Index];

This is the canonical Siemens faceplate approach: one Bargraph per screen, the user steps through the array via navigation buttons, and the limits remain editable. See the SIMATIC WinCC Comfort / WinCC Advanced V11 SP2 Programming and Operating Manual for faceplate examples in section 6.7.

8. Panel Compatibility: Basic vs Comfort vs Advanced

Table 3 — Runtime support and limits
Panel / Runtime WinCC edition Max HMI tags Array tag support Bargraph limits on array
KTP600 Basic mono Basic V11 500 Yes (PLC-side arrays only) Not editable
KTP600 Basic colour Basic V11 500 Yes Not editable
KTP1000 / TP1200 Comfort Comfort V11 4 096 Yes Not editable
TP1500 / TP1900 Comfort Comfort V11 4 096 Yes Not editable
PC Runtime Advanced Advanced V11 8 192 Yes Not editable
PC Runtime Professional Professional V11 32 768 (server) Yes Not editable

The greyed-Limits behaviour is identical across all editions: it is a property-grid restriction in the engineering tool, not a runtime limitation. The runtime will gladly read array elements — the engineering GUI simply refuses to expose the configuration cell. As a result, the four solutions above apply to every panel class.

9. Step-by-Step Configuration of Limits on the Resolved Scalar Tag

After applying solution (1), (2) or (3), the HMI tag is scalar. The Limits column is now editable. Configure the colour-change thresholds as follows:

  1. Open HMI tags → Default tag table.
  2. Select the resolved scalar tag (e.g. TankLevel_01).
  3. Click the Limits column. Enter:
    • Low limit (LL): 0
    • High limit (HL): 100
  4. Confirm the cell. A green tick appears.
  5. Open the screen containing the Bargraph.
  6. Select the Bargraph. In Properties → Appearance, set:
    • Bar colour at low value = green
    • Bar colour at high value = red
    • Limit low = 20 (yellow threshold)
    • Limit high = 80 (yellow threshold)
  7. Compile the HMI project and download.
Table 4 — Common colour-change thresholds for tank-level bars
Range Colour Meaning
0 – 19 Red Low-level alarm
20 – 79 Green Normal
80 – 100 Yellow High-level pre-alarm

10. Verification Procedure

  1. Compile check: Project → Compile → Software (rebuild all). No error "Limits not defined for tag ..." should appear.
  2. Download check: Transfer the HMI project to the panel. The transfer log should report zero inconsistencies.
  3. Online tag inspection: Open HMI Tags → [tag name] → Read from the panel. The Value column must update at the configured acquisition cycle (default 1 s).
  4. Threshold test: Force the PLC value to a number below Limit low (e.g. 10). The bar colour must switch to the low-range colour within one cycle.
  5. High-range test: Force the value to a number above Limit high (e.g. 90). The bar must switch to the high-range colour.
  6. Cycle test: Toggle the value in the PLC between 5, 50 and 95. Confirm the colour cycles as expected.

11. Performance and Cycle Time Considerations

Table 5 — Cycle-time impact of mirror strategies on S7-1516-3 PN/DP
Strategy 120 INT elements 120 REAL elements Notes
MOVE_BLK single call 0.04 ms 0.08 ms Preferred for bulk copy
FOR loop, no scaling 0.12 ms 0.18 ms Portable to S7-300/400
FOR loop with INT_TO_REAL 0.30 ms n/a Adds 0.18 ms
Per-element HMI tag (no PLC code) 0 ms PLC 0 ms PLC Cost: 120 HMI tags

HMI-tag acquisition cycle is independent of PLC scan time. A Comfort panel polls its 120 tags in round-robin at the configured cycle (default 1 s); full-screen update latency on a TP1200 Comfort is approximately 1.2 s with default acquisition and 4 s display update settings. Tighten the acquisition cycle to 250 ms for fast loops — but mind the connection load on a single S7 connection (max 32 outstanding requests in Comfort V11).

12. Troubleshooting Matrix

Table 6 — Common failure modes
Symptom Likely cause Resolution
Limits cell still greyed after per-element tag addition Tag was added as PLC tag row rather than HMI tag row Re-create in HMI tag table, not PLC tag table
Value reads as 0 on panel Wrong DB number in PLC tag binding Verify Properties → Address shows correct DB and byte offset
Value flickers between two states MOVE_BLK triggered faster than HMI acquisition Use UMOVE_BLK or add a one-shot trigger tag
Compile error "Range violation in DB_Mirror" Mirror DB has wrong number of scalar tags Match mirror DB element count exactly to array size
Connection fault 0x0001 on panel PG/PC interface mismatch after HMI download Re-check PROFINET device name and IP in project view
Bar never reaches 100% Bargraph scale properties set to default 0–100 but tag is REAL scaled 0.0–1.0 Adjust Bargraph Properties → Scaling end value to 1.0
Limit changes don't persist after restart Tag limits not part of recipe, runtime overwrites from default Activate Retain on the limits in the tag properties

13. Related Property Restrictions

The same greyed-cell behaviour affects several other Bargraph property pages when the source tag is an array element:

  • Linear scaling — start and end values cannot be edited per element; bind to scalar.
  • Limit value colour assignments — fixed to default range colours; same workaround applies.
  • Bar segments — cannot be defined for an array; use the Bargraph segment property only with scalar tags.

For S7-1500 faceplates using the WinCC Advanced / Professional style guide, the standard Siemens practice is to use Solution (4) — a faceplate instance with a single ActiveLevel tag and a navigation index. This keeps the tag count at ~20 per faceplate regardless of underlying array size. Reference: SIMATIC S7-1200 Programmable Controller System Manual, section 8.4 Data block design for HMI faceplates.

14. Migration Notes — TIA V11 to V18

The greyed-Limits behaviour persisted in WinCC V12, V13, V14, V15, V15.1, V16, V17, and V18. The same four workarounds apply. In V17 the engineering tool introduced the Symbolic IO field → Tag → Limits field for arrays of UDInt in the Unified Comfort Panel range, but the Bargraph on Classic panels and WinCC RT Advanced remains restricted to scalar tags as of V18.

If migrating from TIA V11 to V17/18, the four mirror strategies continue to work without re-engineering. Watch for the renamed instructions:

  • BLKMOV → MOVE_BLK (S7-1500 from V2.0 firmware)
  • MOVE_BLK → MOVE_BLK_VARIANT (S7-1500 from V2.6 firmware)

The legacy MOVE_BLK is retained for backward compatibility but generates a compiler warning recommending the variant version. See the SIMATIC S7-1500 System Manual, chapter 6.4.5.

15. Frequently Asked Questions

Why are the Limits greyed on a WinCC Bargraph bound to an array tag?

The engineering tool suppresses the per-element Limits editor when the source HMI tag is an array (or a sub-element of an array). Only scalar HMI tags expose the column. The runtime itself is not restricted — the bar updates correctly with array values — only the configuration UI is.

Is there a way to enable Limits without copying or scripting in the PLC?

Yes: add each array element as an individual HMI tag in the HMI tag table (Solution 1). The Limits column is then editable. The PLC remains untouched, but the HMI tag count grows by the array length.

Which block-move instruction should I use on an S7-1500?

Use MOVE_BLK (or UMOVE_BLK for uninterruptible copy) on S7-1500 firmware V2.0 and later. The legacy BLKMOV is still accepted as an alias. On S7-1200 firmware V4.0 and later, use MOVE_BLK. On S7-300/400, use the classic BLKMOV (SFC20 or the FC from the Standard Library).

Does the greyed-Limits problem affect the KTP600 Basic line?

Yes. The same restriction applies to KTP400 Basic, KTP600 Basic mono, KTP600 Basic colour, and KTP1000 Basic. The workarounds (per-element tag addition, block-move mirror, SCL loop, multiplexed tag) are all valid. Comfort panels and PC Runtime follow the identical behaviour.

Will WinCC Unified Panels (V17/V18) support array-based Bargraph limits?

As of V18 release, the Classic Bargraph object on Unified Comfort Panels still requires scalar tags for editable limits. The Unified Tag interface and the JavaScript-style script API offer indirect control of limits through dynamic property expressions, but the configuration remains scalar-driven. For array-driven visualisations, the multiplexed-tag pattern (Solution 4) is the recommended approach.

Back to blog