[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] [USRP-users] Fwd: RE: synchronize two USRP N 210
From: |
Marcus Müller |
Subject: |
Re: [Discuss-gnuradio] [USRP-users] Fwd: RE: synchronize two USRP N 210 |
Date: |
Fri, 28 Nov 2014 13:14:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
Hi Bashar,
thanks for following up on this :)
So, the idea was to replace "set_command_time()" by "set_start_time()",
and to generally omit the clearing of command times (as you then don't
even set any):
-initialize all three USRP_sink/source objects
-set the time
-set_start_time on all three of them
-start your flowgraph.
Best regards,
Marcus
On 11/28/2014 12:44 PM, Bashar Hussain wrote:
> Dear Marcus
>
>
>
>
>
> Thanks for your reply.
>
>
>
>
>
> So here is the code now looks like:
>
>
>
>
>
> self.uhd_usrp_source_1 = uhd.usrp_source(
>
>
> device_addr="addr=192.168.1.211",
>
>
> stream_args=uhd.stream_args(
>
>
> cpu_format="fc32",
>
>
> channels=range(1),
>
>
> ),
>
>
> )
>
>
> self.uhd_usrp_source_1.set_clock_source("external", 0)
>
>
> self.uhd_usrp_source_1.set_time_source("external", 0)
>
>
> self.uhd_usrp_source_1.set_time_unknown_pps(uhd.time_spec())
>
>
> self.uhd_usrp_source_1.set_samp_rate(100e6/dec_rate)
>
>
> self.uhd_usrp_source_1.set_center_freq(freq, 0)
>
>
> self.uhd_usrp_source_1.set_gain(rx_gain, 0)
>
>
> self.uhd_usrp_source_1.set_antenna("RX2", 0)
>
>
>
>
>
>
>
>
> self.uhd_usrp_source_0 = uhd.usrp_source(
>
>
> device_addr="addr=192.168.1.221",
>
>
> stream_args=uhd.stream_args(
>
>
> cpu_format="fc32",
>
>
> channels=range(1),
>
>
> ),
>
>
> )
>
>
> self.uhd_usrp_source_0.set_clock_source("external", 0)
>
>
> self.uhd_usrp_source_0.set_time_source("external", 0)
>
>
> self.uhd_usrp_source_0.set_time_unknown_pps(uhd.time_spec())
>
>
> self.uhd_usrp_source_0.set_samp_rate(100e6/dec_rate)
>
>
> self.uhd_usrp_source_0.set_center_freq(freq, 0)
>
>
> self.uhd_usrp_source_0.set_gain(rx_gain, 0)
>
>
> self.uhd_usrp_source_0.set_antenna("RX2", 0)
>
>
>
>
>
> time.sleep(1);
>
>
>
>
>
>
>
>
> cmd_time = self.uhd_usrp_source_1.get_time_last_pps()
>
>
> cmd_time0 = self.uhd_usrp_source_0.get_time_last_pps()
>
>
>
>
>
>
>
>
> real_seconds = uhd.time_spec_t.get_real_secs(cmd_time)
>
>
> real_seconds0 = uhd.time_spec_t.get_real_secs(cmd_time0)
>
>
>
>
>
>
>
>
> future_real_seconds = real_seconds + 1
>
>
> future_real_seconds0 = real_seconds0 + 1
>
>
>
>
>
>
>
>
> future_cmd_time = uhd.time_spec_t(future_real_seconds)
>
>
> future_cmd_time0 = uhd.time_spec_t(future_real_seconds0)
>
>
>
>
>
>
>
>
> self.uhd_usrp_source_1.set_command_time(future_cmd_time)
>
>
> self.uhd_usrp_source_0.set_command_time(future_cmd_time0)
>
>
>
>
>
>
>
>
> self.uhd_usrp_source_1.set_start_time(future_cmd_time)
>
>
> self.uhd_usrp_source_0.set_start_time(future_cmd_time0)
>
>
>
>
>
> self.uhd_usrp_source_1.clear_command_time()
>
>
> self.uhd_usrp_source_0.clear_command_time()
>
>
>
>
>
>
>
>
> Or I have to delete the clear_command_time lines ?
>
>
>
>
>
> Regards ..
>
>
>
>
>
> Bashar Mufid
>
>
> Eng.Bashar Mufid
> Research & Teaching Assistant
> Al-Quds University
> Faculty Of Engineering / Department of Electronics Engineering
> Al-Quds - West Bank - Palestine
> Tel:00972-56-8585085
>
>
>> Date: Fri, 28 Nov 2014 12:42:27 +0100
>> From: address@hidden
>> To: address@hidden; address@hidden
>> Subject: Re: [USRP-users] Fwd: RE: synchronize two USRP N 210
>>
>> Hi Bashar,
>>
>> I'll reply once you send your emails to the mailing list instead of me
>> individually.
>>
>> Best regards,
>> Marcus Müller
>>
>> On 11/28/2014 12:34 PM, Bashar Hussain wrote:
>>> Dear Marcus
>>>
>>> Thanks for your reply.
>>>
>>> So here is the code now looks like:
>>>
>