Can you keep a CRC in a Modbus TCP message?

寵の児 提交于 2019-12-13 05:20:14

问题


Another modbus question here, I've been learning Modbus RTU and feel that I have a pretty good grasp on it and am now writing code to convert RTU to TCP.

A question that was brought up to me today was, when you are converting from RTU to TCP, can you leave the CRC on the end?

I know that the TCP structure does not contain a CRC but I'm not sure why?

Any insight to this would be quite helpful :)


回答1:


The CRC is not necessary mainly because TCP/IP is running on top of protocols that already check message integrity against random errors.

MODBUS TCP framing does not include the CRC, since the CRC is the part of the ADU (application data unit) that is specific to MODBUS RTU. If your implementation left it in, you're not implementing MODBUS TCP anymore and you won't interoperate with endpoints that are MODBUS TCP endpoints.



来源:https://stackoverflow.com/questions/33762798/can-you-keep-a-crc-in-a-modbus-tcp-message

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!