Problem Overview: SFB54 RALRM Returns 0xC0880000 in OB82
When implementing diagnostic interrupt handling in TIA Portal using SFB54 (RALRM) inside OB82, the block may return status code 0xC0880000 even when the TINFO data block structure visually matches the expected layout. The AINFO parameter reads correctly, the OB82 fires on the diagnostic event, but the TINFO output indicates a parameter assignment error and the block stops processing useful data.
This article documents the root cause, the correct data type assignment, the standard-access versus optimized-access configuration, and a verified step-by-step procedure for S7-1200 and S7-1500 controllers in TIA Portal V13 SP1 through V20.
Decoding Error Code 0xC0880000
RALRM status follows the standard SIMATIC error model. The 32-bit word splits into a 16-bit function identifier (high word) and a 16-bit specific cause (low word):
| Status Word | Value | Meaning |
|---|---|---|
| High word (function) | 0xC088 | Parameter assignment error on TINFO / NEW_PTR |
| Low word (detail) | 0x0000 | TINFO target does not match the system data type for the calling OB |
| Full DWORD | 0xC0880000 | Block rejected: TINFO parameter is not a system datatype of correct form |
Per the TIA Portal V20 RALRM (S7-1200, S7-1500) description, this status indicates the TINFO InOut parameter does not point to a variable of the system datatype that the firmware expects for the current OB context. The block does not check structural equivalence; it checks the type identifier stored in the compiler metadata.
Root Cause: User-Defined Types vs System Types
The TINFO parameter of SFB54 is an InOut (pointer-style) parameter. The firmware dereferences this pointer and validates the variable's datatype identifier against an internal table keyed by the calling OB number. The valid identifiers are system types built into the TIA Portal compiler:
-
Standard access (non-optimized block): TINFO must be of system type
TI_Classic. -
Optimized access (S7-1200/1500 symbolic block): TINFO must be of system type
T1_DiagnosticInterruptfor OB82, wrapped inside the system datatypeSFB54_TINFO_TI_DiagnosticInterrupt.
A user-defined PLC data type (UDT) constructed with the same byte layout — identical field names, identical offsets, identical data types — does not satisfy the firmware check. The compiler accepts the UDT at build time (because the structure is structurally compatible), but the runtime rejects the variable when the block enters the call chain. This is why the error 0xC0880000 persists after a clean compile and a successful download.
Why AINFO Works but TINFO Fails
OB82 calls deliver two separate data records to RALRM:
| Parameter | Direction | Content | OB82 System Type |
|---|---|---|---|
| TINFO | InOut | OB start information (16/20/24 bytes depending on CPU class), interrupt source, IO address, channel number | TI_Classic (standard) / T1_DiagnosticInterrupt (optimized) |
| AINFO | InOut | Channel-specific diagnostics payload from the IO device | DiagnosticInterrupt (system type) |
| MODE | Input | 0 = all data; 1 = TINFO only; 2 = AINFO only | — |
| F_ID | Input | Logical address of the slave that triggered the alarm (MODE 2 only) | — |
| MLEN / LEN | Input/Output | Length of AINFO buffer / bytes actually returned | — |
| STATUS | Output | DPV1 or PROFINET error code from the slave | — |
When engineers assign a UDT to TINFO and a system type to AINFO, AINFO succeeds because its system type is correctly identified, and TINFO fails because the UDT identifier does not match. This is the most common source of the 0xC0880000 return.
Correct Configuration: Standard Access (S7-300/400 Compatible Path)
Use this configuration for S7-300, S7-400, or S7-1200/1500 blocks created with the "Standard" access attribute.
- In TIA Portal, open the block calling SFB54 (typically FB inside OB82 or a multi-instance).
- Create a global DB, e.g.
OB82_RALRM_Params_DB, with the Standard block access attribute. - Add a tag of the system type
TI_Classic. In the data type drop-down, typeTI_Cand accept the IntelliSense suggestion. Do not create a UDT. - Add a tag for the AINFO buffer; recommended type is the system type
DIAGNOSTICINTERRUPTwith sufficient size (at least 64 bytes for typical PROFINET diagnostic records). - Wire the tags into the TINFO and AINFO InOut pins of SFB54.
The TI_Classic type holds the standard OB start information (OB class, OB priority, OB number, reserved, module logical base address, channel, multi-instance, I/O state bits) and is the only type accepted by RALRM in OB82 for standard-access blocks.
Correct Configuration: Optimized Access (S7-1200/1500)
For optimized blocks the system datatype container is different. The TINFO variable must be of type SFB54_TINFO_TI_DiagnosticInterrupt, and inside it a member Data of type T1_DiagnosticInterrupt.
- Create a global DB with the Optimized block access attribute.
- Add a tag named
TINFO. In the data type field, typeSFB54_TINFO_TI_DiagnosticInterruptand accept the suggestion. - The compiler will instantiate the nested
Data : T1_DiagnosticInterruptstructure automatically. Do not redefine it. - Add a tag named
AINFOof typeArray of Bytewith a length of 64 to 256 bytes depending on the expected diagnostics payload (PROFINET channel diagnostics can reach 234 bytes; DPV1 can reach 28 bytes). - Call SFB54 from OB82 with the new DB tags.
MyTINFO has a different type ID than the system type, even if the byte layout is identical. RALRM validates the type ID and returns 0xC0880000 if it does not match. The system types are baked into the firmware and the compiler; they are not editable.Step-by-Step Implementation Guide
Prerequisites
- TIA Portal V13 SP1 or later (V16+ recommended for full S7-1500 RALRM enhancements).
- CPU firmware supporting OB82: S7-1200 firmware 4.2+, S7-1500 firmware 1.5+, ET 200SP CPU firmware 1.8+.
- A configured PROFINET device or DP slave with diagnostics enabled. For PROFINET, channel diagnostics must be activated in the device properties. For DP/DPV1, the slave must support DPV1 interrupts.
- Symbolic access enabled on the IO device module if you need to interpret slot/channel information symbolically.
Procedure
- Add OB82 to the program. In the project tree, expand "Program blocks > System blocks". If OB82 is not present, right-click and "Add new block > Organization block > Diagnostic interrupt". TIA Portal will register OB82 as a diagnostic handler.
-
Create a global DB for RALRM parameters. Right-click "Program blocks > Add new block > Data block". Name it e.g.
DB_RALRM_OB82. Set the access attribute (Standard or Optimized) according to the rest of the program. -
Declare the TINFO tag. In the new DB, add a tag named
TINFO. Type the exact system type string in the "Data type" column. Do not create a UDT, do not copy from a working DB expecting type equivalence. -
Declare the AINFO tag. Add a tag of system type
DIAGNOSTICINTERRUPTfor standard access, orArray[0..255] of Bytefor optimized access. -
Insert SFB54 in OB82. From the extended instructions palette under "Distributed I/O", drag
RALRM (SFB54)into OB82. Wire the inputs:
MODE := 0 // request TINFO + AINFO
F_ID := 0 // not used when MODE = 0
MLEN := 64 // max length of AINFO buffer
TINFO := "DB_RALRM_OB82".TINFO
AINFO := "DB_RALRM_OB82".AINFO
-
Check STATUS on each call. After RALRM returns, evaluate
RET_VALandSTATUS. A return of 0xC0880000 indicates the TINFO type is still wrong. A return of 0x00000000 indicates success; the TINFO data is now valid and AINFO holds the channel-diagnostic record. - Trigger a diagnostic event. Use the device's diagnostic mechanism (wire break on an AI module, overload on a DO module, or send a PROFINET channel-diagnostic record from a configured device) to verify the OB82 fires and RALRM populates both TINFO and AINFO correctly.
Alternative Path: SFC51 RDSYSST and SFC RD_SINFO
If the project does not require DPV1 channel-diagnostic payload, the simpler SFC RD_SINFO (sometimes written as SFC6 "RD_SINFO") reads OB start information for OB82 without the TINFO type restrictions of SFB54. It returns two structures: the priority/start-event of the called OB and the priority/start-event of the OB currently being executed.
CALL RD_SINFO // SFC6
SFB_ERROR := W#16#0000 // implicit
TOP_SI := #top_sinfo // priority of called OB
START_UP_SI:= #startup_sinfo // priority of current OB
For PROFINET/DPV1 channel diagnostics, however, SFB54 is the correct and only path. Refer to the Siemens Support entry 21445066 for the canonical DPV1 alarm example including the AI 2x12 bits wire-break scenario.
For PROFINET system diagnostics, SFC51 ("RDSYSST") with SSL ID W#16#00B4 returns the module status information that complements the channel-level data delivered to SFB54.
Status Code Reference for RALRM
| RET_VAL | Meaning | Action |
|---|---|---|
| 0x00000000 | No error; data returned. | None; proceed. |
| 0xC0880000 | TINFO / AINFO datatype mismatch. | Replace UDT with system type; verify access attribute. |
| 0xC8800000 | AINFO length too small (MLEN < actual payload). | Increase MLEN and AINFO buffer size. |
| 0xD0810000 | OB priority conflict or OB not registered. | Verify OB82 is present and registered. |
| 0xD0xx0000 | DPV1 slave error during read. | Check slave diagnostic status with SFC13 DPNRM_DG. |
| 0x80A10000 | PROFINET IO device not accessible. | Check device name assignment and connection. |
The high-word values 0xC0xx, 0xD0xx, and 0x80xx are stable across TIA Portal versions V13 through V20. Lower-word detail bits may differ slightly between firmware revisions; cross-check against the CPU's online help for the exact revision.
Verification Procedure
- Download the corrected project to the CPU and place it in RUN.
- Open the OB82 instance online and force a diagnostic event (e.g. disconnect a sensor wire on an AI module with diagnostics enabled).
- Monitor the DB containing TINFO and AINFO online. Confirm TINFO now contains non-zero, recognizable values for IO logical base address, channel number, and I/O state.
- Confirm AINFO contains the expected channel-diagnostic identifier byte (typically 0x0002 for PROFINET channel diagnostics, 0x0010 for DPV1).
- Confirm RALRM
RET_VALis 0x00000000 after the call. If any non-zero value persists, re-check the TINFO datatype identifier by selecting the tag in the DB and reading the type displayed in the inspector window — it must readTI_ClassicorSFB54_TINFO_TI_DiagnosticInterrupt, not the name of any UDT.
Common Pitfalls and Edge Cases
- Mixed access attributes in the same program. A standard-access block calling an optimized DB (or vice versa) compiles but produces inconsistent TINFO behavior. Keep access attributes uniform per program.
- Multi-instance DB confusion. If SFB54 is called as a multi-instance inside an FB, the instance DB contains its own internal TINFO area. Avoid declaring a separate TINFO tag unless MODE is non-zero and you are reading additional data.
- ET 200SP with HF modules. The HF variants of ET 200SP modules deliver extended channel diagnostics with longer records. Increase the AINFO buffer to at least 128 bytes for these modules. See the ET 200SP diagnostics alarms documentation.
- S7-1500F safety CPU. OB82 is supported on S7-1500F but the safety program and standard program are isolated. Place the RALRM call in the standard OB82, not the safety OB82 instance.
- Firmware 2.9 and SFB54 enhancements. S7-1500 firmware 2.9 added support for multi-subsystem PROFINET diagnostics. RALRM may return more than one diagnostic record; iterate AINFO parsing until LEN is shorter than MLEN.
Diagnostic Workflow Summary
| Step | Action | Expected Result |
|---|---|---|
| 1 | Force a wire-break or channel fault on the configured IO module | OB82 is called; RALRM is invoked |
| 2 | Inspect RET_VAL of RALRM | 0x00000000 indicates TINFO accepted |
| 3 | Inspect TINFO.IO_STATE / TINFO.CHANNEL | Non-zero values matching the faulted channel |
| 4 | Inspect AINFO first 4 bytes | 0x0002 (PROFINET channel) or 0x0010 (DPV1) |
| 5 | If RET_VAL is 0xC0880000, open the TINFO variable declaration | Type must be TI_Classic or SFB54_TINFO_TI_DiagnosticInterrupt |
| 6 | Replace any UDT with the system type, recompile, download | RET_VAL becomes 0x00000000 |
Quick Reference: System Types for Common OBs
| OB | Standard-Access TINFO | Optimized-Access TINFO | AINFO |
|---|---|---|---|
| OB40 (Hardware interrupt) | TI_Classic | SFB54_TINFO_TI_HardwareInterrupt | DIAGNOSTICINTERRUPT |
| OB55 (DPV1 status) | TI_Classic | SFB54_TINFO_TI_StatusInterrupt | DIAGNOSTICINTERRUPT |
| OB56 (DPV1 update) | TI_Classic | SFB54_TINFO_TI_UpdateInterrupt | DIAGNOSTICINTERRUPT |
| OB57 (DPV1 manufacturer) | TI_Classic | SFB54_TINFO_TI_ManufacturerInterrupt | DIAGNOSTICINTERRUPT |
| OB82 (Diagnostic) | TI_Classic | SFB54_TINFO_TI_DiagnosticInterrupt | DIAGNOSTICINTERRUPT |
| OB83 (Insert/remove) | TI_Classic | SFB54_TINFO_TI_PlugPullInterrupt | DIAGNOSTICINTERRUPT |
| OB121 (Programming error) | TI_Classic | n/a (no AINFO) | — |
FAQ
What does SFB54 RALRM error 0xC0880000 mean on an S7-1500 in OB82?
The high word 0xC088 indicates a parameter assignment error on the TINFO InOut. The low word 0x0000 specifies that the variable passed to TINFO is not the system datatype the firmware expects for OB82. Replace any user-defined PLC data type with the system type TI_Classic (standard access) or SFB54_TINFO_TI_DiagnosticInterrupt (optimized access).
Can I use a UDT with the same structure as TI_Classic for the TINFO parameter?
No. The TIA Portal compiler accepts a structurally equivalent UDT, but the CPU firmware validates the type identifier at runtime. A UDT named identically in field layout still carries a different type ID, so RALRM rejects it with 0xC0880000. Use the system datatype directly.
Why does the AINFO parameter work while TINFO fails in the same RALRM call?
AINFO is validated as a byte buffer (system type DIAGNOSTICINTERRUPT or Array of Byte) and is more permissive. TINFO is a structured record validated against the OB-specific system type. The most common error is assigning a UDT to TINFO while leaving AINFO at its system type, causing asymmetric behavior.
Does SFB54 behave the same on S7-1200 as on S7-1500 in OB82?
The interface is similar but the optimized-access TINFO container is required on S7-1200 firmware 4.2 and on all S7-1500 firmware levels. On S7-300/400, only the standard TI_Classic path exists. On S7-1500 firmware 2.9 and later, RALRM can deliver multiple chained diagnostic records in AINFO; iterate the buffer parsing until the returned LEN is shorter than MLEN.
Is SFC6 RD_SINFO a valid alternative to SFB54 RALRM in OB82?
SFC6 RD_SINFO returns OB start information (priority, OB number, and similar fields) without the strict TINFO type validation of SFB54. It is a valid alternative when the program only needs to know which channel triggered the diagnostic interrupt. If the application must read the full PROFINET or DPV1 channel-diagnostic payload (the actual channel error code, value, and extended diagnostics), SFB54 is the correct and only path. See Siemens Support entry 21445066 for the canonical DPV1 alarm implementation.