TP170A Real Value Display: Custom Decimal Format Pattern in WinCC

David Krause24 min read
SiemensTutorial / How-toWinCC
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

Overview

The SIMATIC TP170A is a 5.7-inch STN-LCD operator panel (320 × 240 pixels) launched by Siemens for the lower-cost tier of the WinCC flexible product line. It supports WinCC flexible 2004, 2005, 2007, 2008 SP1, SP2, and SP3, and remains in service in many brownfield installations. When an Output or I/O field is bound to a REAL (IEEE-754 single-precision) process tag, the Format drop-down in the field's property dialog exposes only three preset patterns—99999, 9.99, and 99.9—because the editor is locked to the most common industrial renderings. Engineers who need a non-standard precision (for example, four significant digits with one decimal place, 999,9, for a tank level scaled in metres) frequently assume the dialog is restrictive and abandon the configuration. In reality the underlying Format property is a free-text edit box; clicking the edit area (not the drop-down arrow) and typing the pattern directly overrides the preset list. The WinCC flexible runtime evaluates the string at every refresh using the same .NET numeric format grammar used throughout the SIMATIC HMI portfolio, so the workaround is portable to TIA Portal WinCC and to newer panel families.

This reference covers the tag types involved, the full format pattern grammar, a step-by-step commissioning procedure, PLC-side data preparation across S7-200, S7-300/400, S7-1200, and LOGO!, locale behaviour, runtime verification, a comprehensive troubleshooting matrix, and the migration path when the project is later ported to TIA Portal WinCC. It is written for the control or commissioning engineer who must produce a working TP170A configuration from a raw WinCC flexible project and ship it to the plant floor on the same shift.

Problem Definition

The default Output field dialog on a TP170A project offers exactly three format presets when the connected tag is declared as REAL:

Preset Output Example Typical Use
99999 417 Integer-only display; counter or whole-unit engineering value
9.99 4.17 Two-decimal display; low-magnitude measurements (0.00–9.99)
99.9 41.7 One-decimal display; mid-magnitude measurements (0.0–99.9)

None of the three matches a measurement of 417,3 m, where the field must render a four-digit integer followed by a single decimal digit. The user who clicks the drop-down assumes the dialog is restrictive; the dialog is in fact a convenience filter on a free-text property. Manually entering 999,9 (or 999.9 depending on the runtime locale) resolves the limitation immediately. The same fix works for any pattern between 0.0000 and 999999.9999, including leading-zero, thousands-separator, signed, and literal-suffix forms.

The mistake is common because the dialog's drop-down arrow and the field's edit area share the same visual control. New users click the arrow, see only the three presets, and conclude that other patterns are unsupported. The fix is to click inside the edit area (single click, no arrow) so the cursor enters the field, then type.

Prerequisites

Item Requirement Notes
Configuration software SIMATIC WinCC flexible 2004 / 2005 / 2007 / 2008 SP1 / SP2 / SP3 TIA Portal does not target TP170A directly. Use WinCC flexible for any TP170A project. The latest build is 2008 SP3.
Panel firmware / image TP170A image ≥ V 4.x Image selectable from Project → Change Device Type in the WinCC flexible device tree.
PC-to-panel cable RS-232 PPI/MPI cable (6ES7 901-3CB30-0XA0) or USB-PPI adapter (6ES7 901-3DB30-0XA0) USB adapters require a driver from the Siemens Automation Toolset CD or from the support portal.
PLC connectivity S7-200 (PPI/MPI), S7-300/400 (MPI/PROFIBUS), LOGO! (with LOGO! CMR option), S7-1200 (PROFINET, only on WinCC flexible 2008 SP1 or later with the PROFINET option enabled) Tag data type REAL must exist on the PLC side, declared explicitly in the symbol table or data block.
Tag data type REAL (32-bit IEEE 754) INT, WORD, and DWORD tags use the integer format chain and will not show decimals regardless of the pattern.
Project transfer medium Serial RS-232 (PPI/MPI), MPI, PROFIBUS, or Ethernet (TP170A with Ethernet option only) Use the WinCC flexible "Transfer" dialog or the PLC-controlled download from STEP 7.
User rights on the engineering PC Local administrator for the WinCC flexible installation directory and for the COM/USB driver install Starter and runtime simulator require write access to the project directory.

