Siemens Industry Online Support
Siemens AG
Type bericht: FAQ, ID van bericht: 21445066, Datum bericht: 09.11.2006

How do you receive an alarm with the SFB 54 "RALRM" in compliance with DPV1?

  • Bericht
  • Heeft betrekking op product(en)

The following example shows how you can use the SFB 54 "RALRM" to receive and evaluate an alarm that has been issued by distributed I/O device. It includes the most important points for module parameterizing, programming and evaluating the data received.
In the example an S7-CPU 315-2DP (MLFB: 6ES7 315-2AG10-0AB0) is used as DPV1 master that operates an ET 200M with IM 153-2 HighFeature (MLFB: 6ES7 153-2BA00-0XB0) as distributed PROFIBUS interface. The power supply is interrupted on the analog I/O module (AI 2x12 bits) so that the DP slave reports an alarm to the DP master.

In order to be able to receive an alarm with the SFB 54 "RALRM", all the components involved must support the DPV1 standard. This means that both the master and the slave used must support the DPV1 standard and thus also alarm handling.

Once the HW Config has been established you must enable the alarm handling. For the ET 200M to be able to issue diagnostics alarms, these must be enabled in the parameters of the modules. Diagnostics alarms are disabled by default.

Fig. 01

Then call the SFB 54 directly in the required alarm OB. In the example it is called directly in the diagnostics alarm OB (OB 82). If the SFB 54 is called in multiple alarm OBs, it must be called with different instance DBs to ensure error-free running of the block.

Fig. 02

Take the content for parameter F_ID on SFB 54 from the HW Config (see Fig. T1-03). Here you need the I/O address of the module from which alarms are to be received. Note that the decimal value from the HW Config has to be converted into a hexadecimal format for the SFB 54. If you use Mode 1 just as in the example, the parameter F_ID is irrelevant.

Fig. 03

Once a diagnostics alarm has been issued in the running project the SFB 54 fills the two data areas specified with administration information (DB1) on the one hand and on the other with all the alarm information received (DB2 - see Fig. 04).

Fig. 04

This alarm information can now be evaluated as follows:

  • You evaluate the first 3 bytes of standard alarm information with the Online Help of SFB 54.
  • The additional alarm information (as from byte 4) can be evaluated using the manual for the distributed system concerned in each case. In the manual the Diagnostics chapter has a separate section on the topic of alarms.

If you are using the SFB 54 on a DPV0 slave, in the alarm information you receive the complete contents of the diagnostics message from the slave. This is described in detail in the Online Help of STEP 7 (keyword: "SFB 54").


DP_Diagnose_SFB54.zip ( 262 KB )

Nota's in verband met security
Ter bescherming van installaties, systemen, machines en netwerken tegen digitale dreigingen is het noodzakelijk om een alomvattend 'Industrial Security' concept te implementeren (en continu te handhaven) dat overeenkomt met de huidige stand van de techniek. De producten en oplossingen van Siemens vormen slechts een deel van een dergelijk concept. Meer informatie over 'Industrial Security' vindt u op