LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT app needs system time from Windows PC

I have an RT PXI controller, and I am wondering the best way to get a networked PC's system time so I can periodically sync to it (in a controlled way, such as when RT system is idle).

 

Obstacles:

The PC is not running any LabVIEW code, so no PC publishing time to network shared variable stuff

The code on the PC is legacy C# code that I cannot modify to include timestamp messaging between systems

The PC and attached RT PXI are network isolated, so no using a domain controller time service

 

 

My only solution to get the time from this generic windows PC (assume WinXP or newer) is to install an NTP time service on it that I can query via UDP from the RT application.  I have done this before, but it just feels unsatisfactory.

 

Anyone else solve this problem before?

0 Kudos
Message 1 of 3
(2,376 Views)

Hi,

 

You might try using NI-TimeSync to synchronize the system time of your RT target.  It sounds like SNTP support for NI-TimeSync could help you out:

NI-TimeSync: SNTP Support

 

If you end up rolling your own NTP support, you should concider using the custom time reference to adjust time on your RT target.

NI-TimeSync: Custom Time Reference

 

Hope this helps,

-Tyler

 

 

0 Kudos
Message 2 of 3
(2,357 Views)

Unforunately that project is old and appears abandoned.  TimeSync drivers have left it behind.

 

Much more importantly, that has a terrible bug.  I used it on cFP controllers and when it can't reach the time server, instead of doing nothing it sets the system time to some random time and date, possibly years away.

 

 

0 Kudos
Message 3 of 3
(2,326 Views)