您可以在Modbus TCP消息中保留CRC吗? [英] Can you keep a CRC in a Modbus TCP message?

查看:705
本文介绍了您可以在Modbus TCP消息中保留CRC吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里还有另一个modbus问题,我一直在学习Modbus RTU,觉得自己对此非常了解,现在正在编写将RTU转换为TCP的代码.

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.

今天向我提出的一个问题是,当您从RTU转换为TCP时,您到底可以保留CRC吗?

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?

我知道TCP结构不包含CRC,但是我不确定为什么吗?

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 :)

推荐答案

CRC并不是必需的,主要是因为TCP/IP运行在已经检查了消息完整性以防止随机错误的协议之上.

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成帧不包括CRC,因为CRC是ADU(应用程序数据单元)的一部分,特定于MODBUS RTU.如果您的实现遗忘了,那么您将不再实现MODBUS TCP,也不会与作为MODBUS TCP端点的端点进行互操作.

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.

这篇关于您可以在Modbus TCP消息中保留CRC吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