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.
Return value
Name | Type | Description |
---|---|---|
F_DATA_TO_CRC16_CCITT | WORD |
|
Inputs
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
Name | Type | Description |
---|---|---|
pData | POINTER TO BYTE | Address of the data buffer. |
cbData | UDINT | Length of the data buffer. |
crc | WORD | 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) |