Reference the official device manual for detailed transfer cabling, the connector pin-out of the TP170A's RS-485 port, and configuration limits: SIMATIC TP170A Operating Instructions (Siemens Support entry ID 109750793) and the WinCC flexible 2008 System Manual (Siemens Support entry ID 18796052). For TIA Portal migration planning, refer to the Migration Guide for HMI Projects (Siemens Support entry ID 109751382).

Format Pattern Syntax

WinCC flexible stores the value of the Output field's Format property as a .NET-style numeric format string. The string is evaluated at runtime by the panel each time the field is refreshed (default 1 s cyclic continuous, configurable per tag). The following placeholders are supported on TP170A:

Symbol Meaning Example Pattern Value 417.31 → Output
0 Digit placeholder; always show a digit (zero if none) 000.0 417.3
# Digit placeholder; show digit or nothing ###.# 417.3
9 Alias for # in WinCC flexible editors 999.9 417.3
. Decimal separator (locale-dependent) 999.9 417.3 (en-US) / 417,3 (de-DE)
, Group (thousands) separator (locale-dependent) #,##0.0 417.3 / 4,173.1 / 1,234.5
; Section separator: positive;negative;zero 0.0;-0.0;0.0 12.3 / -12.3 / 0.0
% Percent (value multiplied by 100 before display) 0.0% 0.4173 → 41.7%
E0 / E+0 / E-0 Scientific notation 0.00E+00 4.17E+02
'literal' Literal text inside single quotes 0.0' m' 417.3 m

Mixing 0 and 9/# in the same pattern is permitted. Use 0 for required leading or trailing zeros and 9/# for positions that may be blank. The locale of the runtime (configured in Project → Language & Font or the panel's regional settings) controls which character is treated as the decimal separator and which as the group separator. A pattern typed with the "wrong" character (for example, 999,9 typed on an English engineering PC) is still accepted by the editor; the runtime substitutes the locale-appropriate separator at display time.

Step-by-Step Configuration

  1. Open the WinCC flexible project in the configuration tool. If the project is not yet bound to a TP170A device, add the TP170A device from the catalog and confirm the connection (PPI, MPI, or PROFIBUS) matches the installed cabling.
  2. Navigate to the screen containing the Output or I/O field that should display the analogue measurement. Double-click the field to open its Properties dialog. Switch to the General tab (or the dedicated Output/Input tab in older WinCC flexible releases).
  3. Bind the Tag drop-down to a process tag of data type REAL. If the value originates in an S7-200, S7-300, or S7-400 data block, point the tag at the corresponding DB double-word (DBD) and ensure the data type is REAL, not WORD or INT. A common error is binding to a DBW (word) address; the runtime then interprets the high 16 bits of the REAL as a separate integer and renders nonsense.
  4. Locate the Format drop-down. Click the arrow to display the three preset entries. Ignore them; click the edit field itself (single click, not on the arrow) so the cursor enters the editable area. The cursor will appear as a text I-beam and the arrow will collapse.
  5. Type the custom pattern directly. For the analogue-level example, enter 999,9 if the runtime locale is German, French, or any other locale that uses a comma as decimal separator; enter 999.9 for English (dot as decimal separator). The string is accepted regardless of which locale is active because the runtime substitutes the configured separator at display time.
  6. Confirm the field. The drop-down will collapse to the custom string; the property sheet will display it exactly as typed. Save the project (Ctrl-S).
  7. Compile the runtime image: Project → Compiler → Generate Runtime. Inspect the warnings pane; a "Format pattern invalid" warning indicates that the string contains a character outside the supported grammar.
  8. Download the runtime to the TP170A through Project → Transfer → Transfer to Panel or via the PLC's transfer trigger. If the panel requests a password, enter the transfer password configured in Panel → Settings → Transfer.
  9. Verify in the panel's Information → System screen that the project CRC and image version match the compile output. A CRC mismatch indicates a partial transfer and the format change will not be applied; re-transfer the project.

