discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: GR and PPS


From: isaac mario tupac davila
Subject: Re: GR and PPS
Date: Wed, 24 Nov 2021 14:33:04 -0500

Hi Richard

Thanks for the help. I didn't know that tool was available for GR. I'm considering update to GR 3.9 as it is available for that version.

I was thinking in aggregate the method set_time_next_pps() inside the code of the UHD:USRP block and then re-make GR. I've never tried to edit the python build file before and I didn't know I could do it with hand-editing or with snippets.
I thought the py build file of my flowgraph was uneditable as it is generated by its own.

Pd: To reply on the list open the message you want to respond, in the right up corner there is an arrow. Click in the arrow and then it will be created an automatic response message. Then check if discuss-gnuradio@gnu.org is added in the contacts. If it is not added, you add it.

Thanks
Regards
Isaac T.



El mié, 24 nov 2021 a las 13:06, Richard Stanley (<richardlstanley@gmail.com>) escribió:
Hi Isaac,

I'm in the middle of 'day job' but here's a way to try to get 1PPS going in GR without hand-editing the Py build.

You can use a Python snippet if using a recent GR version (3.9 for sure, don’t know about 3.8). Create a Python snippet block using the default settings (Main - After Init), then add the following, changing the ID of your USRP (show parameters to see it in GRC) as required but mine is uhd_usrp_source_0:

<snippet>
time_last_pps = self.uhd_usrp_source_0.get_time_last_pps()
while(self.uhd_usrp_source_0.get_time_last_pps() == time_last_pps):
    time.sleep(0.01)

self.uhd_usrp_source_0.set_time_next_pps(uhd.time_spec(0.0))
time.sleep(1.0)

self.uhd_usrp_source_0.set_start_time(uhd.time_spec(1.0))
</snippet>

Apologies for replying off-list. (I really need to figure out how to reply to a message from the digest of GR mailing list.)

HTH,
Richard


reply via email to

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