6.4 Diagnostics

6.4.1 General

Diagnostics according to this document may be implemented in a non-safety-related way. This allows for categorization and localization of safety communication errors.

This document provides two types of diagnostics:

Diagnostics messages generated by the SafetyConsumer and provided in a vendor-specific way.

The Method ReadSafetyDiagnostics, defined in the OPC UA Information Model (see 6.2.2.4 and 6.4.3).

6.4.2 Diagnostics messages of the SafetyConsumer

[RQ6.17] Every time the macro <Set Diag(SD_IDerrOA, isPermanent)> is executed within the SafetyConsumer, the textual representation shown in Table 28 shall be presented. The details and location of this representation (display, logfile, etc.) are vendor-specific.

Table 28 – Safety layer diagnostic messages

Internal identifier

(as used in the state-machines)

General error type
(String)
Extended error type (String)Error code
(offset)1
Classification *)
(optional)
Mandatory
SD_IDerrIgnThe SafetyConsumer has discarded a message due to an incorrect ID. 0x01AYes
SD_IDerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect ID. Operator acknowledgment is required.Mismatch of SafetyBaseID.20x11B, EYes
SD_IDerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect ID. Operator acknowledgment is required.Mismatch of SafetyProviderID.0x12B, EYes
SD_IDerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect ID. Operator acknowledgment is required.Mismatch of SafetyData structure or identifier.30x13B, EYes
SD_IDerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect ID. Operator acknowledgment is required.Mismatch of SafetyProviderLevel.40x14B, EYes
CRCerrIgnThe SafetyConsumer has discarded a message due to a CRC error (data corruption).0x05AYes
CRCerrOAThe SafetyConsumer has switched to fail-safe substitute values due to a CRC error (data corruption). Operator acknowledgment is required.0x15B, CYes
CoIDerrIgnThe SafetyConsumer has discarded a message due to an incorrect ConsumerID.0x06AYes
CoIDerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect SafetyConsumerID. Operator acknowledgment is required.0x16BYes
MNRerrIgnThe SafetyConsumer has discarded a message due to an incorrect MonitoringNumber.0x07AYes
MNRerrOAThe SafetyConsumer has switched to fail-safe substitute values due to an incorrect monitoring number. Operator acknowledgment is required.0x17B, CYes
CommErrTOThe SafetyConsumer has switched to fail-safe substitute values due to timeout. 0x08BYes
ApplErrTOThe SafetyConsumer has switched to fail-safe substitute values at the request of the safety application.0x09DNo
ParametersInvalidThe SafetyConsumer has been configured with invalid parameters.0x0AB, EYes
FSV_RequestedThe SafetyConsumer has switched to fail-safe substitute values at the request of the SafetyProvider. Operator acknowledgment is required.50x20FYes

1 An offset of 0x10 or larger indicates an error requiring operator acknowledgment.

2 This text may also be shown when the error in the SPDU_ID is due to an incorrect SafetyBaseID.

3 This text may also be shown when the error in the SPDU_ID is due to an incorrect SafetyStructureID.

4 This text may also be shown when the error in the SPDU_ID is due to an incorrect SafetyProviderLevel.

5 A diagnostic message is generated only if the parameter SPI.SafetyOperatorAckNecessary is true, see transition T22 in Table 35.

*) The following classification is specified:

A) Transient communication error

B) Permanent communication error

C) Transmission quality seems not to be sufficient

D) Application error

E) Parameter error

F) Error does not affect communication itself.

To avoid a flood of diagnostic messages in case of transmission errors, only up to two messages are shown even if multiple communication errors occur in sequence. This is ensured by the behaviour defined in the SafetyConsumer’s state machine.

Optional features (vendor-specific):

6.4.3 Method ReadSafetyDiagnostics of the SafetyProvider

This Method (as part of the OPC UA Mapper) serves as a Diagnostic Interface and exists for each SafetyProvider. For time series observation, this interface can be polled, e.g. by a diagnostic device. For details, refer to the OPC UA Information Model described, see 6.2.2.4.

The Diagnostic Interface Method does not take any input parameters and returns both the input and output parameters of the last call of the Method ReadSafetyData.

Additionally, a 2-octet sequence number is added to the Diagnostic Interface, allowing for a detection of missed calls due to polling. The sequence number counts the number of accesses to ReadSafetyData.

A best practice recommendation is to store all input and output parameters if SComErr_diag is <> 0.