To inspect the runtime value during development, launch the WinCC flexible Runtime simulator (Start → Runtime) and observe the field. If the value still renders as a five-digit integer, the tag data type on the PLC side is INT or WORD instead of REAL; the field will then truncate the decimal portion. Switch the PLC variable to REAL and re-transfer.

Working Examples

Process Variable Range / Unit Recommended Pattern (en-US) Equivalent (de-DE) Sample Value Display
Tank level 0 – 999.9 m 999.9 999,9 417.31 417.3
Pressure 0 – 9.99 bar 9.99 9,99 4.17 4.17
Flow rate 0 – 99999 l/h 99999 99999 12345 12345
Temperature -50.0 – +250.0 °C 0.0;-0.0;0.0' °C' 0,0;-0,0;0,0' °C' -12.5 -12.5 °C
Scaled percentage 0 – 100 % 0.0% 0,0% 0.873 87.3%
Large counter 0 – 1,234,567 #,##0 #.##0 1234567 1,234,567
Engine speed 0 – 18000 rpm 00000 00000 9500 09500
Weight (load cell) 0.00 – 99.99 kg 00.00 00,00 7.5 07.50
pH 0.00 – 14.00 0.00 0,00 6.85 6.85
Frequency 0.0 – 600.0 Hz 000.0 000,0 50.05 050.1
WinCC flexible silently truncates digits beyond the pattern width. If the live value is 1234.5 and the pattern is 999.9, the runtime displays 234.5 (it does not flag the overflow). Use a wider pattern (9999.9) or, better, scale the variable on the PLC so the runtime value never exceeds the field width. For applications where overflow is a real risk, add a separate bar-graph or message-display element driven by the limit-monitor block on the tag.

PLC Tag Integration

The HMI tag must point to a real-valued storage location. For SIMATIC S7-300/400 the simplest approach is a shared data block (DB) with a REAL field; the HMI tag references the DB number and byte offset. For S7-200, the corresponding storage is a VD (Variable Double Word) area or a VW pair loaded with a real number via the MOVR instruction. For LOGO! 8, the value area is a VW accessible through the LOGO! HMI connection; for S7-1200, the symbolic tag is read via PROFINET from a DB or an I/O tag.

Example 1: S7-300/400 STL excerpt populating the level tag from an analogue input peripheral. The input is a 4–20 mA signal wired to AI8×12Bit (6ES7 331-7KF02-0AB0), occupying PIW 752. The raw value 0–27648 is converted to engineering units in the range 0.0–100.0 m.

NETWORK 1    // Scale AI to level in metres
L     PIW 752                // analogue input word, 0-27648
ITD                          // integer → double integer
DTR                          // double integer → REAL
L     1.000000e+002          // 100.0 (engineering full scale)
L     2.764800e+004          // 27648 (raw full scale)
/R                           // ratio = 100.0 / 27648
*R                           // scaled value in metres
T     DB10.DBD0              // write scaled REAL to DB10, byte 0

Example 2: S7-200 ladder logic keeping a 32-bit REAL in VD200, referenced directly by the TP170A.

NETWORK 1
LD    SM0.0                  // always-true contact
MOVR  AC1, VD200             // copy REAL in accumulator to VD200

Example 3: S7-1200 SCL block populating a symbolic REAL tag.

IF #Enable THEN
    #Level_m := INT_TO_REAL("AI_Level") / 27648.0 * 100.0;
ELSE
    #Level_m := 0.0;
END_IF;

Example 4: WinCC flexible tag configuration to read DB10.DBD0 from an S7-300/400 station on MPI address 2.

  • Tag name: Level_m
  • Connection: S7-MPI, address 2, rack 0, slot 2
  • Address: DB 10 DBD 0
  • Data type: REAL
  • Acquisition mode: Cyclic continuous, 1 s
  • Format (Output field): 999,9

For S7-1200, WinCC flexible 2008 SP1 or later with the PROFINET option is required. The DB name (symbolic or absolute) and the data type REAL are configured identically; the panel imports the symbol table via the HMI device proxy. The PROFINET device name of the S7-1200 CPU must be assigned before transfer (use the TIA Portal or the S7-1200 web server) and must match the name configured on the HMI side.

