Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
536 views
in Technique[技术] by (71.8m points)

synchronization - Synchronize a Windows program with external Data Acquisition systems which lack Real Time Clocks

Given this scenario: A Windows program that captures data from multiple external data capture instruments that lack a Real Time Clock (actually any clock and NTP capabilities), but do have accurate internal tick counters (to 100 nanosecond increments). The external devices are configured via a GIGE link, and transmit their acquired info via same. The transmitted info can be considered 'block' transfers, and can also include metadata such as the start time of the data capture by referencing their own internal tick counters.
The external data collection devices are triggered externally and continuously with the same trigger signal applied to all data acquisition devices. However the Windows program has specific start/stop requirements, and must align the data from all of the data collection devices (2 to 4 devices) to each other for each test run.
There are several issues:

  • Due to OS & communications stack processing and ethernet realities, the start command from the test program arrives at different times at the devices.
  • Packets over GiGE can be lost at higher acquisition speeds, but synchronicity from different devices must be maintained over the length of the test. Essentially the system needs to re-align itself in case of errors.
  • The acquired block data can be timestamped internally from that devices internal tick counter, but the individual data devices internal counters cannot be reliably synchronized with each other in any manner other than externally.

It is thought that one could query the each devices counter through an interface API, but it would have to be marked to the Windows 10 systems time (that's the only reference that we actually have). Repeat for each attached data system, then create a function or table so that each received packet could be placed at a point that corresponds to the system time, there by achieving data packet synchronization.
Marking the device counter time to Windows time is the tricky part, analogous to NTP or PTP, but here the acquisition devices are not resetting their own time to a reference, as it must be done on the windows host side.
We would be surprised if this problem hasn't been observed before so we ask: Are there any algorithms or procedures in academia or practice that we could work off? The algorithms used by NTP and others don't seem to fit here.

question from:https://stackoverflow.com/questions/65835075/synchronize-a-windows-program-with-external-data-acquisition-systems-which-lack

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...