Hi Ron, Thank you! Managed to get it working. By any chance, you know how to change the "delay" using python over time? I tried to use QT Entry GUI shown in the guided tutorial, instead of if else function I tried doing for loop
def set_delay_amt(self, delay_amt): c = 0 for a in range(0,5000): for b in range(0,6000): if b == 5999: c = c + 1 t = c*0.001 delay_amt = int(0.04*((3500*(t-2.5))**2 + 227322562.9)**(1/2.0) self.delay_amt = delay_amt Qt.QMetaObject.invokeMethod(self._delay_amt_line_edit, "setText", Qt.Q_ARG("QString", str(self.delay_amt))) Self.blocks_delay_0.set_dly(self.delay_amt) I've tested the code for the one listed below and tested it out using python shell, got the values I want. c = 0 for a in range(0,5000): for b in range(0,6000): if b == 5999: c = c + 1 t = c*0.001 delay_amt = int(0.04*((3500*(t-2.5))**2 + 227322562.9)**(1/2.0) Just that I not sure where to place it in the generated file. Thank you! From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+yjinkuan=dso.org...@gnu.org] On Behalf Of Ron Economos Sent: Thursday, 31 May 2018 11:16 AM To: discuss-gnuradio@gnu.org Subject: Re: [Discuss-gnuradio] Variable in Delay block You should also change the Trigger Mode in the QT Time sink to Normal. Ron On 05/30/2018 08:05 PM, Ron Economos wrote: It's just a scaling issue. One sample of delay at 32 ksps is much longer in time than one sample of delay at 10 Msps. Try the following changes. 1) Change the number of points in the QT GUI Time sink to 32768. 2) In the QT GUI range block, change the Stop value to 10000 and the Step value to 100. Ron On 05/30/2018 07:39 PM, Yeo Jin Kuang Alvin (IA) wrote: Hi Ron, Thanks! It works for me too, but when I increase the samp_rate to 10e6, can't see the delay. From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+yjinkuan=dso.org...@gnu.org] On Behalf Of Ron Economos Sent: Monday, 28 May 2018 6:08 PM To: discuss-gnuradio@gnu.org<mailto:discuss-gnuradio@gnu.org> Subject: Re: [Discuss-gnuradio] Variable in Delay block It works here. Here's a small flow graph that I tested the delay block operation with. http://www.w6rz.net/delay.grc Ron On 05/28/2018 02:33 AM, Yeo Jin Kuang Alvin (IA) wrote: Hi Ron, That means the Delay block is able to change as well, but why do I not see the delay when simulating on the time sink? Thanks in advanced! From: Discuss-gnuradio [mailto:discuss-gnuradio-bounces+yjinkuan=dso.org...@gnu.org] On Behalf Of Ron Economos Sent: Monday, 28 May 2018 5:26 PM To: discuss-gnuradio@gnu.org<mailto:discuss-gnuradio@gnu.org> Subject: Re: [Discuss-gnuradio] Variable in Delay block If a block variable can be changed during run time, it will be underlined in the properties dialog. For example, in the Multiply Const block, the variable "Constant" can be changed. [block] Ron On 05/28/2018 01:46 AM, Yeo Jin Kuang Alvin (IA) wrote: Hi all, Is it possible for me to create a QT GUI Range and put the ID in the Delay of the delay block? I tried and the graph doesn't change.
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio