CRC16_Modbus (FUN)¶
FUNCTION CRC16_Modbus : WORD
Function calculates the Modbus CRC16 checksum. Deviating from the initial value generally used the check sum will be initialized with 16#FFFF.
Example:
sTest : STRING(10) := '123456789' ;
->
MEM.CRC16_Modbus(ADR(sTest), 9) = 16#4B37
- InOut:
Scope
Name
Type
Comment
Return
CRC16_ModbusWORDfunction returns the Modbus CRC16 checksum of “MemoryBlock”
Input
pMemoryBlockPOINTER TO BYTE
address of memory Block
uiLengthUINTlength of MemoryBlock in byte