Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

GPS time format

Hi..
I am using NAVILI>CK GPS for our work related to Laser radar data aquisition. Through the simple code attached, I can read the time stamp in the way 12:23:45 (say UTC, hh:mm:ss). But I want to have the time stamp as 12:23:45.7653 (see change in the ss stamp). How to generate this?
Pls post your reply
Regards
Sandy
0 Kudos
Message 1 of 10
(6,348 Views)
Hi..
Here is the attached file
Sandy
0 Kudos
Message 2 of 10
(6,340 Views)
Hello Sandy,

as I can see in your programming, you retrieve the timestamp  information from your GPS device via the serial port. Can you configure the device to send the millisecond information you need?
Otherwise you would have to generate your own timestamp in LabVIEW. Maybe you can use the VI "Tick count (ms).vi" out of the time&dialog palette to get the ms information. This VI is reading out an internal timer and displaying the result in milliseconds. You could calculate an offset from a starting point of the measurement and add the information to the timestamp you get from your device. Generating a timestamp beyond the millisecond resolution is tricky on windows systems, because 1ms is the smallest unit in software timing. You would need a counter signal or some other kind of hardware you could use to time your loop.

Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 3 of 10
(6,326 Views)
Hi..Ingo Schumacher
Thanks a lot. If I could understand you properly, then I have to calculate the start time in milli-second and then calcuate the offset by subtracting it from milli-second timer.Well,  I want only  a precision of second like 31.33, 31.66 and 31.99 second like this.. Can you pls correct me.
Regards
Sandy
P.S: Earlier we used the time stamp from the processor and now we want to use the GPS time at every data file. Unfortunately the GPS device does not create the ss.sss precision.
0 Kudos
Message 4 of 10
(6,319 Views)
Hello Sandy,

yes, this is what I meant. What you also can do, instead of calculating the difference, is to use the quotient and remainer function to divide the timervalue by 1000. The remainder output will then give you a value between 0 and 1000, corresponding to the ms in a second. You would only have to add this value to your timestring.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 5 of 10
(6,307 Views)
Hi..
 I modfied the vi (attached) according to your idea. Did you mean to divide the timervalue by 1000, that time value is in Second? If second , then my vi may be correct to get the milli-second. But it still gives me the data as the time stamp 12:23:34.345,12:23:34.345,12:23:34.345 (as hh:mm:ss.sss) and then the sss changes. Do you think, is there again any problem in my modified vi?  Or something wrong with the Serial Communication?
Pls do reply
Sandy
0 Kudos
Message 6 of 10
(6,303 Views)
Sorry..again forget to attach
Sandy
0 Kudos
Message 7 of 10
(6,303 Views)
Hi,

have a look at the attatched VI. I had to remove the Serial VIs and added string controls so I could test it.
But it should explain more clearly what I meant.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 8 of 10
(6,294 Views)
Hi..
Thanks a lot..It works out the HH:mm:ss.sss
Regards
Sandy
0 Kudos
Message 9 of 10
(6,291 Views)

Hi Sandy,

 

Sorry to disturb you. Just now i have the same question as you. i want to use the serial port to read the GPS time in HH:mm:ss.sss. i saw you have figured it out, so I just wonder how did you achieve that? Thanks very much for your help!

 

Best regards,

Henry

0 Kudos
Message 10 of 10
(5,139 Views)