Limiting String I/O Field Length on Siemens TP700 Comfort Panels

David Krause14 min read
HMI ProgrammingSiemensTutorial / How-to
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 an I/O field on a Siemens SIMATIC TP700 Comfort panel is bound to a WSTRING or STRING tag and the operator pastes or types more characters than the configured input capacity, the runtime raises system event 230000 and the system alarm window displays "Invalid Entry". This default behavior is by design — the runtime protects the HMI tag, the connected PLC tag, and the user input buffer from overflow — but for many HMI screens the message is undesirable: the operator is still constrained, the alarm pollutes the message buffer, and the screen-flow can stall while the user closes the dialog.

Two issues must be addressed to get a clean input experience on a TP700 Comfort running TIA Portal V13 (WinCC Comfort V13):

  1. Configure the I/O field so the runtime stops accepting characters at the intended boundary (and stops triggering the alarm).
  2. Suppress or re-route system message 230000 so that any residual violations are not visible to the operator.

This reference covers the exact properties to set, where to find them in TIA Portal V13, how the runtime actually enforces the limit, and the supported ways to extend the behavior with VB Script when pure property configuration is not enough.

Scope: This article targets the SIMATIC TP700 Comfort (6AV2 124-1MC01-0AX0 and equivalent) and TP900 Comfort panels configured with TIA Portal V13 SP1 / V13 SP2 and WinCC Comfort V13. The string input mechanism for Comfort Panels is implemented in WinCC Comfort and shares its configuration surface with WinCC Advanced. For WinCC Unified / TIA Portal V17 and later, the I/O field element model differs — see the notes at the end of this article.

Prerequisites

  • Engineering station: TIA Portal V13 SP1 or V13 SP2 with the WinCC Comfort V13 option installed.
  • Runtime target: SIMATIC TP700 Comfort (or TP900 Comfort) with firmware V13.0.x or V13.0.2 — confirm under Device > Online > Diagnostics > Operating State.
  • Tag type: A PLC or HMI tag of STRING (S7-1500 / S7-1200) or WSTRING (S7-1500) — both are supported as I/O field process values. The maximum displayable length on Comfort Panels is 128 characters for a STRING tag and 254 characters for a WSTRING.
  • Project transfer: The configured screen must be compiled without warnings and transferred to the panel. Verify transfer completion by inspecting the panel's Start Center > Transfer log.

Step-by-Step: Configure the I/O Field String Length Limit

The TP700 Comfort runtime enforces the character limit through the I/O field's display format, not through the underlying tag. The setting is one property field deep, but the menu path differs between TIA Portal V13 and V14+. The exact V13 path is shown below.

  1. Open the screen in the editor. In the project tree, expand HMIs > [HMI_1] > Screens > [Screen_1] and double-click the target screen.
  2. Select the I/O field. Click once on the I/O field that is bound to the string tag. The Inspector window on the right populates with the field's properties.
  3. Open the Properties dialog. In the Inspector, choose Properties > Properties > General. Do not use Properties > Appearance or Properties > Animations — the field-length setting lives under the General subnode.
  4. Locate the Format box. In the General section, scroll to the Format group. The two relevant controls are Display format and Field length.
  5. Set Field length to the desired value. Enter the maximum number of characters the operator may type (e.g., 10). The runtime interprets this as the upper bound for input. Any keystrokes beyond the limit are silently dropped at the input stage; they are not echoed, not stored, and not transferred to the tag.
  6. Verify the display format. For string tags, leave Display format at String. Do not select Binary, Decimal, or Hex — these are numeric formats and will produce a different system alarm (typically 230001 or 230002) on string input.
  7. Confirm the tag type. In Properties > Properties > General > Process, verify that Process value points to a STRING or WSTRING tag. The field length and the tag's declared length are independent: a WSTRING[80] tag can be paired with a 10-character field length to enforce a 10-character input cap.
  8. Compile and transfer. Right-click the HMI device > Compile > Software (rebuild all), then transfer the project to the TP700 Comfort.
Important — keyboard layer difference on TP900: The TP700 Comfort and TP900 Comfort share a runtime engine, but the on-screen keyboard layout is rendered differently. On the TP900, the keyboard adapts the visible key count to the configured Field length, providing visual feedback. On the TP700, the keyboard layout is fixed and the field-length behavior is enforced entirely by the runtime. Configure and verify on the actual target panel, not only in the PLCSIM HMI emulator.

Suppressing System Message 230000

Even with Field length configured, certain input paths can still trigger the runtime to raise system event 230000 — "Invalid entry in the IO field". The most common triggers are:

  • Pasting text longer than the field length from a USB keyboard or from another I/O field on the same screen.
  • Using an external barcode or RFID reader that streams a longer string in a single acquisition cycle.
  • Programmatic tag writes from the PLC that exceed the runtime's expected input length (rare on a correctly sized tag, but possible with mismatched tag lengths between HMI and PLC).

