USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

External Trigger from Python

Hi,

 

I have to synchronize an acquisition based on an external trigger, as it is the case, e.g., for oscilloscopes.

For my understanding, the PPS signal could be used for that purpose.

 

I found one thread where someone was asking for exactly this, however, this person was using LabView and the N200 [1].

I was downloading LabView and trying to understand the internals of the provided example, however, I could not translate the functionality to Python.

 

Could somebody point me in the right direction on how to setup an external trigger on rising edge using purely Python?

 

Thanks and best regards,
Marvin

 

[1] https://forums.ni.com/t5/USRP-Software-Radio/External-trigger-based-data-acqusition-using-USRP-N200/...

0 Kudos
Message 1 of 2
(497 Views)

Hi StarvinMarvin8,

 

Yes the PPS would be used for that. You need an appropriate 1PPS source for that. There are many different options for 1PPS source, for example the Octoclock.

 

To synchronize to an external 1PPS you can use the UHD interface. UHD is the main interface to programmatically communicate with USRPs. There is also a Python wrapper for the interface (USRP in Python | PySDR: A Guide to SDR and DSP using Python)

 

For synchronization using 1PPS read this section of the Python UHD docs: USRP in Python | PySDR: A Guide to SDR and DSP using Python

It shows you have to acquire the external PPS and issue a timed streaming command based on the 1PPS. For timed commands you should also make sure to provide an external reference so that the clocks tick at the same speed.

 

Let me know if you have further questions!

 

Best regards

Leonard

0 Kudos
Message 2 of 2
(307 Views)