LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPS Time Stamp

I’m a LabView novice and asked this question in the SignalExpress forum.

 

http://forums.ni.com/ni/board/message?board.id=380&thread.id=1548

 

I’m trying to acquire long duration data with either a GPS time stamp or GPS time synchronization to account for clock drift.  My application requires that I acquire approximately10 hours of data at a rate of 500kS/s.  The system is a PXI1000B containing 2X5922 cards and a 6682 card.

 

Is there an example VI that writes a timestamp file corresponding to each fetch from the 5922 buffer?  I’m using fetch (size) in reference to the fetch size in the niScope Stream to Disk Queues Win32 File IO VI.  I normally set fetch size to 512000 so ideally I’d like a GPS time stamp for each 512000 sample set.  This would result in a separate text file with about 36000 timestamps.  Though laborious I could account for drift post processing.

 

I would later on like to use the suggestion given in

http://zone.ni.com/devzone/cda/tut/p/id/9734

using the Trimble Thunderbolt to synchronize the GPS clock but time doesn’t allow this.

 

Thanks in advance.

 

 

0 Kudos
Message 1 of 18
(6,644 Views)

Hello annayaj,

 

Thank you for using NI forums.  Do you have NI-Sync installed on your computer?  If so, there is a VI which allows you to read the last GPS position stored.  You could use this VI right before each fetch and then log the information to a file each iteration of a while loop.  This should give you your samples, along with the last GPS timestamp all in a different file each time.

 

Regards,

0 Kudos
Message 2 of 18
(6,581 Views)

Brandon,

 

Thank you for your response.

 

Yes, I do have Ni-Sync 3.0 installed.  Currently I use the Time Stamp Trigger VI to get the start time of the acquisition.  I use: Input Terminal >> Dev1/Start Trigger, Detected Edge >> rising, and Active Edge >> rising. Dev1 is the PXI 5922.   Assuming this is the correct configuration, I'm expecting the GPS timestamp to indicate the start of acquisition on the PXI 5922.

 

Which VI are you talking about?  If it's the same VI as in the preceding paragraph, how should I configure it so that each fetch is time stamped as opposed to each sample?

 

One other question.  I want to use the TXCO clock on the PXI 6682 as my sample clock as opposed to the onboard clock on the PXI 5922.  I'm assuming there is less drift using the PXI 6682 oscillator.  Does the Route Clock VI with Source Terminal >> Oscillator and Destination Terminal >> PXI_Clk10_In enough to force the PXI 5922 to use the 10 Mhz oscillator on the PXI 6682? No other VI or changes are required?  The reason I ask is that the niScope Stream to Disk Queues Win 32 File IO VI (what I use to acquire data) has only Onboard Clock, Clock In, PXI Star, PFI 0, and PFI 1 as choices for the External Sample Clock Timebase.  Does the External Sample Clock Timebase needs to be PXI_Clk10_In?

 

Thanks again for your response. 

0 Kudos
Message 3 of 18
(6,570 Views)

Hello anayaj,

 

The VI's I'm referring to are the Enable GPS or IRIG Timestamping.vi and the Read Last GPS or IRIG Timestamp.vi.  Both VI's are from the NI-Sync driver. You should be able to call this VI before each fetch, but I'm not positive how the timestamp will be associated with it.

 

I'm not sure what VI you're talking about when you say the Route Clock VI.  What driver is this associated with?

 

Regards,

0 Kudos
Message 4 of 18
(6,556 Views)

Brandon,

 

I do not have Enable GPS Timestamping, Enable IRIG Timestamping, Read Last GPS Timestamp, or Read Last IRIG Timestamps installed.  Can these be gotten from the NI website? I searched the NI website and could not find the aforementioned VI's.

 

I'm not sure what you mean by driver but the Route Clock VI is under examples Hardware Input and Output >> Timing and Synchronization >> Signal-Based >> Route Clock.vi.

 

Thanks 

0 Kudos
Message 5 of 18
(6,548 Views)
Forgot to add that I have LabVIEW 8.6.1 and Ni-Sync 3.0 installed.  Thanks.
0 Kudos
Message 6 of 18
(6,547 Views)

Hello Annayaj,

 

Those VIs are a part of the NI-Sync driver.  Is this driver included in the functions pallette on your block diagram (I think it should be under Measurement I/O)?  I will take a look at the example and see what I can come up with.

 

Regards,

0 Kudos
Message 7 of 18
(6,518 Views)

Brandon,

 

You are correct.  The VIs exist under the programming pallete.  I'll take a look at them.

 

About my previous question about the Route Clock VI example.  Is running the example enough to discipline the 5922 sample clock to the TXCO oscillator on the 6682?  With the following options:

 

Source Terminal >> Oscillator and Destination Terminal >> PXI_Clk10_In

 

Thanks again.  Your response will be very helpful. 

0 Kudos
Message 8 of 18
(6,514 Views)

Hello annayaj,

 

I'm not too familiar with this example and will need to consult with another Applications Engineer, as well as probably try it out myself.  I will let you know what I come up with.

 

Regards,

0 Kudos
Message 9 of 18
(6,475 Views)

Hello annayaj,

 

I took a look at the Route Clock VI and yes you will be able to export the oscillator of the 6682.  I would suggest sending the oscillator to the PXI backplane and then using the niScope Clock Configuration VI to select the PXI clock as the timing source for your task.  Please let me know if you run into any problems.

 

Regards,

0 Kudos
Message 10 of 18
(6,376 Views)