1. Problem Overview
A refrigeration skid has a compressor with seven distinct operational states (Stopped, Starting, Running Unloaded, Running Loaded, Overload, Low Pressure Trip, High Pressure Trip). Each state is asserted by an individual Boolean bit inside a SIMATIC S7-300 PLC. The TP177B 6" color panel mounted in the control cabinet door must show the active state on a single screen object, refreshing in real time as the PLC flips the bits.
The naive mapping - wiring each compressor bit to its own TP177B text field and showing the right one with visibility logic - is verbose and brittle. The recommended WinCC flexible pattern is a text list (or graphic list) bound to a single symbolic I/O field. The list object resolves a numeric state code to a human-readable string, which is exactly the multi-state display the original question requires.
The catch is that WinCC flexible text and graphic lists operate on a single source tag of type INT or WORD. They do not read individual bit positions directly. When the PLC logic cannot be edited (a frequent constraint on packaged refrigeration skids shipped with locked firmware), the field engineer has to aggregate the discrete bits into a state code on the PLC side. This article documents both the cleanest path (modify the PLC to drive an INT) and the workarounds when the PLC program is frozen.
2. Prerequisites
- SIMATIC TP177B 6" PN/DP color panel (MLFB 6AV6642-0BA01-1AX1) or TP177B 4" PN/DP variants running firmware 1.x under WinCC flexible 2008 SP2/SP3 or WinCC flexible 2007.
- WinCC flexible ES (Engineering Station) with the TP177B device template installed and a configured connection to the target PLC. The connection can be MPI, PROFIBUS DP, or PROFINET depending on the panel variant.
- The PLC tag database must be exposed to the HMI - either through a S7-300/400 connection with the partner reachable, or by importing the STEP 7 symbol table into WinCC flexible via Tags > Import.
- For the recommended approach, a free
INT(data block word) must be allocated in the PLC to hold the aggregated state code, or a scratch bit/word in the PLC process image can be reassigned. - Read access to the TP177B manual and the WinCC flexible online help for screen-object property reference.
Reference the official device page for the TP177B 6" PN/DP color at the Siemens Industry Online Support portal: 6AV6642-0BA01-1AX1 - TP177B 6" PN/DP color. The HMI device manual covering TP 177A, TP 177B, and OP 177B with WinCC flexible is published as entry SIMATIC HMI TP 177A, TP 177B, OP 177B (WinCC flexible).
3. Text List Fundamentals in WinCC flexible
A text list in WinCC flexible is a project-level dictionary that maps a numeric range or bit pattern to a string. Two flavors exist:
-
Text list - returns a plain string (e.g.
"Running") that is shown in an I/O field, button label, or status display. - Graphic list - returns a graphic ID (icon, animated state) for use in graphic views. Same addressing model.
Both list types accept a single integer source tag. The list configuration dialog has three selection modes:
| Mode | Source value | Range / range behavior | Use case |
|---|---|---|---|
| Value/Range | Decimal integer in a defined range | Each entry maps a contiguous range such as 0..0, 1..1, 2..2, or 0..9, 10..19, etc. | Discretely numbered states (the compressor case). |
| Bit | Single bit position in a word | Bit 0..bit 15 of the source word | Single Boolean indicators - does not combine multiple states into one display. |
| Bit + Range | Bit position + remaining integer range | Bit selection governs one field, the rest of the word is a range | Hybrid displays (alarm class bit + severity number). Not a multi-bit OR. |
This explains why the original question runs into a wall: the Bit mode reads exactly one bit per list evaluation. There is no built-in OR-of-several-bits mode in WinCC flexible that aggregates multiple discrete PLC bits into a single returned string. The aggregation has to happen in the PLC.
4. Data Flow Topology
The data path from the refrigeration compressor field devices to the operator screen has three segments. Drawing it out makes the conversion point obvious.
The conversion from Boolean to integer happens inside the CPU. From the HMI's point of view, the panel only ever reads a single 16-bit word. This keeps the panel configuration, the transfer project size, and the runtime CPU load on the TP177B to a minimum.
5. Recommended Approach: Integer State Code With Text List
Create a project text list named CompressorState with one entry per compressor state. State codes are arbitrary positive integers; using 1..7 (rather than 0..6) is convenient because the textual "No state" fallback can occupy code 0.
| State code (INT) | Range start | Range end | Display text |
|---|---|---|---|
| 0 | 0 | 0 | -- Undefined -- |
| 1 | 1 | 1 | Stopped |
| 2 | 2 | 2 | Starting |
| 3 | 3 | 3 | Running Unloaded |
| 4 | 4 | 4 | Running Loaded |
| 5 | 5 | 5 | Overload |
| 6 | 6 | 6 | Low Pressure Trip |
| 7 | 7 | 7 | High Pressure Trip |
Create one HMI tag in WinCC flexible:
- Name:
Compressor_State - Type:
INT(16-bit, signed) - Connection: same as the existing PLC connection
- PLC address: e.g.
DB100.DBW 10(data block word 10 in DB100) - Acquisition: cyclic, 1 s refresh (sufficient for compressor state changes; 250 ms if a faster visual update is needed on a 6" color panel).
On the screen, drop an Output field (not the Symbolic I/O field - see section 7), set the Process > Tag to Compressor_State, and set the Properties > Representation > Text list to CompressorState. The list selection mode should remain Value/Range; each of the seven states plus the fallback occupy a single-value range. With Settings > Display "Out of range" text enabled, any undefined code (for example, a transient 8 that does not exist) shows a configurable "Invalid" string instead of a blank field.
6. State Machine of the Seven Compressor States
The PLC ladder implements a priority-ordered OR of the seven bits. Drawing it as a state machine clarifies which state wins when several bits are true simultaneously (for example, an overload while the compressor is already running).
7. Alternative: Bit-State Aggregation Using STEP 7 Logic
When the PLC program is sealed and a free INT cannot be created, the engineer has two viable choices.
7.1 Add an INT in an unused area of the process image
S7-300 inputs and outputs are bit-addressable; the corresponding word aliases (IW, QW, PIW, PQW) read the same physical bits as I and Q. If any of the seven compressor bits are in the same byte (or in adjacent bytes within the same word boundary), they can be re-interpreted as a single word that holds a packed bitmask. A 7-bit pattern can map to 128 codes, which is enough for 7 states plus a wide safety margin:
// S7 STL fragment - pack seven status bits into a word
// Assumes bits in PIB/IB offsets 0..6, e.g. I 0.0 .. I 0.6
L IB 0
T MW 200 // MW200 mirrors IB0, bits 0..6 hold the status
// Now build a state code (1..7) from the priority chain.
A I 0.0 // HP trip
JC HP7
A I 0.1 // LP trip
JC LP6
A I 0.2 // Overload
JC OL5
A I 0.3 // Running loaded feedback
JC RL4
A I 0.4 // Running unloaded feedback
JC RU3
A I 0.5 // Starting feedback
JC ST2
L 1 // default Stopped
T DB100.DBW 0
JU END
HP7: L 7
T DB100.DBW 0
JU END
LP6: L 6
T DB100.DBW 0
JU END
OL5: L 5
T DB100.DBW 0
JU END
RL4: L 4
T DB100.DBW 0
JU END
RU3: L 3
T DB100.DBW 0
JU END
ST2: L 2
T DB100.DBW 0
END: NOP 0
Trade-off: this is a workaround, not a clean design. It also couples the HMI to internal marker bytes, which violates the usual discipline of exposing a single DB word for HMI consumption. Use it only when there is no alternative.
7.2 Add a second tag at the panel and switch the text list in code
WinCC flexible does not support swapping the text list configuration dynamically. Two separate text lists (CompressorStateTrips, CompressorStateRun) bound to the same I/O field cannot be activated at runtime. This path is not viable; it is documented here so the engineer does not waste time pursuing it.
8. Configuring the Text List in WinCC flexible
From the project tree in WinCC flexible, open Text and Graphic Lists > Text Lists, click New, and name the list CompressorState. The configuration dialog requires three decisions for each entry:
- Range / value - the integer code that triggers this entry. The mode Value/Range lets you specify Range start and Range end (inclusive on both ends). For single-value entries, set both to the same number.
- Text - the string shown on the panel. Limit to 32 characters; the TP177B 6" color panel truncates the field display past that, even if the list definition accepts more.
- Default entry - the entry used when the source value falls in no defined range. The default is set in Settings > Default entry; the text for it can be the same as the "Out of range" placeholder.
For 7 compressor states, configure 8 entries (states 1..7 plus default 0). Mark entry 0 as the Default entry so any uninitialized or out-of-range code falls back gracefully.
9. Binding to a Symbolic I/O Field
The Symbolic I/O field is the WinCC flexible object that combines a numeric value display with a list-based label. It is the correct object when the operator must be able to acknowledge or change a state from a popup - for example, resetting a trip from the panel.
To configure:
- Open the screen and drag a Symbolic I/O field from the toolbox onto the canvas.
- Open Properties > General > Process and select the tag
Compressor_State. - Set Mode to either Output (read-only) or Input/output (operator-selectable).
- Open Properties > Representation > Text list and choose
CompressorState. - Set Selection mode to By value. By index uses the row number (0..n-1) in the list, which only works for indexes that match the project list order - it is fragile when entries are reordered.
- Enable Settings > Show "Out of range" text and set the placeholder to
---for clean fallback. - Format: in Properties > Appearance > Display format, choose String (not Binary, Decimal, or HEX) - the Symbolic I/O field shows the resolved text, not the raw integer.
The Symbolic I/O field supports a two-state behavior worth knowing: when the operator taps the field, the panel raises a popup listing the configured text list entries. The selection writes the chosen value/range start back to the PLC tag. For a fault acknowledgement workflow (operator selects "High Pressure Trip - Acknowledged"), the list entries at runtime can be made longer than 32 characters; only the on-screen collapsed view is truncated.
10. PLC-Side Tag Preparation (S7-300/400)
For a SIMATIC S7-300 with a TP177B connected via MPI or PROFIBUS, the standard pattern is to expose a data block word for the HMI:
// DB100 - Compressor status block
DATA_BLOCK DB100
TITLE =CompressorStatus
VERSION : 0.1
STRUCT
StateCode : INT ; // DBW 0 - HMI reads this
SpareBits : WORD ; // DBW 2
TripLatches : BYTE ; // DBB 4
END_STRUCT
END_DATA_BLOCK
The state-code generation ladder is straightforward. Use priority-OR logic - if multiple trip conditions are active, the most severe wins. A structured-text equivalent in S7-SCL is more compact:
// S7-SCL priority OR
IF HP_trip THEN
DB100.StateCode := 7;
ELSIF LP_trip THEN
DB100.StateCode := 6;
ELSIF Overload THEN
DB100.StateCode := 5;
ELSIF RunningLoaded THEN
DB100.StateCode := 4;
ELSIF RunningUnloaded THEN
DB100.StateCode := 3;
ELSIF Starting THEN
DB100.StateCode := 2;
ELSE
DB100.StateCode := 1; // Stopped default
END_IF;
Make sure the HMI connection in WinCC flexible points to the same DB number and uses the Absolute addressing mode unless symbol import has been performed. The cycle time of the S7-300 OB1 is sufficient - no OB35 interrupt is needed for a 1-second update.
11. Wiring and Electrical Considerations
The seven PLC inputs that drive the text list are typically 24 VDC sourced by a SM321 digital input module. The TP177B 6" PN/DP color panel (MLFB 6AV6642-0BA01-1AX1) itself is fed from a 24 VDC power supply on terminals X1 (24 V) and X2 (0 V), with a typical current draw around 0.5 A at 24 V. Keep the panel supply on a separate breaker from the field inputs to avoid the operator screen browning out during a hard compressor trip.
For the input wiring of the seven status bits:
- Use shielded cable if the compressor starter is in the same cabinet, with the shield grounded at the panel end only.
- Add a freewheeling diode across any 24 VDC relay coil that asserts a status bit to suppress back-EMF.
- If the field devices are mechanical pressure switches with long cable runs, fit a debounce RC network (typically 10 kOhm in series, 0.1 uF to 0 V) on the PLC input to prevent racing during the priority-OR.
PROFINET or PROFIBUS baud rate is independent of the digital input scan time. The TP177B 6" PN/DP variant supports PROFINET at 100 Mbit/s full duplex; the PROFIBUS DP variant supports 12 Mbit/s. For a single state-code word, either bus is more than sufficient.
12. Variations: S7-1200, LOGO! and TIA Portal
The pattern above is portable across the SIMATIC family.
| Controller | Engineering tool | List object | Notes |
|---|---|---|---|
| S7-300 / S7-400 | STEP 7 V5.5 + WinCC flexible 2008 | Text list, Symbolic I/O field | Pattern shown in section 10. |
| S7-1200 / S7-1500 | TIA Portal V15..V18 | Text list, Symbolic I/O field (identical concept) | Use PUT/GET or HMI connection over PROFINET; tag is a DB word in the S7-1200 user program. |
| LOGO! 8 | LOGO! Soft Comfort V8 | Text list on LOGO! TD or LOGO! Display | Limited to fewer states and shorter strings; pattern same but only one text list per screen. |
| S7-200 (legacy) | STEP 7 MicroWIN + WinCC flexible 2007 | Text list on TD 200 / TP177micro | Use VW memory for the state code; eight entries is the practical ceiling. |
If the project is migrated from WinCC flexible to TIA Portal, the text list object survives the migration with the same name, range entries, and tag binding. Only the connection configuration moves from Connections to Devices & Networks. The TIA Portal symbolic I/o field is functionally identical to the WinCC flexible one.
13. Commissioning and Verification
Once the project compiles and downloads to the TP177B, validate end-to-end with the following checklist:
-
Tag online test. Open WinCC flexible in online mode, right-click the
Compressor_Statetag, and force values 0..7 in sequence. The panel output field must show the corresponding text. A blank field or a literal "?" indicates the text list was not bound. - PLC-side forcing. Force the seven input bits individually from STEP 7 and watch the panel update. Confirm that the priority logic in the ladder produces the expected state code when multiple bits are active.
- Out-of-range check. Force a value of 8 (or 100) on the HMI tag. With Show "Out of range" text enabled, the field should show the placeholder and not a list entry.
- Acquisition cycle. Time a bit toggle on the PLC with a stopwatch. The panel update lag should be less than 2 seconds with a 1 s acquisition cycle. If higher latency is observed, drop the acquisition to 500 ms or 250 ms in the tag properties.
- Restart behavior. Power-cycle the TP177B and confirm the field re-paints within the configured startup screen time (default 0 s, panel returns to last screen).
- Recipe / screen change. Navigate to a different screen, return, and confirm the text list still resolves. This catches corrupted list caches after firmware updates.
- Bus diagnostics. Open the panel's diagnostic page (Settings > System > Diagnostics) and verify the S7 connection is in Connected state, with no transient faults logged in the last hour.
- Power-loss recovery. Pull the panel supply, restore it, and confirm the text list still binds to the tag after the project re-initializes. Some panel firmware versions reload the project but do not re-evaluate text lists until the first tag update.
The TP177B 6" color panel (6AV6642-0BA01-1AX1) ships with WinCC flexible 2008 SP2/SP3 as the supported engineering tool. Project transfer to the panel is via MPI/PROFIBUS, PROFINET, serial, or USB stick; the HMI manual SIMATIC HMI TP 177A, TP 177B, OP 177B (WinCC flexible) documents transfer and the per-screen object limits in chapter 4.
14. Troubleshooting Matrix
| Symptom on TP177B | Likely cause | Fix |
|---|---|---|
| Field is blank, no text | Tag connection broken, or text list is not bound to the output field | Online test the tag; in object properties verify Text list points to CompressorState
|
| Field shows "0" instead of the resolved text | Output format is still decimal, list binding ignored | Set Display format to String |
| Field shows raw code, e.g. "3" | Text list mode is By index but the project list was reordered | Switch selection mode to By value |
| Field always shows default text | Source tag is a different DBW than the one the PLC writes | Cross-check the DB number and byte offset in both the WinCC flexible tag and the STEP 7 source |
| Field flickers between two values | Two bits in the priority chain are racing; OB1 scan is too slow for a transitional state | Add hysteresis or latch the state code on a rising edge; raise the OB1 priority if the process requires |
| List does not appear in Symbolic I/O field popup | Mode is set to Output instead of Input/output | Change mode to Input/output in object properties |
| Operator selects an item but PLC does not receive the write | Tag direction is Read only or the HMI connection lacks write rights | Open tag properties > Direction and set to Read/write; verify connection in Connections > Properties |
| Out-of-range texts appear intermittently | PLC value briefly spikes to 8..15 due to floating input | Debounce the input with a TON timer in the S7 logic, or widen each list range to 0..7, 8..15, etc., and use a default for the uninteresting codes |
| Wrong language shown on panel | Multiple language lists exist and the runtime language is set to non-default | Configure Project > Language > Languages and ensure each text list has a translation for every active language |
15. Performance and Resource Budget
The TP177B 6" color has a 200 MHz ARM processor with 16 MB of project memory. A text list of 8 entries is trivial; a project can contain hundreds. The runtime cost of a list evaluation is dominated by the tag acquisition, not the lookup. With a 1 s acquisition cycle the panel can sustain thousands of listed tags without visible CPU pressure.
The HMI connection over MPI/PROFIBUS DP at 1.5 Mbit/s supports roughly 50 polled tags per second with default S7-300 timing. The single state-code word used here consumes one slot; this leaves the connection with substantial headroom for additional alarms, trends, and recipe data on the same TP177B.
16. Cross-Reference to Official Documentation
Two Siemens Industry Online Support entries are the authoritative references for the topics in this article:
- 6AV6642-0BA01-1AX1 TP177B 6" PN/DP color product page - spare-part information, technical specifications, downloads for the panel firmware.
- SIMATIC HMI TP 177A, TP 177B, OP 177B (WinCC flexible) device manual - operating instructions, screen-object reference, list of available controls, transfer options.
- Siemens FAQ How do you display texts from a text list on the HMI?
- Siemens FAQ How do you configure a symbolic I/O field in WinCC flexible?
For S7-300 programming, the STEP 7 V5.5 help system and the S7-300 Operation List (entry ID 15343315) cover the priority-OR ladder structure shown in section 10.
FAQ
Can WinCC flexible aggregate multiple PLC bits into a single text list entry?
No. Text and graphic lists in WinCC flexible read exactly one source tag (INT or WORD) and resolve it through a single value/range or single-bit lookup. The aggregation of multiple Boolean bits into a state code has to happen in the PLC.
Which TP177B firmware version supports text lists in WinCC flexible 2008?
All TP177B 6" color variants (for example MLFB 6AV6642-0BA01-1AX1) running firmware 1.x support text and graphic lists. WinCC flexible 2008 SP2 or SP3 is the matching engineering tool; older WinCC flexible 2007 projects are upward-compatible.
Should I use an Output field or a Symbolic I/O field for a status display?
Use an Output field for read-only status (compressor state). Use a Symbolic I/O field only when the operator must select a list entry and write a value back to the PLC, such as a fault acknowledgement or mode change.
How many text entries can a TP177B 6" color panel hold?
Up to 256 text entries per text list and up to 256 text lists per project, well above the 7 states needed for the compressor case. The 32-character text limit per entry is the more relevant constraint for the 6" display.
Why does the field briefly show the wrong state during a transition?
Transitions occur when two bits race in OB1 scan. Latch the new state code on a rising edge of any of the seven input bits and hold it for a debounce period of 250-500 ms before publishing to DB100.DBW0. This eliminates flicker on the panel.