Memory Layout and Bit-Level Detail

A REAL occupies four bytes (32 bits) in the PLC's memory. The IEEE 754 single-precision layout is one sign bit, eight exponent bits, and 23 mantissa bits. In a SIMATIC DB, a REAL field declared as DB10.DBD0 spans bytes DB10.DBB0 through DB10.DBB3, with the most significant byte (sign + top exponent bits) at the lowest address on big-endian S7-300/400 CPUs and the opposite byte order on S7-200. The WinCC flexible tag driver handles the byte order transparently; the engineer does not need to byte-swap. Where the engineer does need to act is at the wiring boundary: an INT tag inadvertently bound to a REAL address will display the top half-word as an integer, which is why the "value still shows as integer" symptom is almost always a tag-type mismatch and not a pattern error.

For diagnostics, the WinCC flexible Tools → Status panel can read the raw 32-bit hex value of any tag. Compare it to the expected pattern: for 417,3 stored as a REAL, the hex representation is 0x4350D999 in big-endian (S7-300/400) or 0x99D95043 in little-endian (S7-200, S7-1200). If the runtime value is 417,3 and the hex matches, the pattern is the next thing to inspect. If the hex is wrong, the scaling on the PLC side is at fault and the HMI configuration is correct.

Scaling Formulas

For 4–20 mA inputs read by SIMATIC analogue modules, the raw count N from the PLC maps to engineering value E as:

E = (N / 27648.0) × (E_max - E_min) + E_min

where 27648 is the nominal full-scale count of the 4–20 mA range on most AI modules (the actual value is 27648 for the 0–20 mA range scaled to 4–20 mA; some modules report 0–27648 even for 4–20 mA, others 0–65535 for the full hardware range, in which case the formula becomes E = (N / 65535.0) × (E_max - E_min) + E_min). For 0–10 V inputs, the same 27648 count holds. For bipolar ±10 V inputs on modules such as the 6ES7 331-7NF00-0AB0, the range is -27648 to +27648 and the formula becomes:

E = (N / 27648.0) × E_max_bipolar

For Pt100 RTDs read by the 6ES7 331-7PF01-0AB0, the module returns the temperature in 0.1 °C units (e.g., 253 for 25.3 °C). Divide by 10 to obtain engineering units and use a pattern with one decimal place.

For thermocouples read by the 6ES7 331-7PF11-0AB0, the module returns the temperature in 0.1 °C units as a signed integer. The same divide-by-10 rule applies; allow for negative temperatures by including a negative sub-pattern in the format string.

Locale and Decimal Separator Behaviour

WinCC flexible stores the format pattern as a literal string but renders the decimal and group separators using the active runtime locale. This is why a project developed on a German engineering workstation with a comma as decimal separator and then deployed on an English-locale TP170A may display 417,3 (because the pattern was typed as 999,9) or 417.3 (because the pattern was typed as 999.9) depending on what the user typed. To avoid ambiguity, follow the locale of the operating engineer when typing the pattern; the runtime always substitutes the locale-appropriate character at refresh.

For mixed-locale fleets, prefer literal text patterns such as 0.0' m' for English and 0,0' m' for German. If a single image must serve both, the safer compromise is to type the pattern using the locale-neutral placeholder 0 and 9 only and to let the runtime choose the separator based on the panel's regional settings. Force the locale in Project → Language & Font → Project Language to a known value before generating the runtime image to eliminate drift between projects. The runtime language is configurable per project under Project → Language & Font and per panel under Control Panel → Language; both must agree for the format substitution to be consistent.

