Forcing Symbolic Integer Bits in TIA Portal V17 Watch Tables

David Krause10 min read
SiemensTechnical ReferenceTIA Portal
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

Engineers migrating from classic STEP 7 to TIA Portal V17 (Update 5 and later) frequently hit a wall when they try to force individual bits of a symbolically addressed 16-bit integer from a watch table. The legacy habit of typing MW10, locating it in binary, and toggling each bit via the Variable table is replaced by a symbolic tag (for example "HMI_Word".x3) that the watch table UI refuses to coerce into individual BOOL rows.

This reference documents the exact syntax TIA Portal accepts, where force values actually live, what is and is not forceable, and the field-proven workarounds (UDT structs, M-bit overlay, peripheral input forcing) that restore bit-level forcing without sacrificing symbolic programming or HMI tag economy.

Critical constraint: The force values are stored in the CPU and not in the watch table. Closing TIA Portal, switching online sessions, or deleting the watch table does not clear forced bits. A CPU STOP-to-RUN or a memory reset does. See the SIMATIC S7-1200 Watch Tables and Force Tables documentation for the authoritative behavior.

Symbolic Bit Addressing Syntax

TIA Portal supports direct bit access on any elementary integer data type through the .<bit> notation. The full set of supported parent types and their bit counts:

Parent Type Bits Bit Range Storage (Bytes)
BOOL 1 n/a 1
BYTE 8 .x0 – .x7 1
WORD 16 .x0 – .x15 2
DWORD 32 .x0 – .x31 4
LWORD 64 .x0 – .x63 8
SINT / USINT 8 .x0 – .x7 1
INT / UINT 16 .x0 – .x15 2
DINT / UDINT 32 .x0 – .x31 4
LINT / ULINT 64 .x0 – .x63 8

Valid PLC program syntax examples:

"DataWord".x0   := TRUE;        // symbolic INT, bit 0
"DataWord".x15  := "Sensor_1";  // symbolic INT, bit 15 from BOOL tag
"DB_HMI".Word[3].x7 := bAck;     // ARRAY element bit access

This syntax is fully resolved by the compiler; the resulting MC7 code still operates on the parent byte. TIA Portal does not create a separate BOOL symbol for each bit, which is the root cause of the watch-table limitation discussed below.

Watch Table vs Force Table

The two tools look similar but have fundamentally different authority over the CPU scan cycle.

Property Watch Table Force Table
Primary purpose Monitor and modify once-per-cycle Override I/O directly, scan-cycle independent
Storage of values Engineering station CPU retentive force memory
Effect on process image Writes are read back on next scan Force persists across STOP→RUN
Affects outputs (Q) Yes (modify) Yes (force)
Affects inputs (I) No (read-only from PII) Only via peripheral input (PI)
Affects M/DB/PI Yes (modify) Yes (force)
Survives online logout Yes (data) Yes (until CPU reset)
Symbolic BOOL accepted Yes (e.g., "Motor".Start) Yes
Symbolic INT.bit accepted Yes as modify of whole INT Partial – see next section

Per the official SIMATIC S7-1200 programming manual, "the force values are stored in the CPU and not in the watch table. You cannot force an input (or 'I' address). However, you can force a peripheral input." (See Watch tables and force tables.) This single rule dictates every workaround below.

Why "Tag".x0 Refuses to Force

When a symbolic INT tag "HMI_Word" is dragged into a watch table, TIA Portal offers one row containing the 16-bit aggregate. The Modify column accepts decimal, hexadecimal, binary, octal, BCD, and character-set interpretations of the same WORD. Changing the display format to BIN shows all 16 bits in one editable field, but every keystroke rewrites the entire WORD. There is no row to toggle a single bit because the watch-table model is one-row-per-symbol, not one-row-per-bit.

Attempts to type "HMI_Word".x0 directly into the Address column of a force table result in a compile-time error "Address not permitted in force table". This is by design: the force table's address parser only accepts absolute memory areas or fully qualified DB-element paths, not bit slices of an elementary type.

Workaround 1 – Force the Parent WORD, Override in Binary

The lowest-effort workaround requires no code change:

  1. Open the watch table, click Switch to force table in the toolbar.
  2. Insert "HMI_Word" as the address.
  3. Set the display format to BIN.
  4. Type the desired 16-bit pattern (for example 0000 0000 0000 0101) into the Force value column.
  5. Right-click the row → Force to 1 or Force to 0 to write the whole word.

Limitations: any program logic writing to "HMI_Word" is overwritten on the next cycle after STOP→RUN. Bit-by-bit toggling requires retyping the binary pattern each time.

