To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Demonstrates how to use the specified instrument GPS time to set the system clock to that value.
Description
This VI programmatically sets the time reference and displays the time reference properties continuously. When setting the time reference to IRIG you'll need to indicate the type of IRIG being used. For IRIG or PPS you will need to indicate the time reference terminal.
It collects the GPS time through the PXI-6682 and then sets the system clock to that value. If on RT, it saves this change to the system (not necessary for Windows) and then displays both the GPS time used and the System time so that you can confirm synchronization. It also gives you the option to set the Windows OS clock through calling into the kernel32.dll.
Requirements
Software:
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi. The alppication isn't working on my computer in RT mode. I have some errors:
Can you help me eliminate the error?
Hi Peter_W. Should the program change the computer's time in "window" position? If so, it does not. Why? Why?
Hey Mikosim,
I had received a couple of requests regarding that recently so I updated the code. The controller system time and the Windows OS clock aren't the same thing, but the code now has a button to set the windows time as well. Give it a test run and let me know if you still have any issues.
Best Regards,
Peter W.
Hi Peter_W. Thank you for yours solution. It work!
Hi Peter,
Do you have a copy of the code that update the pc clock? I downloaded the example at the top of the page but I get the same problem as Mikosim.
Regards,
LizAsh