This function of the
⇘
CAA_Memory.library calculates the Modbus CRC16 check sum. Deviating from the initial value generally used the check sum will be initialized with 16#FFFF.
Input:
pMemoryBlock
|
DWORD
|
Address of memory area
|
uiLength
|
UINT
|
Size of area in bytes
|
Output:
MEM.CRC16_Modbus
|
WORD
|
Check sum
|
Example:
sTest : STRING(10) := '123456789' ;
->
MEM.CRC16_Modbus(ADR(sTest), 9) = 16#4B37