CRC16
Inputs
IN : STRING character string
Outputs
Q : INT CRC16 calculated on all the characters of the string.
Remarks
In FFLD language, the input rung (EN) enables the operation, and the output rung keeps the same value as the input rung. In IL "Instruction list" This is a low-level language and resembles assembly language, the input parameter (IN) must be loaded in the current result before calling the function.
The function calculates a Modbus ModBus is a serial communications protocol and is now the most commonly available means of connecting industrial electronic devices. ModBus is often used to connect a supervisory computer with a remote terminal unit in supervisory control and data acquisition (SCADA) systems. Versions of the ModBus protocol exist for serial port and Ethernet (it is widely used with TCP/IP over Ethernet) CRC16, initialized at 16#FFFF value.
ST Language
Q := CRC16 (IN);
FBD Language
FFLD Language
(* The function is executed only if EN is TRUE *)
(* ENO is equal to EN *)