getRadioTime
Add-On Required: This feature requires the Communications Toolbox Support Package for USRP Radio add-on.
Syntax
Description
Examples
Get USRP Radio Time
Create an SDRu receiver System object. Set the pulse per second (PPS) signal source to be the PPS signal from a GPSDO.
rx = comm.SDRuReceiver(Platform="B210",SerialNum='3136D5F',... PPSSource="GPSDO",ClockSource="GPSDO",... EnforceGPSTimeSync=true,SamplesPerFrame=20000);
Get the current USRP radio time.
GPSLockStatus = 0; while ~GPSLockStatus disp("Trying to lock to GPS constellation ..."); GPSLockStatus = gpsLockedStatus(rx); end
Trying to lock to GPS constellation ...
linux; GNU C++ version 10.3.0; Boost_107800; UHD_4.2.0.0-vendor ---------- see libuhd version information above this line ----------
disp("GPS Locked");
GPS Locked
rx_data = rx();
USRP time synchronized to GPS time
radTime = getRadioTime(rx); d = datetime(radTime,'ConvertFrom','posixtime','Format','MM/dd/uuuu HH:mm:ss','TimeZone','Asia/Calcutta'); fprintf('The current USRP radio time is %s',d)
The current USRP radio time is 07/27/2023 16:29:31
release(rx);
Input Arguments
radio
— USRP radio
comm.SDRuTransmitter
System object | comm.SDRuReceiver
System object
USRP radio, specified as a comm.SDRuTransmitter
or comm.SDRuReceiver
System object. This radio must be connected
to the host computer.
Version History
Introduced in R2023bR2024a: Support for N3xx and X3xx series radio devices moved to Wireless Testbench
Support for NI™ USRP N3xx and X3xx series radio devices has moved from Communications Toolbox™ Support Package for USRP Radio to Wireless Testbench™ Support Package for NI USRP Radios.
To configure these radios for use with Wireless Testbench, see Install Support Package for NI USRP Radios (Wireless Testbench).
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)