discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Slow control external hardware


From: mleech
Subject: Re: [Discuss-gnuradio] Slow control external hardware
Date: Tue, 29 Jul 2014 13:29:33 -0400
User-agent: Roundcube Webmail/1.0.1

There are rather a lot of ways to choke this particular cat, writing a block is just one of them.

 

I do "control external device" things from within GRC without custom blocks, using "helper code" and a polling function at a low rate

  that drives a simple state machine.  I use this for controlling a serial device that turns calibration sources on/off.  It can get data out

  of the flow-graph if it needs to, with low-rate "probe" blocks.   Some might call this inelegant, I call it saving the headache of

  writing/maintaining custom blocks when the functionality doesn't really require real-time access to the sample stream....

 

 

 

On 2014-07-29 13:20, Martin Braun wrote:

http://gnuradio.org/doc/doxygen/page_python_blocks.html

$ git grep self.set_msg_handler **/*.py[19:20:26]
gr-blocks/python/blocks/qa_python_message_passing.py

M

On 07/29/2014 05:02 PM, Daniele Nicolodi wrote:
On 29/07/2014 16:57, Martin Braun wrote:
Daniele, there's loads of blocks that use messages, as well as manual pages for that. And I would recommend you use them for this case. Create a block that talks to the serial port, and give it a message port.
Hello Martin, thank for your answer. Can you please point me to an example of such blocks from which I can take inspiration? I would like to code it in python, therefore if a python block that uses the message passing infrastructure exists, it would be great. Meanwhile I'm going to grep through the code distribution... Thanks! Cheers, Daniele
M On 07/29/2014 02:55 PM, Daniele Nicolodi wrote:
Hello, I need to control a RF synthesizer from within a GNURadio flowchart updating some parameters on the base of some measurements obtained from processing data collected by an USRP. The synthesizer is connected through a RS232 serial port, thus is quite slow, but the bandwidth of the control is also very small, < 1Hz. One of the parameters that needs to be controlled is the output power, and it can be adjusted only in discrete steps of 0.01 dB, therefore I need to correctly take care of the discretization. What is the best strategy to do that? Should I simply implement a sink block? Would be better to implement the discretization in a sink block that then sends messages to another block that handles the communication with the synthesizer? As far as my experimentation goes, there are no blocks using messages in the standard GNURadio distribution (version 3.7.2), therefore I don't really have examples of use cases for it. Thanks. Cheers, Daniele _______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

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