节点有多少时间来回复?

huangapple go评论52阅读模式
英文:

How much time does a node have to reply?

问题

节点在响应消息方面是否有时间限制?
PDO和SDO消息在响应时间方面是否有区别?
还是这仅取决于主节点的实现方式?

是否有关于这方面的文档?

英文:

Is there a time limit for a node to respond to a message?
Is there a difference between PDO and SDO messages in terms of response time?
Or does this only depend on how the Master gets implemented?

Is there any documentation about this?

答案1

得分: 1

一般情况下,不是这样的。CiA 301规定(附件A,信息性):

> 超时
由于COB可能被忽略,已确认服务的响应可能永远不会到达。为了解决这种情况,一种实现可以在一定时间后向服务用户指示这一点(超时)。超时不是该服务的确认。超时表示该服务尚未完成。应用程序可以处理这种情况。超时值被视为实现特定,不在本规范的范围内。但建议实现提供设施来调整这些超时值以满足应用程序的要求。

此外,CANopen将数据和监督分开,因此应该单独使用Heartbeat协议来检查节点是否存活。

在大多数应用中,实施超时是合理的,特别是在关键任务数据方面。我对于控制系统(汽车/工业)的一般建议是,在PDO生产者上使用PDO禁止时间和事件计时器,以使其每10毫秒或100毫秒定期发送数据。

然后,PDO消费者应具有相应的超时,之后它进入安全模式/错误状态。一些关于安全的协议期望数据在一定时间窗口内到达,既不晚也不早。这一切取决于特定的应用,需要多快做出反应以及是否存在与安全相关的因素。

英文:

Generally, no. CiA 301 says (Annex A, informative):

> Time-out's [sic]
Since COB's may be ignored, the response of a confirmed service may never arrive. To resolve this
situation, an implementation may, after a certain amount of time, indicate this to the service user
(time-out). A time-out is not a confirmation of that service. A time-out indicates that the service has not
completed yet. The application may deal with this situation. Time-out values are considered to be
implementation specific and do not fall within the scope of this specification. However, it is
recommended that an implementation provides facilities to adjust these time-out values to the
requirements of the application.

Furthermore, CANopen separates data and supervision, so checking if nodes are alive should be done with the Heartbeat protocol separately.

It is reasonably in most applications to implement a timeout, especially on mission-critical data. My general recommendation for control systems (automotive/industrial) that is used to steer some manner of machine or is otherwise safety-related, is to use PDO inhibit time and event timer on the PDO producer, to have it send out data cyclically every 10ms or 100ms.

And then the PDO consumer should have a corresponding timeout after which it enters a safe mode/error state. Some safety-related protocols expect data to arrive within a certain time window even - neither too late nor too early. It all depends on the specific application, how fast it needs to be reacting and if there are safety-related aspects or not.

huangapple
  • 本文由 发表于 2023年2月6日 15:38:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75358504.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定