F_BYTE_TO_CRC16_CCITT

F_BYTE_TO_CRC16_CCITT 1:

The function "F_BYTE_TO_CRC16_CCITT" can be used to determine a 16-bit CRC CCITT (cyclic redundancy check) for individual data bytes.

The generator polynomial used: Name: CRC-16 CCITT

FUNCTION F_BYTE_TO_CRC16_CCITT: WORD

VAR_INPUT

VAR_INPUT
    value   : BYTE;(* Data value *)
    crc     : WORD;(* Initial value (16#FFFF or 16#0000) or previous CRC-16 result *)
END_VAR

value: The data byte to be converted.

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)