Skip to main content

PROFIsafe Status and Diagnosis

States of the PROFIsafe communication and problems which the safety controller has detected can be diagnosed at the output DiagCode of the driver function block (see below).

Diagnostic code

The DiagCode parameter is divided into two categories:

  • 16#8xxx for states of communication with transmission (see States of communication with transmission

  • 16#Cxxx error states (see Error states)

States of communication with transmission

The diagnostic code can have the following values in the states of communication with transmission:

DiagCode = 16#80xx, xx contains the state of the ProfisafeHost and of the ProfisafeHostV26 according to the PROFIsafeHost Specification:

Values for xx

Description

16#01

(Initialization) "System start": Initial state of the ProfisafeHost after system start.

16#02

(Initialization) "Prepare Message": Preparation of the next message for the F-Device

16#03

(Initialization) "Await Device Ack": Wait for the response of the F-Device.

16#04

(Initialization) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error)

16#05

(Data exchange) "Prepare Message": Preparation of the next message for the F-Device.

16#06

(Data exchange) "Await Device Ack": Wait for the response of the F-Device

16#07

(Data exchange) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error)

16#08

(Error handling) "Prepare Message": Preparation of the next message for the F-Device.

16#09

(Error handling) "Await Device Ack": Wait for the response of the F-Device

16#0A

(Error handling) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error)

16#0B

(Error handling) "Wait Delay Time": No transmission (watchdog time regarding response)

  • 16#01 to 16#07: These diagnostic codes exist during operation at the DiagCode output in the IEC application.

  • 16#08, 16#09, 16#0A, and 16#0B: These diagnostic codes never exist at the DiagCode output in the IEC application because the PROFIsafeHost stack is in an error state and this is displayed with a diagnostic code of type 16#Cxxx.

Display of error states at the diagnostic output

The ProfisafeHost and ProfisafeHostV26 function blocks have different behavior regarding the display of error states at the diagnostic output.

  • Function block: ProfisafeHost

    If there are two errors in the ProfisafeHost function block at the same time, then only the error with the highest priority is shown. The priorities of the errors are assigned according to the error category:

    1. Error category 16#C0xx (highest priority)

    2. Error category 16#C1xx

    3. Error category 16#C2xx (lowest priority)

  • Function block: ProfisafeHostV26

    The error which has been detected first remains at the output of the function block as a diagnostic word until it is acknowledged.

The diagnostic code can take the following values in the error state (divided into 3 error categories):

Configuration and initialization errors of ProfisafeHost and ProfisafeHostV26

DiagCode = 16#C0xx (configuration and initialization error of the ProfisafeHost); xx contains an additional error-specific error code

Value for xx

Description

16#00

Invalid call of the ProfisafeHost stack

16#01

The pointer to the F-Parameters is invalid.

16#02

Invalid values of the instance data

16#03

The number of F-Parameters is incorrect.

16#04

The configured length of the CRC (F_CRC_Length parameter) is not supported.

16#05

The number of F-Parameters is invalid.

16#06

The length of the F-Parameters does not correspond to the F_Block_ID F-Parameter.

16#07

ProfisafeHost version (F_Par_Version parameter) is not supported by the instantiated function block.

16#08

Invalid value for the F_Par_CRC F-Parameter

16#09

Invalid F_Parameter F_WD_Time = 0

16#0A

Invalid F_Parameter F_Source_Address

16#0B

Invalid F_Parameter F_Dest_Address

16#20

Invalid length of I/O telegrams

ProfisafeHost: 4 ≤ telegram length ≤ 16

ProfisafeHostV26: 5 ≤ telegram length ≤ 128

16#30

The subordinate I/O system could not be initialized. An internal error occurred with the configuration data.

Error status of the ProfisafeHost and ProfisafeHostV26

DiagCode = 16C1xx (error state of the ProfisafeHost); xx contains an additional host error-specific error code

Value for xx

Description

16#01

Applies only to ProfisafeHost

Short-circuit error detected; an output telegram of the ProfisafeHost stack has been received as an input telegram (loopback error)

16#02

Watchdog error; no valid telegram received within the F_WD_Time (F-Watchdog time)

Note: This error also occurs when communication between the F-Host and F-Device is not possible due to incorrect configuration.

16#03

CRC error for the received telegram

16#04

Applies only to ProfisafeHost

The ProfisafeHost stack is waiting for an Operator Acknowledge.

The OA_Req_S = TRUE output signals to the application that safe communication has been re-established after an error and that confirmation of the restart is expected.

Error state of the F-Device

DiagCode = 16#C2xx (error status of the F-Device which has been transmitted to the Master); xx contains the status byte (see PROFIsafe Specification, Chapter 7.1.3) of the CODESYS PROFIsafe device. Bit 0, bit 5, bit 6, and bit 7 are masked out by the F-Host stack. Multiple bits can be set at the same time.

Bit in xx

Description

Bit 0

Not used

Bit 1

There is an error in the F-Module or F-Device (Device_Fault).

Bit 2

CRC communication error (CE_CRC)

The CRC error includes all possible variants of initialization and communication errors.

Bit 3

Timeout error (WD-timeout)

Bit 4

Failsafe values are activated (FV-activated)

Bit 5

Not used

Bit 6

Not used

Bit 7

Not used