F_DATA_TO_CRC16_CCITT
The function "F_DATA_TO_CRC16_CCITT" can be used to determine a 16-bit CRC CCITT (cyclic redundancy check) for any data. Internally the function F_BYTE_TO_CRC16_CCITT is used.
Further information on the algorithm used can be found in the documentation for the F_BYTE_TO_CRC16_CCITT function.
FUNCTION F_DATA_TO_CRC16_CCITT: WORD
VAR_INPUT
VAR_INPUT
pData : POINTER TO BYTE;(* Pointer to first data byte *)
cbData : UDINT;(* Length of data *)
crc : WORD;(* Initial value (16#FFFF or 16#0000) or previous CRC-16 result *)
END_VAR
pData: Address of the data buffer.
cbData: Length of the data buffer.
crc: Initial value = 16#FFFF or 16#0000 or the last CRC.
Requirements
Development environment |
Target platform |
PLC libraries to be integrated (category group) |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86, x64, ARM) |
Tc2_Utilities (System) |