Siemens HMI Bool Tag: Operator Toggle via Input/Output Field

David Krause11 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

1. Overview

Boolean (BOOL) tags are the workhorse of operator interaction on Siemens SIMATIC HMI panels. A typical field requirement is to let an operator view the current state of a process flag in the PLC (TRUE / FALSE) and also force that flag from the HMI without leaving the screen. The correct way to do this on a Siemens OP (Operator Panel), KTP, TP, or Comfort Panel is to bind a screen object to the BOOL tag with read and write rights and to map the numeric representation (0/1) to a human-readable text using a Text List.

This reference covers the full configuration path on both TIA Portal (V15.1 and later, including V17 / V18) and the legacy SIMATIC WinCC Flexible (2008 SP5 and earlier), together with the required PLC tag properties, the operator interaction model, the verification steps, and a troubleshooting matrix for the most common field issues.

Source-of-truth principle: the OP never stores the bit. The OP only reads it from the PLC and writes it back. Make sure your PLC tag is in a retentive or non-retentive DB location appropriate to the process; the HMI configuration does not change PLC retention.

2. Prerequisites

Item Detail
Engineering software SIMATIC TIA Portal V15.1+ (recommended) or WinCC Flexible 2008 SP5
HMI device Any SIMATIC OP, KTP, TP, or Comfort panel supported by the chosen software (OP 73, OP 77A/B, OP 177B, KTP400 Basic, KTP700 Basic, TP700 Comfort, TP1500 Comfort, etc.)
PLC S7-300 / S7-400 / S7-1200 / S7-1500 / ET 200SP CPU with a BOOL tag exposed to the HMI
Connection PROFINET or MPI/PROFIBUS, configured in the TIA Portal "Devices & Networks" editor
PLC tag BOOL tag in a global DB, instance DB, or memory area; address within HMI access level (e.g., DB1.DBX0.0, M0.0, %MW0 bit, etc.)
Operator rights An HMI user group with at least "Operator" authorization (number 6 by default in WinCC) for the relevant screen

3. Understanding Bool Tags in the Siemens HMI Model

A Siemens HMI tag is a pointer to a real memory location in the PLC. For a BOOL tag, the HMI transfers a single bit (0 or 1) on every configured acquisition cycle. The default data type mapping in TIA Portal uses Bool on the PLC side and Bool on the HMI side; the wire format is one bit packed into the smallest available byte. According to the SIMATIC TIA Portal Help - HMI Tags documentation, the HMI tag's Access mode must be set to read/write if the operator is to change the value from the panel.

Property Recommended value for operator toggle Notes
Name e.g. bOperatorEnable Engineering naming, no spaces
PLC tag (TIA) connection Bound to PLC tag, e.g. DB_HMI.DBX10.0 Bit-offset must match the BOOL tag
Data type Bool Do not use Word/Int for a 1-bit indicator
Access mode <absolute access> read/write Read-only will block operator writes
Acquisition cycle 1 s typical, 100 ms for fast interlocks Faster = higher bus load
Length 1 bit BOOL is always 1 bit
PLC address (WinCC Flex) DB1 DBX 0.0 or M0.0 Direct bit addressing

4. Step-by-Step: TIA Portal Configuration

  1. Create the HMI tag. In the project tree, open the HMI device → HMI tags → Show all tags. Add a new tag, give it a name (for example bOperatorEnable), and set the connection to the PLC.
  2. Bind the PLC tag. In the tag's properties, click the browse button of PLC tag and select a BOOL tag from the PLC program (e.g. "Data_block_1".bEnable). Make sure the PLC tag itself is not marked as non-readable in the PLC's protection settings.
  3. Set Access mode to <absolute access> read/write. This is the property that unlocks operator writes. TIA Portal will display a yellow warning icon if the connected PLC tag has read-only access; resolve that on the PLC side first.
  4. Add a Text List. In the project tree, open HMI > Text and graphic lists > Text lists. Create a new text list with the following properties:
    Property Value
    Name tlBool_OnOff
    List range 0..1 (two entries)
    Default entry 0 (or whatever is process-safe)
  5. Define the entries. Add value 0 → text OFF and value 1 → text ON. You can also use FALSE / TRUE, STOP / START, 0 / 1, or any bilingual pair by enabling the language switch.
  6. Insert an Input/Output field on the screen. Open your screen, drag an IO field from the toolbox onto the canvas. In the properties:
    • Mode → Input/output (not Output only)
    • Process value → bind to bOperatorEnable
    • Display → set to Text
    • Text list → select tlBool_OnOff
    • Appearance → choose the desired field type, ideally Drop-down list or Toggle on Comfort panels
  7. Assign operator authorization. Under Properties > Security, set the required operator level (e.g. User / Authorization 6). The operator will be prompted for login if the level is above their current session.
  8. Compile and download both the PLC and HMI project. On Comfort Panels, use the "Software" load mode; on Basic Panels, delta load is sufficient when only the screen has changed.