Verification Procedure

  1. Start the WinCC flexible Runtime simulator. The simulator reads the project image as if it were loaded on the TP170A, including the format pattern and the tag connection. For MPI/PROFIBUS connections the simulator uses a soft-PLC stub; for S7-PLCSIM on STEP 7, the simulator can be linked to the simulated CPU through MPI/TCP.
  2. Force the connected tag to several values spanning the expected range: minimum, mid, maximum, and one negative (if applicable). In S7-PLCSIM, use the VAT (Variable Table) to overwrite the source DBW/DBD. In the field device, use the engineering tool's Tools → Tags dialog to write a test value.
  3. Observe the Output field. Confirm that:
    • Leading or trailing digits appear as defined by the 0 vs 9/# placeholders.
    • The decimal separator matches the runtime locale.
    • No digit truncation occurs; if it does, widen the pattern or rescale the value.
    • Negative values render with the minus sign when the negative sub-pattern is included; without a sub-pattern, the minus may be dropped silently.
  4. Stop the simulator. Connect the panel, transfer the runtime image, and repeat the value test on the live TP170A. The HMI's Information → System screen can be used to verify the project CRC and image version.
  5. Save a project backup (.hmi or .fwx export) and label it with the format pattern in the file name; this prevents format regressions when the project is later opened in a different WinCC flexible build.
  6. Capture screenshots of the field under test for the commissioning report. Attach the screenshots to the project's documentation folder and link them to the tag name in the I/O list.

Troubleshooting Matrix

Symptom Likely Cause Diagnostic Step Corrective Action
Field shows full five-digit integer (41731) with no decimal point Tag is INT or WORD; runtime cannot interpret as REAL Open tag properties, verify data type REAL Change tag type to REAL; reselect address; if PLC is S7-200, ensure source is VD and not VW
Field shows 0.0 even when PLC has a valid value DB number, byte offset, or connection address is wrong Use WinCC flexible diagnostics Tools → Status on the connection Correct the address; verify that the CPU is in RUN, not STOP; check MPI/PROFIBUS cable
Field shows asterisks (*****) or "###" Pattern width smaller than the live value, or value is NaN/±∞ Force a smaller value on the PLC and watch the field; check for divide-by-zero in the PLC Widen the pattern (e.g., from 99.9 to 999.9) or rescale the variable; trap division results for zero divisor
Field shows a comma in en-US project or a dot in de-DE project Pattern typed with the wrong separator character Compare pattern to the active locale in Project → Language & Font Retype pattern using the locale's decimal separator; do not rely on visual substitution
Field changes not visible after transfer Old runtime image still cached in panel Reboot TP170A (power cycle) and re-transfer Disable Transfer → Remote only if the PLC is controlling the transfer; otherwise enable and retry
Field shows literal "999,9" string Pattern field was left in text-quote mode or the field is bound to a string tag Inspect the Tag binding and the Output/Input mode Re-bind to a REAL tag and set the field to Output only
Compilation warning "Format pattern invalid" Pattern contains characters outside the supported grammar (e.g., ?, *, L) Re-read the supported placeholder table Replace invalid characters with 0, 9, or #
Negative values display without minus sign Pattern has no ; section or no negative sub-pattern Add a negative sub-pattern: 0.0;-0.0 Use the full positive;negative;zero form
Field flickers between two values Tag acquisition set to On change with a small deadband; PLC value oscillates within deadband Inspect tag properties → acquisition Switch to Cyclic continuous for process-critical values
Field updates slowly (≥ 5 s lag) Cyclic acquisition period set too long, or connection bandwidth saturated Reduce acquisition period to 1 s; check PROFIBUS bus load Lower the period; reduce the number of tags on the same connection; check bus termination
Field shows correct value in simulator, wrong value on panel Project CRC mismatch after transfer, or wrong image version active Check Information → System on the panel; compare to compile output Force re-transfer; reboot panel; clear panel flash via service menu if corrupted
Field shows scientific notation unexpectedly Pattern contains an E segment and the value is outside the pattern's fixed-point range Inspect pattern Remove the E segment and use a wider fixed-point pattern

