F_DATA_TO_CRC16_CCITT

F_DATA_TO_CRC16_CCITT 1:

The function "F_DATA_TO_CRC16_CCITT" performs a 16-Bit-CRC-CCITT (cyclic redundancy check) of any data. Internaly the function F_BYTE_TO_CRC16_CCITT is used, refer to the documentation of the  F_BYTE_TO_CRC16_CCITT function for further information.

FUNCTION F_DATA_TO_CRC16_CCITT: WORD

VAR_INPUT
    pData   : DWORD;(* Pointer to data *)
    cbData  : UDINT;(* Length of data *)
    crc     : WORD; (* Initial value (16#FFFF or 16#0000) or previous CRC-16 result *)
END_VAR

pData: Address of data buffer.

cbData: Length of data buffer.

crc: Initial value = 16#FFFF or 16#0000 or last CRC.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.10.0 Build > 1340
TwinCAT v2.11.0 Build > 1524

PC or CX (x86, ARM)

TcUtilities.Lib