From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MATCHING GPS AND PC CLOCK

Hello.
I have a GPS Encore connected to my PC and I´m getting
the time information of the GPS in LABVIEW. I want to match
the PC clock to the reading I get from the GPS. How
do I do it in LABVIEW?? Is there a command so I can set
the PC clock time at my owne will??

Thanks in advance

Jony


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 1 of 4
(2,739 Views)
In article <2750ac20.5f23a5b3@usw-ex0107-042.remarq.com>,
jony wrote:
> Hello.
> I have a GPS Encore connected to my PC and I´m getting
> the time information of the GPS in LABVIEW. I want to match
> the PC clock to the reading I get from the GPS. How
> do I do it in LABVIEW?? Is there a command so I can set
> the PC clock time at my owne will??
>
> Thanks in advance
>
Yes, you could for sure.

See the following threads:

http://x26.deja.com/[ST_rn=md]/threadmsg_md.xp?thitnum=53&mhitnum=0&CONT
EXT=945203958.567410735&new=0

and

http://x24.deja.com/[ST_rn=md]/threadmsg_md.xp?thitnum=55&AN=556958138.1
&mhitnum=1&CONTEXT=945205124.246349913

They may help you.

>

--
G. Chen
Ph.D. Candidate
Ohio Univeristy, Athens, OH
Nothing can di
m the light which shines from within.


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 2 of 4
(2,739 Views)
This is relatively straight forward:
Get a Call library function (from the advanced menu).
Right click and go to configure.
A pannel will appear, starting at the top:
Library: C:\windows\system\kernel32.DLL
Function name : SetSystemTime
Calling convention : StdCall (WINAPI)

Below this there will be a parameter called Return - rename this ERROR.
Set the parameter details to Numeric and Signed 32bit Integer. If the returned value is NON zero, the command was successfull.

Click Add Parameter.

A new parameter will appear called arg1 - rename this to SYSTEMTIME.
Set the type to 'Adapt to type', and the value to 'Handles by Value'.

Finally, set the function to be REENTRANT (top right listbox).

You can now press OK.

The Call Library function will have changed to refle
ct the configuration.

The SYSTEMTIME variable is a cluster of 8 signed 16bit integers. To set the time, the values should be as follows:

Year (yyyy)
month
Day of week (ignored - windows decides this)
Day
Hours
Minutes
Seconds
Milliseconds

Happy programming

Chris
0 Kudos
Message 3 of 4
(2,739 Views)
This works great!

Only in WinXP the dll is located in
C:\windows\system32\kernel32.DLL

Thanks
0 Kudos
Message 4 of 4
(2,738 Views)