Discussion and technical support related to USRP, UHD, RFNoC
View all threadsHi all
I have a question that was probably already answered, but I searched the mailling list and knowledge base up and down and only found pieces to the answer of my question.
Here's my setup (UHD 3.9.3 and GNU Radio 3.7.9.2):
I have two USRP X310 with SBX daughter boards. Both are connected to the OctoClockG for PPS and 10MHz references. I use a single USRP source block in GNU Radio, which I configured to include the 2 X310s, so I get 4 Rx channels. All 4 channels start sampling at the same time (PPS is sync is working), but the phases between the channels are not aligned (input signal is a sine from a signal generator).
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that. My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio? I know that I could implement a phase adjustment by software with a calibration "tone". But I'd rather use the LO feature of the SBX boards before I invest time in learning how to write my own OOT modules for GNU Radio to do that.
I'm sorry if this topic has been covered/discussed and answered before. I only found solutions that covered development with the UHD API directly, without GNU Radio.
Thank you very much in advance!
Best regards,
Jonas
On 05/30/2016 12:21 PM, Schild Jonas via USRP-users wrote:
Hi all
I have a question that was probably already answered, but I searched the mailling list and knowledge base up and down and only found pieces to the answer of my question.
Here's my setup (UHD 3.9.3 and GNU Radio 3.7.9.2):
I have two USRP X310 with SBX daughter boards. Both are connected to the OctoClockG for PPS and 10MHz references. I use a single USRP source block in GNU Radio, which I configured to include the 2 X310s, so I get 4 Rx channels. All 4 channels start sampling at the same time (PPS is sync is working), but the phases between the channels are not aligned (input signal is a sine from a signal generator).
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that. My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio? I know that I could implement a phase adjustment by software with a calibration "tone". But I'd rather use the LO feature of the SBX boards before I invest time in learning how to write my own OOT modules for GNU Radio to do that.
I'm sorry if this topic has been covered/discussed and answered before. I only found solutions that covered development with the UHD API directly, without GNU Radio.
Thank you very much in advance!
Best regards,
Jonas
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
If by "Gnu Radio" you mean GRC, then there's no direct way to implement
timed commands from GRC.
HOWEVER, you can edit the generated Python code, and wrap
set_command_time() / clear_command_time() around your tuning calls.
Hi Jonas,
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that.
Exactly [1]!
My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio?
Two ways:
The first way is pretty simple: you use python (or C++, but I'm assuming
you're using Python to build your flowgraphs) to call
usrp_source/_sink.set_command_time(uhd.time_spec(…)), the
set_rx/tx_frequency, then clear_command_time. The problem with this is
you'd have to modify a python file (which, if you use GRC, would be
overwritten the next time you generate the python file), it's pretty
hard to do this in sync with e.g. information gotten from the received
samples etc.
The GNU Radio USRP blocks have message passing interfaces. These take
specially formatted messages containing commands [3]. You can, for
example, use the message strobe or a self-written block to send such
messages.
Best regards,
Marcus
[1] http://files.ettus.com/manual/page_sync.html#sync_phase_lo
[2]
http://gnuradio.org/doc/doxygen/classgr_1_1uhd_1_1usrp__block.html#ae5876b4e9350ea4bfbc16fedfcb65741
[3] http://gnuradio.org/doc/doxygen/page_uhd.html
On 30.05.2016 18:21, Schild Jonas via USRP-users wrote:
Hi all
I have a question that was probably already answered, but I searched the mailling list and knowledge base up and down and only found pieces to the answer of my question.
Here's my setup (UHD 3.9.3 and GNU Radio 3.7.9.2):
I have two USRP X310 with SBX daughter boards. Both are connected to the OctoClockG for PPS and 10MHz references. I use a single USRP source block in GNU Radio, which I configured to include the 2 X310s, so I get 4 Rx channels. All 4 channels start sampling at the same time (PPS is sync is working), but the phases between the channels are not aligned (input signal is a sine from a signal generator).
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that. My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio? I know that I could implement a phase adjustment by software with a calibration "tone". But I'd rather use the LO feature of the SBX boards before I invest time in learning how to write my own OOT modules for GNU Radio to do that.
I'm sorry if this topic has been covered/discussed and answered before. I only found solutions that covered development with the UHD API directly, without GNU Radio.
Thank you very much in advance!
Best regards,
Jonas
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
Hi!
Thanks for the suggestions.
I read a couple of times that one can just use the set_command_time and clear_command_time and just wrap it around the tuning calls. But I'm not quite sure on how to do that. Could you give me an example? I posted the code snippet of my top_block.py of which I assume I have to modify.
def set_fc(self, fc):
self.fc = fc
self.blocks_message_strobe_0.set_msg(uhd.tune_request(self.fc,0))
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 0)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 1)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 2)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 3)
I saw that one can use the message strobe block of GRC to send timed commands. How would I have to format that message? And, am I correct in the assumption that if I set the period to 0, the message is only sent once?
Your help is much appreciated!
BTW: I love the new knowledge base! Especially the Application Notes.
Best wishes,
Jonas
Berner Fachhochschule
Institut für Risiko- und Extremwertanalyse
Jonas Schild
El. Ing. BSc BFH
Jlcoweg 1, CH-3400 Burgdorf
Telefon direkt +41 34 426 69 24
jonas.schild@bfh.ch
irex.ti.bfh.ch
-----Original Message-----
From: USRP-users [mailto:usrp-users-bounces@lists.ettus.com] On Behalf Of Marcus D. Leech via USRP-users
Sent: Montag, 30. Mai 2016 18:29
To: usrp-users@lists.ettus.com
Subject: Re: [USRP-users] SBX phase alignment in GNU Radio with timed commands
On 05/30/2016 12:21 PM, Schild Jonas via USRP-users wrote:
Hi all
I have a question that was probably already answered, but I searched the mailling list and knowledge base up and down and only found pieces to the answer of my question.
Here's my setup (UHD 3.9.3 and GNU Radio 3.7.9.2):
I have two USRP X310 with SBX daughter boards. Both are connected to the OctoClockG for PPS and 10MHz references. I use a single USRP source block in GNU Radio, which I configured to include the 2 X310s, so I get 4 Rx channels. All 4 channels start sampling at the same time (PPS is sync is working), but the phases between the channels are not aligned (input signal is a sine from a signal generator).
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that. My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio? I know that I could implement a phase adjustment by software with a calibration "tone". But I'd rather use the LO feature of the SBX boards before I invest time in learning how to write my own OOT modules for GNU Radio to do that.
I'm sorry if this topic has been covered/discussed and answered before. I only found solutions that covered development with the UHD API directly, without GNU Radio.
Thank you very much in advance!
Best regards,
Jonas
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
If by "Gnu Radio" you mean GRC, then there's no direct way to implement timed commands from GRC.
HOWEVER, you can edit the generated Python code, and wrap
set_command_time() / clear_command_time() around your tuning calls.
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
You might want to refer to:
http://gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax
Also, general questions about Gnu Radio block behavior should be
directed to the discuss-gnuradio mailing list.
On 2016-06-02 05:23, Schild Jonas via USRP-users wrote:
Hi!
Thanks for the suggestions.
I read a couple of times that one can just use the set_command_time and clear_command_time and just wrap it around the tuning calls. But I'm not quite sure on how to do that. Could you give me an example? I posted the code snippet of my top_block.py of which I assume I have to modify.
def set_fc(self, fc):
self.fc = fc
self.blocks_message_strobe_0.set_msg(uhd.tune_request(self.fc,0))
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 0)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 1)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 2)
self.uhd_usrp_source_0.set_center_freq(uhd.tune_request(self.fc,0), 3)
I saw that one can use the message strobe block of GRC to send timed commands. How would I have to format that message? And, am I correct in the assumption that if I set the period to 0, the message is only sent once?
Your help is much appreciated!
BTW: I love the new knowledge base! Especially the Application Notes.
Best wishes,
Jonas
Berner Fachhochschule
Institut für Risiko- und Extremwertanalyse
Jonas Schild
El. Ing. BSc BFH
Jlcoweg 1, CH-3400 Burgdorf
Telefon direkt +41 34 426 69 24
jonas.schild@bfh.ch
irex.ti.bfh.ch
-----Original Message-----
From: USRP-users [mailto:usrp-users-bounces@lists.ettus.com] On Behalf Of Marcus D. Leech via USRP-users
Sent: Montag, 30. Mai 2016 18:29
To: usrp-users@lists.ettus.com
Subject: Re: [USRP-users] SBX phase alignment in GNU Radio with timed commands
On 05/30/2016 12:21 PM, Schild Jonas via USRP-users wrote:
Hi all
I have a question that was probably already answered, but I searched the mailling list and knowledge base up and down and only found pieces to the answer of my question.
Here's my setup (UHD 3.9.3 and GNU Radio 3.7.9.2):
I have two USRP X310 with SBX daughter boards. Both are connected to the OctoClockG for PPS and 10MHz references. I use a single USRP source block in GNU Radio, which I configured to include the 2 X310s, so I get 4 Rx channels. All 4 channels start sampling at the same time (PPS is sync is working), but the phases between the channels are not aligned (input signal is a sine from a signal generator).
I read that the LOs on the SBX have the feature to be set to a known phase after tuning. But one needs to use timed commands for that. My question is: can I accomplish auto phase alignment with GNU Radio or is there a way to use timed commands from within GNU Radio? I know that I could implement a phase adjustment by software with a calibration "tone". But I'd rather use the LO feature of the SBX boards before I invest time in learning how to write my own OOT modules for GNU Radio to do that.
I'm sorry if this topic has been covered/discussed and answered before. I only found solutions that covered development with the UHD API directly, without GNU Radio.
Thank you very much in advance!
Best regards,
Jonas
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
If by "Gnu Radio" you mean GRC, then there's no direct way to implement timed commands from GRC.
HOWEVER, you can edit the generated Python code, and wrap
set_command_time() / clear_command_time() around your tuning calls.
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com