This is the web edition of the original ⮫ AC500-S safety user manual, version 1.3.2. This web edition is provided for quick reference only. The original safety user manual must be used to meet functional safety application requirements. |
SF_CRC_INIT, SF_CRC_INPUT and SF_CRC_FINISH functions offer a CRC calculation for a user-defined data block by a user-defined CRC polynomial, e.g., FSoE (Functional Safety over EtherCAT) or CRC8. The user-defined data and calculated CRC can be used both for sending the user-defined data with calculated CRC and receiving the user-defined data with the CRC (the calculated CRC is then used for comparison with the received CRC value) if acyclic non-safe data exchange or cyclic non-safe data exchange is used on the safety CPU for user-defined safety communications (contact ABB technical support for more details).
The function blocks are needed to implement 1oo2 safety architecture for safety telegram handling. The same mechanism is used for PROFIsafe communication. This mechanism allows reaching SIL 3 (IEC 61508 and IEC 62061) and PL e (ISO 13849-1) safety integrity level for data exchange using acyclic non-safe data exchange or cyclic non-safe data exchange.
To give the user the possibility to serve several safety communications, like FSoE, with different CRC polynomials (if needed), up to 8 different CRC operations for safety communications can be managed in parallel (each identified via function input CRC_SLOT).
Three phases have to be implemented in the safety application for user-defined CRC calculation using the provided functions.
Phase 1: CRC initialization
-
For operating a user-defined CRC calculation, the user has to configure it. If more than one user-defined safety communication is planned to be used in the safety application, call SF_CRC_INIT once for each of planned safety communications to initialize their CRC calculations.
Call of SF_CRC_INIT builds up the CRC calculation table for a user-defined CRC polynomial (given via input POLYNOM) with its CRC length (input BITS) for the selected safety communication (identified via CRC_SLOT input).
Only one initialization of a selected CRC slot is allowed. After initialization, a re-initialization leads to an error.
-
Further configuration settings have to be done via additional FB inputs.
Phase 2: CRC calculation
-
Call SF_CRC_INPUT to calculate a CRC value over a user data block (previously configured with SF_CRC_INIT) for the selected safety communication (identified via input CRC_SLOT).
You have to call SF_CRC_INPUT for each safety communication separately with the correct CRC_SLOT input value.
The calculation is done in one CPU processing cycle (large data amount can lead to prolongation of CPU cycle time).
Phase 3: Finalize the CRC calculation
-
Call SF_CRC_FINISH to get the calculated CRC value for the selected safety communication (identified via CRC_SLOT input).
You have to call SF_CRC_FINISH for each safety communication separately with the correct CRC_SLOT input value.
The function returns the calculated CRC value which has been previously calculated with SF_CRC_INPUT and prepares the next CRC calculation cycle.
-
In case of the receiving direction of the safety communication, the calculated value which is returned from SF_CRC_FINISH has to be validated against the received CRC value.




NOTICE

Usage of these functions requires detailed knowledge on the handling of CRC protected data in safety communication protocols. Furthermore, it is essential to call the functions in a correct manner, because not all error scenarios are explicitly detectable. To give more information on how to implement the application program, some implementation guidelines are given.




NOTICE

Only CRC calculation from CRC8 to CRC32 is supported using the functions SF_CRC_INIT, SF_CRC_INPUT and SF_CRC_FINISH.




DANGER

The user application must not include the CRC data in the data block when calculating the CRC value for the received data block. It is needed to prevent that the CRC result of "0" is always calculated, which would lead to unexpected CRC calculation result of "0". It is mandatory to validate the calculated CRC from SF_CRC_FINISH against the received CRC value.
-
SF_CRC_INIT
-
SF_CRC_INPUT
-
SF_CRC_FINISH
-
Application guidelines