# How to start and stop recording without exiting the flowgraph

**URL:** <https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066>\
**Category:** GNU Radio\
**Created:** [May 24, 2015, 6:48pm UTC](https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066 "2015-05-24T18:48:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [May 24, 2015, 6:48pm UTC](https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066/1 "2015-05-24T18:48:24Z")

</div>

Hi all,

I would like to use two filesink blocks to record signals from two  
USRP:s  
with MIMO Cable. I am interested in the phase offset of an incoming  
signal  
so I first need to calibrate and then start recording. I haven’t found  
how  
this could be done in an easy way, does anyone have any ideas?

To clarify:  
I would like to start my flowgraph then when I press a button in the GUI  
start recording and then press the button again and stop recording.

Thank you all in advance.

Regards

Carl

---

<div class="post-metadata">

**Author:** ![calvin76](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9de053/32.png) [@calvin76](https://www.ruby-forum.com/u/calvin76)\
**Post date:** [May 25, 2015, 2:15am UTC](https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066/2 "2015-05-25T02:15:19Z")

</div>

On 05/24/2015 06:46 PM, Carl O. wrote:

> start recording and then press the button again and stop recording.  
> Write a small Python block that takes a setter, then input a button  
> state through a QT selector. This block will only allow samples flowing  
> through when you input a certain state.

Cheers,  
M

---

<div class="post-metadata">

**Author:** ![calvin76](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9de053/32.png) [@calvin76](https://www.ruby-forum.com/u/calvin76)\
**Post date:** [May 26, 2015, 11:42pm UTC](https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066/3 "2015-05-26T23:42:12Z")

</div>

Thank you for the answer.  
I think I found however that the selector block and a check button is  
already doing what I needed.

Cheers,

Carl

---

<div class="post-metadata">

**Author:** ![calvin76](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9de053/32.png) [@calvin76](https://www.ruby-forum.com/u/calvin76)\
**Post date:** [May 29, 2015, 10:42pm UTC](https://www.ruby-forum.com/t/how-to-start-and-stop-recording-without-exiting-the-flowgraph/242066/4 "2015-05-29T22:42:41Z")

</div>

Hi,

I tried to follow Carl’s suggestion to record a wav file but it didn’t  
work  
for me. The first time I change the check box the wav file sink will  
stop  
working forever. File sinks works fine. Will Martin’s suggestion work  
for  
wav files or does anyone have another suggestion to record wav files  
only  
when the checkbox is enabled?  
I’ve attached my flowgraph.

Cheers,  
Murray

2015-05-26 22:40 GMT+01:00 Carl O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
