discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Pyt


From: Yan Nie
Subject: Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Python
Date: Fri, 25 Nov 2011 17:51:54 -0500

I really appreciate your reply, Josh.

I am using a GPS as the input for PPS of my receiver based on USRP N200 in 
order to synchronize with a transmitter which uses GPS pulse to synchronize 
with other devices. This transmitter detects the NEG edge of GPS pulse, then 
2ms later, starts to transmit signal for 1ms,then it suspends for the remainder 
of this second. When next GPS pulse coming at the beginning of next second, 
this transmitter repeats the transmission process again for every second.

Therefore, this PPS signal is used as a synchronization signal in my receiver 
to synchronously receive the signal sent by this transmitter needed to 
collaborate with. The PPS signal need to trigger the signal reception every 
second, as the precision of the clock of USRP and GPS cannot be exactly the 
same. If only use PPS to trigger the latching of the time registers the first 
second of signal reception, eventually, the receiver and transmitter cannot be 
precisely synchronized. 

To sychronize the receiver with this transmitter, I need use the PPS triger the 
signal reception every second. I am so interested in your uhd_work branch the 
set_start_time feature of gr_uhd_usrp_source block would be a good solution for 
triggering data reception. I have some further questions on set_sart_time:

1. The version of my UHD does not include this feature into gr_uhd_usrp_source 
block, how can I add it into UHD after compiling the modified source code?

2. As for the PPS triggering problem,how can I implement PPS triggering the 
latching of the time registers with different timestamps?

Thank you so much for your help, Josh! Your reply did help me to find the 
solution to my current problems.

Have a great weekend!

with thanks,
Yan

On 11/23/11, Josh Blum  <address@hidden> wrote:
> 
> When you say PPS, do you mean "pulse per second" or are you trying to
> use the PPS input as a generic triggering system? If the second case,
> you can do this, but my advice will be different.
> 
> > 1. I am wondering how to fill meta-data in Python if device.recv() is
> > not swigged? I need to use the PPS signal to trigger the received
> > data storage for 1ms every second after detecting the edge of PPS
> 
> It seems like you do not need the PPS to trigger anything. Your
> downstream block can use the timestamp tag and sample count to determine
> which samples should be stored.
> 
> > signal every second. I am using the follow setting method to detect
> > the PPS signal:
> > 
> > self.clk_cfg = uhd.clock_config() self.clk_cfg.pps_source =
> > uhd.clock_config.PPS_SMA self.clk_cfg.pps_polarity =
> > uhd.clock_config.PPS_NEG self._usrp2.set_clock_config(self.clk_cfg,
> > uhd.ALL_MBOARDS) 
> > self._usrp2.set_time_unknown_pps(uhd.time_spec(0.0))
> > 
> 
> That will work
> 
> > 2. This PPS setting is done just after the usrp device is created.
> > The PPS signal could be detected while usrp device is setup. I am
> > also wondering if this approach could make usrp detect PPS signal
> > every second or only once when the usrp device is setup?
> > 
> 
> You need to understand that the PPS is only used to trigger the latching
> of the time registers. Once you set the time registers, thats it, your
> are done. You know what time the next pps will occur because it is one
> second plus the time you set.
> 
> -Josh
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]