Edge Cases and Limitations

  • Integer overflow during format truncation. The pattern is a render specification, not a range check. A 16-bit INT that the runtime interprets as a positive 32-bit unsigned value because of a tag-type mismatch may produce nonsensical but syntactically valid output.
  • NaN and infinity. If the PLC value becomes NaN (e.g., divide-by-zero before DTR) or ±∞, WinCC flexible shows ### or a similar placeholder. The format pattern does not control this output; the runtime substitutes its own representation. Add a PLC-side check for zero divisor and clamp the result to a sentinel value such as -9999.0 before scaling.
  • Cyclic vs. on-change acquisition. The format applies at every refresh, but if the tag acquisition is set to On change with a deadband, the panel may appear "stuck" at a value when the underlying REAL oscillates within the deadband. Choose Cyclic continuous for process-critical values.
  • Recipe and trend rendering. Recipes and trend views apply their own formatting and do not honour the Output field's pattern. Configure format at the trend or recipe element instead. For trend value-axis labels, use the axis properties dialog.
  • Multilingual projects. Each language can override the format pattern through the text library. The pattern string is treated as a localizable resource, so the same project can display 417,3 in German and 417.3 in English on a TP170A configured with two runtime languages.
  • Print and log output. Reports and alarm logs use a separate format chain controlled in the report layout. They will not pick up the Output field's pattern. For alarm logs with a real-valued trigger, configure the format on the message class or on the log column.
  • Bar view and slider. A bar view or slider element bound to the same REAL tag uses the tag's limits, not the Output field's pattern. Configure the limits under Properties → Limits.
  • Symbolic addressing on S7-1200/1500. WinCC flexible 2008 SP1 with the PROFINET option supports symbolic addressing through the HMI device proxy. If the symbolic name changes in TIA Portal, the proxy must be refreshed; otherwise the tag will read the old absolute address and may show a stale value.
  • Power-on defaults. The runtime image stores the format pattern in compressed flash. A failed flash write (rare, usually caused by a power interruption during transfer) can leave the panel displaying a default pattern; re-transfer the project and verify the CRC before declaring the fault.

Performance and Bus Loading

Each tag with Cyclic continuous acquisition generates one read request per cycle on the connection. The TP170A supports a default cycle of 1 s and can service roughly 30 tags per second on an MPI connection at 187.5 kbit/s. For PROFIBUS at 1.5 Mbit/s the ceiling rises to about 200 tags per second. When the same REAL value is displayed in several fields (for example, on the main screen, on a trend, and on an alarm log), consider defining the tag once and binding multiple elements to it, rather than creating three separate tags pointing to the same address. The TP170A's tag cache is single-instance per address and is shared across views.

For a 4-byte REAL, the bus cost is four bytes per request plus the MPI/PROFIBUS frame overhead (about 11 bytes for a single-word read, 15 bytes for a double-word read, 19 bytes for a four-byte read with full SD/LE/DA/SA/FC/FCS/ED framing). At 187.5 kbit/s, a double-word read takes about 1 ms on the wire; at 1.5 Mbit/s, about 0.1 ms. These figures are useful for sizing the acquisition period when many tags share one connection.

Migration to TIA Portal WinCC

The TP170A is not directly supported by TIA Portal; WinCC flexible remains the only engineering environment for this device. When a project is migrated to a newer panel family (for example, SIMATIC TP700 Comfort, KTP1200 Basic, or Unified Comfort), the conversion is performed through Project → Migrate in TIA Portal. The Output field's format pattern is preserved verbatim because the TIA Portal WinCC runtime uses the same .NET numeric format grammar. Patterns defined in WinCC flexible 2008 SP3 round-trip to TIA Portal V13, V14, V15, V15.1, V16, V17, and V18 without manual editing, which makes the manual-entry workaround discussed above a durable choice for the field engineer.

For projects intended to remain on TP170A hardware, archive the source .hmi project together with the WinCC flexible build number used to compile it. WinCC flexible is a generational toolchain: opening a TP170A project in a build newer than the one that generated it can re-emit the runtime image with subtle differences in default tag properties; in extreme cases, this can change a field from REAL to WORD, which would explain a sudden loss of the decimal point after a project recompile. Tag the source archive with the exact build (e.g., "WinCC flexible 2008 SP3 HF5") and the project CRC; these two pieces of information are sufficient to reproduce the runtime image byte-for-byte.

