• No results found

Diagnostics of a 41xH CPU operating as PROFIBUS DP master Diagnostics Using LEDs

S7-400H in Profibus DP Mode Chapter Overview

5.1 CPU 41x-H as PROFIBUS DP master Introduction

5.1.3 Diagnostics of a 41xH CPU operating as PROFIBUS DP master Diagnostics Using LEDs

Table 5-2 shows the meaning of the BUSF LED.

The BUSF LED assigned to the interface configured as the PROFIBUS DP interface will always light up or flash.

Table 5-2 Meaning of the BUSF LEDs of the CPU 41x as DP master

BUSF Meaning What to Do

Off Configuration correct All the configured slaves are addressable

--

is lit • Bus error (hardware fault) • Check whether the bus cable has a short--circuit or a break.

• DP interface fault

• Different transmission rates in multi--DP master operation (only in stand--alone mode)

• Evaluate the diagnosis. Reconfigure or correct the configuration.

Flashes • Station failure

• At least one of the assigned slaves is not addressable

• Check whether the bus cable is connected to the CPU 41x or whether the bus is interrupted. • Wait until the CPU 41x has powered up. If the

LED does not stop flashing, check the DP slaves or evaluate the diagnosis of the DP slaves.

Reading Out the Diagnostics Information with STEP 7 Table 5-3 Reading out the diagnostics information with STEP 7

DP Master Block or Tab in

STEP 7 Application Refer To...

CPU 41x DP slave diagnostics

tab To display the slave diagnosisas plain text at the STEP 7 user interface

see “Hardware diagnostics” in the STEP 7 Online Help, and the Configuring hardware and

connections with STEP 7 manual.

SFC 13

“DPNRM_DG” Reading slave diagnostics data,i.e. saving these to the data area of the user program The busy bit may not be set to ”0” when an error occurs while SFC13 is being processed. You should therefore check the RET_VAL parameter whenever SFC13 was processed.

For information on the structure for a 41x CPU, refer to the CPU

Datareference manual; on the

SFC, refer to the System and

Standard Functions reference

manual

For information on the structure for other slaves, refer to the corresponding description. SFC 59 “RD_REC” To read out data records of the

S7 diagnosis (save these to the data area of the user program SFC 51 “RDSYSST” To read out SSL sublists Call

SFC 51 in the diagnostics interrupt using the SSL ID W#16#00B3 and read out the SSL of the slave CPU.

See the System and Standard SFB 52 “RDREC” For DPV1 slaves:

Reading data records of S7 diagnostics,i.e. saving these to the data area of the user program

See the System and Standard

Functions

Reference Manual

SFB 54 “RALRM” For DPV1 slaves:

To read out interrupt information within the associated interrupt OB

Evaluating diagnostics data in the user program

The figure below shows how to evaluate the diagnostics data in the user program.

Diagnostics event

Read OB82_MDL_ADDR

and

Read OB82_IO_FLAG (= input/output module identifier)

For the diagnosis of the whole DP slave:

Call SFC 13

Enter the diagnostics address OB82_MDL_ADDR* in the LADDR parameter

Enter bit 0 of the OB82_IO_Flag as bit 15 in OB82_MDL_ADDR Result: Diagnostics address

”OB82_MDL_ADDR*”

For the diagnosis of the relevant modules:

Call SFC 51

Enter the diagnostics address

OB82_MDL_ADDR* in the INDEX parameter Enter the ID W#16#00B3 in the SSL_ID parameter (= diagnostics data of a module)

CPU 41xH

OB82 is called

For the diagnosis of the relevant components:

Call SFB 54 (in DPV1 environment)

MODE= set 1

Diagnostics data are entered in the TINFO and

AINFO parameters.

Diagnostics Addresses in Connection with DP Slave Functionality

Assign the diagnostics addresses for PROFIBUS DP at the 41xH CPU. Ensure during configuration that DP diagnostics addresses are assigned once to the DP master and once to the DP slave.

You specify two diagnostics addresses during configuration:

PROFIBUS

DP-Slave S7-CPU as DP master

Diagnostics address Diagnostics address During the configuration of the DP

master, you specify (in the associated project of the DP master) a diagnostics address for the DP slave. In the following, this diagnostics address is described as being assigned to the DP

master.

During the configuration of the DP slave, you also specify (in the associated project of the DP slave) a diagnostics address that is assigned to the DP slave. In the following, this diagnostics address is described as being assigned to the

DP slave.

The DP master reads information on the status of the DP slave and any bus interruptions at this diagnostics address. See also table 5-4.

By means of this diagnostics address the DP slave receives information on the status of the DP master or a bus interruption.

Event detection

Table 5-4 shows how the 41xH CPU in DP master mode detects operating state transitions at a DP slave or interruptions of the data transfer.

Table 5-4 Event detection of 41xH CPUs in DP master mode

Event What Happens in the DP Master

Bus interruption due to short--circuit or disconnection of the bus connector

OB 86 called with the message Station failure incoming event;

diagnostics address of the DP slave that is assigned to the DP master

• with I/O access: call of OB 122, I/O access error

DP slave:

RUN → STOP • Call of OB 82 with the message Module erroras coming event;

Diagnostics address of the DP slave which is assigned to the DP master;

tag OB82_MDL_STOP=1 DP slave:

STOP → RUN •

Call of OB 82 with the message Module OK

as going event; diagnostic address of the DP slave which is assigned to the DP master; tag OB82_MDL_STOP=0

Evaluation in the User Program

The table below shows you how to evaluate RUN-STOP transitions of the DP slave in the DP master. See also table 5-4.

In the DP Master In the DP Slave (CPU 41x)

Example of diagnostics addresses: Master diagnostics address=1023 Slave diagnostics address in the master system=1022

Example of diagnostics addresses: Slave diagnostics address =422 Master diagnostics address = irrelevant The CPU calls OB 82 with the following

information, amongst other things: • OB 82_MDL_ADDR:=1022 • OB82_EV_CLASS:=B#16#39

as coming event

• OB82_MDL_DEFECT:=module malfunction

This information is also available in the diagnostics buffer of the CPU

Your application program should also be set up for reading the diagnostics data of the DP slave using SFC 13 “DPNRM_DG”..

In the DPV1 environment, use SFB54.It outputs the entire interrupt information.

CPU: RUN → STOP

CPU generates a DP slave diagnostics frame.