[time-nuts] labview, gpib, gps , logging data and lost data points!!

Brooke Clarke brooke at pacific.net
Wed Oct 29 15:47:44 UTC 2008

Hi Norman:

The way to do it in LabVIEW is to have a single VI running by itself that's the 
sole connection to the GPS data.  This VI looks for the end of one message AND 
the start of the next message, i.e. for Motorola <CR><LF>@@
Although it's possible for that to occur in the middle of data it only causes a 
hiccup at the beginning and will sort itself out.

Once you have found it, then the characters after the @@ are used to route the 
rest of the packet into a global table.  Note that there may be two or four 
message ID characters for the Motorola receivers.  Once you know which packet 
it is then you know how long it is so start looking for <CR><LF> where it's 
supposed to be then keep looking in case there's been some character stuffing.

Now you can have another VI running in parallel that just reads the global 
table of packets and processes each one (calls the @@ VIs).  This can be 
greatly simplified since the same VI can read many different packets because 
they all have the same number of variables of the same data types.  So you end 
up with a VI named for each @@ message and those call generic VIs that read the 
global table.

I did this many years ago to compare a hardware 1 PPS sawtooth corrector with 
the software method.

Have Fun,

Brooke Clarke, N6GCE
http://www.prc68.com/P/Prod.html  Products I make and sell
http://www.prc68.com/Alpha.shtml  All my web pages listed based on html name
http://www.prc68.com/I/WebCam2.shtml 24/7 Sky-Weather-Astronomy Web Cam

Norman J McSweyn wrote:
> Hi!
> I'm logging data from an HP 5335a (using it as a time interval counter). 
> and from a Motorola gps board ( text data).
> The test setup is comparing the 1pps output from the gps board to a 
> divided (Thank you Dave Partridge!!!!!!) down 10 MHz from a Trimble 
> Thunderbolt. The text data is used to post process the measurement from 
> the 5335a reflecting the 1pps error (+/- 15E-9). The ver is LV 8
> Code description:
> Each instrument has it's own VI and I run them simultaneously, 
> collecting data and storing it in text files. The individual vi's are 
> for loops with the iterations being the number of seconds that I want to 
> log. Inside the loop is obviously a delay. The data is time stamped with 
> seconds enabled.
> The problem is that somewhere in the 40k data points some (not all at 
> the same time or sometimes one here and there or sometimes a bunch at 
> once) aren't' collected.
> Solutions that I've tried:
> Using the 1pps to drive the parallel port so that I've got a hardware 
> time hack. When I had both vi's in the same for loop things didn't go 
> well. Not really sure what happened. Separated them. Works well now 
> (except for the four or five lost data points in 40k)
> Varying the time constant. It's helped lots, but I really don't' want to 
> lose any data.
> Have tried timed loops. Works fine with one process. Try to do two (gpib 
> and serial for the gps) and it hangs the PC.
> Solution that I think would work:
> A way of firmly triggering a start event with labview. I've got a time 
> server so windoze time (or lack of it!) is not an issue. (This may be an 
> issue. Played around with it. Turning off polling made a difference.)
> I'm not really a programmer. Actually play with trains for a living. 
> Will be on vacation for the next week. Not much to do so I'll be able to 
> play lots.
> Thoughts, questions, comments and humor greatly appreciated.
> Thanks for your time,
> Norm n3ykf
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

More information about the time-nuts mailing list