Time Synchronization Protocols in NI-Sync
A time synchronization protocol is a specific set of standards that enables clocks distributed amongst different systems to maintain the same notion of time to within a certain degree of precision. PXI modules support four different time synchronization protocols: IEEE 1588-2008, GPS, PPS, and IRIG-B. Linux RT targets support the IEEE 802.1AS time synchronization protocol in addition to the four previously-mentioned protocols.
Each time synchronization protocol follows different standards to encode and transmit time data. Though multiple time synchronization protocols can be running at the same time, only one time synchronization protocol can govern the device's various clocks. NI-Sync timing and synchronization modules support the following time synchronization protocols:
- IEEE 1588-2008—This time synchronization protocol synchronizes a group of device clocks distributed across a network, typically connected via Ethernet, to a single grandmaster device clock within the network. The grandmaster is automatically chosen with the Best Master Clock algorithm (BMCA). Each distributed device runs the BMCA to determine the highest ranking, most accurate device clock on the network. All the slave devices (devices not elected as the 1588 grandmaster) in the network synchronize to the grandmaster clock. If the grandmaster clock leaves the network or is no longer the most accurate clock on the network, the BMCA selects a new grandmaster.
Unlike 802.1AS, 1588 can operate with or without hardware-assisted timestamping features. With hardware-assist, 1588 is typically accurate to within 1 microsecond, and without (known as "software only" mode), it is accurate to within 1 millisecond.
- IEEE 802.1AS—This time synchronization protocol is a simplified standard based on IEEE 1588 that is better optimized for time-sensitive applications. Like 1588, 802.1AS uses the BMCA to determine a grandmaster clock, which then distributes timing information to the other devices in order to maintain synchronization. One of the main differences between 802.1AS and 1588 is that 802.1AS requires 802.1AS-capable network switches and network interfaces providing hardware-assisted timestamping in order to operate. 802.1AS is typically accurate to sub-microsecond precision.
 |
Note The 802.1AS time synchronization protocol can be used only with Linux RT targets. |
- Global Positioning Satellite (GPS)—This time synchronization protocol uses a network of satellites to create a radio frequency-encoded signal that provides time, position, and velocity information. GPS delivers a synchronization precision between the tens and hundreds of nanoseconds, depending on the number of satellites that are visible from your position (at least four satellites must be visible for GPS to function) and the accuracy of the antenna. GPS is the only NI-Sync compatible time synchronization protocol that returns velocity and position information.
- IRIG-B—This time synchronization protocol transmits encoded time data. Each data frame is one second long, and presents the time information in seconds, minutes, and days. LabVIEW and NI-Sync can decode IRIG packets into a readable timestamp format that you can then use to synchronize your devices. IRIG-B has a synchronization precision of tens of nanoseconds, making it one of the more precise protocols available for NI-Sync. To use IRIG-B as an NI-Sync time synchronization protocol, you must have an external IRIG signal generator connected to your module, typically through the PFI0 front panel connector of a time-based synchronization module.
- PPS—This time synchronization protocol is the simplest form of time-based synchronization. Pulse Per Second (PPS) outputs a signal at a high logic level once every second, with the leading edge aligned to the clock's seconds boundary. PPS doesn't contain any information about date, year, or position. You must specify a terminal to receive the PPS signal when you use the PPS protocol.
NI-Sync use the International Atomic Time (TAI) standard to format timestamps. TAI time is not adjusted for leap seconds. You can convert a LabVIEW timestamp to the TAI and 1588 format using niSync Convert Time Stamp to 1588 Time, or a 1588 timestamp to the LabVIEW format using niSync Convert 1588 Time to Time Stamp.