Choosing synchronization technologies depends on distance between nodes, synchronization accuracy requirements, platform support, technology availability, and more. This article describes synchronization recommendations and the breadth of options on the CompactDAQ platform.
There are two types of synchronization:
The following table compares the synchronization technologies on CompactDAQ, listing the maximum distance allowed between nodes, typical synchronization accuracy, time server requirements, cabling requirements, timestamp support, recommended hardware, and the subsystem that they will synchronize. This table is intended only as a general guideline, and all technologies are explained in more detail below.
Technology | Physical Distance Between Nodes | Accuracy1 | Need Time Server?2 | Cabling | Timestamp? | Recommended Hardware |
Signal-Based | <100 m | Varies (Refer to the Manual) | No | CAT 5E | No | NI-9469 |
IEEE 1588 software-based timestamping (default 1588 profile)3 | Within Subnet | 1 ms | No | LAN | Yes | cDAQ-9132/9133/9134/9135/9136/9137 running NI Linux Real-Time |
IEEE 1588 with hardware assisted timestamping (IEEE 802.1AS or default profile)6 | Within Subnet | <1 µs | No | LAN | Yes | cDAQ-9185/9189 |
SNTP4 | Global (access to NTP server) | 10s ms | Yes5 | LAN | Yes | cDAQ-9132/9133/9134/9135/9136/9137 running WES7 |
1This is an accuracy estimate for a typical system. Accuracy varies depending on the system.
2A time server requirement indicates that you need a time server to synchronize to a global notion of time.
3SW IEEE 1588v2 is supported on only CompactDAQ controllers running NI Linux Real-Time
4(S)NTP is supported on only CompactDAQ controllers. Refer to the Time-Based Synchronization Methods section for more information.
5There are a variety of NTP time servers publicly available on the web. A time server is required for (S)NTP synchronization.
69185/9189 firmware 18.1 or later is required to enable support for IEEE 1588 with hardware assisted timestamping (default profile)
In signal-based synchronization, devices are wired directly together and a master device exports timing signals to slave devices. In this paradigm, all systems acquire together, but one does not necessarily know the data point’s time. Typically, either trigger signals or sample clocks are shared. The following is a list of signal-based synchronization options for CompactDAQ.
The NI-9469 is a C Series module specifically designed for sharing clocks and triggers between chassis. It has a software-configurable, multiport interface that enables distribution of triggers and clocks from a host chassis, and it has an onboard DDS and PLL for clock generation and synchronization capabilities.
For sharing the triggers and clocks, the NI-9469 has three RJ45 connectors on the front panel, which use standard CAT 5E cabling to pass DIO signals to other NI-9469 modules. Although this is standard Ethernet cabling, these modules only pass timing signals and cannot provide general communication. Each port is software-configurable and can drive or receive four differential signals through the cable.
The NI-9469 was also designed to synchronize modules with simultaneous delta-sigma analog-to-digital converters (ADCs) for high-channel-count systems that require more than one chassis. Delta-sigma modules require a separate oversample clock to operate. Delta-sigma modules are also referred to as DSA devices and include accelerometer and microphone data. Each delta-sigma module has an onboard clock for normal operation that is physically routed through the CompactDAQ chassis to synchronize all delta-sigma modules within a single chassis. For multichassis systems, the NI-9469 generates the required oversample clock for delta-sigma modules and routes it to both the local CompactDAQ chassis and any other CompactDAQ chassis connected by an NI-9469.
The NI-9469 module allows for a flexible network topology. Refer to the NI-9469 Getting Started Guide for more information on the possible network topologies.
The NI-9469 is supported on both CompactRIO and CompactDAQ platforms. However, it is not possible to interface the NI-9469 with the PXI platform. For example, the Ethernet port on the PXI-6683H timing module does not interface with the NI-9469.
It is also possible to manually import and export timing signals through digital I/O C Series modules or the integrated BNC/SMB PFI lines included on some CompactDAQ chassis/controllers using the NI-DAQmx driver to route the signals. With this method, the DIO/PFI lines can be connected to route triggers and timing signals. Using NI-DAQmx, these signals can be exported from a master task by using the NI-DAQmx Export Signals Property Node. The other tasks in the nonmaster chassis then need to be configured to have the sample clock and start trigger inputs use the DIO/PFI terminals as the input to accept the signal.
Below is a simple example where sample clock and start trigger are being routed to the BNC ports on the CompactDAQ chassis, which has the master task. The example also shows the slave task using the BNC ports from the slave CompactDAQ chassis as the input terminals for the sample clock and start trigger, which receive the signals from the master task.
Figure 1: Example of a sample clock and start trigger being routed to the BNC ports.
In time-based synchronization, all system components have a common reference to time. It is more scalable than signal-based synchronization as more devices are added to the system. The data from the new device can be correlated with other devices on the system once the system is synchronized to a time source.
There are two central software APIs for time-based synchronization on CompactDAQ:
IEEE 1588, also known as the Precision Time Protocol (PTP), is an Ethernet-based synchronization method designed for cabled, local networks. The benefit of IEEE 1588 is that it allows you to synchronize your targets over a standard network. It works by determining a master clock automatically from the network and having all other clocks slave to this master clock. IEEE 1588 is also a relatively fault-tolerant synchronization option. If the master clock is disconnected from the network, a new master is dynamically determined. For a detailed description of the protocol, refer to the white paper, Introduction to Distributed Clock Synchronization and the IEEE 1588 Precision Time Protocol.
IEEE 1588 has many different profiles, each of which use different features. Because the profiles are not interoperable with each other, make sure you are aware of which profiles your device supports
All CompactDAQ controllers based on NI Linux Real-Time support a software implementation of IEEE 1588v2 through the NI-TimeSync driver. After the driver is installed, you can connect multiple CompactDAQ controllers over any standard Ethernet network, and they automatically synchronize their system clocks. TSN-enabled Ethernet CompactDAQ chassis with firmware 18.1 or later installed also support IEEE 1588v2. The typical accuracy of this type of synchronization between controllers is about 1 ms. Although there is no specific network hardware (Ethernet switches) required to support IEEE 1588v2, an IEEE 1588v2-enabled switch is recommended to obtain the best synchronization performance. These switches mitigate the impact of network loading that can adversely affect synchronization on standard switches.
To enable software-based IEEE 1588v2 synchronization on your CompactDAQ controllers running NI Linux Real-Time, you need to install NI-TimeSync on each controller. This can be done through the software installation process in Measurement & Automation Explorer (MAX). IEEE 1588v2 settings for NI Linux Real-Time targets need to be configured through file modifications. For details on configuring and monitoring the IEEE 1588v2 synchronization status on NI Linux Real-Time, refer to Using NI-TimeSync to Configure IEEE 1588 and 802.1AS Time References.
TSN-enabled CompactDAQ chassis with firmware 18.1 and later support HW IEEE 1588v2 (default profile). HW IEEE 1588v2 (default profile) is compatible with SW IEEE 1588v2, but is not compatible with the 802.1AS profile. HW IEEE 1588v2 (default profile) features greater accuracy due to hardware timestamping, but is otherwise the same protocol as SW IEEE 1588v2.
A newer PTP profile within IEEE 1588 is IEEE 802.1AS, which was selected for time synchronization within Time Sensitive Networking (TSN). TSN is a series of additions and updates to the IEEE 802.1 standard, which is a local area networking standard for bridges. One of the aspects of TSN is defining a global sense of time between network components within the TSN subnet. Both the 4-slot cDAQ-9185 Ethernet chassis and the 8-slot cDAQ-9189 Ethernet chassis use this PTP profile to provide time-based synchronization across the network. The typical accuracy of this type of synchronization between chassis is less than 1 μs, but this can be greatly reduced to the 100s of nanosecond range, depending on the configuration of the system. To synchronize these chassis, you can daisy chain them together, creating a line topology, with just Ethernet cables. For other topologies where they are not daisy chained and you want to have all the chassis synchronized, you must use an IEEE 802.1AS-compliant switch between the devices.
These chassis leverage the addition of the time-based synchronization features in NI-DAQmx to be able to now configure certain triggers and timestamps to be specified in terms of time of day. The IEEE 802.1AS-2011 profile is already enabled on these CompactDAQ Ethernet chassis, so to use this feature, all you need to do is install your application software and the NI-DAQmx driver.
Default IEEE 1588v2 profiles are not compatible with the 802.1AS profile.
SNTP is a time synchronization method for clocks located on the Internet. The current time is obtained from public NTP servers. It uses a distributed network of NTP servers and synchronizes clocks within the network to national time standards over Ethernet. NTP and SNTP are indistinguishable from each other on the network level. SNTP has a smaller footprint in terms of memory and CPU usage while still being good enough to achieve system clock synchronization for typical desktop usage. Many industries, such as government and oil, prefer (S)NTP because it is a mature and well-tested standard that requires only a network connection. The major trade-off with (S)NTP is that it is less accurate than the other time-based technologies described in this article. It has typical accuracy on the order of tens of milliseconds. (S)NTP is not officially supported on LabVIEW Real-Time targets, but there are methods to enable it, as described below.
On CompactDAQ controllers based on NI Linux Real-Time, NTP can be enabled using an open-source Linux NTP daemon. Documentation on the NI Developer Community details how to install this daemon to an NI Linux Real-Time target. Note that you should not install NI-TimeSync to your target if you choose to use this daemon. Both NI-TimeSync and this daemon adjust system time, and your systems may not synchronize properly if both NI-TimeSync and the NTP daemon are attempting to modify time on the target
For TSN-enabled Ethernet CompactDAQ chassis using NI-DAQmx 18.1 or later, there must be at least one IEEE 1588 or IEEE 802.1AS time reference running for NI-DAQmx tasks to start. Because running (S)NTP and NI-Timesync cannot run at the same time, (S)NTP time references cannot be used on TSN-enabled Ethernet CompactDAQ chassis using NI-DAQmx 18.1 or later.
Synchronization Type | Technology | Multislot USB CompactDAQ Chassis | Multislot ENET CompactDAQ Chassis | CompactDAQ Controllers Running WES7 | CompactDAQ Controllers Running NI Linux Real-Time |
Signal-Based | NI-9469 | ||||
Manual Routing With Digital I/O or PFI Lines | |||||
Time-Based | HW IEEE 1588v2 (default or 802.1AS) | — | 1 | — | — |
SW IEEE 1588v2 | — | — | — | 2 | |
SNTP | — | — | —3 |
1IEEE 802.1AS-2011 synchronization is supported on the following Ethernet CompactDAQ chassis: cDAQ-9185 and cDAQ-9189. IEEE 802.1AS-2011 synchronization is also supported on CompactRIO with NI-DAQmx controllers allowing you to create distributed synchronized systems with a mix of devices.
2SW IEEE 1588v2 synchronization is supported on only the following CompactDAQ controllers based on NI Linux Real-Time: cDAQ-9132/9133/9134/9135/9136/9137
3There is currently not an NI-supported method for enabling (S)NTP on CompactDAQ controllers running NI Linux Real-Time, but there are open-source options available. See the (S)NTP section above for more details.
The mark LabWindows is used under a license from Microsoft Corporation. Windows is a registered trademark of Microsoft Corporation in the United States and other countries. The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a worldwide basis.