Problem with CRC calculation

I rummaged around my old projects, and found this old conversion routine.
I don't know if it matches your flavor of CRC16, though.
global ubytes global xA001 MODBUS_CRC16.aia (5.5 KB)

P.S. These blocks can be dragged directly into your Blocks Editor workspace.

See A way to group projects by theme - #10 by ABG
for a demo.