How do you calculate CRC in ModBus library (TCP/IP)?

I am trying to understand how to use CRC in Modbus extension over TCP/IP
but the method block is only commented with the tittle of the block
smb that could help me?

I would start here

If not enough, use the board's search facilities for 'Modbus'.

firstly, thank u so much.
i ve read this topic yet but its didnt help me.
i am doing a communication with modbus, from the app to a plc modbus tcp server and viceversa.
but i have the problem that when i have bad wifi connection i lost lots of packages and i get the symbol of the pic. i would like to use de crc but i dont know how to implement it with my blocks.
i use UNICODE to transfer data from the server to the app (is the only way that i could make work)
if u can help me i would be greatful.


IMG-20240326-WA0057

Could you post links to the various pieces you are using?

Modbus?

FTP?

AI2 uses UTF-8, for what it's worth.

i didnt understand, link to the pieces?

Links to the documentation on those extensions?

and your library of conversion of from text to decimal and viceversa

Explanation of CRC:

CRC = Cyclic Redundancy Check, one of a bunch of ways of scanning a list of bytes and generating a checksum to be transmitted independently of the list of bytes, to check if the list of bytes got corrupted on route. There are different flavors of checksum, sensitive to different combinations of byte errors (transposition, erasure, bit changes, tampering, etc.) and generated by different algorithms.

To send a byte list error free, generate a CRC code (16 or 32 bits, depending on the algorithm) and make it accessible to whoever is reading your byte list. To read some one's byte list, grab their CRC code and try to generate the same code on the received byte list. If your code doesn't match their code, there was a transmission error or their byte list got corrupted.

That's a problem.

My text conversion samples only cover the ASCII code range, 0-127.

So now it's time for you to post YOUR ,aia file and sketch. (no promises, I have not used this extension)