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 according to the PROFIsafeHost Specification:

Values for XX

Description

16#01

(Initialization) "System start": Initial state of the PROFIsafe Host 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 output DiagCode 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.

Error states

If there are two errors in the PROFIsafe Host 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)

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

Configuration and initialization errors of the PROFIsafeHOST

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. (Only PROFIsafe V2 is 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

PROFIsafe Host Version (F_Par_Version parameter) is not supported. (Only PROFIsafe V2 is supported.)

16#08

Invalid value for the F_Par_CRC F-Parameter

16#20

Invalid length of I/O telegrams (4 ≤ telegram length ≤ 12)

16#30

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

Error state of the PROFIsafeHOST

DiagCode = 0C1XX (error state of the PROFIsafeHost); XX contains an additional host error-specific error code

Value for XX

Description

16#01

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)

16#03

CRC error for the received telegram

16#04

The PROFIsafeHost stack is waiting for an Operator Acknowledge.

Error state of the F-Device

DiagCode = 16#C2XX (error state of the F-Device, which was transmitted to the master); XX contains the status byte (compare PROFIsafe Specification, Sec. 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)

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