IEEE 1588 Pulse Per Second (PPS) Synchronization Reference Example for LabVIEW RT and Windows
Overview
This example shows how to synchronize the timebase on a windows machine with an RT machine using Pulse Per Second (PPS). This particular example is designed for use with a PCI 1588 device in the Windows machine and a PXI 6682 in the RT machine. The program first configures the PPS signal and waits until the 2 device are synchronized. Then it calculates the offset between the 2 clocks so that the absolute time is synchronized.
Downloads
Filename: win_rt_sync.zip
Requirements: View
Requirements:
The system should include a Windows computer with a PCI 1588 in it. There should be an RT system with a PXI 6682 in it. There needs to be 2 cables connecting PFI 1 and PFI 2 of the 1588 to PFI 1 and PFI 2 of the 6682 respectively. NI-Sync 3.1 is required for this to work.
Theory:
The Windows machine will start by creating a PPS signal on the 1588. It will export this signal to PFI 1 (or other if changed). This VI will then automatically launch the VI “Start Time Reference.vi” on the RT machine. This VI will start the time base on the 6682 and sync to the PPS signal. Once it is synchronized, it will change the value of a shared variable. The initial VI will see this and create a trigger at a specified time. The RT machine will see this trigger and timestamp it. The two timestamps are then compared to find the offset between the 2 clocks. Now the clocks are synchronized and we know the offset between the 2. Any timestamps associated with data acquisition that are coming from the RT machine can be adjusted by this value so that they are in reference to the Windows Clock.
Instructions:
- First configure the hardware as described above.
- Next you will have to configure your PXI RT system in the project. In the project, Right click on the RT machine and select properties. Here you can change the IP address to whatever the IP address of the RT machine is. You can also change the resource name if you would like. Still in the properties window, click on VI Server: Configuration. In here you will have to enable TCP/IP by clicking the check box.
- Make sure that the “Start Time Reference.vi” VI is listed under the RT target in the project.
- Right click on the RT target and select Deploy All. If it prompts you to save, select yes.
- Open the VI called “Top Level.vi” and enter the appropriate values in the fields.
- Run this VI.
- If everything is configured correctly, it should display an RT time, a Trigger sent time, and an RT-Win Time offset. This should take around 5 seconds and if it takes much longer, there will be a time-out error. Once these values are returned, that means that the 2 systems are synchronized. From here data acquisition can be done. See the comments on the block diagram for instructions on how to integrate DAQ.
- Click the stop button to stop the program.
- If any changes are made to the VI on the RT system, make sure you deploy all again before trying to run the program.
Requirements
Filename: win_rt_sync.zip
Software Requirements
Application Software: LabVIEW Full Development System 8.5.1
Language(s): LabVIEW
Hardware Requirements
Hardware Group: PXI/CompactPCI, Real-Time (RT)
Hardware Model: PCI-1588, PXI-6682
Driver: NI-Sync 3.0
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
