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).
The DiagCode parameter is divided into two categories:
-
16#8XXXfor states of communication with transmission (see States of communication with transmission -
16#CXXXerror states (see Error states)
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 |
|---|---|
|
|
(Initialization) "System start": Initial state of the PROFIsafe Host after system start. |
|
|
(Initialization) "Prepare Message": Preparation of the next message for the F-Device. |
|
|
(Initialization) "Await Device Ack": Wait for the response of the F-Device. |
|
|
(Initialization) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error) |
|
|
(Data exchange) "Prepare Message": Preparation of the next message for the F-Device. |
|
|
(Data exchange) "Await Device Ack": Wait for the response of the F-Device. |
|
|
(Data exchange) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error) |
|
|
(Error handling) "Prepare Message": Preparation of the next message for the F-Device. |
|
|
(Error handling) "Await Device Ack": Wait for the response of the F-Device. |
|
|
(Error handling) "Check Device Ack": Checking the response of the F-Device (CRC, consecutive number, F-Device error) |
|
|
(Error handling) "Wait Delay Time": No transmission (watchdog time regarding response) |
-
16#01to16#07: These diagnostic codes exist during operation at the DiagCode output in the IEC application. -
16#08,16#09,16#0A, and16#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 type16#CXXX.
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:
-
Error category
16#C0XX(highest priority) -
Error category
16#C1XX -
Error category
16#C2XX(lowest priority)
The diagnostic code can take the following values in the error state (divided into 3 error categories):
DiagCode = 16#C0XX (configuration and initialization error of the PROFIsafeHost); XX contains an additional error-specific error code
|
Value for XX |
Description |
|---|---|
|
|
Invalid call of the |
|
|
The pointer to the F-Parameters is invalid. |
|
|
Invalid values of the instance data |
|
|
The number of F-Parameters is incorrect. |
|
|
The configured length of the CRC ( |
|
|
The number of F-Parameters is invalid. |
|
|
The length of the F-Parameters does not correspond to the |
|
|
|
|
|
Invalid value for the |
|
|
Invalid length of I/O telegrams (4 ≤ telegram length ≤ 12) |
|
|
The subordinate I/O system could not be initialized. An internal error occurred with the configuration data. |
DiagCode = 0C1XX (error state of the PROFIsafeHost); XX contains an additional host error-specific error code
|
Value for XX |
Description |
|---|---|
|
|
Short-circuit error detected; an output telegram of the |
|
|
Watchdog error; no valid telegram received within the |
|
|
CRC error for the received telegram |
|
|
The |
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 ( |
|
Bit 2 |
CRC communication error ( |
|
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 |