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_INPUT function performs the CRC calculation over a given user-defined data block (addressed via pointer at DATA input) with a given length (via LENGTH input) for the given safety communication identified via input CRC_SLOT. The CRC calculation is done on one microprocessor (1oo2 safety architecture is used on AC500-S safety CPU) only, but the CRC calculation result is available on both safety CPU microprocessors.
Two options are possible for the CRC calculation:
-
Calculation in one processing cycle:
This means the calculation is done by setting DATA input to the base address of the data buffer and setting LENGTH input to the complete data buffer size.
-
Sequenced calculation:
This means the calculation is split in multiple processing cycles. This could be required for specific reasons of the safety communication protocol. The sequence is started by setting DATA input to the base address of the data buffer and setting LENGTH input to a partial data buffer size (the first part of the complete buffer). The next sequence is done by setting DATA input to [base address of the data buffer + length in the previous sequence] and setting LENGTH input to the next partial data buffer size (and so on). As a result, the CRC calculation can be sequenced in byte-by-byte steps. It is important to call SF_CRC_FINISH function only once after the complete CRC calculation sequence is executed over the complete data block.

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 calculation is performed. Allowed values: 0...7 |
DATA |
DWORD |
16#00000000 |
Memory start address as pointer (via ADR operator) of the data block for which the CRC is calculated. Allowed values: Must be inside the user memory space (in combination with LENGTH input) |
LENGTH |
WORD |
16#0000 |
Length of data block (based on DATA input) for which the CRC is calculated. Allowed values: Must be inside the user memory space (in combination with DATA input) |
VAR_OUTPUT |
|||
SF_CRC_INPUT |
BOOL |
false |
Result of SF_CRC_INPUT function. TRUE: CRC calculation successful. FALSE: Error in CRC calculation, possible reasons:
|
SF_CRC_INPUT_Slot1 := SF_CRC_INPUT(CRC_SLOT1, ADR(DATA_SLOT1), LENGTH_SLOT1);