USRP Codegen error : Nontunable property 'ChannelMapping' may only be assigned once.
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
XIANGLONG WANG
el 14 de Sept. de 2023
Comentada: XIANGLONG WANG
el 19 de Sept. de 2023
Hi all,
I am trying to use code generation to accelerate my usrp fucntion. However, when I set ChannelMaping to '[1 2]' to receive data from both antennas on B210, the error 'Nontunable property 'ChannelMapping' may only be assigned once' popped up. How can I solve this?
2 comentarios
Matan Silver
el 14 de Sept. de 2023
Hi Xianglong,
To best answer your question, it would be helpful to have some example code or reproduction steps. Could you show a minimal example of how you are using Support Package for USRP to get this error? For example, are you generating code from MATLAB, or are you generating code for a model using the USRP Simulink blocks?
In the mean time, there is some information I can give you based on the context of your question which may be helpful.
For the SDRuTransmitter and SDRuReceiver System Objects, ChannelMapping is a Nontunable property. Nontunable properties have restrictions on when they can be modified. See this doc page for more info on that:
Does that help narrow down if you are modifying ChannelMapping in a place that is disallowed?
Please let me know if you can reply with reproduction steps--I might be able to get you a more helpful answer.
Matan
Respuesta aceptada
Karunya Choppara
el 19 de Sept. de 2023
Here the property 'ChannelMapping' of system object comm.SDRuReceiver is a non tunable property, and cannot be changed in between the simulation.
The error is seen as the ChannelMapping is assumed as 1, while setting the other parameters. The error happens as it tries to tune the ChannelMapping to [1 2] later.
Set the Channel Mapping to [1 2] after specifying the radio address, as below
rxRadio = comm.SDRuReceiver(...
'Platform', 'B210', ...
'SerialNum', prmUSRP.Address, ...
'ChannelMapping', [1 2], ...
'MasterClockRate', prmUSRP.MasterClockRate, ...
'CenterFrequency', prmUSRP.USRPCenterFrequency, ...
'Gain', prmUSRP.USRPGain, ...
'DecimationFactor', prmUSRP.USRPDecimationFactor, ...
'SamplesPerFrame', prmUSRP.USRPFrameLength, ...
'OutputDataType', 'double');
Más respuestas (0)
Ver también
Categorías
Más información sobre RF Blockset Models for Transceivers en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!