I am using a protocol that includes a checksum (CRC or simple sum). How can I let Docklight calculate the checksum automatically? How can I validate checksums?

I am using a protocol that includes a checksum (CRC or simple sum). How can I let Docklight calculate the checksum automatically? How can I validate checksums?

Applies to: Docklight / Docklight Scripting (all versions), Article ID: dl_faq016

Docklight and Docklight Scripting support checksum areas for on-the-fly calculation of checksums/CRCs, both for Send Sequences (commands sent) and Receive Sequences (responses received). See the user manual section “Calculating and Validating Checksums” for more details.

In Docklight Scripting you can additionally perform checksum calculations with your script code,
using the “DL.CalcChecksum” method.

Docklight Manual – Calculating and Validating Checksums

Docklight Manual – Sending MODBUS commands with CRC-16 checksum

Docklight Scripting Manual – DL.CalcChecksum method