Example Code

Synchronize PXI Time to PCs system on Windows using nisyscfg module

Code and Documents



Demonstrates how to programmatically synchronize PXI Time to PCs system by calling the SetSystemTime function from the Windows' kernel32.dll.

This Code used nisyscfg module in LabView.



First, this program initializes Target, then create a filter to only obtain hardware resources. The program finds all hardware (devices and chassis) in the system and obtains and displays hardware properties.

The program defines Format Date/Time (UTC format specifies if the output string is in Universal Time or in the configured time zone for the computer). Then set the date/time to this pc by Call SetSystemTimeFunction from Kernel32.dll. 




LabVIEW 2015 (or compatible)

Steps to Execute Code

1. Run LabVIEW as Administrator.

2. Click the 'Change Time' boolean to change System Time.
3. Select Target.
4. Run the program.


Additional Information or References


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.