Siemens PLC Error Codes | Complete S7-1200/1500 Fault Reference (2026)
Complete reference of Siemens S7-1200 and S7-1500 PLC error codes, diagnostic buffers, and LED indicators. Lookup any fault code with causes and step-by-step fixes.
Siemens PLCs report errors through three channels: LED indicator patterns on the CPU module, the diagnostic buffer accessible in TIA Portal online mode, and system organization blocks (OBs) triggered by fault events. The most common error codes are 16#02:42:00 (I/O access error), 16#02:47:04 (PROFINET station failure), 16#03:42:01 (channel diagnostic alarm), and OB-level programming errors (121, 122, 85, 86). This reference covers every major S7-1200, S7-1500, and S7-300/400 error code with causes and step-by-step fixes.
This page is organized as a working reference, not a tutorial. Use the table of contents below to jump directly to your error category. If you need broader troubleshooting methodology, see the PLC troubleshooting complete guide. For TIA Portal navigation, see the TIA Portal programming tutorial.
Table of Contents
- How Siemens PLCs Report Errors
- S7-1500 CPU LED Indicator Patterns
- S7-1200 CPU LED Indicator Patterns
- S7-300/400 CPU LED Indicator Patterns
- Diagnostic Buffer Event Classes and Error Codes
- System Errors — Hardware and Module Faults
- Programming Errors — OB-Level and Runtime Faults
- I/O and Channel Errors
- Communication and PROFINET Errors
- Memory Errors
- TIA Portal Compilation and Download Error Messages
- How to Read the Diagnostic Buffer in TIA Portal
- How to Set Up Custom Error Handling with OBs
- Error Code Quick Lookup Table
- Frequently Asked Questions
How Siemens PLCs Report Errors
Siemens S7-1200 and S7-1500 PLCs use three parallel error reporting systems. Understanding all three is essential for fast fault resolution.
1. LED Indicators (Hardware Layer)
Every Siemens CPU module has a set of status LEDs on its front panel. These LEDs provide the first indication of a problem — visible from a distance without any software connection. LED patterns point to the error category and severity before you open a laptop.
2. Diagnostic Buffer (Software Layer)
The diagnostic buffer is a chronological log of system events stored in the CPU's retentive memory. It records:
- Start and stop events (CPU mode changes)
- Hardware faults (module failures, channel errors)
- Programming errors (runtime exceptions)
- Communication faults (PROFINET losses, network errors)
- System alarms (temperature warnings, battery status)
Each entry contains a timestamp, event class, event number, and detailed information. The S7-1500 stores up to 3,200 entries; the S7-1200 stores up to 50 entries. Entries persist across power cycles until the buffer is manually cleared or the maximum is reached (oldest entries are overwritten).
Access the diagnostic buffer in TIA Portal: Online & Diagnostics > Diagnostics > Diagnostic buffer
3. Organization Blocks — OB Error Handlers (Program Layer)
When certain fault conditions occur, the Siemens CPU does not simply go to STOP. Instead, it calls a specific Organization Block (OB) that your program can respond to. If the OB does not exist in your project, the CPU goes to STOP as a default. The critical error-handling OBs are:
| OB | Event | Default (if absent) |
|---|---|---|
| OB82 | Diagnostic alarm (I/O module fault) | CPU goes to STOP |
| OB83 | Insert/remove module event | CPU goes to STOP |
| OB85 | Program cycle error (OB not found) | CPU goes to STOP |
| OB86 | Rack/station failure (PROFINET loss) | CPU goes to STOP |
| OB121 | Programming error (runtime exception) | CPU goes to STOP |
| OB122 | I/O access error (address not available) | CPU goes to STOP |
Key practice: Add empty versions of OB82, OB86, OB121, and OB122 to every project. This prevents the CPU from going to STOP on transient faults while you implement proper handling logic.
4. System Diagnostics (S7-1500 and newer S7-1200)
The S7-1500 includes a built-in system diagnostics function that automatically detects and reports hardware faults without requiring user programming. It updates HMI screens and web server diagnostics automatically. Enable it in TIA Portal: CPU Properties > System diagnostics > Enable system diagnostics.
S7-1500 CPU LED Indicator Patterns
The S7-1500 CPU has four status LEDs: RUN (green), STOP (yellow), ERROR (red), and MAINT (yellow). Read them from left to right.
RUN LED (Green)
| LED State | Meaning | Immediate Action |
|---|---|---|
| Solid green | CPU is in RUN mode, no errors | Normal operation |
| Flashing green (0.5 Hz, slow) | CPU in STARTUP mode (startup OBs executing) | Wait for startup to complete; if it does not reach RUN, check OB100 logic |
| Flashing green (2 Hz, fast) | Firmware update in progress | Do not power off; wait for completion |
| Off with STOP solid yellow | CPU in STOP mode, no error | Put CPU to RUN via TIA Portal or mode selector |
| Off with ERROR solid red | Fatal hardware error | See ERROR LED table; likely requires module replacement |
STOP LED (Yellow)
| LED State | Meaning | Immediate Action |
|---|---|---|
| Solid yellow | CPU in STOP mode (normal stop) | Check diagnostic buffer for reason; put to RUN when safe |
| Flashing yellow (2 Hz) | CPU requesting memory reset (MRES pending) | Complete memory reset or cycle power; all program data will be lost |
| Flashing yellow (alternating with RUN) | CPU in HOLD mode (breakpoint active) | Remove breakpoint in TIA Portal debug mode |
| Off | CPU not in STOP | Normal if RUN is lit |
ERROR LED (Red)
| LED State | Meaning | Immediate Action |
|---|---|---|
| Solid red | Fatal error — CPU cannot continue | Check diagnostic buffer; most likely internal hardware failure or corrupted firmware |
| Flashing red (2 Hz, fast) | Time-of-day error (incorrect time/date) | Set correct time via TIA Portal: Online & Diagnostics > Functions > Set time |
| Flashing red (0.5 Hz, slow) | Firmware update failed or corrupted | Re-flash firmware using TIA Portal Automation Tool or Siemens Memory Card |
| Off | No current errors | Normal |
Note on ERROR + STOP both lit (solid): This combination indicates a hardware defect in the CPU itself or an unsupported firmware version. The CPU will not accept program downloads in this state. Contact Siemens technical support or replace the CPU module.
MAINT LED (Yellow) — Maintenance Required
| LED State | Meaning | Immediate Action |
|---|---|---|
| Solid yellow | Maintenance required — non-critical fault present | Check diagnostic buffer; common causes: encoder drift, battery low, module needs calibration |
| Flashing yellow | Maintenance demanded — fault requires prompt attention | Check diagnostic buffer immediately; I/O module near failure or firmware mismatch |
| Off | No maintenance required | Normal |
Combined LED Pattern Reference — S7-1500
| RUN | STOP | ERROR | MAINT | Diagnosis |
|---|---|---|---|---|
| Green solid | Off | Off | Off | Normal RUN operation |
| Off | Yellow solid | Off | Off | Normal STOP |
| Green flash | Off | Off | Off | STARTUP executing |
| Off | Yellow flash | Off | Off | Memory reset pending (MRES) |
| Off | Yellow solid | Off | Yellow solid | STOP with maintenance fault |
| Off | Yellow solid | Off | Yellow flash | STOP with urgent maintenance |
| Off | Yellow solid | Red flash | Off | STOP + time-of-day error |
| Off | Off | Red solid | Off | Fatal CPU hardware error |
| Green solid | Off | Off | Yellow solid | RUN with maintenance required |
| Green solid | Off | Red flash | Off | RUN with time error (check clock) |
| Off | Yellow flash | Off | Off | HOLD mode (breakpoint) |
S7-1200 CPU LED Indicator Patterns
The S7-1200 CPU has three LEDs: RUN/STOP (green/yellow), ERROR (red), and MAINT (yellow). Note the combined RUN/STOP LED — the color indicates the mode.
RUN/STOP LED (Green = RUN, Yellow = STOP)
| LED State | Meaning | Immediate Action |
|---|---|---|
| Solid green | CPU in RUN mode | Normal operation |
| Solid yellow | CPU in STOP mode | Check diagnostic buffer; put to RUN when safe |
| Flashing green (2.5 Hz) | STARTUP mode executing | Wait for startup OBs to complete |
| Alternating green/yellow (2 Hz) | Programming or parameter error caused STOP | Check diagnostic buffer for programming error code |
| Alternating green/yellow (0.5 Hz) | CPU in STARTUP, waiting for configuration | Verify hardware configuration matches physical modules |
ERROR LED (Red) — S7-1200
| LED State | Meaning | Immediate Action |
|---|---|---|
| Off | No error | Normal |
| Flashing red (1 Hz) | Hardware or firmware error | Check diagnostic buffer; may require firmware update |
| Flashing red (2.5 Hz) | CPU test or firmware update active | Do not power off |
| Solid red | Fatal internal error | Cycle power; if persistent, replace CPU or re-flash firmware |
MAINT LED (Yellow) — S7-1200
| LED State | Meaning | Immediate Action |
|---|---|---|
| Off | No maintenance required | Normal |
| Flashing yellow | Maintenance event (non-critical fault) | Check diagnostic buffer; common: SD card error, I/O channel warning |
| Solid yellow | Force operation active | Disable force table in TIA Portal before returning to production |
Combined LED Pattern Reference — S7-1200
| RUN/STOP | ERROR | MAINT | Diagnosis |
|---|---|---|---|
| Green solid | Off | Off | Normal RUN |
| Yellow solid | Off | Off | Normal STOP |
| Green flash | Off | Off | STARTUP |
| Green/Yellow alternating (fast) | Off | Off | Program or parameter error caused STOP |
| Green/Yellow alternating (slow) | Off | Off | Waiting for hardware configuration |
| Green solid | Off | Yellow solid | Force table active |
| Yellow solid | Red flash | Off | Hardware/firmware error in STOP |
| Any | Red solid | Off | Fatal error — cycle power |
S7-300/400 CPU LED Indicator Patterns
Legacy S7-300 and S7-400 CPUs use a different LED set: SF (System Fault, red), BF (Bus Fault, red), DC5V (green), FRCE (yellow), RUN (green), STOP (yellow).
| LED | State | Meaning |
|---|---|---|
| SF (red) | On | System fault — hardware defect, programming error, I/O error; check diagnostic buffer |
| SF (red) | Flashing | Firmware error or module fault |
| BF (red) | On | PROFIBUS or MPI bus fault — check cable, termination resistors, DP slave config |
| BF (red) | Flashing | Bus fault intermittent; check noise, cable quality, grounding |
| DC5V (green) | Off | Internal 5V power failure — check power supply module |
| FRCE (yellow) | On | Force operation active — disable force table |
| RUN (green) | Flashing (2 Hz) | CPU in STARTUP mode |
| STOP (yellow) | Flashing (0.5 Hz) | Memory reset requested (MRES via mode switch) |
| STOP (yellow) | Flashing (2 Hz) | Memory reset in progress |
| SF + STOP | Both on | Programming error caused STOP — check OB not found or runtime exception |
Diagnostic Buffer Event Classes and Error Codes
Siemens diagnostic buffer entries use a structured format. Each entry has an Event Class (two hex digits) and Event Number (four hex digits). The full entry is displayed as 16#EE:NNNN where EE is the event class and NNNN is the event number.
Event Class Reference
| Event Class | Category | Description |
|---|---|---|
| 16#01 | Process control event | OB call without error |
| 16#02 | System diagnostic event | Hardware/communication fault |
| 16#03 | Diagnostic alarm | I/O module diagnostic message |
| 16#04 | Maintenance event | Maintenance required/demanded |
| 16#05 | User program error | Programming runtime error |
| 16#06 | Communication error | Network/bus communication fault |
| 16#07 | Redundancy event | (S7-400H/S7-1500R) redundancy state change |
| 16#38 | Process mode change | CPU mode transition (STOP/RUN) |
| 16#39 | Process mode change | Startup, cold start, warm start |
| 16#3E | External error | Rack/station failure |
| 16#3F | External error | End of rack/station failure |
System Errors — Hardware and Module Faults
Rack and Module Faults
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#02:42:00 | I/O access error, read | Addressed I/O not in rack; module removed while running | 1. Check physical module seating. 2. Verify hardware config matches rack. 3. Add OB122 to handle gracefully. |
| 16#02:42:01 | I/O access error, write | Same as above for write operations | Same as 16#02:42:00 |
| 16#02:43:00 | Module not available | Module physically absent from configured slot | 1. Reseat or replace module. 2. Check backplane connector. 3. Verify slot assignment in hardware config. |
| 16#02:43:02 | Module type mismatch | Different module order number in slot than configured | 1. Check order number on physical module label. 2. Update hardware config to match. 3. Re-download hardware config. |
| 16#02:43:03 | Module firmware mismatch | Module firmware version not compatible with CPU | 1. Check CPU firmware version. 2. Update module firmware via TIA Portal > Online & Diagnostics > Firmware update. |
| 16#02:45:00 | Rack fault — expected rack not found | ET 200 distributed rack not responding | 1. Check PROFINET cable to ET 200 rack. 2. Verify rack IP address. 3. Check power to distributed rack. |
| 16#02:45:01 | Rack returned after fault | Distributed rack reconnected | Informational — verify I/O data is valid before resuming process. |
| 16#02:4A:00 | Station missing | PROFINET IO device not found at startup | 1. Verify device is powered. 2. Check IP/device name assignment. 3. Verify PROFINET cable. |
Power Supply Faults
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#02:41:00 | Power supply voltage low | 24V supply below threshold | 1. Measure supply voltage at CPU terminals. 2. Check for excessive load. 3. Replace power supply if out of spec. |
| 16#02:41:01 | Internal supply fault | CPU internal regulator failure | Replace CPU module. |
| 16#04:41:10 | Battery low — maintenance required | Backup battery below threshold | Replace CR1620 or external battery module per CPU model. |
| 16#04:41:11 | Battery failed — data loss possible | Battery depleted or absent | Replace battery immediately; real-time clock and retentive data may be lost on next power cycle. |
Temperature Faults
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#04:41:20 | CPU temperature — maintenance required | CPU approaching thermal limit | 1. Check enclosure ventilation. 2. Measure ambient temperature. 3. Clean air filters. 4. Add enclosure cooling. |
| 16#02:41:21 | CPU overtemperature — fault | CPU exceeded maximum operating temperature | CPU will go to STOP. Immediately address cooling. Check ambient temperature spec (typically 0–60°C for S7-1500). |
Programming Errors — OB-Level and Runtime Faults
These errors are generated by the CPU's program execution engine when the user program performs an illegal operation. If the corresponding error OB does not exist in the project, the CPU goes to STOP.
OB Not Found Errors (OB85)
OB85 is called when the CPU cannot find a required Organization Block. If OB85 itself is absent, the CPU goes to STOP.
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#05:85:01 | OB not available — process alarm OB missing | Process alarm configured but OB40–OB47 not in project | Add the required OB to your project (OB40 for process alarms by default). |
| 16#05:85:02 | OB not available — time-of-day interrupt OB | Time-interrupt configured but OB10–OB17 missing | Add the required time interrupt OB, or disable the interrupt if not needed. |
| 16#05:85:03 | OB not available — cyclic interrupt OB | Cyclic interrupt configured but OB30–OB38 missing | Add the required cyclic interrupt OB (e.g., OB30 for 5ms cycle). |
| 16#05:85:10 | OB not available — startup OB missing | CPU cold start but no OB100/OB101/OB102 | For S7-1500: add OB100. For S7-300/400: add appropriate startup OB. |
Programming Runtime Errors (OB121)
OB121 handles synchronous errors — errors that occur at a specific instruction during program execution.
| Error Code | Error Type | Description | Common Causes | Fix |
|---|---|---|---|---|
| 16#05:79:10 | BCD conversion error | Illegal BCD value in TOD or DT conversion | Verify input data is valid BCD before conversion instruction | |
| 16#05:79:11 | Area length error on read | Read access beyond declared array/data block | 1. Check array index against declared array size. 2. Add bounds checking with IF statements before array access. | |
| 16#05:79:12 | Area length error on write | Write access beyond declared data block or array | Same as above for write operations | |
| 16#05:79:20 | Timer number error | Timer number outside valid range | Verify timer number is within valid range for CPU type | |
| 16#05:79:21 | Counter number error | Counter number outside valid range | Verify counter number is within valid range | |
| 16#05:79:30 | Alignment error on read | Odd-byte address access to word/dword | Align data access to correct byte boundaries | |
| 16#05:79:31 | Alignment error on write | Same for write operations | Same as above | |
| 16#05:79:40 | Write protect violation | Write attempt to protected memory area | Check memory area write protection in CPU properties | |
| 16#05:79:50 | Block not available | Call to FC, FB, or DB that does not exist | 1. Verify block number exists in project. 2. Check for typographic errors in block call. 3. Re-download complete project. | |
| 16#05:79:51 | Block too long | Block size exceeds CPU memory limit | Reduce block size; split into multiple blocks if necessary | |
| 16#05:79:60 | Division by zero | Integer or real division where divisor is zero | Add IF divisor <> 0 check before every division operation | |
| 16#05:79:70 | Stack overflow | Call stack depth exceeded | Reduce nesting depth of FC/FB calls; check for recursive calls |
I/O Access Errors (OB122)
OB122 handles peripheral access errors — when the program attempts to access I/O that is not available.
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#05:7A:00 | Read access to peripheral — address not assigned | Address does not exist in hardware config | 1. Verify I/O address in hardware config. 2. Check for deleted module that address referenced. 3. Add OB122 with error handling. |
| 16#05:7A:01 | Write access to peripheral — address not assigned | Same for write access | Same as above |
| 16#05:7A:10 | Read access — module not present | Module configured but physically absent | Check module seating; if module can be absent, add OB122 logic to handle gracefully. |
| 16#05:7A:11 | Write access — module not present | Same for write access | Same as above |
Watchdog Timeout
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#02:42:F0 | Watchdog timeout — cycle time exceeded | OB1 scan cycle exceeded maximum time | 1. Measure actual cycle time in TIA Portal: Online & Diagnostics > Cycle time. 2. Increase maximum cycle time in CPU properties (default 150ms). 3. Optimize time-consuming loops in program. 4. Move heavy processing to lower-priority cyclic interrupt OBs. |
Increasing cycle time limit (S7-1500): CPU Properties > Cycle time > Maximum cycle time. Increase from 150ms to a value matching your process requirements. Setting too high can mask genuine infinite loops — investigate root cause before increasing.
I/O and Channel Errors
I/O errors generate diagnostic alarm events (Event Class 16#03) and call OB82. The error codes within OB82's startup information (LADDR, CHANNEL, ERROR_CODE) identify the specific fault.
Channel Diagnostic Codes (reported in OB82)
These codes appear in the OB82 local data at byte offset DIAG_INFO and in the diagnostic buffer entries for I/O modules.
| Code (hex) | Description | Common Causes | Fix |
|---|---|---|---|
| 16#01 | Short circuit | Output channel short to 24V or ground | 1. Disconnect load from channel. 2. Measure resistance between output terminal and common. 3. Replace wiring or load device. |
| 16#02 | Undervoltage | Supply voltage below threshold at module | 1. Measure 24V at module supply terminals. 2. Check terminal block connections. 3. Verify supply current capacity. |
| 16#03 | Overvoltage | Supply or signal voltage exceeds maximum | 1. Measure input/supply voltage. 2. Check for surge or spike source. 3. Add transient protection. |
| 16#04 | Overtemperature | Module temperature exceeded limit | 1. Check enclosure cooling. 2. Reduce load current (check derating curves). 3. Ensure adequate spacing between modules. |
| 16#05 | Wire break (open circuit) | Broken wire or disconnected sensor | 1. Check wiring continuity to sensor. 2. Verify sensor connection at field terminal. 3. Enable wire-break detection is active in module config. |
| 16#06 | Upper limit exceeded | Analog input above configured upper range | 1. Check sensor calibration. 2. Verify process is within expected range. 3. Check input range configuration in module properties. |
| 16#07 | Lower limit exceeded | Analog input below configured lower range | 1. Check sensor calibration. 2. Verify 4mA live-zero is present (4–20mA sensors). 3. Check for broken wire (which appears as 0mA, below 4mA range). |
| 16#08 | Error at fieldbus interface | Module communication failure on backplane | 1. Reseat module firmly. 2. Check for bent backplane connector pins. 3. Replace module if fault persists. |
| 16#09 | No load voltage | Output module load voltage supply missing | 1. Check load voltage wiring to module. 2. Measure voltage at load voltage terminals. 3. Check fuse or circuit breaker for load supply. |
| 16#10 | Lost ground reference | Ground reference missing at module | 1. Check M terminal connection. 2. Verify common ground continuity. 3. Measure voltage between 0V and earth. |
| 16#11 | Reference channel error | Thermocouple or RTD reference junction fault | 1. Check CJC (cold junction compensation) sensor. 2. Verify module configuration matches sensor type. |
| 16#12 | Process alarm lost | Alarm generated faster than CPU could process | Add OB40 for process alarms; increase alarm processing priority if needed. |
Analog Input Error Codes
| Condition | Raw Value | Description | Fix |
|---|---|---|---|
| Overflow | 32767 (7FFF hex) | Input above maximum measuring range | Check sensor and process value; verify input type configuration |
| Underflow | -32768 (8000 hex) | Input below minimum measuring range | Check sensor; verify 4mA zero-signal for current inputs |
| Wire break (4–20mA) | ~-32512 (8100 hex) | Current below 3.6mA — wire break detected | Check sensor wiring; verify 4–20mA sensor is powered |
| Overflow warning | 27649 | Input approaching upper range limit | Informational warning; verify process value is expected |
| Underflow warning | -27648 | Input approaching lower range limit | Informational warning; check sensor calibration |
Analog scaling reference for S7-1200/1500:
- 0–10V input: 0 to 27648 in engineering units
- 0–20mA input: 0 to 27648 in engineering units
- 4–20mA input: 0 to 27648 (4mA = 0, 20mA = 27648)
- Overflow above range: values up to 32511 (valid but out of calibrated range)
- Overflow fault: 32767
Communication and PROFINET Errors
PROFINET Device Faults
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#02:47:00 | PROFINET IO system — station failure | ET 200 rack or remote IO station lost | 1. Check PROFINET cable at both ends. 2. Check device power. 3. Ping device IP from engineering PC. 4. Check for duplicate IP addresses on network. |
| 16#02:47:01 | PROFINET IO station — return after failure | Station reconnected | Informational — verify I/O data validity; check for stale data in application. |
| 16#02:47:04 | PROFINET IO station failure — data exchange stopped | Ongoing station failure; controller stopped updating IO data | Investigate physical connection; verify device is powered and PROFINET port LEDs active. |
| 16#02:47:05 | PROFINET — expected configuration mismatch | Device connected but module configuration does not match | 1. Check device order numbers match TIA Portal config. 2. Re-download hardware config to IO controller. 3. Verify device firmware is compatible. |
| 16#02:47:10 | PROFINET IO line structure error | Physical topology error (ring, tree, line) | Check PROFINET switch/cable topology matches configured topology in TIA Portal. |
| 16#02:47:20 | PROFINET — DCP station name mismatch | Device found but name does not match | 1. Assign correct station name via TIA Portal > Online > Assign device name. 2. Check DHCP or DNS is not overriding name. |
| 16#02:47:21 | PROFINET — IP address mismatch | Device name matches but IP does not | 1. Assign correct IP via TIA Portal > Online > Assign IP address. 2. Ensure no IP conflict exists on subnet. |
| 16#03:47:01 | PROFINET IO device — maintenance required | Non-critical device fault reported via PROFINET alarm | Check device-specific diagnostic buffer; address reported maintenance event. |
| 16#03:47:02 | PROFINET IO device — maintenance demanded | Critical device fault via PROFINET alarm | Immediate attention required; check device diagnostics. |
Ethernet and Web Server Errors
| Condition | Error | Fix |
|---|---|---|
| Cannot reach CPU via TIA Portal | Connection timeout | 1. Verify IP settings match. 2. Check Windows Firewall for TIA Portal. 3. Verify Ethernet card used is correct in TIA Portal > Options > PG/PC interface. |
| Web server not responding | Connection refused | 1. Enable web server in CPU Properties > Web server > Activate web server. 2. Check firewall rules for port 80/443. 3. Verify CPU is in RUN or STOP mode (not STARTUP). |
| SNMP not responding | No response | Enable SNMP in CPU Properties > SNMP > Activate SNMP. |
PROFIBUS Errors (S7-300/400)
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| BF LED on | Bus fault | No termination at cable ends | 1. Verify PROFIBUS connectors with bus termination set to ON at both ends (first and last device only). 2. Check cable shielding and grounding. 3. Verify baud rate matches all devices. |
| 16#02:43:10 | DP slave not responding | Slave not powered or address mismatch | 1. Verify slave station address matches configuration. 2. Check slave power and cable. 3. Use hardware diagnostics tool in STEP 7/TIA Portal. |
| 16#02:43:11 | DP slave configuration error | GSD file mismatch or module count error | Re-export GSD file from device; verify module configuration in hardware config. |
Memory Errors
| Error Code | Description | Common Causes | Fix |
|---|---|---|---|
| 16#02:41:30 | Load memory full | CPU load memory (FLASH) is 100% full | 1. Check TIA Portal compile output for memory usage. 2. Delete unused blocks from project (mark as unlinked). 3. Reduce DB initial values if using large static data. 4. Consider CPU with larger memory card or upgrade memory card. |
| 16#02:41:31 | Work memory full | CPU work memory (RAM) exceeded | 1. Check work memory in CPU properties vs. actual usage in TIA Portal. 2. Reduce local variable stack usage in FCs. 3. Convert large local arrays to DB-based arrays. |
| 16#02:41:32 | Retentive memory full | Retentive data area full | Reduce number of retentive variables in DBs and M memory; review which variables truly need to survive power cycles. |
| 16#05:79:80 | DB too long | Data block access exceeds declared size | Check DB size in TIA Portal; increase DB size or reduce write offset. |
| 16#05:79:81 | Access to FB instance DB outside valid area | UDT or FB instance DB accessed incorrectly | Verify instance DB size matches FB interface definition; re-download after changes. |
Memory card errors (S7-1500):
| Condition | Fix |
|---|---|
| "No memory card inserted" at startup | Insert Siemens-brand SIMATIC Memory Card; third-party cards are not supported |
| Memory card read error | Format memory card via TIA Portal: Online & Diagnostics > Memory card > Format |
| Program cannot be saved to card | Ensure memory card is not write-protected; check card capacity (use minimum 4MB card for S7-1500) |
TIA Portal Compilation and Download Error Messages
These are error messages you see in the TIA Portal output window — distinct from diagnostic buffer codes.
Compilation Errors
| Error Message | Meaning | Fix |
|---|---|---|
| "The data type 'XXX' is not declared" | A UDT or data type referenced in a block is missing | Add the missing UDT to the project; check for spelling errors in type name |
| "The block 'FCxx' does not exist" | A function call references a block number not in project | Add the missing block or correct the block number in the call |
| "Formal parameter 'X' has no actual parameter" | FC/FB call missing a required input parameter | Connect all required input/output parameters in the call; or declare parameter as optional |
| "The address 'M100.0' is used more than once" | Same memory address assigned to multiple tags | Check tag table for duplicate memory addresses; reassign one tag to different address |
| "Too many nesting levels" | Call stack nesting exceeds CPU limit (typically 24 levels) | Reduce FC/FB call depth; restructure program to reduce nesting |
| "Operand 'IX0.0' cannot be written" | Attempt to write to an input memory area | Change program to write to output (Q) or marker (M) memory; inputs (I) are read-only in user program |
| "Block is inconsistent" | Block references another block that has changed interface | Right-click affected block > Compile. If it fails, check interface changes in called blocks. |
| "The project cannot be compiled due to errors in hardware configuration" | Hardware config has validation errors | Open Device Configuration, look for red/yellow markers; check module ordering and addresses |
Download Errors
| Error Message | Meaning | Fix |
|---|---|---|
| "The online project and offline project are not identical" | CPU program differs from TIA Portal project | Not an error — this is a warning. Download to sync, or use compare function first to review differences. |
| "Download failed: PLC is in RUN mode" | Certain changes require STOP mode | Either: 1. Switch CPU to STOP before download, or 2. Enable "Stop modules during download" option in download dialog |
| "Hardware configuration mismatch — download blocked" | CPU hardware differs from configured hardware | 1. Go online and check which modules report as different. 2. Update hardware config to match actual hardware. 3. Re-download hardware config separately before program. |
| "Connection to PLC not established" | TIA Portal cannot reach CPU | 1. Verify Ethernet connection. 2. Check IP address settings (Settings > PG/PC interface). 3. Disable VPN if active. 4. Try ping from command prompt. |
| "Memory card not available" | CPU requires memory card (S7-1500) but none inserted | Insert SIMATIC Memory Card before download. |
| "Cannot download — block is protected" | Block has know-how protection | You need the original password; protected blocks cannot be downloaded without the password. |
| "Download aborted — CPU went to STOP during download" | CPU stopped during download process | Check diagnostic buffer immediately after attempting the download; usually indicates a watchdog or hardware issue occurred during the download. |
| "Address conflict — two devices have same IP" | Duplicate IP address on network | 1. Identify conflicting device using network scanner. 2. Assign correct IP to one device. 3. Ensure DHCP is not reassigning addresses. |
| "Device name not found" | PROFINET device name not assigned | Assign device name: Online > Assign device name, then re-attempt download. |
| "The firmware version is not supported" | CPU firmware older than minimum TIA Portal version requires | Update CPU firmware via TIA Portal: Online & Diagnostics > Firmware update, using firmware package from Siemens support. |
Online/Diagnostics View Messages
| Message | Meaning | Fix |
|---|---|---|
| "Accessible devices not found" | TIA Portal cannot detect any PLCs on network | Check PG/PC interface selection; try different network adapter; disable Windows Firewall temporarily to test |
| "The CPU is in an undefined state" | CPU memory corrupted or firmware issues | Perform CPU memory reset (MRES): hold MRES button 3+ seconds on mode selector until STOP flashes, then release and hold again |
| "Time-out waiting for CPU" | Communication timeout during operation | Check network stability; increase timeout in TIA Portal options |
How to Read the Diagnostic Buffer in TIA Portal
Follow these steps to access and interpret the diagnostic buffer for any Siemens S7-1200 or S7-1500 CPU.
Step 1: Establish online connection
- Open TIA Portal with your project loaded
- Click the "Go online" button in the toolbar (plug icon) or use Online > Go online
- In the connection dialog, select the correct PG/PC interface (your Ethernet adapter) and CPU
- Click "Start search" and select your CPU from the found devices
- Click "Go online"
Step 2: Navigate to the diagnostic buffer
- In the Project tree on the left, expand your CPU (e.g., "PLC_1 [CPU 1515-2 PN]")
- Click "Online & Diagnostics"
- In the Online & Diagnostics window, expand "Diagnostics"
- Click "Diagnostic buffer"
Step 3: Read and interpret entries
- Entries are listed newest-first (entry 1 is the most recent event)
- Each entry shows: Time, Event, Details
- The Event column shows the event class and number (e.g., "Incoming event 16#02:47:04")
- Click any entry to see full details in the lower pane, including module address (LADDR), channel number, and specific error information
- The entry marked "1" (the newest) is always the starting point for diagnosis
Step 4: Identify the causative entry
- Look for the transition entry: "CPU changed from RUN to STOP" or "Startup aborted"
- The entry immediately before that transition event is typically the cause
- Work backward from the stop event to the triggering fault
Step 5: Clear the diagnostic buffer (optional)
- Click "Clear diagnostic buffer" button in the toolbar
- Clearing is only recommended after you have resolved the underlying fault and want a clean baseline
- Note: clearing does not fix any fault; it only removes the history
Alternative: Web server diagnostics (S7-1500 only)
- Enable web server: CPU Properties > Web server > Activate web server on module
- Browse to
http://[CPU-IP-ADDRESS] - Log in with your user credentials (or the guest account if enabled)
- Navigate to Diagnostics > Diagnostic buffer for the same information in a browser
How to Set Up Custom Error Handling with OBs
Adding error-handling OBs to your project is the single most important step for preventing unnecessary CPU STOP events. Here is how to configure each critical error OB.
OB82 — Diagnostic Alarm Handler
OB82 is called when an I/O module generates a diagnostic alarm (channel fault, wire break, short circuit).
To add OB82 in TIA Portal:
- In Project tree > Program blocks, click "Add new block"
- Select "Organization block", choose "Diagnostic error interrupt" (OB82)
- Select your preferred language (LAD, FBD, or SCL)
- Click OK
OB82 local variables available for reading:
| Variable | Data Type | Description |
|---|---|---|
| LADDR | HW_IO | Hardware identifier of the affected module |
| IO_STATE | Word | Bit-coded I/O state information |
| DIAG_INFO | Array[0..3] of Byte | Module-specific diagnostic information |
Minimum useful OB82 implementation (SCL):
// OB82 - Diagnostic Alarm
// Simply having this OB prevents CPU STOP on module alarms
// Add your alarm logging here
#ioDiagAlarmActive := TRUE;
#ioFaultLADDR := #LADDR;
// Use SFB54 GET_DIAG to read full diagnostic data
// Implement alarm management via HMI or historian
OB86 — Rack or Station Failure
OB86 is called when a PROFINET IO device or distributed rack goes offline or comes back online.
OB86 local variables:
| Variable | Data Type | Description |
|---|---|---|
| LADDR | HW_IO | Hardware identifier of the affected station |
| EVENT_CLASS | Byte | 16#38 (station failure) or 16#39 (station return) |
Key practice: Check EVENT_CLASS to distinguish between a device going offline (16#38) and returning online (16#39). Use this to set/clear status bits in your HMI.
OB121 — Programming Error Handler
OB121 is called when a synchronous programming error occurs (division by zero, array out of bounds, etc.).
OB121 local variables:
| Variable | Data Type | Description |
|---|---|---|
| FAULT_ID | Byte | Fault identifier code |
| RESERVED_1 | Byte | Reserved |
| MDT | Byte | Module data type |
| RESERVED_2 | Byte | Reserved |
Important: OB121 gives you the opportunity to log the error and take corrective action instead of going to STOP. However, the error instruction still does not execute correctly — you must handle the output value explicitly after catching the error.
OB122 — I/O Access Error Handler
OB122 is called when the program accesses an I/O address that is not available (module absent, address not configured).
OB122 local variables:
| Variable | Data Type | Description |
|---|---|---|
| LADDR | HW_IO | Hardware address of failed access |
| ACCESS_ERROR | Word | Bit 0: read error; Bit 1: write error |
Best practice implementation: In OB122, set a flag indicating I/O loss for that station, and use substitute values for outputs. This allows your program to continue running in a degraded mode rather than stopping production.
Practical OB Strategy for Production Systems
For a robust production system, implement the following OB set:
- OB82 — Log alarm to historian; set HMI alarm bit
- OB83 — Log module insert/remove event; trigger re-configuration check
- OB86 — Set/clear station status bits; activate fallback logic for missing stations
- OB121 — Log programming error with timestamp and fault ID; alert maintenance
- OB122 — Set station-offline flag; apply substitute values; alert HMI
Refer to the Siemens PLC programming tutorial for complete OB programming examples.
Error Code Quick Lookup Table
Use this table for rapid lookup of any error code. Sorted by code for direct reference.
| Code | Category | Description | Severity | Quick Fix |
|---|---|---|---|---|
| 16#01:xx:xx | Mode change | CPU startup or stop event | Info | Normal operational event |
| 16#02:41:00 | Power | 24V supply voltage low | Warning | Check supply voltage at terminals |
| 16#02:41:01 | Power | Internal CPU supply fault | Critical | Replace CPU module |
| 16#02:41:21 | Temperature | CPU overtemperature | Critical | Improve enclosure cooling immediately |
| 16#02:41:30 | Memory | Load memory full | Critical | Remove unused blocks; use larger memory card |
| 16#02:41:31 | Memory | Work memory full | Critical | Reduce local variable usage; restructure program |
| 16#02:41:32 | Memory | Retentive memory full | Warning | Reduce retentive variables |
| 16#02:42:00 | I/O | I/O read access error | Error | Add OB122; check module seating |
| 16#02:42:01 | I/O | I/O write access error | Error | Add OB122; check module seating |
| 16#02:42:F0 | CPU | Watchdog/cycle time exceeded | Critical | Increase cycle time limit; optimize program |
| 16#02:43:00 | Hardware | Module not available | Error | Check module seating and power |
| 16#02:43:02 | Hardware | Module type mismatch | Error | Verify order number; update hardware config |
| 16#02:43:03 | Hardware | Module firmware incompatible | Error | Update module firmware |
| 16#02:45:00 | Rack | Distributed rack not found | Critical | Check PROFINET cable and power to rack |
| 16#02:47:00 | PROFINET | IO station failure | Critical | Check cable, power, and device IP |
| 16#02:47:04 | PROFINET | IO station data exchange stopped | Critical | Investigate connection; check port LEDs |
| 16#02:47:05 | PROFINET | Device configuration mismatch | Error | Verify device modules match TIA Portal config |
| 16#02:47:20 | PROFINET | Station name mismatch | Error | Assign correct device name via TIA Portal |
| 16#02:47:21 | PROFINET | IP address mismatch | Error | Assign correct IP via TIA Portal online |
| 16#03:42:01 | Diagnostic | Channel diagnostic alarm | Warning | Check OB82; inspect channel error code |
| 16#03:47:01 | PROFINET | Device maintenance required | Warning | Check device diagnostic buffer |
| 16#03:47:02 | PROFINET | Device maintenance demanded | Error | Immediate device inspection required |
| 16#04:41:10 | Battery | Battery low | Warning | Replace battery |
| 16#04:41:11 | Battery | Battery failure | Critical | Replace battery immediately |
| 16#04:41:20 | Temperature | Temperature maintenance required | Warning | Improve ventilation |
| 16#05:79:10 | Program | BCD conversion error | Error | Validate input before BCD conversion |
| 16#05:79:11 | Program | Array read out of range | Error | Add bounds check before array access |
| 16#05:79:12 | Program | Array write out of range | Error | Add bounds check before array write |
| 16#05:79:50 | Program | Block not available | Error | Verify block exists; re-download project |
| 16#05:79:60 | Program | Division by zero | Error | Add divisor <> 0 check |
| 16#05:79:70 | Program | Stack overflow | Error | Reduce call nesting depth |
| 16#05:7A:00 | I/O | Read from unassigned peripheral | Error | Add OB122; verify I/O address in config |
| 16#05:7A:01 | I/O | Write to unassigned peripheral | Error | Add OB122; verify I/O address |
| 16#05:85:01 | OB | Process alarm OB missing | Error | Add OB40 to project |
| 16#05:85:10 | OB | Startup OB missing | Error | Add OB100 to project |
| Channel 16#01 | Channel | Short circuit | Error | Check output wiring for short |
| Channel 16#02 | Channel | Undervoltage at module | Error | Measure 24V supply at module |
| Channel 16#05 | Channel | Wire break / open circuit | Error | Check sensor wiring continuity |
| Channel 16#06 | Channel | Analog upper limit exceeded | Warning | Check sensor calibration and range config |
| Channel 16#07 | Channel | Analog lower limit / 4mA break | Warning | Check 4mA live-zero signal |
| Channel 16#09 | Channel | No load voltage | Error | Check load supply wiring and fuse |
| Analog 32767 | Analog | Input overflow | Error | Check sensor and input range setting |
| Analog -32768 | Analog | Input underflow | Error | Check sensor; verify 4mA for 4–20mA inputs |
Frequently Asked Questions
How do I read the diagnostic buffer in TIA Portal?
Go online to your CPU in TIA Portal (click the "Go online" button in the toolbar). In the Project tree, expand your CPU and click "Online & Diagnostics". In the navigation pane of the Online & Diagnostics window, go to Diagnostics > Diagnostic buffer. Entries are shown newest-first. The entry immediately before the "CPU changed to STOP" entry is usually the fault that caused the stop. For a web-based alternative on S7-1500, enable the web server in CPU properties and browse to the CPU's IP address.
What does a flashing red LED on a Siemens S7-1500 mean?
On the S7-1500, a fast flashing red ERROR LED (2 Hz) indicates a time-of-day error — the CPU's real-time clock has lost its time setting. Fix it by going online in TIA Portal and navigating to Online & Diagnostics > Functions > Set time and date. A slow flashing red LED (0.5 Hz) indicates a firmware update failure. A solid red ERROR LED combined with STOP lit is a fatal hardware fault requiring module replacement or Siemens support.
How do I clear the diagnostic buffer on a Siemens PLC?
In TIA Portal, go online to the CPU and navigate to Online & Diagnostics > Diagnostics > Diagnostic buffer. Click the "Clear diagnostic buffer" button at the top of the window. Note that clearing the buffer only removes the historical log — it does not fix any underlying faults. Only clear the buffer after you have resolved the issue and want a clean baseline for future monitoring.
What is OB82 and when does it get called?
OB82 is the Diagnostic Alarm Organization Block. It is called by the CPU operating system whenever an I/O module generates a diagnostic alarm — such as a wire break, short circuit, overtemperature, or channel fault. If OB82 does not exist in your project and a diagnostic alarm occurs, the CPU goes to STOP. Adding an empty OB82 (or one with logging logic) prevents this unwanted STOP and allows your program to continue running while the alarm is active. Read the LADDR variable in OB82 to identify which module generated the alarm.
Why does my S7-1200 keep going to STOP?
The most common causes of repeated S7-1200 STOP events are: (1) Missing error OBs — add OB82, OB86, OB121, and OB122 to your project; (2) Watchdog timeout — check cycle time in Online & Diagnostics and increase the maximum cycle time in CPU properties if your program is taking too long; (3) Program runtime error — check the diagnostic buffer for 16#05:79:xx codes (division by zero, array out of bounds); (4) I/O access error — addressed I/O module is absent or incorrectly configured; (5) Hardware fault — check for physical damage or loose module connections.
How do I enable web server diagnostics on S7-1500?
In TIA Portal, open the CPU's device properties (double-click the CPU in Device view). Navigate to Properties > Web server. Check "Activate web server on this module". Optionally enable "Allow access only via HTTPS" for security. Download the hardware configuration to the CPU. Then browse to http://[CPU-IP-ADDRESS] from any device on the same network. The default login uses user management configured in CPU properties; if no users are configured, the guest account with limited access is available.
What causes "module not available" errors (16#02:43:00)?
This error means a module that is configured in TIA Portal is not present in the physical rack at the expected slot. Common causes: the module was physically removed while the system was running; a module has failed; a module was swapped for a different order number; or the rack is improperly seated. Fix by reseating the module, replacing it if faulty, or updating the hardware configuration in TIA Portal if the module has been intentionally changed. Add OB83 to handle graceful insert/remove events without CPU STOP.
How do I handle errors in my PLC program without going to STOP?
The key is implementing the four essential error-handling OBs: OB82 (diagnostic alarms), OB86 (station/rack failures), OB121 (programming errors), and OB122 (I/O access errors). With these OBs present in your project — even empty — the CPU will call them instead of going to STOP when the corresponding fault occurs. Additionally, in your program logic: add divisor-not-zero checks before all division operations; add array bounds checking before indexed array access; use the GetDiagInfo or DeviceStates instructions to monitor IO station availability; and implement watchdog timers to detect and handle equipment timeouts rather than relying on the CPU watchdog.
What is the difference between Error Event Class 16#02 and 16#03?
Event Class 16#02 is a system diagnostic event — a fault detected by the CPU operating system itself, such as a hardware failure, communication timeout, or memory error. These events typically push the CPU toward STOP if unhandled. Event Class 16#03 is a diagnostic alarm — a fault reported by an I/O module through the PROFINET or backplane diagnostic channel. These events call OB82 and are module-level faults like wire break, short circuit, or channel overrange. Class 16#02 faults are generally more severe system-level events, while class 16#03 faults are field-level I/O issues that your program should handle gracefully via OB82.
How do I fix a "hardware configuration mismatch" download error?
This error means the physical CPU or modules do not match what is configured in TIA Portal. Steps to resolve: (1) Go online to the CPU. (2) In the Project tree, right-click your CPU and select "Detect" or "Update configuration" — TIA Portal will scan the actual hardware. (3) Review the differences in the hardware comparison view. (4) Update your TIA Portal hardware config to match the physical hardware (or correct the physical hardware to match your design). (5) Compile the hardware configuration. (6) Download hardware configuration separately (right-click CPU > Download to device > Hardware configuration). (7) Then download the program.
Related Siemens Resources
Working with Siemens PLC errors requires solid foundational knowledge. These guides cover the platforms and tools referenced throughout this reference:
- Siemens PLC Programming Tutorial — Comprehensive guide covering S7-1200, S7-1500, S7-300/400 programming in TIA Portal and STEP 7
- TIA Portal Programming Tutorial — Complete TIA Portal navigation, project setup, and download procedures
- PLC Troubleshooting Complete Guide — Systematic 8-step methodology for diagnosing any PLC fault
- PROFINET Protocol Tutorial — PROFINET architecture, device naming, and network troubleshooting
- Siemens PLC Certification Guide — Certification pathways for Siemens automation engineers
- Siemens vs Allen-Bradley Comparison — Platform selection reference including diagnostic capability comparison