Always validate the Output field's Format property after any project upgrade. The most common regression is the format string reverting to 99999 (the editor's first preset) when the project is opened in a newer WinCC flexible build, especially across major service-pack boundaries (2007 → 2008 SP1, 2008 SP1 → SP2, etc.). If a regression is detected, re-apply the custom pattern, re-compile, and re-transfer before resuming commissioning.

Field Commissioning Checklist

  1. Verify the TP170A firmware image version matches the WinCC flexible build used to compile the project.
  2. Confirm the connection parameters (MPI address, PROFIBUS node, baud rate) match the PLC configuration. Use the Tools → Status dialog on the panel to read the bus diagnostic counters.
  3. Read the tag's raw 32-bit value through the diagnostics panel and confirm it matches the value visible in STEP 7 VAT or TIA Portal watch table.
  4. For each Output field bound to a REAL tag, document the pattern string in the I/O list. Attach a screenshot of the field under three test values (min, mid, max).
  5. For each field with a negative sub-pattern, force a negative test value and confirm the minus sign is rendered.
  6. For each field with a literal-suffix pattern (e.g., ' m'), confirm the suffix is rendered with one space between the value and the unit. Reduce the gap or add a non-breaking space in the literal if the field is narrow.
  7. Sign off the panel's commissioning sheet and file the screenshots in the project documentation directory.

Frequently Asked Questions

Why does the Format drop-down only show 99999, 9.99, and 99.9 in WinCC flexible?

The drop-down is a convenience filter, not a hard limit. The field is a free-text edit box; click the edit area (not the arrow) and type any .NET-compatible numeric format string such as 999,9, 0.0, or #,##0.00. The runtime applies the pattern at every refresh.

What format pattern should I use to show 417,3 m on a TP170A?

Use 999,9 on a German-locale runtime, or 999.9 on an English-locale runtime. Append a literal unit with single quotes—999,9' m'—if you want the unit baked into the field rather than placed in a separate text element. The runtime substitutes the locale-appropriate decimal separator automatically.

My REAL tag still shows an integer. Is the panel wrong?

Almost always the tag data type is wrong on the WinCC flexible side (or on the PLC side). Open the tag's properties and confirm Data type = REAL. For S7-200, ensure the source area is a VD and not a VW; for S7-300/400, confirm the DBW/DBD address points to the correct double-word and that the data block uses REAL declarations. A common mistake is binding to a DBW (word) address; the runtime then interprets the high 16 bits of the REAL as a separate integer and renders nonsense.

Can I show leading zeros, for example 09500 rpm, on a TP170A?

Yes. Use the 0 placeholder instead of 9 or #. The pattern 00000 forces a five-digit display with leading zeros for any value from 0 to 99999. For signed values, use 00000;-00000 so the minus sign is preserved and the field width remains constant across positive and negative states.

Does the same format pattern work on TIA Portal WinCC after migration?

Yes. TIA Portal's WinCC runtime uses the same .NET numeric format grammar, so patterns such as 999,9, 0.0;-0.0;0.0, or #,##0.00 round-trip from WinCC flexible 2008 SP3 to TIA Portal V13 and later without manual editing. Always re-verify the pattern in the new environment, however, because some compiler warnings only appear at migration time and may force a re-key of the pattern if the project was opened in a build that did not recognize a placeholder.

How do I render a real value with a thousands separator on a TP170A?

Use the #,##0.0 pattern (en-US) or #.##0,0 (de-DE). The comma or dot between the digit groups is interpreted as a group separator at runtime, not a literal character. The pattern #,##0 without a decimal segment produces an integer with thousands separators; the pattern #,##0.00 produces a two-decimal value with thousands separators. For values under 1000 the group separator is suppressed automatically.

Why does my formatted value show 999.9 even when the PLC sends 1000.0?

The pattern width is too small. The runtime truncates digits that do not fit the pattern; a 1000.0 value with a 999.9 pattern renders as 999.9 because the leading 1 is cut. Either widen the pattern to 9999.9 or, preferably, rescale the variable on the PLC so the runtime value is bounded within the pattern width. Add a PLC-side clamp (LIMIT instruction on S7-300/400, MIN/MAX on S7-1200) to keep the value in range.

Back to blog