Workaround 2 – M-Bit Memory Overlay

Create an absolute M-bit area that mirrors the symbolic word. This is the technique most field engineers use when the HMI must read 16 independent indicators from one tag.

// Symbolic block-side declarations (FB static area)
VAR
    HMI_Word : WORD;       // %MW200 mapped via AT overlay
    M_HMI    AT %MW200 : ARRAY[0..15] OF BOOL;  // AT-view into same word
END_VAR

Now the watch table contains:

Address Symbol Display Format Force Action
%M200.0 M_HMI[0] BOOL Single bit
%M200.1 M_HMI[1] BOOL Single bit
... ... ... ...
%M201.7 M_HMI[15] BOOL Single bit
%MW200 HMI_Word HEX Whole word

The PLC and HMI both reference the single HMI_Word (one tag), while the engineer has 17 forceable entries (16 bits + 1 word). The HMI consumes one HMI tag, not sixteen, because it reads HMI_Word and decodes bits internally.

Caution: The AT overlay is a zero-cost view; both symbols refer to the same memory. Writing either side updates the other in the same cycle. Disable one side in the watch table (right-click → Hide) if the parallel view causes confusion during commissioning.

Workaround 3 – UDT Struct of 16 BOOLs

A user-defined data type provides self-documenting bit semantics:

TYPE "UDT_HMI_Status"
VERSION : 1.0
   STRUCT
      SignOfLife       : BOOL;   // .x0
      ReceiveInterlock : BOOL;   // .x1
      SendInterlock    : BOOL;   // .x2
      Running          : BOOL;   // .x3
      Idle             : BOOL;   // .x4
      Offline          : BOOL;   // .x5
      Faulted          : BOOL;   // .x6
      Spare_07         : BOOL;   // .x7
      Spare_08         : BOOL;   // .x8
      Spare_09         : BOOL;   // .x9
      Spare_10         : BOOL;   // .x10
      Spare_11         : BOOL;   // .x11
      Spare_12         : BOOL;   // .x12
      Spare_13         : BOOL;   // .x13
      Spare_14         : BOOL;   // .x14
      Spare_15         : BOOL;   // .x15
   END_STRUCT;
END_TYPE

Instance: "DB_HMI".Status : "UDT_HMI_Status"

Watch-table behavior:

  • Fully expand the DB element to reveal 16 individual BOOL rows.
  • Each row is independently modifiable and forceable.
  • Symbols appear in plain language, eliminating binary-pattern mistakes.

HMI cost: WinCC Professional / Unified treats the UDT as 16 separate tags when no symbolic multiplex is enabled. This is the trade-off the field report identifies – 1 tag for a WORD vs. 16 tags for a UDT. Enable symbolic multiplexing on the HMI connection to reduce the wire count to 1; see Workaround 2 for the equivalent effect using an absolute MW pointer.

Workaround 4 – Force Peripheral Inputs Directly

When the engineer needs to drive input bits into the process image from the watch table, only the peripheral input area is forceable. The standard %I (PII) area is read-only.

// Force mapping example for an S7-1200 with 16 DI on byte 0
// Symbolic PI access syntax:
"I/O".DI_Force : BOOL;   // bound to %IB0:P  (peripheral input, byte 0)
  1. In the PLC tag table, address a new tag as %IB0:P (byte 0 peripheral) instead of %IB0.
  2. Create a force table and enter the peripheral address (for example %IB0:P, %I0.0:P, %IW2:P).
  3. Activate Force. The CPU now substitutes the forced peripheral byte for the actual hardware input each scan, regardless of physical wiring.

Force values are retained in the CPU's force memory until a STOP→RUN transition is performed with Reset force values checked, or until a memory reset (MRES). This behavior is consistent across S7-1200 firmware 4.2 and later, including all V17-targeted CPU firmware.

Watch Table Display Format Reference

Each symbolic or absolute tag in a watch table supports the following display formats. Choosing the right format is critical when forcing a multi-bit tag.

Format Example Value Editable As Force-Friendly?
BIN (binary) 2#0000_0000_0000_0101 16/32-bit pattern Yes (whole word only)
HEX 16#0005 Hex digit string Yes
DEC (signed) 5 Signed decimal Yes
DEC (unsigned) 5 Unsigned decimal Yes
OCT 8#5 Octal digit string Yes
BCD 16#0005 Binary-coded decimal Rarely used
CHAR (ISO 8859-1) '\0\0\0\x05' Character string Yes (per-byte view)
BOOL (per bit) TRUE / FALSE Only for BOOL tags Yes

