beautypg.com

Spc3 profibus interface center – Siemens SPC3 User Manual

Page 63

background image

SPC3

PROFIBUS Interface Center

SPC3 Hardware Description

V1.3

Page 61

Copyright (C) Siemens AG 2003 All rights reserved.

2003/04

11 Appendix A: Diagnostics Processing in PROFIBUS DP

11.1 Introduction

PROFIBUS DP offers a convenient and multi-layer possibility for processing diagnostics messages on the
basis of error states.

As soon as a diagnostics request is required, the slave will respond in the current data exchange with a high
priority reply message. In the next bus cycle, the master then requests a diagnostics from this slave,
instead of executing normal data exchange.

Likewise, any master (not only the assigned master!) can request a diagnostics from the slave. The
diagnostics information of the DP slave consists of standard diagnostics information (6 bytes), and can be
supplemented by user-specific diagnostics information.

In the case of the ASICs, SPM2, and LSPM2, extensive diagnostics is possible through corresponding
wiring. In the case of the intelligent SPCx solution, adapted and convenient diagnostics processing can be
carried out through programming.

11.2 Diagnostics Bits and Expanded Diagnostics

Parts of the standard diagnostics information are permanently specified in the firmware and in the micro-
program of the ASICs through the state machine.

Request diagnostics only once („update_diag(..)“) if an error is present or changes. By no means should
diagnostics be requested cyclically in the data exchange state; otherwise, the system will be burdened by
redundant data.

Three information bits can be influenced by the application:

11.2.1 STAT_DIAG

Because of a state in the application, the slave can’t make valid data available. Consequently, the master
only requests diagnostics information until this bit is removed again. The PROFIBUS DP state is, however,
Data_Exchange, so that immediately after the cancellation of the static diagnostics, data exchange can
start.

Example: failure of supply voltage for the output drivers

11.2.2 EXT_DIAG

If this bit is set, a diagnostics entry must be present in the user-specific diagnostics area. If this bit is not
set, a status message can be present in the user-specific diagnostics area.

User-Specific Diagnostics

The user-specific diagnostics can be filed in three different formats:

Device-Specific Diagnostics:

The diagnostics information can be coded as required.

Bit 7 Bit 6 Bit 5-0

Header Byte

0

0

Block length in bytes, including header

Diagnostics Field

Coding of diagnostics is device-specific

.....

Can be specified as required