Hello Koyel,

you can do this by modifying the python script that grc generates.
there will be variable called tb in the python file, which is basically the
top block from the gnuradio

tb.start()


this line will start the flowgraph, once it is started by default the
python code will wait for some keyboard event(in case of no gui) or gui
event (in case if you are use a gui window)
Here is the default code for no gui case

>     try:
>         input('Press Enter to quit: ')
>     except EOFError:
>         pass
>     tb.stop()
>     tb.wait()



you can change this to some like below which,  making the main thread to
end after some fixed time.

    time.sleep(5)
>     tb.stop()
>     tb.wait()
>     sys.exit(0)


You can get number of seconds you want to run the flowgraph from the sample
rate of your usrp and how much total samples you need to capture
Hope this helps !

Regards,
Mohamed Yaaseen


On Tue, 4 Aug 2020 at 10:38, Koyel Das (Vehere) via USRP-users <
[email protected]> wrote:

> Hi,
>
> Can grc be made to run for a predefined fixed amount of time and number of
> samples and made to stop automatically after acquiring this many number of
> samples  from usrp? If so what parameters need to be set in usrp source
> block and others if any to serve the purpose?
>
> Regards,
> Koyel
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
> _______________________________________________
> USRP-users mailing list
> [email protected]
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to