Event 230000 is generated by the WinCC Comfort system event class and cannot be cancelled or acknowledged by user code. The supported way to remove it from the operator's view is to delete or hide the system message from the project's HMI messages table.

  1. Open the HMI messages editor. In the project tree, expand HMIs > [HMI_1] > HMI messages > System messages. The HMI messages table is pre-populated with the system class messages; event 230000 is one of them.
  2. Locate message 230000. Use the filter Number = 230000 or scroll to the "IO field" group. The text is "Invalid entry in the IO field".
  3. Disable the message. Right-click message 230000 and select Delete. The runtime will no longer raise the alarm window. Alternatively, leave the message in the table but clear the Acknowledgement and Logging columns and disable the message in the Visibility column for the alarm window view.
  4. Confirm suppression. In the Alarm window object on the screen, the Filter setting also controls which message classes are surfaced. Set the filter to Errors, Warnings, Information but explicitly exclude the system event class if you want global suppression. Note that excluding the system class hides all system messages, not only 230000 — use this only if your project design already handles system events through a separate diagnostic view.
  5. Recompile and transfer. Message table changes are compiled into the project image; a partial download is not sufficient. Use Compile > Software (rebuild all) and a full project transfer.
Field-proven caveat: Deleting message 230000 from the HMI messages table is a project-level change. If you later add a second panel or import the HMI configuration into a different TIA Portal project, the message suppression does not automatically follow. Document the suppression in the project HMI specifications so it is not accidentally re-enabled by a later engineer.

VB Script Alternative for Dynamic Truncation

If the input cap needs to vary at runtime (e.g., a recipe-driven limit, a user-role-driven cap, or a value set by the PLC), the static Field length property is not enough. The TP700 Comfort supports VBScript (VB Script) on the global and screen level for event-driven logic. A common pattern is to use a longer internal string as a buffer and truncate the live value through a script.

Implementation pattern:

  1. Declare an internal HMI tag of type WSTRING[254] (the maximum supported). Use this tag as the Process value of the I/O field. Set Field length on the I/O field to the maximum possible length (e.g., 254) so the input is never rejected.
  2. Declare a second HMI tag of the same type and a third tag, MaxLen (INT), which holds the current allowed length.
  3. On the I/O field's Change event, call a VBScript function that reads the internal string, compares it to MaxLen, and writes the truncated result to the PLC tag.

Sample VBScript (screen-level, on the I/O field Change event):

' --- Truncation function for a buffered I/O field on a TP700 Comfort --- ' Bound to: I/O field "BufferInput" Change event ' Reads internal HMI tag "internal_buf", truncates to MaxLen, writes to "plc_string" Sub OnChange(ByVal item, ByVal value) Dim sBuf Dim iMax Dim sTrunc sBuf = SmartTags("internal_buf") iMax = SmartTags("MaxLen") If Len(sBuf) > iMax Then sTrunc = Left(sBuf, iMax) SmartTags("plc_string") = sTrunc ' Push the truncated value back to the I/O field so the operator sees the cap SmartTags("internal_buf") = sTrunc Else SmartTags("plc_string") = sBuf End If End Sub

This pattern lets you change the cap from the PLC at runtime (e.g., based on operator role or recipe) without editing the screen. The internal_buf tag is the operator's actual visible input; the plc_string tag is the value delivered to the controller.

Performance note: VBScript on Comfort Panels runs on the HMI's integrated controller. For high-frequency input (barcode streams, fast field changes), avoid running string operations on every Change event — debounce by using the Output event with a small delay, or move the truncation into the PLC and use a 1-byte length tag as a contract between PLC and HMI.

How the String Length Limit Actually Works

Understanding the enforcement model prevents misdiagnosis when the cap appears to "leak." The TP700 Comfort runtime uses a layered check:

  1. Key event interception: The on-screen keyboard's input layer rejects keystrokes beyond Field length. The character is never placed in the input buffer.
  2. Paste and external input path: Pasting from the Windows clipboard (USB keyboard, VNC remote, RDP) bypasses the on-screen keyboard layer. The runtime checks the resulting buffer length and either accepts, truncates, or rejects based on configuration.
  3. Tag type guard: If the underlying tag is STRING[n] or WSTRING[n] with n smaller than Field length, the tag becomes the binding constraint. The runtime truncates to the tag length and raises message 230000 only if the truncation actually altered the value.
  4. PLC-bound write: When the operator confirms the input (Enter or focus loss), the runtime writes the buffer to the PLC tag. If the PLC tag is shorter than the buffer, the S7 communication layer truncates on the controller side and the HMI logs a system event; this is independent of the I/O field configuration.

Configuration Parameter Reference

Property Path Type Default Effect
Field length Properties > Properties > General > Format UINT (1–254) 10 Maximum input characters accepted before keystrokes are dropped
Display format Properties > Properties > General > Format Enum String Must be "String" for STRING/WSTRING tags; selecting a numeric format triggers 230001
Process value Properties > Properties > General > Process Tag reference — Target tag; effective length = min(Field length, Tag length)
Hidden input Properties > Properties > General > Security Bool False When true, characters are masked (password fields); does not affect length
System message 230000 HMI messages > System messages Alarm Active Delete to suppress invalid-entry alarm globally
Alarm window filter Properties > Properties > Filter Enum All Set to "Errors" to hide 230000 without deleting; affects all system messages

