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 transmission16#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 |
---|---|
| (Initialization) "System start": Initial state of the ProfisafeHost 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#01
to16#07
: These diagnostic codes exist during operation at theDiagCode
output in the IEC application.16#08
,16#09
,16#0A
, and16#0B
: These diagnostic codes never exist at theDiagCode
output in the IEC application because the PROFIsafeHost stack is in an error state and this is displayed with a diagnostic code of type16#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:Error category
16#C0xx
(highest priority)Error category
16#C1xx
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 |
---|---|
| 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 F_Parameter |
| Invalid F_Parameter |
| Invalid F_Parameter |
| Invalid length of I/O telegrams
|
| 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 |
---|---|
| Applies only to Short-circuit error detected; an output telegram of the |
| Watchdog error; no valid telegram received within the Note: This error also occurs when communication between the F-Host and F-Device is not possible due to incorrect configuration. |
| CRC error for the received telegram |
| Applies only to The The |
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 ( |
Bit 2 | CRC communication error ( The CRC error includes all possible variants of initialization and communication errors. |
Bit 3 | Timeout error ( |
Bit 4 | Failsafe values are activated ( |
Bit 5 | Not used |
Bit 6 | Not used |
Bit 7 | Not used |