# Change value of variable in GRC when a message is received

**URL:** <https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997>\
**Category:** GNU Radio\
**Created:** [May 8, 2014, 7:09pm UTC](https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997 "2014-05-08T19:09:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 8, 2014, 7:09pm UTC](https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997/1 "2014-05-08T19:09:13Z")

</div>

Is there a simple way for a GRC block to asynchronously  
change the value of a GRC variable when  
the block receives a specific message?

thanks  
Achilleas

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [May 8, 2014, 7:30pm UTC](https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997/2 "2014-05-08T19:30:45Z")

</div>

I’m not sure it’s what you want, but the RPC Server block lets you  
change  
the value of any GR variable in a running FG remotely. There also seems  
to  
be some work ongoing t bring zeromq endpoints into GR.

Very Respectfully,

Dan CaJacob

On Thu, May 8, 2014 at 1:07 PM, Achilleas A.

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [May 8, 2014, 7:46pm UTC](https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997/3 "2014-05-08T19:46:44Z")

</div>

Dan,

when I said “messages” I meant “gnuradio messages”  
([http://gnuradio.org/doc/doxygen/page\_msg\_passing.html](http://gnuradio.org/doc/doxygen/page_msg_passing.html))

So my problem is not with any “remote messaging” issue.  
Apologies for not making this more clear.

best  
Achilleas

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [May 11, 2014, 4:17pm UTC](https://www.ruby-forum.com/t/change-value-of-variable-in-grc-when-a-message-is-received/240997/4 "2014-05-11T16:17:41Z")

</div>

On Thu, May 8, 2014 at 1:45 PM, Achilleas A.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> 

Achilleas,  
You mean you want to change the value of a GRC “Variable” (as in an  
actual  
[Variable]: Variable block on the canvas)? If so, no, we have nothing  
architected to enable that. I suppose you could try to hack together  
something using the Function Probe block.

Tom
