Hi Marcus,

Initially when I create the USRP object, I synchronize USRP to external PPS
though self.usrp1.set_time_next_pps(round(time.time())+1) method.
and in the function get_start(), I wrote like:
  self.stop()
  self.wait()
  self.disconnect_all()
  #self.usrp1.stop()
  #self.usrp1.start()
  self.usrp1.set_start_time(self.usrp1.get_time_now() + uhd.time_spec_t(5))
  self.connect(...)
  self.connect(...)
  self.connect(filesink, self.usrp1)
  self.start
I wish the USRP stops, and restarts transmission 5 sec later every time I
run the get_start() function. But the USRP doesn't stop, and will produces
LLLLLLLLLL on the screen after around 5 sec. If I use
" self.usrp1.set_command_time(self.usrp1.get_time_now() +
uhd.time_spec_t(5))" instead of set_start_time(), it does stop transmission
for 5 sec and start, but it's not the correct command for start time.

Do you have any advice how can I make it work?
I appreciate all your help!

Best regards,
Wei

Marcus D. Leech <[email protected]> 于2021年10月5日周二 下午3:15写道:

> On 2021-10-05 4:16 a.m., Huang Wei wrote:
> > Hello group,
> >
> > I am running USRP in GRC. I would like the USRP to  stop and restart
> > transmission at specific times. so I wrote a function in the top_block
> > class like:
> > self.stop()
> > self.wait()
> > self.usrp.set_start_time(an absolute time)
> > self.start()
> > It doesn't work. Also I tried  1) add clear_commnad_time() and
> > set_command_time() before; 2) disconnect(), set_command_time() and
> > connect (); 3) usrp.stop(), usrp start(). All these methods don't make
> > sure USRP will restart at the time I want.
> > Is there any command that can achieve this purpose?
> >
> > Thank you very much!
> >
> > Best regards,
> > Wei
> >
> What times are you setting?  How are you setting the initial time on the
> device?
>
>
> _______________________________________________
> USRP-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to