discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Simultaneously send data and store it in file wit


From: Martin Luelf
Subject: Re: [Discuss-gnuradio] Simultaneously send data and store it in file with high sample rate
Date: Fri, 22 Mar 2013 10:07:55 +0100
User-agent: SquirrelMail/1.4.22

> Hi Martin,
>
> Can you please show me an example.. How to write connect statement?
>
> Thanks
>
>
> On Thu, Mar 21, 2013 at 6:26 PM, Martin Luelf <address@hidden> wrote:
>
>> > Hi,
>> > How to simultaneously transmit data to usrp and also store it in a
>> file.?
>> > I
>> > ran two separate flow graphs.But i want to have a sample rate of
>> 25Mhz.Is
>> > it possible to do it.
>> >
>> > I want the same thing in receiver side also(simultaneously detect the
>> > packet  and store the data)
>> >
>> > I am using USRPN210 and Ubuntu 12.04
>> >
>> > Thanks.
>>
>> Hi,
>>
>> you can connect a block's output to as many inputs as you want. So take
>> tha last block in your chain that generates your signal and connect it
>> both to a uhd sink (which will make the USRP transmitt the signal) and a
>> file sink (which will write the same samples to a file).
>>
>> Same goes for the receiver side. If you use GRC just add another
>> connection from a block's out port to another ones in port and the
>> output
>> will be send to both blocks.
>>
>> Yours
>> Martin
>>

Hi,

first of all please make sure that you reply to the list rather than to
the individual persons, or CC the list so that answers are also available
for anyone who might have a similar question in the future.

The question how to do a block connect is confusing me a bit. Maybe there
is a misunderstanding? You should already have done block connections when
setting up your flowgraphs.

Anyway what I mean is a standard connection of two GNURadio blocks, so in
GRC it might look like this (I know I am not an ASCII artist, sorry)

                 |---->(Your signal processing block)
(UHD Source)-----|
                 |---->(File Sink)

This should lead to python code like this

##################################################
# Blocks
##################################################
self.uhd_usrp_source_0 = uhd.usrp_source(...)
self.yourblock_0 = yourmodule.yourblock(...)
self.file_sink_0 = gr.file_sink(gr.sizeof_gr_complex*1, ...)
##################################################
# Connections
##################################################
self.connect((self.uhd_usrp_source_0, 0), (self.file_sink_0, 0))
self.connect((self.uhd_usrp_source_0, 0), (self.yourblock_0, 0))

Yours
Martin




reply via email to

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