Important: if the IO field is configured as Output only, the operator can see the state but cannot change it. This is the most common reason a "toggle doesn't work" in the field.

5. Step-by-Step: WinCC Flexible Configuration

  1. Open the project in SIMATIC WinCC Flexible and connect to the target OP.
  2. Open Project > Communication > Tags, click New, and create a tag with the following properties:
    Property Value
    Name bOperatorEnable
    Connection your S7 connection (e.g. PLC_1)
    Address DB 1 DBX 0.0 (or M 0.0)
    Data type Bool
    Acquisition mode Cyclic continuous
    Acquisition cycle 1 s
    Length 1
    Access rights Read/Write (operator level)
  3. Open Project > Text Library (or directly on the IO field) to add the text list. The Wizard method described in the original engineering note is equivalent: create a text list with two entries:
    • Value 0 → FALSE
    • Value 1 → TRUE
  4. Place an Input/Output field on the screen. In the configuration dialog, set:
    • Tag → bOperatorEnable
    • Type → Output is wrong; choose Input/Output or Input
    • Display → Text (decimal / binary will also work but is not human-friendly)
    • Text list → assign the two-entry list
  5. Compile the project and transfer to the OP. The default operator interaction on the OP is: tap the field, the Shift indicator appears, then press the Cursor Up key (or the screen's up arrow) to toggle the value. On touch panels, the field acts as a direct toggle when configured with Display = Text and the dropdown list mode.

6. PLC Program Considerations

The HMI only writes a value when the operator confirms. The PLC program must therefore tolerate an asynchronous write and must not treat a brief transition as an event.

// SCL (S7-1500, TIA Portal V18)
FUNCTION_BLOCK fbOperatorEnable
VAR
    bEnable        : BOOL;   // written by HMI, read by logic
    bEnableAck     : BOOL;   // optional echo for the HMI
    bOperatorReq   : BOOL;   // one-shot from the HMI request
END_VAR

// Latch the operator's command on a rising edge of the request
IF bOperatorReq AND NOT bEnable THEN
    bEnable := TRUE;
    bEnableAck := TRUE;
ELSIF bOperatorReq AND bEnable THEN
    bEnable := FALSE;
    bEnableAck := FALSE;
END_IF;

// ... rest of process logic uses bEnable as a permissive

For non-retentive memory (M bits), the value is reset on STOP → RUN. Place operator-controlled bools in a retentive DB if the process must survive a warm restart.

7. Verification

  1. Go online with the PLC. Watch the BOOL tag in the watch table. Force a manual change on the HMI and confirm the value flips in TIA Portal / STEP 7 within one acquisition cycle (default 1 s).
  2. Toggle in the opposite direction and verify the text list entry swaps from ON → OFF on the OP.
  3. Switch operator to a non-authorized user; the field should display but be unchangeable, and the OP should raise the standard "Insufficient user rights" message.
  4. Power-cycle the panel (or simulate a re-connect) and confirm the OP reads the current PLC state on the first scan — the screen must not show a stale value.
  5. On Comfort Panels, enable the Diagnosis Viewer and check the connection status of the HMI tag. A red X indicates the tag is unbound or the PLC is in STOP.

8. Security and Access Control

The standard SIMATIC authorization model is documented in the TIA Portal Help - User Administration page. Operator-controlled bools typically belong to authorization level 6 ("Operator"). Higher-risk flags — e.g. a remote reset of a safety permissive — should require a Supervisor (level 4) or Administrator (level 1) login, or better still, be implemented through a separate confirmation screen.

Functional safety: if the bit influences a safety function, do not expose it on the OP. Safety-related I/O must be wired to the F-CPU or a safety relay; the HMI is not a safety device and must not be the sole path to a safe state.

9. Troubleshooting Matrix

Symptom on the OP Likely root cause Corrective action
Field shows #### or blank Tag is unbound or PLC is offline Recompile HMI, re-download, check connection in "Devices & Networks"
Field shows 0/1 but does not toggle IO field is set to Output only Change Mode to Input/Output
Toggle reverts immediately PLC program overwrites the tag every cycle Read the bit in the logic, do not write unconditionally
Operator cannot see any list Display mode is Decimal/Binary Set Display = Text and bind the text list
Field shows wrong value (always inverted) Bit offset mismatch (e.g. DBX0.0 vs DBX0.1) Verify the bit in the watch table against the configured address
Field is grayed out Operator not logged in or wrong authorization level Check user administration and the field's "Security" property
Write times out Cycle load on PROFINET too high Increase the acquisition cycle or move the tag to a separate acyclic job
Value resets on PLC restart Tag is in M area or a non-retentive DB Move to a retentive DB and mark the variable as retentive

10. Alternative Methods for the Same Goal

Method When to use Drawback
IO field with Text List (this guide) Single bit the operator must read and write None for this scope
Two separate buttons ("Set" / "Reset") Operator must never see the current state No feedback on the current value
Toggle button (Comfort Panels) Visual, large-touch target Ties up a wider area on the screen
Drop-down list (WinCC V14+) Multi-state values (0/1/2) that include a bool More complex for a pure bool
Script (VBS / C-Script) Need a confirmation prompt or audit trail Overkill for a single bit

11. Cross-Platform Notes (OP 73 / OP 77A-B / OP 177B / KTP / Comfort)

  • OP 73 / OP 77A / OP 77B (text-based, monochrome): use the IO field with the DEC display and a two-line text list. The toggle is via SHIFT + Cursor Up as described in the original engineering note.
  • OP 177B (touch, color): identical configuration but the screen is touch-driven, so a Drop-down list IO field is friendlier.
  • KTP400 Basic / KTP700 Basic / KTP1200 Basic (WinCC Basic): the configuration dialog hides some advanced properties; the IO field + Text List recipe still applies.
  • TP Comfort / TM Comfort (WinCC Comfort / Advanced): full drop-down list, toggle button, and confirmation dialog available. Use these for new projects whenever possible — they are the current generation and benefit from active Siemens firmware updates.

12. Field Commissioning Checklist

  • PLC tag is a BOOL in a reachable DB or memory area.
  • HMI tag is configured read/write with the correct acquisition cycle.
  • IO field mode = Input/Output (not Output only).
  • Display = Text and the text list has two entries (0 → OFF, 1 → ON).
  • Operator authorization matches the user group policy.
  • PLC program does not unconditionally overwrite the bit.
  • Watch table confirms the bit flips on every operator change.
  • Power-cycle test passed.
  • Functional-safety boundary respected (the bit is not a safety I/O).

Can the operator panel really change a BOOL in the PLC?

Yes. Configure the HMI tag with read/write access and bind the screen object (typically an Input/Output field) to that tag. The panel only requests a value change; the PLC must accept the write. Avoid any PLC logic that unconditionally re-writes the bit every scan or the operator's change will appear to revert.

How is the value displayed: 0/1 or TRUE/FALSE?

By default the panel shows 0 or 1. To show TRUE/FALSE, ON/OFF, or any bilingual text, create a Text List in TIA Portal (or a text library entry in WinCC Flexible) with two entries and set the IO field's Display property to "Text". The list maps the numeric value to the human-readable string.

What is the key sequence to toggle a BOOL on a text-based OP?

On the OP 73/77 series, tap or focus the IO field, press the SHIFT key, then press Cursor Up. The value toggles between the two text list entries. On touch panels (KTP, TP, Comfort) a Drop-down list or Toggle button is more intuitive and does not require the cursor key combination.

Why does the bit reset to 0 after every PLC restart?

The tag is in a non-retentive memory area (M bits or a non-retentive DB). Move the BOOL to a retentive DB and mark it as retentive in the PLC properties, or accept the default behavior if the process is expected to start from a known safe state.

Can I use a single HMI tag to read and write a BOOL, or do I need two tags?

One tag is sufficient. A single Siemens HMI tag can be both read and written when the Access mode is <absolute access> read/write. Two separate tags would only be needed if you want different acquisition cycles for the read-back and the write, which is rarely useful for a single bit.

Back to blog