# Getting time each time power squelch is on

**URL:** <https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676>\
**Category:** GNU Radio\
**Created:** [January 2, 2015, 11:47pm UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676 "2015-01-02T23:47:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 2, 2015, 11:47pm UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/1 "2015-01-02T23:47:35Z")

</div>

Hello,

I have a Python handcoded block in which I want every time that power  
squelch is triggered, grab the actual time and then use that filename  
to write a wav file with a decoded stream.

What would be a good approach? I tried using variables but I see they  
don’t update at runtime and I am not sure if you are able to change  
the wav sink name on runtime and just expect it to work or if it  
neccesary to do something else there.

Thanks.

---

<div class="post-metadata">

**Author:** ![luis21\_futur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/87869e/32.png) [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Post date:** [January 3, 2015, 12:13am UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/2 "2015-01-03T00:13:36Z")

</div>

Hi Luis,

I am pretty certain there is a block in mainline GR to do this with  
tagging. Burst tagger maybe? The tags define the burst boundaries and  
a  
timestamp is recorded as well.

---

<div class="post-metadata">

**Author:** ![luis21\_futur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/87869e/32.png) [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Post date:** [January 3, 2015, 8:40pm UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/3 "2015-01-03T20:40:52Z")

</div>

Hi Dan,

Thanks for the response, but it seems like burst tagger would not work  
in this case because I am working with audio. What I want is when  
power squelch is triggered demod a NFM signal and then save it to a  
wav file with the time power squelch was triggered.

Thanks

2015-01-02 16:12 GMT-07:00 Dan CaJacob [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![luis21\_futur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/87869e/32.png) [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Post date:** [January 4, 2015, 12:44pm UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/4 "2015-01-04T12:44:53Z")

</div>

On Sat, Jan 3, 2015 at 8:39 PM, Luis C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi Dan,
> 
> Thanks for the response, but it seems like burst tagger would not work  
> in this case because I am working with audio. What I want is when  
> power squelch is triggered demod a NFM signal and then save it to a  
> wav file with the time power squelch was triggered.

You can try keeping power squelch’s gate to false (so that you will get  
zero samples) and then use it as a trigger for “burst\_tagger” after  
doing  
some math manipulations. This along with a “tagged\_file\_sink” should  
work.

Please look into “gnuradio/examples/tags” for examples.

Sreeraj

---

<div class="post-metadata">

**Author:** ![luis21\_futur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/87869e/32.png) [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Post date:** [January 5, 2015, 12:04am UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/5 "2015-01-05T00:04:48Z")

</div>

Hello sreeraj,

I am checking those examples, thanks. Can you elaborate with what you  
mean with math manipulations?? Even if I am using tagged\_file\_sink can  
I interpret what is generated as if they were audio wav files?

Thank you.

2015-01-04 4:43 GMT-07:00 sreeraj r [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![luis21\_futur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/87869e/32.png) [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Post date:** [January 5, 2015, 2:29am UTC](https://www.ruby-forum.com/t/getting-time-each-time-power-squelch-is-on/233676/6 "2015-01-05T02:29:57Z")

</div>

Hi, sreeraj,

I figured out what you meant by the math manipulations. Thanks

I based on the example of the uhd energy detector.py for modifying the  
output of the power squelch to use it as a trigger on burst tagger.

I see that if I put on audacity 32bit float it’s going to interpret  
the file created by the tagged file sink right.

Thanks all of you 🙂

2015-01-04 16:03 GMT-07:00 Luis C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
