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. |
The SF_CRC_FINISH function returns the calculated CRC value and re-initializes the CRC calculation for selected safety communication, identified via input CRC_SLOT.




NOTICE

SF_CRC_FINISH shall only be called once after CRC calculation is done with SF_CRC_INPUT, and before starting a new CRC calculation cycle.
If SF_CRC_FINISH is not called (after actual CRC calculation and before next CRC calculation):
-
The new calculated CRC value is not available in the safety application.
-
The required re-initialization for the next CRC calculation cycle is missing which will provide an unexpected result during next SF_CRC_INPUT function call.
If SF_CRC_FINISH is called more than once (after actual CRC calculation and before next CRC calculation) only the first call returns the valid calculated CRC value. Following calls will return invalid CRC values.

Name |
Data type |
Initial value |
Description, parameter values |
---|---|---|---|
VAR_INPUT |
|||
CRC_SLOT |
BYTE |
0 |
Identifies the CRC slot of the safety communication for which CRC value is returned. Allowed values: 0...7 |
VAR_OUTPUT |
|||
SF_CRC_FINISH |
DWORD |
16#00000000 |
CRC calculation result |




NOTICE

Under the following error conditions, SF_CRC_FINISH initiates a SAFE STOP to protect from unrecoverable error situations, possibly caused by an erroneous application (not indicatable by the function return value, since the calculated CRC value does not have any value restrictions).
-
CRC_SLOT invalid (>7)
-
CRC_SLOT configured with CRC polynomial “0”
-
CRC_SLOT not configured at all or not configured successfully
Call in ST
SF_CRC_FINISH_Slot1 := SF_CRC_FINISH(CRC_SLOT1);