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.
pMemoryBlock |
DWORD |
Address of memory area |
uiLength |
UINT |
Size of area in bytes |
MEM.CRC16_Modbus |
WORD |
Check sum |
Example:
sTest : STRING(10) := '123456789' ;
->
MEM.CRC16_Modbus(ADR(sTest), 9) = 16#4B37