Edge Cases and Behavior Variations

  • WSTRING vs STRING length semantics: A WSTRING[10] holds 10 UTF-16 characters, each of which can be a multi-byte Unicode codepoint. The TP700 Comfort's Field length counts UTF-16 code units, not Unicode codepoints. If the operator enters emoji or CJK characters that map to surrogate pairs, the effective codepoint count is half the displayed character count and can trigger unexpected truncation.
  • Tag length vs field length mismatch: If Field length = 10 and the bound tag is STRING[6], the runtime truncates to 6 and the first 4 keystrokes are not what the user sees. Always align the tag's declared length to the I/O field's cap, or place a longer tag in between (internal buffer pattern) and have the PLC read the truncated view.
  • Recipe and library reuse: If the I/O field is part of a screen template or library element, the Field length property is instance-level. Changes to the library master do not propagate to instances; check each instance individually.
  • Panel restart behavior: The runtime reads the Field length from the compiled project, not from the runtime tag. Changing the field length at runtime is not supported via standard properties — use the VBScript buffer pattern for dynamic limits.
  • TP177 vs TP700: Older TP177 panels running WinCC Flexible 2008 SP3 do not expose the Field length control under the Format group in the same way. If you are migrating a WinCC Flexible project to a TP700, verify the property mapping during the port.
  • WinCC Unified difference: In WinCC Unified (TIA Portal V17+, the runtime used by Unified Comfort Panels such as the MTP700 Unified), the I/O field's input limit is configured under Properties > General > Limit values > Input length, and a limit violation can change the background color according to the configuration. The legacy Field length under Format does not exist on Unified panels. If you are working on both families, do not assume parity.

Verification

After transferring the compiled project, perform the following checks on the live panel:

  1. Boundary test: Type exactly the field-length count of characters. Verify the last character is accepted and the value is written to the tag (observe the tag in Online > Watch table or via the PLC's online monitor).
  2. Overflow test: Type one more character. Verify the keystroke is dropped, no alarm window appears, and the tag value remains at the boundary count.
  3. Paste test: Paste a string longer than the field length (e.g., a 20-character string into a 10-character field). Verify the buffer truncates to 10 characters and no 230000 message appears. If the message still appears, the suppression was not applied — re-check the HMI messages table.
  4. Barcode test: If a USB barcode scanner is connected, scan a code longer than the field length. Verify truncation occurs without an alarm event in the Alarm log view.
  5. Round-trip test: In the PLC, monitor the bound tag for the truncated value. Confirm the value matches the operator-visible string. If the PLC value differs, check the tag-length mismatch case described in Edge Cases.

Reference Notes

The TP700 Comfort is part of the SIMATIC HMI Comfort Panel family, configured with WinCC Comfort inside TIA Portal. The runtime engine shares its input model with WinCC Advanced. For projects that migrate to a Unified Comfort Panel (MTP700 Unified / MTP1000 Unified), the I/O field element uses a different configuration surface; in WinCC Unified the limit is configured under Limit values > Input length and a limit violation can change the background color of the I/O field in input mode. The migration preserves the project logic but requires re-binding the limit property in each screen.

FAQ

What is the maximum string length supported by the I/O field on a TP700 Comfort?

For a STRING tag, 128 characters. For a WSTRING tag, 254 characters. The Field length property can be set to any value from 1 up to the tag's declared length; values above the tag length are clamped at the tag length by the runtime.

Why does the "Invalid Entry" alarm still appear after I set Field length to 10?

System message 230000 is raised by the runtime when the input buffer is forced to truncate. This happens when text is pasted or streamed from a barcode scanner, or when the bound PLC tag is shorter than the operator's input. Setting Field length stops keystroke-level overflow but does not stop paste-level overflow. Delete message 230000 from the HMI messages table to suppress the alarm.

Can I change the input length limit at runtime from the PLC?

No, the Field length property is compiled into the project and cannot be modified at runtime. To enforce a dynamic cap, use the VBScript buffer pattern: bind the I/O field to a long internal HMI tag, set Field length to the maximum possible value, and use a Change event script to truncate the value to the current PLC-supplied limit before writing to the PLC tag.

Does deleting system message 230000 also disable the alarm log entry?

No. Deleting the message from the HMI messages table removes it from the active alarm buffer so it is not displayed, but it can still be written to the alarm archive if logging is enabled. To fully disable logging for this event, also clear the Log column in the HMI messages table or use a custom event ID routed to a separate archive.

Is the configuration the same for TP900 Comfort and TP700 Comfort?

Configuration of the I/O field is identical. The on-screen keyboard layout differs: the TP900 compresses its key count visually to match the configured Field length, while the TP700 keeps a fixed layout and enforces the limit silently in the runtime. Always verify behavior on the actual target panel.
Back to blog