LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows time service

Hi all, 

 

Windows has the ability to obtain and set the time on my PC.

 

I'm wondering if I can use this (service?) in my apps to check the internet time.

 

I have read something about the w32time.dll and the NetApi32.dll, am I on the right track?

 

Does anyone know how to or has anyone done this?

 

Cheers,

 

Battler.

0 Kudos
Message 1 of 8
(4,328 Views)

check this.

 

Use systemexec in LabVIEW.

 

Mathan

Message 2 of 8
(4,326 Views)

Check out this link you may get some idea

 

Post back for queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 3 of 8
(4,302 Views)

This link provides command line arguements check out.

 

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 4 of 8
(4,300 Views)

That's great, thanks for the useful links (especially the last one).

 

What I am trying to do is to create a VI wich compares the local computer time (obtained using the get date and time.vi) with the internet time.

0 Kudos
Message 5 of 8
(4,278 Views)

CheersSmiley Happy

 

You might need to create a sequence of operations like register->resync->set time.  A small study on the commands given in the table will reveal the entire activity required.

 

Kindly post when you have acheived it.

 

Post back for queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 6 of 8
(4,271 Views)

Done a lot of reading on this issue.  I dont believe the w32tm.exe (any of the command line arguments or registry entries) will serve my purpose.

 

What I need to do is check whether the date set on a customers PC matches the internet time.  I was hoping to use the inbuilt Windows time services to do this for reasons of reliability etc. 

 

There is also the Windows NET TIME utility but I cannot get it to work.  Does anyone know anything about it (I have specific questions about the commands but don't have my notes with me - i.e. /domain<computer>)?

 

The only other way I can do it is a simple TCP/IP call to NIST server.

 

What do people think is the best way to do this?

0 Kudos
Message 7 of 8
(4,215 Views)

I don't want (or wont be able) my application to synchronise the system clock, just to check what it should be.  My app will handle what to do if the computer time varies from the internet time.

 

Since my app will be deployed to Windows Vista I don't believe it will have the proper authority to change the clock setting anyway.  True?

0 Kudos
Message 8 of 8
(4,214 Views)