[USRP-users] (no subject)

Michael West michael.west at ettus.com
Thu Oct 1 15:34:56 EDT 2015


Hi Carlos,

You should be able to accomplish that by using timed commands.  You will
most likely need a separate thread just for the tuning.  Something like:

while (wait_for_start)
    boost::this_thread::sleep(boost::posix_time::milliseconds(1);

uhd::time_spec_t t = start_time;    // start_time could be global to
coordinate with data streams
for (double freq = 1e6; freq <= 16e6; freq += 50e3)
{
    usrp->set_command_time(t);
    usrp->set_rx_freq(freq);  // or usrp->set_tx_freq(freq)
    usrp->clear_command_time();
    t += uhd::time_spec_t(0.00512);
}

Instead of starting and stopping the data streams (which will interfere
with the tuning), just zero fill (for TX) or throw away the samples (for
RX) you don't need.  By using the start times of the streams, the metadata
in the data packets, and the start time of the tuning, you should be able
to coordinate the tuning with the data without too much effort.

Hope this helps!

Regards,
Michael

On Mon, Sep 28, 2015 at 2:25 PM, Carlos Quiroga via USRP-users <
usrp-users at lists.ettus.com> wrote:

> Hello USRP-users:
>
> I am sending some complementary pulses in bpsk modulation  for a radar
> application.
> I am trying to change the frequency of modulation in the usrp N200. But
> this change have to be automatic, with a 50 kHz step each 5.12 ms.
> The frequency begin in 1Mhz and end in 16 Mhz.
>
> How can I do this automatically without any slide bar?
>
> I have a basic TX daugtherboard.
>
> Any Idea would be great and helpful.
>
> Thanks
>
> --
> Carlos F. Quiroga Ruiz
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20151001/f62215c1/attachment-0002.html>


More information about the USRP-users mailing list