WinCC Bar Graph Display Options Overview
Siemens WinCC exposes three production-ready mechanisms for rendering a numeric process tag as a bar: the Smart Object "Bar", the Smart Object "3D-Bar", and an ActiveX control such as the WinCC Slider Control or the Microsoft Progress Bar Control. All three accept a single HMI tag as the process value and render a filled rectangle whose length or height is proportional to that value between a configured minimum and maximum. The Smart Object Bar is the preferred path in SIMATIC WinCC in TIA Portal; the ActiveX path is the legacy path still in use under WinCC V7.x RT and WinCC RT Professional where a slider, knob, or marquee-style indicator is required.
| Control | Where Available | Best Use Case | Render Style |
|---|---|---|---|
| Smart Object Bar | TIA Portal WinCC Comfort/Advanced/Professional | Process level indicators, tank levels, percent displays | 2D rectangle |
| Smart Object 3D-Bar | TIA Portal WinCC Comfort/Advanced/Professional | Cosmetic process displays, sight-glass style levels | 3D shaded rectangle |
| WinCC Slider Control (ActiveX) | WinCC V7.x, WinCC RT Professional | Adjustable setpoints, motorized valve position, lever-style values | Slider track with knob |
| Microsoft Progress Bar Control (ActiveX) | WinCC V7.x (with registration) | Progress style, finite-span %-of-task indicators | Segmented progress bar |
Prerequisites
Before configuring a bar graph object in either TIA Portal or WinCC V7, verify the following:
- The WinCC project is open in the engineering station with a valid HMI device (Comfort Panel, WinCC Runtime Advanced, WinCC Runtime Professional, or WinCC V7).
- The HMI tag you intend to display already exists under "HMI Tags" in the project tree, with the correct data type and acquisition type (cyclic on demand or cyclic continuous).
- The PLC tag is connected either directly (S7-1200/S7-1500 symbolic access) or via an area pointer / raw tag with scaling (legacy S7-300/400 absolute access).
- The screen in which the bar will be placed is in Edit mode and not locked by a multi-user editor.
- The TIA Portal version matches the panel firmware. Refer to the TIA Portal compatibility tool for confirmed pairings.
Configuring the Smart Object Bar in TIA Portal WinCC
- Open the target screen from the project tree: Project → HMI device → Screens → [Screen name].
- In the Toolbox task card, switch to Objects and locate Smart Objects → Bar. A right-click reveals alternative shapes (Rectangle, Circle, Polygon); only Bar carries the dynamic range property set.
- Drag the Bar onto the canvas. A default 100 x 20 px rectangle appears in horizontal orientation.
- In the Properties inspector, open the General category and set:
- Process value: bind to an HMI tag of type Int, UInt, Real, or Word. The binding can be a direct HMI tag or an indirect pointer. Indirect pointer tags require the HMI tag prefix "DB" or use of the "@" prefix for area pointers.
- Minimum scale value: numeric lower bound, e.g. 0.
- Maximum scale value: numeric upper bound, e.g. 100.
- Bar direction: LeftToRight, RightToLeft, TopToBottom, BottomToTop.
- Open the Appearance category to set the Bar color (RGB), Background color, and Border style. The Bar color applies to the filled portion; the Background color applies to the empty portion.
- Click Compile → Software (only build) to validate. A red error indicator next to the object signals a missing or wrongly-typed tag.
For panels in the Comfort Series and above, the Smart Object Bar uses the property ProcessValue internally; for WinCC Runtime Professional it is exposed as ScreenItems.Item("Bar_1").ProcessValue to VBScript.
Scaling and Range Parameter Reference
Incorrect scaling is the most common cause of a bar that appears to be empty or pinned at maximum. Use the table below as the commissioning reference for the four supported PLC tag classes:
| PLC Tag Type | Recommended HMI Tag Type | Min Scale | Max Scale | Notes |
|---|---|---|---|---|
| INT (-32768..32767) | Int | 0 | 27648 | S7 analog normalized value (0..27648) |
| REAL (engineering units) | Real | 0.0 | 100.0 | Already scaled; verify PLC FB output |
| WORD (0..65535) | Word | 0 | 65535 | Unsigned raw value |
| BOOL (state) | Bool | 0 | 1 | Bar will snap to 0% or 100%; not recommended |
Color Thresholds and Limit Ranges
The Smart Object Bar supports up to four color threshold bands. Each band has a trigger value, a fill color, and an optional warning text. Configure bands under Properties → Limits:
| Band | Trigger Direction | Default Color | Typical Use |
|---|---|---|---|
| LowLow | < | Red (FF0000) | Tank empty, process under-range alarm |
| Low | < | Yellow (FFFF00) | Caution low |
| High | > | Yellow (FFFF00) | Caution high |
| HighHigh | > | Red (FF0000) | Process over-range alarm |
Trigger evaluation is inclusive at the boundary. If the bar value equals the LowLow threshold it will render in red. Bands are evaluated in order: HighHigh > High > Low > LowLow. When two thresholds are crossed simultaneously, the more severe (red) color wins.
ActiveX Bar and Slider Controls in WinCC V7
In WinCC V7 (legacy) and WinCC RT Professional projects that retain the ActiveX model, the Object Palette exposes a dedicated Controls tab that contains registered OCX components. To enable the slider and progress bar:
- Open the Graphics Designer and select the target screen.
- In the Object Palette, switch to the Controls tab. Right-click any empty area and select Add/Remove....
- In the Select OCX Controls dialog, enable the checkmark next to:
- WinCC Slider Control (CSiemensHmiSliderCtrl.S7HmiSliderCtrlCtrl.1 or vendor-supplied ProgID depending on WinCC version)
- Microsoft Progress Bar Control (MSComctlLib.ProgCtrl.2) - if not present, install the Visual Basic 6.0 runtime SP6 on the engineering station.
- Click OK. The new controls appear in the palette and can be dragged onto the canvas.
- Right-click the placed control and choose Configuration Dialog to set:
- Minimum / Maximum value
- Tick frequency
- Small change / Large change
- Position tag (read/write HMI tag)
- Visible range (if the host screen should scroll the bar)
- Use Properties → Events to wire release events to a C action or VBScript for setpoint commit logic.
regsvr32 SiemensHmiSliderCtrl.dll if it fails to appear in the controls list. Run the command from an elevated command prompt in the directory C:\Program Files (x86)\Siemens\Automation\WinCC\bin.Microsoft Progress Bar Control as a Bar Graph Substitute
The Microsoft Progress Bar ActiveX (MSComctlLib.ProgCtrl.2) is a viable substitute when the legacy WinCC V7 Smart Object is not available or when a uniform segmented bar is preferred. Configuration parameters accessible from VBScript:
BarControl.Min = 0
BarControl.Max = 100
BarControl.Value = 75
BarControl.Scrolling = 0 ' ccScrollingStandard
BarControl.Orientation = 0 ' ccOrientationHorizontal
Bind Value to the HMI tag through a Dynamic Dialog (WinCC V7) using Variable → Direct Variable, or via a one-line VBScript tag-prefix assignment:
Dim tagVal
tagVal = HMIRuntime.Tags("Level_Tank1").Read
BarControl.Value = CInt(tagVal)
This script can be attached to the screen's Open event and a 250 ms cyclic trigger to refresh on demand.
Dynamic Property Updates via VBScript
Properties such as color, fill direction, and visible range can be modified at runtime through the WinCC object model. For WinCC Runtime Professional:
' Reference a Smart Object Bar by its screen name
Dim objBar
Set objBar = HmiRuntime.Screens("Main_Overview").ScreenItems("Bar_TankLevel1")
' Update color based on a calculated band
Dim level
level = HmiRuntime.Tags("TankLevel1").Read
If level < 10 Then
objBar.BackColor = RGB(255, 0, 0) ' Red empty
ElseIf level > 90 Then
objBar.BackColor = RGB(255, 0, 0) ' Red full
ElseIf level > 75 Then
objBar.BackColor = RGB(255, 255, 0) ' Yellow caution
Else
objBar.BackColor = RGB(0, 176, 80) ' Green nominal
End If
objBar.ProcessValue = level
For WinCC V7 the equivalent is:
Dim objBar
Set objBar = ScreenItems("Bar_TankLevel1")
objBar.BackColor = RGB(0, 176, 80)
objBar.ProcessValue = HMIRuntime.Tags("TankLevel1").Value
HMIRuntime.Tags(...).Read requires the tag's acquisition mode to be set to "Cyclic continuous" or "Cyclic on demand"; otherwise the value returned is the cached last-known value. The recommended cycle for a level indicator on a 1280 x 800 panel is 500 ms.Verifying Bar Graph Runtime Behavior
After configuration and compilation, verify the bar in the runtime simulator or on the live panel before commissioning:
- Start the runtime simulator: in TIA Portal, select the HMI device and click Start simulation (or press Alt+S). For WinCC V7, open WinCC Runtime Loader and activate the project.
- Confirm the bar renders at the expected size and orientation. If it is invisible, check that the host screen's background is not the same color as the bar background.
- Force the source tag to 0%, 25%, 50%, 75%, 100% via the tag simulator (Tools → Tag Simulation in WinCC V7; HMI Tag Table → Simulation in TIA Portal).
- Verify the bar length scales linearly. A non-linear response indicates either a wrong scaling block or a non-monotonic tag conversion in the PLC.
- Trigger each limit band (LowLow, Low, High, HighHigh) and confirm the color swap occurs at the configured threshold, not at the wrong one.
- Run the runtime for at least 15 minutes to confirm the bar refresh rate is smooth and the CPU load on the panel stays below 60% (visible in the diagnostic screens under System → Performance).
Troubleshooting Matrix
| Symptom | Probable Cause | Diagnostic Step | Resolution |
|---|---|---|---|
| Bar invisible, no error indicator | Background and bar color identical | Inspect properties → Appearance | Set distinct background and fill color |
| Bar pinned at minimum | Min/Max swapped; tag value below Min | Force tag with simulator | Reverse Min and Max; check PLC FB scaling |
| Bar pinned at maximum | Tag overflow above Max | Trace raw PLC value | Raise Max or clamp tag in PLC |
| Bar renders upside down | Direction set BottomToTop | Properties → General → Bar direction | Select TopToBottom or RightToLeft as needed |
| Color thresholds do not switch | Threshold outside Min/Max range | Inspect Limit values | Ensure LowLow < Low < High < HighHigh within Min..Max |
| ActiveX missing from Object Palette | OCX not registered | Run regsvr32 for the control DLL |
Reinstall control via WinCC setup or register DLL |
| Bar flickers in runtime | Tag cycle faster than screen refresh | Monitor tag cycle vs panel refresh | Set tag cycle ≥ 250 ms |
| Bar stuck at last value after PLC stop | Acquisition mode is "Cyclic on demand" with no trigger | Inspect tag properties → Acquisition | Change to "Cyclic continuous" or trigger on area pointer |
| Compile error: tag not found | HMI tag deleted after object was placed | Recompile and inspect error log | Recreate tag or rebind ProcessValue property |
Performance and Panel Hardware Notes
The Smart Object Bar consumes approximately 0.3% of the screen-build memory on a Comfort Panel TP700 and scales linearly with the number of distinct instances. On TP1500 Comfort panels and above, the runtime engine uses GPU-accelerated drawing, so more than 50 simultaneous bar instances remain smooth at the default 100 ms refresh. On KP400 Basic panels, limit bar instances to 20 per screen and disable 3D shading (use Smart Object Bar instead of 3D-Bar) to keep the panel refresh under the 250 ms HMI tick.
For WinCC RT Professional running on a WinCC station, the recommended ceiling is 200 simultaneous animated bar objects before noticeable paint latency. Above that count, group multiple bars into a single faceplate and use the faceplate's internal symbol IO for tag binding.
Migration Notes: WinCC V7 to TIA Portal WinCC
If you are migrating a WinCC V7 project that uses the legacy Bar smart object (file Bar.emo) or an ActiveX slider, the TIA Portal migration tool translates them as follows:
| WinCC V7 Object | Translated to TIA Portal | Action Required |
|---|---|---|
| WinCC V7 Smart Object Bar | TIA Portal Smart Object Bar | None; properties preserved |
| WinCC V7 3D-Bar | TIA Portal Smart Object 3D-Bar | None; verify color depth matches panel |
| WinCC Slider Control (ActiveX) | Slider object (Comfort/Advanced) or unchanged ActiveX (RT Professional) | Replace ActiveX with native Slider on Comfort panels; rebuild position tag binding |
| Microsoft Progress Bar Control | Not migrated | Rebuild as native Bar or Progress Indicator |
After migration, recompile, then re-test limit bands. Migrated limit band colors occasionally lose the alpha channel and render as solid RGB without transparency.
FAQ
Which WinCC bar graph object should I use for a tank level on a TP700 Comfort panel?
Use the Smart Object Bar with direction BottomToTop. Bind the HMI tag to the analog input from the PLC (Int, scaled 0..27648 for S7 normalized values or Real in engineering units). Configure the four limit bands for LowLow/Low/High/HighHigh alarms.
How do I add an ActiveX control that is missing from the Object Palette in WinCC V7?
Right-click inside the Object Palette Controls tab and select Add/Remove.... Enable the checkmark next to the desired OCX, click OK, then place the control on the screen. If it still does not appear, register the underlying DLL with regsvr32 from an elevated command prompt and restart Graphics Designer.
Why does my bar stay pinned at maximum even though the tag value is changing?
Three common causes: (1) Min and Max values are reversed in the bar properties, (2) the tag data type does not match the bar's expected numeric range (e.g. Bool bound to an Int-scaled bar), or (3) the PLC is sending a value that exceeds the configured Max. Force the tag with the simulator to a known value and verify it lands inside the configured Min..Max range.
Can the same bar object be operator-adjustable and update the PLC?
The Smart Object Bar is read-only. To make the value operator-adjustable, use the Slider object in TIA Portal or the WinCC Slider Control ActiveX in WinCC V7, both of which can write to the connected tag on release. Configure the write-back in the "Events" property group using the "Change" or "Release" event.
How do I make a bar change color at specific thresholds in WinCC TIA Portal?
Open Properties → Limits on the bar object and define up to four trigger points (LowLow, Low, High, HighHigh). Assign a distinct RGB color to each. The runtime engine re-evaluates on every tag update, so set the tag's acquisition cycle to 500 ms or less for a fluid color transition. Limits must lie inside the configured Min..Max scale, otherwise they are ignored.