Force Table Scope and Retention

Event Watch Table Modify Force Table Active
Online → Offline Lost Retained in CPU
TIA Portal close Lost Retained in CPU
CPU STOP → RUN Cleared (re-evaluated) Retained unless "Reset force" checked
MRES (memory reset) Cleared Cleared
Project download (new HW config) Cleared Cleared
Firmware update Cleared Cleared

HMI Tag Economy Considerations

  1. UDT expansion in WinCC Unified. A STRUCT-containing UDT cannot be dropped onto a faceplate screen in WinCC Unified V17 as a single tag. The faceplate must reference the parent UDT instance, and each BOOL member exposes one HMI tag. A flat WORD with internal decoding consumes one HMI tag and sixteen script-side bits – the lowest tag count.
  2. HMI tag count. WinCC Unified licenses tag counts by the entries in the HMI tag table, not by usage on screens. One WORD variable consumes one license; the same sixteen BOOLs consume sixteen licenses. When the application requires 16 faceplate indicators per device and the plant has 200+ devices, the difference is 16 × 200 = 3,200 tags vs. 200 tags.

Recommended pattern for HMI-heavy systems: keep HMI_Word : WORD in the PLC, decode bits in a WinCC Unified script (JavaScript or VB), and use Workaround 2 (M-bit overlay) for bit-level forcing.

Verification Procedure

  1. Compile. After selecting a workaround, perform Project → Compile all and resolve any "address not permitted" diagnostics.
  2. Download. Perform a full download (blocks + tag tables) to ensure new watch-table entries are recognized.
  3. Online connect. Establish online connection; the watch table will populate with current CPU values.
  4. Force test. For each forceable row, right-click → Modify to 1. Verify the corresponding bit in the program via the cross-reference (Ctrl+Shift+F).
  5. Cycle test. Run the CPU for at least 10 scan cycles and confirm forced bits persist while non-forced bits update normally.
  6. Reset test. STOP→RUN with Reset force values checked; confirm all forced bits return to their physical / program-controlled state.

Troubleshooting Matrix

Symptom Likely Cause Remedy
Force table: "Address not permitted" Bit slice of elementary type entered Use parent WORD or UDT members
Force to 1 has no effect on output Program overwrites tag in OB1 Force in peripheral area or disable overwrite logic
Force survives STOP→RUN unexpectedly Force table active in CPU STOP→RUN with "Reset force values"
Watch table shows --- instead of value Tag not downloaded or wrong area Recompile, download HW config, reconnect
Bit toggles correctly in watch but HMI does not update HMI acquisition cycle too slow Reduce update time to 100 ms or use area-pointer polling
UDT does not appear as one tag in HMI WinCC Unified limitation Use WORD + script decode
Cannot force %I0.0 PII is read-only Force %I0.0:P (peripheral input)
Force command greyed out CPU in wrong operating mode or password-protected Set CPU to RUN-P, supply protection password

FAQ

Can I force "MyWord".x0 directly in a TIA Portal V17 watch table?

No. The watch table's address parser only accepts absolute memory areas or fully qualified symbolic tags, not bit slices of an elementary type. Use a force table on the parent WORD in binary format, or adopt one of the workarounds above (M-bit overlay, UDT struct, peripheral-input forcing).

Where are forced values stored – in TIA Portal or the CPU?

In the CPU. The watch or force table is only the editor; the force values reside in CPU retentive memory and persist across online logout, project close, and STOP→RUN until explicitly cleared or until an MRES is performed. See the S7-1200 Watch and Force Tables documentation.

Why can I force %I0.0:P but not %I0.0?

The standard process input image (%I) is read-only because the CPU overwrites it every cycle with physical input data. The peripheral input area (%I:P) sits upstream of the process image and can be substituted by the force table, allowing bit-level input simulation even when no physical sensor is wired.

What is the lowest HMI tag count for 16 boolean indicators per device?

One WORD PLC tag multiplexed to one HMI tag, with bit decoding in a WinCC Unified script. A UDT of 16 BOOLs costs 16 HMI tags when used in WinCC Unified faceplates, and the M-bit overlay costs 16 tags if exposed individually. The single-WORD pattern wins on tag economy.

How do I clear all forced values after commissioning?

In the force table, select all rows, right-click and choose Stop forcing. For a hard reset, set the CPU to STOP, perform STOP→RUN with the Reset force values checkbox enabled, or execute an MRES. Both methods permanently remove force memory contents.

Back to blog