Siemens OP77A K1-K4 LED Control and System Key Mapping in WinCC

David Krause13 min read
HMI ProgrammingSiemensTechnical Reference
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 OP77A is a 4.5-inch graphics-capable operator panel from the OP 73 / OP 77A / OP 77B family, used for small- to mid-range machine HMI in SIMATIC S7-200, S7-300, S7-400, and LOGO! environments. The OP77A replaces the legacy OP7 and is configured natively with WinCC flexible 2004 SP1 and later. This reference consolidates the four recurring configuration tasks encountered when migrating an OP7/ProTool project to OP77A/WinCC flexible:

  • Driving the K1–K4 LED indicators embedded in the system keys
  • Mapping system-key events (ACK, ENTER, ESC, HELP, INFO, PRINT) to PLC tags
  • Viewing and exporting the alarm history buffer
  • Synchronizing date and time without a battery-backed RTC

All four tasks are located in the System Keys, Alarms, and Connections / Area Pointers editors of WinCC flexible — none of which exist in identical form in ProTool/OP7, which is the source of most migration friction.

Hardware Identification and Ordering Data

MLFB Description
6AV6641-0BA11-0AX1 OP77A, 4.5" FSTN LC display, backlit, MPI/PROFIBUS DP up to 1.5 Mbit/s, configurable with WinCC flexible 2004 SP1 and later
6AV6641-0CA01-0AX0 OP77B (next-generation successor, 4.5" STN, additional recipes)
6AV6641-0AA11-0AX0 OP73 micro panel (3" mono, reduced tag count)

Use the Siemens Industry Online Support portal entry OP77A product support page to download firmware updates, manuals, and the WinCC flexible HSP (Hardware Support Package). The consolidated operating manual for the OP 73 / OP 77A / OP 77B family is the ba_op7xx_en_en-US.pdf document.

Safety notice: The OP77A operating manual contains safety guidelines that must be observed for personal safety and to prevent damage to property. Read the "Safety Guidelines" section of the PDF before commissioning or replacing the device.

Project Structure in WinCC Flexible

When converting from ProTool to WinCC flexible, the project tree replaces the ProTool "Screens / Areas / Keys" hierarchy with the following nodes:

  1. Project — overall configuration and device identification (panel type, firmware version)
  2. Connections — MPI/PROFIBUS DP connection parameters (baud rate, station address, slot, area pointers)
  3. Tags — internal tags (HMI-local) and external tags (PLC)
  4. Screens — process screens, each containing templates and screen objects
  5. System Keys — assignment of K1–K16 to functions, events, and PLC tags
  6. Alarms — discrete alarms, analog alarms, alarm classes, history buffer
  7. Schedules / Recipes / Reports — optional nodes (not all supported on OP77A)

WinCC Flexible Configuration Limits (OP77A)

Parameter Limit
Screens 500
Tags per project 1,024
Discrete alarms 2,000
Analog alarms 50
Recipes Not supported on OP77A
Audible feedback Optional buzzer (WAV playback not supported)

Configuring the K1–K4 LED Indicators

The four soft LEDs are driven indirectly: a Boolean tag whose value toggles the LED state. In WinCC flexible this is configured under Project > Screens > <Screen> > Template or directly on a screen via Properties > Representation. Configuring the LEDs on the Template is preferred so every screen inherits identical LED behavior without per-screen repetition.

Step-by-Step: Drive K1 LED from a PLC Tag

  1. Open WinCC flexible > Tags and create a new external tag, e.g. HMI_Tag_K1_LED, of data type BOOL, address DB1.DBX0.0 on the S7 PLC.
  2. Open the Template editor (Screens > Template).
  3. Insert the K1 key object from the toolbox (System Keys folder).
  4. In the K1 properties, navigate to General > LED Assignment > Value source and select HMI_Tag_K1_LED.
  5. Set the polarity: Active = 1 lights the LED when the tag is TRUE; Active = 0 inverts.
  6. Repeat for K2, K3, K4 with separate tags (HMI_Tag_K2_LED … HMI_Tag_K4_LED).
  7. Compile the project (Project > Compiler > Generate) and download to the panel.
  8. Force DB1.DBX0.0 = TRUE in STEP 7 and verify the K1 LED illuminates within one polling cycle.

Address Mapping Table

System Key LED Tag (suggested name) S7 Sample Address PLC Logic
K1 HMI_Tag_K1_LED DB1.DBX0.0 Set TRUE to light K1 LED
K2 HMI_Tag_K2_LED DB1.DBX0.1 Set TRUE to light K2 LED
K3 HMI_Tag_K3_LED DB1.DBX0.2 Set TRUE to light K3 LED
K4 HMI_Tag_K4_LED DB1.DBX0.3 Set TRUE to light K4 LED

How It Differs From ProTool/OP7

ProTool exposed the LED as a discrete key property and required a separate "LED area" configured on the PLC side. In WinCC flexible, the LED is a tag-driven property of the same screen object used for the key press; this eliminates the legacy LED area pointer but also means the LED no longer responds automatically to the keystroke — the PLC must set the LED tag explicitly in response to its own logic.

System Keys and PLC Function Mapping

System keys perform fixed HMI functions (ACK, ENTER, ESC, HELP, PRINT, INFO) but can also fire a configurable event that triggers a function list or sets a tag. Use this mechanism to bridge "ACK" or "ENTER" to a Boolean tag the PLC can read on its own scan cycle.

Standard System Key Functions on OP77A

Key Default WinCC Flexible Function Suggested PLC Tag
K1–K4 User-defined (soft key) 4 BOOL tags, one per key
ACK Acknowledge visible alarms HMI_ACK_Request (optional pulse)
ENTER Confirm input field HMI_ENTER_Request
ESC Cancel input / previous screen HMI_ESC_Request
HELP Open context help —
PRINT Trigger hard copy —
INFO Show alarm details —

Step-by-Step: Map ENTER to a PLC Tag

  1. Create Boolean external tag HMI_ENTER_Request at MB10.
  2. In the screen editor, click System Keys > ENTER > Properties > Events > Press.
  3. Add function SetBit: tag = HMI_ENTER_Request, value = TRUE.
  4. Add a second function SetBit with a 200 ms delay: value = FALSE (auto-clear pulse).
  5. Compile, download, and verify in STEP 7 by reading MB10 with a VAT table.

STEP 7 STL Snippet — Latch ENTER Pulse in PLC

// FC 50 — Acknowledge ENTER key from OP77A
      A     M 10.0                // HMI_ENTER_Request (pulse, 200 ms)
      S     M 20.0                // Latched "ENTER received" flag
      A     M 20.0
      =     DB1.DBX1.0            // Echo to LED tag if needed
      BE

The same pattern applies to ACK, ESC, HELP, and INFO. For ACK specifically, the OP77A also automatically writes the acknowledgement to the alarm history buffer; the additional tag is only needed if your PLC application wants to react programmatically.

Alarm History Buffer: View and Export

The OP77A supports both an alarm log (persistent on the panel's internal flash) and the on-screen alarm view. To inspect the historical buffer on the device:

On-Device Steps

  1. Insert an Alarm View screen object on a screen (toolbox > Controls > Alarm View).
  2. In the alarm view properties, set Display > Show History = TRUE.
  3. Define the filter: Active alarms + Acknowledged alarms + Cleared alarms with date/time range.
  4. Press the ALARM button on the panel — historical entries appear in the same list as active alarms.

Transferring the Buffer to a PC

The OP77A logs alarms to the internal flash if logging is enabled under Alarms > Settings > Activate logging. To retrieve:

  1. Connect the OP77A to the engineering PC via MPI/PROFIBUS DP.
  2. Open WinCC flexible > Transfer > Backup/Restore.
  3. Select Backup HMI data, choose Alarm log as the source.
  4. Save the .csv file. The CSV contains columns: Date, Time, Status, Class, Number, Text, PLC tag.

Buffer Capacity

Log Type Approx. Capacity (entries) Storage
Alarm log (circular) ~1,000 (firmware-dependent) Internal flash
Active alarm buffer Limited by RAM Volatile
Audit trail Not supported on OP77A —
Note: Audit Trail (GMP-compliant logging) is not available on the OP77A. If audit trail is required by regulation, migrate to OP77B, TP177, or KTP series panels.

Date and Time Synchronization (No Battery)

The OP77A has no on-board battery backup for the real-time clock. After a power loss the RTC defaults to 01.01.2000 00:00:00 and increments from there until the next PLC sync. This is by design across the OP 73 / OP 77A / OP 77B family. The mitigation is to push the PLC clock into the panel at every startup and at periodic intervals.

Two Complementary Mechanisms

  1. Date/Time Area Pointer (read-only from PLC to HMI): the OP77A polls eight bytes of PLC memory and updates its display clock on each cycle.
  2. PLC Job (job mailbox): the PLC writes a job number to a configured word to force the HMI to read the PLC clock immediately.

Area Pointer Configuration

Parameter Value (OP77A default) Notes
Pointer name "Date/Time" Configured under Connections > Area Pointers
Length 8 bytes BCD-encoded date/time
PLC address DB100.DBB0 … DB100.DBB7 Any DB or bit memory; must be unique in the HMI
Encoding S7 DATE_AND_TIME (DT) Byte 0–7, BCD per IEC 61131-3
Update cycle 1 s (default) Adjustable 250 ms – 60 s

S7 DATE_AND_TIME Byte Layout (BCD)

Byte Content Range
0 Year 90–99 (1990–1999), 00–89 (2000–2089)
1 Month 01–12
2 Day 01–31
3 Hour 00–23
4 Minute 00–59
5 Second 00–59
6 Milliseconds (high + low nibble) 00–999
7 Weekday / reserved 1=Sunday … 7=Saturday

PLC Job Numbers Reference

Job # Function Typical Trigger
0 No job —
14 Set HMI date/time from PLC Cold start, every hour, on warm restart
40 Save alarm log Shift end, before power-down
48 Restore recipe Not applicable on OP77A
51 Trigger printout End-of-shift report

PLC-Job Data Block Layout (S7-300/400)

The job mailbox is one word, written by the PLC and read by the OP77A. The OP77A resets the word to zero on completion.

DATA_BLOCK "HMI_Job"
  STRUCT
   Job_No   : WORD;     // DB100.DBW8 — write job number here
   Reserved : WORD;     // DB100.DBW10
  END_STRUCT;
END_DATA_BLOCK

STEP 7 STL Example — Trigger Time Sync on OB100 (Warm Restart)

// OB100 - Complete restart
      CALL   "BLKMOV"               // Copy current DT into DB100
      SRCBLK := "RTC_OB1".TimeStamp
      DSTBLK := "HMI_Time".Date_Time  // DB100.DBB0..DBB7
      L     W#16#000E               // Job 14 = set date/time from PLC
      T     "HMI_Job".Job_No
      SET
      SAVE
      BE

When the OP77A detects the value 14 in the configured job pointer, it reads the eight bytes of the Date/Time area pointer and applies them to its internal RTC. The job pointer word is then cleared by the panel within one polling cycle.

Recommended Commissioning Sequence

  1. Define the Date/Time area pointer at DB100.DBB0..DB100.DBB7 with BCD DT format.
  2. Define the Job mailbox at DB100.DBW8.
  3. Configure OP77A under Connections > Area Pointers: enable "Date/Time" and "Job mailbox".
  4. In STEP 7, fill DB100 bytes 0–7 with the current local time in DT format on every PLC startup using SFC 1 (READ_CLK).
  5. Write job 14 to DB100.DBW8 in OB100 and OB101.
  6. Verify on the OP77A: power-cycle the panel and check that the displayed time matches the PLC clock within ±1 s of startup.

S7-300 SFC 1 Example — Reading the PLC Clock

// FC 10 — read PLC RTC into DB100 DT format
      CALL "READ_CLK"
       RET_VAL := MW100
       CDT     := "HMI_Time".Date_Time   // DB100.DBB0..DBB7
      L     W#16#000E
      T     "HMI_Job".Job_No             // Trigger OP77A time sync
      BE

Communication: MPI and PROFIBUS DP

Parameter Value
Interface RS-485 (isolated), 9-pin Sub-D
Protocols MPI (187.5 kbit/s default), PROFIBUS DP slave up to 1.5 Mbit/s
Max stations per segment 32, up to 126 with repeaters
Default OP address 1
Default PLC address 2 (S7-300 CPU)
Bus termination Required on first and last physical node
Cable PROFIBUS DP cable (twisted, shielded), 9.6 kbit/s – 1.5 Mbit/s
Maximum segment length 200 m at 1.5 Mbit/s; up to 1,200 m at 9.6 kbit/s
Termination: The OP77A is not a self-terminating node. Enable the bus termination switch on the PROFIBUS connector only if the panel is the first or last physical node on the segment.

Troubleshooting Matrix

Symptom Probable Cause Diagnostic Corrective Action
K1–K4 LED does not light when PLC sets tag Wrong tag polarity or tag not downloaded Online > Tags > monitor HMI_Tag_K1_LED Verify polarity (Active = 1 vs 0) and re-download project
System key ACK not visible to PLC No event configured on the key WinCC flexible > Screen > ACK > Events > Press Add SetBit function to a BOOL tag
Alarm history buffer empty Logging disabled or storage full Alarms > Settings > Logging Enable logging, format storage, increase capacity
Time displays 01.01.2000 after power-cycle No Date/Time area pointer or PLC job not triggered WinCC flexible > Connections > Area Pointers Configure Date/Time pointer, fire job 14 in OB100
Job pointer never clears OP77A cannot read the pointer (address error) Check HMI diagnostics buffer (Ctrl+Shift+D on panel) Correct PLC address, ensure consistent DB number across PLC and HMI project
Communication faults during transfer Baud rate mismatch or address conflict WinCC flexible > Transfer > Settings Match PLC baud rate, set unique MPI address, verify bus termination
Tags show "###" on screen Address out of range or DB not loaded Online > Tags > Quality code Verify DB exists on PLC, check pointer length
ACK button acknowledges nothing Alarm class not configured with ACK Alarms > Classes Enable "Can be acknowledged" property on the class
Panel shows 01.01.2000 within first 60 s of startup Date/Time pointer update cycle too long Connections > Area Pointers > Cycle Reduce update cycle to 1 s or use job 14 trigger

Verification Procedure

  1. LED test: Force DB1.DBX0.0 = 1 in STEP 7; K1 LED must illuminate within the configured update cycle (default 1 s).
  2. System key test: Press ENTER on the panel and observe MB10 toggle TRUE for the configured pulse width (default 200 ms).
  3. Alarm buffer test: Trigger a discrete alarm, acknowledge it, then open Alarm View with history enabled and confirm the entry is present with a valid timestamp.
  4. Time sync test: Set the PLC clock to 12:00:00, power-cycle the OP77A, then verify the HMI displays the PLC time within 2 s of startup.
  5. Communication test: Run WinCC flexible > Transfer > Diagnostics > Read Tags on at least 10 external tags; all must return correct values without timeout.
  6. PLC job test: Write job 40 to DB100.DBW8 from STEP 7 and confirm the alarm log file timestamp updates on the panel within one polling cycle.

Migration Notes: OP7/ProTool → OP77A/WinCC Flexible

OP7/ProTool Concept OP77A/WinCC Flexible Equivalent
LED area pointer Boolean tag, polarity = Active 1/0
System key to PLC ACK/ENTER System key event > SetBit to BOOL tag
Alarm history buffer Alarm View with "Show history" enabled + CSV export
Battery-backed RTC Date/Time area pointer + PLC Job 14 in OB100/OB101
ProTool area pointer for LED Single Boolean tag per LED; no area pointer needed
ProTool "Jobs" function WinCC flexible PLC Job mailbox (DBW)

Migration Checklist

  • Confirm WinCC flexible version ≥ 2004 SP1 supports OP77A target device
  • Re-create LED area as four Boolean tags bound to K1–K4 properties
  • Re-create system-key-to-PLC mapping as key events with SetBit functions
  • Add Date/Time area pointer (8 bytes BCD DT) and Job mailbox (1 word)
  • Configure SFC 1 (READ_CLK) in OB100 to push PLC clock to the panel
  • Export alarm history to CSV for archival before any project reload

FAQ

How do I light the K1–K4 LEDs on an OP77A from a Siemens S7 PLC?

Define a Boolean external tag (e.g., DB1.DBX0.0 for K1), bind it to the LED property of the K1 screen object, and set the polarity to "Active = 1". The PLC sets the bit TRUE to light the LED; the OP77A polls the tag every cycle (default 1 s). Repeat for K2, K3, K4 with DB1.DBX0.1, DB1.DBX0.2, and DB1.DBX0.3.

Can I map the OP77A ENTER key to a PLC tag like I did in ProTool?

Yes. In the screen editor open System Keys > ENTER > Events > Press, then add the "SetBit" function pointing to a BOOL tag such as MB10. Add a delayed "SetBit" to FALSE to produce a one-shot pulse the PLC can latch. The same pattern applies to ACK and ESC.

How do I view the alarm history buffer on the OP77A?

Insert an Alarm View screen object and enable "Show history". The buffer holds the configured number of entries (default ~1,000) and can be exported as CSV via WinCC flexible > Transfer > Backup > Alarm log. CSV columns are Date, Time, Status, Class, Number, Text, and PLC tag.

Why does the OP77A show 01.01.2000 after a power-cycle?

The OP77A has no battery backup. Configure the "Date/Time" area pointer (eight BCD bytes from the PLC) and fire PLC Job 14 in OB100/OB101 to push the PLC clock to the HMI after every restart. Use SFC 1 (READ_CLK) on the S7-300/400 to populate the DT bytes.

What is the maximum PROFIBUS DP baud rate on the OP77A?

Up to 1.5 Mbit/s on PROFIBUS DP; the panel also supports MPI at 187.5 kbit/s default. Use PROFIBUS DP cable with termination enabled on the first and last physical node. Maximum segment length is 200 m at 1.5 Mbit/s, up to 1,200 m at 9.6 kbit/s.

Where can I download the official OP77A operating manual?

The consolidated OP 73 / OP 77A / OP 77B operating manual is published as ba_op7xx_en_en-US.pdf on the Siemens Industry Online Support portal. The OP77A product page is at 6AV6641-0BA11-0AX1.

Back to blog