transmit
Description
Examples
Configure NI™ USRP™ Radio Device and Transmit Waveform
Create a usrp
System object™, specifying a radio setup configuration previously saved in the Radio Setup wizard.
device = usrp("MyRadio");
Program the FPGA with your bitstream and configure the hardware interfaces.
programFPGA(device, "myBitstream.bit", "myDeviceTree.dts");
Loading bitstream to FPGA... Loading bitstream to FPGA is now complete.
describeFPGA(device, "ModelName_wthandoffinfo.mat");
Specify a transmit antenna on the radio and transmitLength
samples of memory allocation in the PL DDR Buffer..
transmitLength = 1000;
device.TransmitAntennas = "DB0:RF0:TX/RX0";
device.TransmitDDRAllocation = transmitLength;
Connect to the radio and apply radio front end properties.
setup(device);
Generate a random transmit waveform.
txWaveform = complex(randn(transmitLength,1),randn(transmitLength,1));
Transmit the generated waveform continuously.
transmit(device,txWaveform,"continuous");
Stop the continuous transmission after 5 seconds.
pause(5); stopTransmission(device);
Input Arguments
device
— NI USRP radio device
usrp
object
NI
USRP radio device, specified as a usrp
System object™.
waveform
— IQ waveform to transmit
complex-valued column vector | complex-valued matrix
IQ waveform to transmit, specified as one of these options.
Complex-valued column vector with even number of rows — Use this option to send an IQ waveform on a single transmit antenna.
Complex-valued matrix with even number of rows — Use this option to send IQ waveforms on multiple transmit antennas. The number of antennas specified by the
TransmitAntennas
property of thedevice
input must match the number of matrix columns.
If you specify a waveform with a single
or
double
data type, you must scale the transmit data sample values to
the range
[intmin('int16')
,intmax('int16')
].
The waveform length is limited by the TransmitDDRAllocation
of the
device
input.
Data Types: int16
| single
| double
Complex Number Support: Yes
mode
— Transmission mode
"continuous"
| "once"
Transmission mode, specified as one of these options.
"continuous"
— The function transmits the waveformwaveform
continuously to the air by repeating the data samples until you callstopTransmission(device)
."once"
— The function transmits the waveformwaveform
once in a single-shot transmission.
Data Types: string
Version History
Introduced in R2024a
See Also
Objects
Functions
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 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)