CANopen系列文章【1】--SYNC【3】


前两篇文章写的已经涵盖了大部分内容,事实上仍有一部分没有说清楚。所以寄希望于DS301的部分内容能把这部分内容讲清楚。

9.3.1  Transmission of Synchronous PDO Messages 
Synchronous transmission of a message means that the transmission of the message is fixed in time 
with respect to the transmission of the SYNC message. The synchronous message is transmitted 
within a given time window with respect to the SYNC transmission, and at most once for every period 
of the SYNC. 
In general the fixing of the transmission time of synchronous PDO messages coupled with the 
periodicity of transmission of the SYNC message guarantees that devices may arrange to sample 
process variables from a process environment and apply their actuation in a co-ordinated fashion. 
A device consuming SYNC messages will provide synchronous PDO messages too. The reception of 
a SYNC message controls the moment when the application will interact with the process environment 
according to the contents of a synchronous PDO. The synchronous mechanism is intended for 
transferring commanded values and actual values on a fixed timely base. 
In general a synchronous PDO with a commanded value will be received before a SYNC. The SYNC 
consuming device will actuate based on this synchronous PDO at the next SYNC message. The 
reception of a SYNC will also prompt a device operating in the cyclic mode to sample its feedback 
data and transmit a synchronous PDO with an actual value as soon as possible afterwards. 
Depending upon its capabilities, a device may also be parameterised with the time period 
synchronous window length after the SYNC at which it is guaranteed that its commanded value has 
arrived. It may therefore perform any processing on the commanded value which is required in order 
to actuate at the next SYNC message. 


Figure 44: Bus Synchronisation and Actuation

=======================================================================

Figure 45: Bus Synchronisation and Sampling



9.3.2  Optional High Resolution Synchronisation Protocol 
The synchronisation message carries no data and is easy to generate. However, the jitter of this 
SYNC depends on the bit  rate of the bus as even the very high priority SYNC has to wait for the 
current message on the bus to be transmitted before it gains bus access. 
Some time critical applications especially in large networks with reduced transmission rates require 
more accurate synchronisation; it may be necessary to synchronise the local clocks with an accuracy 
in the order of microseconds. This is achieved by using the optional high resolution synchronisation 
protocol which employs a special form of time stamp message (see Figure 46) to adjust the inevitable 
drift of the local clocks. 
The SYNC producer time-stamps the interrupt generated at t1 by the successful transmission of the 
SYNC message (this takes until t2). After that (at t4) he sends a time-stamp message containing the 
corrected time-stamp (t1) for the SYNC transmission success indication. The SYNC consumer that 
have taken local time-stamps (t3) on the reception (t1) of the SYNC can now compare their corrected 
time-stamp (t1) with the one received in the time-stamp message from the SYNC producer. The 
difference between these values determines the amount of time to adjust the local clock. With this 
protocol only the local latencies (t2-t1 on the SYNC producer and t3-t1 on the SYNC consumer ) are 
time critical. These latencies depend on local parameters  (like interrupt processing times and 
hardware delays) on the nodes which have to be determined once. The accuracy of this determination 


is implementation specific, it forms the limiting factor of the synchronisation (or clock adjustment) 
accuracy. Note that each node only has to know its own latency time as the time-stamp message 
contains the corrected value t1 and not t2. 
The time-stamp is encoded as UNSIGNED32 with a resolution of 1 microsecond which means that the 
time counter restarts every 72 minutes. It is configured by mapping the high resolution time-stamp into 
a PDO. 
It is reasonable to repeat the clock adjustment only when the maximum drift of the local clock exceeds 
the synchronisation accuracy. For most implementations this means that it is sufficient to add this 
time-stamp message to the standard SYNC once every second. 
This principle enables the best accuracy that can be achieved with bus-based synchronisation, 
especially when implemented on CAN controllers that support time-stamping. Note that the accuracy 
is widely independent of the transmission rate. Further improvement requires separate hardware (e.g. 
wiring). 

Figure 46: Optional High Resolution Synchronisation Protocol






  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值