LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Realtime PXI SetSystemTimeAdjustment

Hi all,
  I'm trying to adjust the clock time on a group PXI-8106s to sync them up to within a few milliseconds, 5-10 mS would be fine. The correct function call (to kernel32.dll) is: SetSystemTimeAdjustment() along with some possible privilege settings to be allowed to set time.

   Has anyone already done this?, especially any issues with privilege adjustments? I thought I would ask before diving in myself, as we are kind of pressed for time (who isn't these days;-) and there is no budget for a hardware based solution (whose accuracy we don't need anyway, 5-10 mS or close is fine) such as IRIG, etc.

Thanks!
0 Kudos
Message 1 of 3
(3,155 Views)
Hi Imaginatics,
 
I haven't tried this myself. I did find these details on the Microsoft website. You might also want to check this Knowledge Base on using the Net Time Command on a PXI Controller. Hope this helps
Regards,

Hillary E
National Instruments
0 Kudos
Message 2 of 3
(3,134 Views)
Hi Hillary,

Thank you for your reply ( and also to Christian Loew for a private reply ).  I think the SetSystemTimeAdjustment() function should be pretty simple to call directly using the Call Library node. However, it references having to get privileges to set time first and that requires a call to the AdjustTokenPrivileges() function along with some handles to data structures, etc, which looked to me like it would need another intermediate DLL to package up the LabVIEW simple data types into the correct structures, make the call etc, like what the settime.dll does for the RT Set Date Time utility does.

I was hoping someone had already done this, as my C is rusty and C++/# non-existent.

Thanks again for the quick reply!

Mike Ashe
Imaginatics


Message Edited by Imaginatics on 02-28-2008 07:54 PM
0 Kudos
Message 3 of 3
(3,130 Views)