Note: This is an older example. Consider using the IEEE 1588 Precision Time Protocol for your synchronization needs.
Introduction to Distributed Clock Synchronization and the IEEE 1588 Precision Time Protocol
Overview
This example describes a library that provides better timing accuracy and precision for distributed LabVIEW applications by distributing the timebase process to the networked nodes. The distributed timebase has several potential applications but it is most commonly used to time stamp data and events at the I/O nodes.
Background
When data values and events are are to be monitored or logged they must be time stamped so that they can be correlated in time for display or analysis. For distributed applications, the traditional method is to transmit the data to a central computer where it is time stamped using the computer’s clock. This centralized approach works well for applications where the timing uncertainty created by network and processing latencies are acceptable.
For distributed applications that require millisecond-level precision and accuracy, the distributed timebase (DTB) library provides a simple tool for synchronizing the local timebase on each I/O node.
The DTB library also addresses the following requirements for distributed system synchronization:
Implementation
The distributed timebase (DTB) library is implemented as two processes. The time reference process can run on any network node. It generates a UDP packet once per second containing the master time value.
The timebase process runs wherever a synchronized local timebase is required (typically on I/O nodes).
The time reference and timebase processes are based on the LabVIEW millisecond tick timer, which is a relatively stable and reliable timing source that is available on most LabVIEW targets.
Programming Interface - Using the DTB
The DTB library includes 5 public VIs.
Examples
The following examples demonstrate how to use the DTB library VIs.
Time Reference Application
The time reference process can run as part of the application on any network node. There should only be one active time reference process in the system. The Time Reference VI runs in parallel with other application code. It can be dropped outside of other programming structures on the diagram of the top level VI.
The Abort Time Reference VI is used in the cleanup phase of the application code to terminate the time reference process.
I/O Node Application
The Timebase VI runs in parallel with other I/O node application code. It can be dropped outside of other programming structures on the diagram of the top level VI.
The Abort Time Reference VI is used in the cleanup phase of the application code to terminate the Time Reference process.
Limitations
There are a few limitations that you should be aware of when using the DTB library.
Additional information on features and licensing are available in the ReadMe file.
Feedback
This example was created by the NI Systems Engineering group. You can give us feedback by posting questions and comments below.
References
Choosing a CompactRIO Synchronization Technology
Configuring IEEE 1588 Synchronization with the NI PXI-668x Timing and Synchronization Module
Configuring GPS Synchronization with the NI PXI-668x Timing and Synchronization Module
Always interesting to see a new reference design.
What is the advantage of this though over PTP?
Actually this is an older example that was moved from Developer Zone (ni.com) to NI Community. You are correct that PTP is probably the synchronization preferred method at this point. I will add a note to this effect.