Monitoring S7-1500 Load Voltage 2L+ Status via OB82 Diagnostic Interrupts
Detecting the loss of 24 V load voltage (2L+) on a SIMATIC S7-1500 station, especially an ET 200pro F-2 PN with a CPU 1516pro F-2 PN, is a recurring commissioning task. 2L+ supplies the actuator side of digital output modules and the load side of digital input modules; when it collapses the field wiring may still appear healthy while every output is in fact de-energised. Because no dedicated LED on the PROFINET CPU reports the switched 24 V rail, the loss must be obtained from the I/O module itself using its channel diagnostics and reported up to the controller logic. This reference walks through the four production-grade techniques available: (1) OB82 channel diagnostics, (2) SFC 51 / SSL reads, (3) an analog-input sentinel with a signal conditioner, and (4) an OB40 hardware interrupt fed from a digital input wired to a buffer relay. All four approaches are valid in the field; selecting the right one depends on the module population, fail-safe constraints and the time budget the application can tolerate before raising the alarm.
1. Overview: What 2L+ Is and Why It Cannot Be Read on the CPU
In the SIMATIC distributed I/O family, the PROFINET device separates the supply rails into two functional groups:
- 1L+ – non-switched supply voltage feeding the module electronics, encoder supply and bus interface. Loss of 1L+ is reported by the PROFINET device itself as a station failure because the module can no longer communicate.
- 2L+ – switched load voltage that powers the actuator side of outputs or the load side of inputs. The module remains fully communicative on PROFINET when 2L+ drops; the loss is reported as a channel diagnostic event, not a station failure.
Reference: ET 200eco PN Operating Instructions (Siemens Support, 29999018) — confirms that 2L+ is the switched load voltage and is supervised separately from 1L+.
The CPU 1516pro F-2 PN has no hardware register exposing the chassis-level 2L+ rail. The standard S7 system status lists (SSLs) and the diagnostic buffers reflect module state only. Consequently, 2L+ monitoring must be implemented either on the module that owns the rail (PROFIsafe and standard DI/DQ modules both support this) or by an external voltage sentinel.
2. How Siemens Modules Report 2L+ Loss
Standard digital and fail-safe I/O modules from the ET 200 family expose a green PWR LED dedicated to the 2L+ status. The same physical condition is mirrored to the controller as a channel-level diagnostic interrupt. For the F-DI 4+F-DQ 2x24VDC/2A (6ES7146-5FF00-0BA0) module this is documented in the equipment manual:
"…Load voltage 2L+ status (PWR (green))…" — F-DI 4+F-DQ 2 Manual (Siemens, 109798489)
When the green PWR LED is off, the module has detected 2L+ missing or out of range. Internally it raises a channel diagnostic with a fault code that the CPU forwards to OB82 (diagnostic interrupt) for standard modules, or to OB82 plus the F-runtime for fail-safe modules. The diagnostic data record carries an event code that identifies the specific cause.
2.1 Standard S7-1500 Diagnostic Event Codes for 2L+
| Hex Code | Channel Event | Typical Module Response |
|---|---|---|
| 0x0311 | Supply voltage 1L+ missing or undervoltage | Channel diagnostic, OB82 incoming |
| 0x0312 | Supply voltage 1L+ overvoltage | Channel diagnostic, OB82 incoming |
| 0x0321 | Load voltage 2L+ missing / undervoltage | Channel diagnostic, OB82 incoming, PWR LED off |
| 0x0322 | Supply or load voltage too high (overvoltage) | Channel diagnostic, OB82 incoming |
| 0x0323 | Load voltage 2L+ wire break on actuator side | Channel diagnostic, OB82 incoming |
| 0x0331 | Actuator short circuit / overload | Channel diagnostic, OB82 incoming, output trips |
Source for fault code 0x0322: SIMATIC ET 200AL Manual Collection — Fault types, causes and corrective measures (TIA Portal Cloud). The other codes are the corresponding events for "missing" vs. "overvoltage" on the same module family; always cross-check with the device-specific manual because Siemens re-uses some code points across module generations.
3. Prerequisites
- SIMATIC CPU 1516pro F-2 PN (6ES7516-2PN03-0AB0) or compatible S7-1500 CPU with firmware ≥ V2.0. TIA Portal V15.1 or later is recommended for full F-CPU handling.
- At least one ET 200pro, ET 200eco PN or SIMATIC DP digital module that supervises 2L+ (e.g. 6ES7146-5FF00-0BA0, 6ES7141-6BF00-0AB0, 6ES7142-6BF00-0AB0).
- The Load voltage diagnostics checkbox enabled in TIA Portal on every module whose 2L+ rail must be supervised (see Section 4).
- For the analog-sentinel approach: a Phoenix Contact MINI MCR-2-UI-UI-PT (2902040) signal conditioner and one free AI channel on an ET 200 AI module.
- For 230 V AC 2L+ monitoring: a Phoenix Contact PLC-OSC or PLC-RSC buffer relay (e.g. 2966906) plus a 24 V DC sink output or a 24 V tolerant DI channel.
- For OB40 hardware interrupts: a free DI channel on a module that supports hardware interrupts (most ET 200pro DI modules do).
4. Step-by-Step: Enabling 2L+ Diagnostics in TIA Portal
- Open the project in TIA Portal and expand the device view of the ET 200pro station that contains the CPU.
- Select the digital module whose 2L+ rail must be supervised. In the inspector window switch to Properties → Diagnostics.
- Tick "Supply voltage 1L+ missing" if you also want 1L+ supervision, and tick "Load voltage 2L+ missing" (or "Load voltage 2L+ fault"). The TIA Portal labels differ slightly between module firmware versions; both are required to catch undervoltage and overvoltage events.
- Switch to Properties → I/O addresses and note the start address of the module (e.g.
%IW64/%QW64). This is the LADDR that OB82 will deliver. - Compile the hardware (Project tree → right-click PLC → Compile → Hardware and software (rebuild all)).
- Download the hardware configuration to the CPU.
5. OB82 Implementation in SCL
OB82 is the diagnostic interrupt organisation block. The S7-1500 version exposes the following local tags (default names in TIA Portal):
| Local Tag | Type | Meaning |
|---|---|---|
LADDR |
HW_IO | Logical base address of the faulty module |
Channel |
UINT | Channel number, 0 = whole module |
Event |
DWORD / multi-field | Detailed event information (FaultID, EventID, etc.) |
IOState |
BYTE | 0 = fault cleared (going), 1 = fault present (coming) |
Fault |
BOOL | TRUE if the event is a fault |
The following SCL skeleton captures the 2L+ event, raises a sticky bit that the cyclic program can read, and logs the event ID to a global DB. It assumes the I/O module's logical base address is 256 (replace with the actual LADDR from Section 4):
// 2L+_Diagnostic_DB (global, retain)
// b_2Lplus_Fault : BOOL // sticky: 1 = 2L+ missing or fault
// w_FaultModuleLADDR : WORD // LADDR captured on incoming event
// dw_LastEventID : DWORD // last raw Event DWORD
// b_2Lplus_Log[0..31] : BOOL // ring buffer of the last 32 events
// b_LogIndex : BYTE
ORGANIZATION_BLOCK OB82
VAR_TEMP
t_LADDR : DWORD;
t_EventLo : DWORD;
t_Channel : UINT;
t_IOState : BYTE;
i : INT;
END_VAR
BEGIN
t_LADDR := DWORD_OF_BOOL(LADDR);
t_Channel := UINT_OF_WORD(LADDR);
t_IOState := IOState;
t_EventLo := Event.EventID; // or just the DWORD cast of Event
// Pre-defined thresholds: only act on 2L+ related event IDs
// (0x00000321 = 2L+ missing, 0x00000322 = 2L+ overvoltage)
IF (t_EventLo = DWORD#16#00000321) OR (t_EventLo = DWORD#16#00000322) THEN
IF (t_IOState = 1) THEN
// INCOMING
"2Lplus_DB".b_2Lplus_Fault := TRUE;
"2Lplus_DB".w_FaultModuleLADDR := WORD#256; // expected LADDR
"2Lplus_DB".dw_LastEventID := t_EventLo;
// Log to ring buffer
i := INT#0;
WHILE i < 31 DO
"2Lplus_DB".b_2Lplus_Log[i] := "2Lplus_DB".b_2Lplus_Log[i+1];
i := i + 1;
END_WHILE;
"2Lplus_DB".b_2Lplus_Log[31] := TRUE;
ELSE
// OUTGOING: clear sticky
IF "2Lplus_DB".w_FaultModuleLADDR = WORD#256 THEN
"2Lplus_DB".b_2Lplus_Fault := FALSE;
END_IF;
END_IF;
END_IF;
END_ORGANIZATION_BLOCK
Two important points on the S7-1500 OB82 interface:
- The
Eventtag is a multi-field; in the optimised access view it is exposed as a DWORD, but a fully symbolic view separatesEventID,FaultID,AddValueandChannelNumber. Code that runs on multiple CPU firmware versions should read the raw DWORD and mask the relevant nibble (low byte = event class, next byte = event identifier). - OB82 executes at the priority of the OB started by the operating system. For S7-1500 this is fixed at priority 9 by default; do not change it unless you fully understand the diagnostic-alarm timing.
6. Reading System Status with SFC 51 "RD_SINFO" and SSLs
OB82 is event-driven, but a cyclic supervisory read can complement it. The S7 system status list (SSL) exposes module-level LED and diagnostic state through SFC 51. Two SSL IDs are particularly useful:
- SSL W#16#0019 – status of the LEDs (PWR, SF, BF) of any module, including the 2L+ PWR.
- SSL W#16#0F31 – module status information (station / module good/bad). This SSL is the standard way to enumerate all PROFINET devices and confirm that none of them has dropped because of 2L+ loss.
A typical cyclic scan of SSL 0x0019 for the module at LADDR 256 looks like this:
// 2L+ monitoring via SFC51 SSL 0x0019
// SSL_ID W#16#0019 = LED status
// INDEX LADDR = 256 (module base address)
// RET_VAL = 0 if OK
// BUSY = 0 if single-record read (length 0)
"2Lplus_DB".i_RD_SINFO_RET := RD_SINFO(
SZL_HEADER := "2Lplus_DB".szl_Header,
CPU_STATES := "2Lplus_DB".cpu_State,
HEADER_ITEMS := "2Lplus_DB".hdr_Items
);
For the per-module LED SSL, the call is more involved (use SFC 51 with LENGTH = 0 to read a single record, then evaluate DR 0..5 in the destination area for the 6-byte LED bitmap per module). Refer to the S7-1500 system manual, Section "System status lists (SSL)" for the record layout.
7. Channel-Level Diagnostics with RDREC / WRREC (Optional)
For non-interrupt-driven applications, the standard data record DS0 (index 0) and the channel-specific DS1 (index 1) of every I/O module can be read on demand with the SFB 52 "RDREC" / SFB 53 "WRREC" pair. The DS0 byte 4..7 contains the channel fault bitmap; DS1 contains the textual channel diagnostic. The 2L+ fault appears in DS0 with a bit set in the channel field (typically channel 0 indicates a module-wide fault such as missing 2L+).
// Cyclic read of DS0 for module at logical address 256
IF NOT "2Lplus_DB".b_RDREC_Busy THEN
"2Lplus_DB".b_RDREC_Valid := FALSE;
"2Lplus_DB".b_RDREC_Error := FALSE;
RDREC_REQ(
REQ := TRUE,
ID := DWORD#256,
INDEX := 0, // DS0
MLEN := 16,
VALID => "2Lplus_DB".b_RDREC_Valid,
BUSY => "2Lplus_DB".b_RDREC_Busy,
ERROR => "2Lplus_DB".b_RDREC_Error,
STATUS => "2Lplus_DB".w_RDREC_Status,
LEN => "2Lplus_DB".w_RDREC_Len,
RECORD := "2Lplus_DB".ab_DS0
);
"2Lplus_DB".b_RDREC_Busy := TRUE;
END_IF;
Once the record is in, mask byte 7 (channel 0..7 fault type) and look for the codes listed in Section 2.1.
8. Alternative: Analog-Input Sentinel with Signal Conditioner
If no I/O module is wired to the 2L+ rail (e.g. 2L+ feeds only external contactors) or if a sub-millisecond response is required without modifying the I/O list, the cleanest method is an analog sentinel. A Phoenix Contact MINI MCR-2-UI-UI-PT (article 2902040) converts the 24 V rail to a 0..10 V or 4..20 mA signal that any AI module can read. Set the configuration DIP switches on the conditioner for input = 0..30 V and output = 0..10 V.
Commissioning steps:
- Wire the 2L+ rail to input terminals 3 and 4 of the MINI MCR-2 (observe polarity).
- Wire output terminals 7 and 8 to the AI module's voltage input channel (e.g. AI 0 of an ET 200pro AI 4xU/I module).
- In TIA Portal, configure the AI channel for 0..10 V, integrate 50 Hz rejection, and set the smoothing to 4 cycles.
- Scale the raw integer: U_2L+ = (raw / 27648) × 10 V × 3 (the ×3 restores the original 0..30 V range if the conditioner is set to 1:1 attenuation).
- Program a threshold alarm. For a nominal 24 V rail, raise an alarm when U_2L+ drops below 21.6 V (10 % undervoltage per IEC 61131-2).
For a 230 V AC 2L+ rail, the conditioner must be selected accordingly (Phoenix Contact MACX MCR-EX-SL or similar) or a step-down transformer plus a DC-tapped signal conditioner is required. An intermediate buffer relay (Phoenix Contact PLC-RSC-230UC/21 or similar) wired to a 24 V-tolerant DI channel achieves the same goal in fail-safe systems and avoids routing mains to the field I/O.
9. Alternative: OB40 Hardware Interrupt on a Digital Input
OB40 executes on a configurable edge of a hardware-capable DI channel. Wire the 2L+ rail to one DI input through a buffer relay or voltage divider; configure the channel for "rising edge" trigger on the OB40. When 2L+ collapses the buffer relay drops, the DI input goes low, and OB40 fires. This is useful when the application already has a free DI channel and the response must be faster than the diagnostic OB82 cycle (typically < 1 ms on ET 200pro).
Enable the interrupt in TIA Portal under Properties → Inputs → Hardware interrupt. Select the channel, set the event to "Falling edge", and assign OB40. In the OB40 body, set the same sticky bit used by the OB82 implementation and timestamp the event using RD_SYS_T for forensic analysis.
10. Reporting 2L+ Status to HMI / SCADA
Once the sticky bit 2Lplus_DB.b_2Lplus_Fault is set, expose it on the HMI tag list. Recommended WinCC Unified / TIA Portal HMI configuration:
- Tag name:
HMI_2Lplus_Fault, typeBool, acquisition cycle 500 ms. - Visibility linked to a red banner in the system overview screen.
- Alarm class "System fault" with single acknowledgment; the bit clears automatically when OB82 reports the outgoing event.
- For logging, raise the same bit as a CPU diagnostic buffer entry using
WR_USMSG(SFB 36) so the SCADA historian and the STEP 7 diagnostic buffer stay synchronised.
11. Diagnostic Fault Code Quick Reference
| Event | Code (hex) | PWR LED | OB82 | Recommended Action |
|---|---|---|---|---|
| 2L+ missing | 0x0321 | Off | Coming, channel 0 | Check 24 V switched supply, fuse, contactor upstream |
| 2L+ overvoltage | 0x0322 | Off or flicker | Coming, channel 0 | Check power supply regulation; per TIA Portal Cloud — Fault types: adjust supply or load voltage |
| 1L+ missing | 0x0311 | Off | Coming, station failure | Module goes dark; PROFINET diagnosis |
| Wire break (DO) | 0x0323 | On | Coming, channel n | Check actuator wiring |
| Short circuit (DO) | 0x0331 | On or flicker | Coming, channel n | Check load, de-rating per module manual |
12. Verification and Commissioning Checklist
- Power the station normally. Verify that
2Lplus_DB.b_2Lplus_Fault = FALSEin the watch table. - Remove the 2L+ fuse (or open the load-voltage disconnect) while the CPU is in RUN. OB82 must fire with event 0x0321 within < 5 ms.
- Confirm the sticky bit in the watch table turns TRUE.
- Check the diagnostic buffer online (Online & Diagnostics → Diagnostics buffer). The event should appear with the module LADDR and the timestamp.
- Re-apply 2L+. The sticky bit must reset automatically when OB82 reports the outgoing event.
- Force the OVERVOLTAGE condition (set a programmable PSU above 30 V). OB82 must fire with event 0x0322.
- For F-modules, perform the same test with the F-CPU in RUN with passivation enabled; the affected F-channel must transition to passivated state.
13. Troubleshooting Matrix
| Symptom | Likely Root Cause | Remedy |
|---|---|---|
| OB82 does not fire when 2L+ drops | "Load voltage 2L+ missing" diagnostic not enabled in module properties | Re-check Properties → Diagnostics in TIA Portal, re-download hardware config |
| OB82 fires but event ID is 0x0000 | Event field is masked incorrectly or symbolic view differs from optimised view | Read the raw DWORD with Event.EventID cast and mask low 16 bits |
| Sticky bit never clears | OB82 only wired for "coming" events; outgoing branch missing | Implement the OUTGOING branch in OB82 (see Section 5) |
| PWR LED is on but OB82 reports 2L+ missing | Module in slot with no 2L+ terminal (2L+ not connected to that slot) | Re-route 2L+ to the slot's 2L+ terminal, or supervise a different module |
| OB40 never fires on the digital sentinel | DI module powered from 2L+ (not 1L+), so it is dark when 2L+ drops | Power the sentinel DI from 1L+ (electronics supply) |
| Analog sentinel reads 0 V even though 2L+ is present | MINI MCR-2 input polarity reversed or output range DIP mis-set | Check Phoenix Contact MINI MCR-2-UI-UI-PT 2902040 DIP switch and wiring |
| SCADA sees the fault twice | Both OB82 and OB40 raise the same bit | Decide on one source of truth; suppress the duplicate in the second OB |
| Fault appears only on cold start | Retain bit initialised on power-up; OB82 "going" not delivered for the previous outage | Force-clear the bit on OB100 (restart) and require OB82 re-affirmation |
14. Frequently Asked Questions
Can the CPU 1516pro F-2 PN report its own 2L+ state directly to the logic?
No. The PROFINET CPU does not expose a logical 2L+ register; supervision must be implemented on the I/O module that owns the 2L+ terminal or via an external voltage sentinel.
Which OB fires when 2L+ drops on an ET 200pro F-DI/F-DQ module?
OB82 fires with event 0x0321 (2L+ missing) or 0x0322 (2L+ overvoltage), and on a fail-safe CPU the F-runtime additionally passivates the affected channel. Both responses are configured in TIA Portal under module Properties → Diagnostics.
Is the Phoenix Contact MINI MCR-2-UI-UI-PT (2902040) a drop-in replacement for a digital 2L+ monitor?
It is the standard choice for an analog sentinel: input 0..30 V, output 0..10 V, DIN-rail mount, electrically isolated to 1.5 kV. Set the output to 0..10 V and connect to any spare AI channel; scale the raw integer to recover the rail voltage.
How do I monitor a 230 V AC 2L+ rail without routing mains to the field I/O?
Use a Phoenix Contact PLC-RSC buffer relay or a step-down transformer feeding a DC-tapped signal conditioner. The relay's 24 V output then drives a DI channel that is powered from 1L+ and is hardware-interrupt-capable (OB40).
Why does my sticky fault bit never reset?
OB82 fires both on "incoming" and "outgoing" events. If the outgoing branch is missing, the bit is set on loss and never cleared when 2L+ returns. Implement the IOState = 0 branch as shown in Section 5.