• 沒有找到結果。

Diagnostics using LEDs

The following table explains 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-3 Meaning of the "BUSF" LED of the CPU 41x as DP master

BUSF Meaning Remedy

Off Configuration correct;

All configured slaves can be addressed

Lit Bus fault (hardware fault)

DP interface fault

Different transmission rates in multi-DP master mode

Check for short-circuit or interruption of the bus cable.

Evaluate the diagnostics. Reconfigure or correct the configuration.

Flashing Station failure

At least one of the assigned slaves cannot be addressed

Check whether the bus cable is connected to the CPU 41x or whether the bus is interrupted.

Wait until the CPU 41x has started up. If the LED does not stop flashing, check the DP slaves or analyze the diagnostic data of the DP slaves.

flashes briefly INTF lights up briefly

CiR synchronization running

Triggering Detection of the Bus Topology in a DP Master System with the SFC103 "DP_TOPOL"

The diagnostic repeater is available to improve the ability to locate faulty modules or an interruption on the DP cable when failures occur in ongoing operation. This module operates as a slave and can identify the topology of a DP chain and record any faults originating from it.

You can use SFC103 "DP_TOPOL" to trigger the identification of the bus topology of a DP master system by the diagnostic repeater. For information on SFC103, refer to the

corresponding Online Help and to the System and Standard Functions manual The diagnostic repeater is described in the manual Diagnostic Repeater for PROFIBUS DP, order number 6ES7972-0AB00-8BA0.

长沙工控帮教育科技有限公司整理

PROFIBUS DP 5.1 CPU 41x as DP master / DP slave

Reading the Diagnostic Data with STEP 7

Table 5-4 Reading the diagnostic data with STEP 7

DP master Block or tab in STEP 7 Application Reference

"DP Slave Diagnostics"

tab Show slave diagnostics in clear

text on the STEP 7 user interface See the section on hardware

diagnostics in the STEP 7 Online Help and in the Programming with STEP 7 manual

SFC 13 "DPNRM_DG" Read slave diagnostics (save to data area of the user program)

SFC, see System Software for S7-300/400, System and Standard Functions reference manual. For the structure of other slaves, refer to their descriptions.

SFC59 "RD_REC" Reading the data records of S7 diagnostics (stored in the data area of the user program)

SFC 51 "RDSYSST" Reading partial SSL lists. Call SFC51 in the diagnostic interrupt using the SSL ID W#16#00B3 and read out the SSL of the slave CPU.

SFB 52 "RDREC" For DPV1 slaves

Reading the data records of S7 diagnostics (stored in the data area of the user program)

SFB 54 "RALRM" For DPV1 slaves:

To read out interrupt information within the associated interrupt OB CPU 41x

SFC 103

"DP_TOPOL" Triggers detection of the bus topology of a DP master system with diagnostic repeaters installed there.

System Software for S7-300/400, System and Standard Functions reference manual.

Analysis of Diagnostic Data in the User Program

The following figure shows you how to evaluate the diagnostic data in the user program.

长沙工控帮教育科技有限公司整理

PROFIBUS DP

5.1 CPU 41x as DP master / DP slave

S7-400 Automation System, CPU Specifications

5-8 Manual, 11/2006, A5E00850746-02

CPU 41x

Diagnostic event

OB82 is called

Read out OB82_MDL_ADDR and

Read out OB82_IO_FLAG (= input/output module identifier)

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

Diagnostic address

"OB40_MDL_ADDR*"

For the diagnosis of the whole DP slave:

Call SFC 13

Enter the diagnostic address

“OB82_MDL_ADDR*” in the LADDR param-eter

For the diagnosis of the relevant modules:

Call SFC 51

Enter the diagnostic address

“OB82_MDL_ADDR*” in the INDEX parameter Enter the ID W#16#00B3 in the SZL_ID parameter (= diagnostic data of a module)

For the diagnosis of the relevant components:

Call SFB 54 (in the DPV1 environ-ment)

MODE= set 1

Diagnostic data are entered in the TINFO and AINFO parameters.

Figure 5-1 Diagnostics with CPU 41x

Diagnostic Addresses in Connection with DP Slave Functionality

You assign diagnostic addresses for the PROFIBUS DP in the CPU 41x. Verify in your configuration that the DP diagnostic addresses are assigned once to the DP master and

once to the DP slave. 长沙工控帮教育科技有限公司整理

PROFIBUS DP 5.1 CPU 41x as DP master / DP slave

Table 5-5 Diagnostic addresses for the DP master and DP slave

S7 CPU as DP master S7 CPU as DP slave

PROFIBUS

Specify two diagnostic addresses during configuration:

Diagnostic address Diagnostic address

During configuration of the DP master, specify (in the associated project of the DP master) a diagnostic address for the DP slave. This diagnostic address is identified as assigned to DP master below.

The DP master uses this diagnostic address to receive information about the status of the DP slave or a bus interruption (see also table

"Event detection of the CPUs 41x as DP master").

During configuration of the DP slave, also specify (in the associated project of the DP slave) a diagnostic address that is assigned to the DP slave. This diagnostic address is identified as assigned to the DP slave below.

The DP master uses this diagnostic address to receive information about the status of the DP master or a bus interruption (see also table "Event detection of the CPUs 41x as DP slave").

Event Detection

The following table shows you how the CPU 41x as DP master detects any changes in the operating mode of a CPU as DP slave or interruptions in data transfer.

Table 5-6 Event detection of the CPUs 41x as DP master

Event What happens in the DP master

Bus interruption (short-circuit, connector removed)

OB86 called with the message station failure (event entering state;

diagnostic 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 OB82 is called with the message "Faulty module" (event entering state;

diagnostic address of the DP slave that is assigned to the DP master; tag OB82_MDL_STOP=1)

DP slave:

STOP → RUN OB82 is called with the message "Module OK" (event exiting state;

diagnostic address of the DP slave that is assigned to the DP master; tag OB82_MDL_STOP=0)

长沙工控帮教育科技有限公司整理

PROFIBUS DP

5.1 CPU 41x as DP master / DP slave

S7-400 Automation System, CPU Specifications

5-10 Manual, 11/2006, A5E00850746-02

Evaluation in the User Program

The following table shows you how, for example, you can evaluate RUN-STOP transitions of the DP slave in the DP master (see also table "Event detection of the CPUs 41x as DP master").

Table 5-7 Evaluation of RUN-STOP transitions of the DP slave in the DP master

In the DP master In the DP slave (CPU 41x)

Diagnostic addresses: (example) Master diagnostic address=1023 Slave diagnostic address in the master system=1022

Diagnostic addresses: (example) Slave diagnostic address=422

Master diagnostic address=not relevant

The CPU calls OB82 with at least the following information:

OB82_MDL_ADDR:=1022

OB82_EV_CLASS:=B#16#39 (incoming event)

OB82_MDL_DEFECT:=module fault Tip: The CPU diagnostic buffer also contains this information

You should also program the SFC

"DPNRM_DG" in the user program to read out the DP slave diagnostic data.

Use the SFB 54 in the DPV1 environment. It outputs the interrupt information in its entirety.

CPU: RUN → STOP

CPU generates a DP slave diagnostic frame.